Return Oriented Programming (PicoCTF 2022 #48 'ropfu')

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ส.ค. 2024
  • Help the channel grow with a Like, Comment, & Subscribe!
    ❤️ Support ➡ j-h.io/patreon ↔ j-h.io/paypal ↔ j-h.io/buymeac...
    Check out the affiliates below for more free or discounted learning!
    🖥️ Zero-Point Security ➡ Certified Red Team Operator j-h.io/crto
    💻Zero-Point Security ➡ C2 Development with C# j-h.io/c2dev
    👨🏻‍💻7aSecurity ➡ Hacking Courses & Pentesting j-h.io/7asecurity
    📗Humble Bundle ➡ j-h.io/humbleb...
    🐶Snyk ➡ j-h.io/snyk
    🌎Follow me! ➡ j-h.io/discord ↔ j-h.io/twitter ↔ j-h.io/linkedin ↔ j-h.io/instagram ↔ j-h.io/tiktok
    📧Contact me! (I may be very slow to respond or completely unable to)
    🤝Sponsorship Inquiries ➡ j-h.io/sponsor...
    🚩 CTF Hosting Requests ➡ j-h.io/ctf
    🎤 Speaking Requests ➡ j-h.io/speaking
    💥 Malware Submission ➡ j-h.io/malware
    ❓ Everything Else ➡ j-h.io/etc

ความคิดเห็น • 61

  • @aminel2a
    @aminel2a 2 ปีที่แล้ว +3

    28:25 I'm just like* why not sh(), but I was too hasty, great work john💖

  • @FurikuriYugi
    @FurikuriYugi 2 ปีที่แล้ว +5

    Awesome as always my friend.

  • @sikkavilla3996
    @sikkavilla3996 2 ปีที่แล้ว +4

    hey john, have you tried using the command cyclic to find the padding size for your buffer? I would recommend that if you need to find the length quicker for easier calculations. Overall a great video, and keep up the good work!

  • @chriskaprys
    @chriskaprys 4 หลายเดือนก่อน

    12:07 For those starting out in gdb, as I am: I believe what he was looking for there was x/500b (or x/500xb).
    It was already printing in xw (hex, word) mode, so x/500 (i.e. x/500xw) gave the *hex* of the 500 *words* at that address.
    b = byte
    h = half-byte (2 bytes)
    w = word (4 bytes)
    g = giant word (8 bytes)
    👍
    13:18 or, as Scooby would say, the "ROPportunities" 😜

  • @jaroslavhromatka3257
    @jaroslavhromatka3257 2 ปีที่แล้ว +27

    Hi, I enjoy your content but lately you've been having issues with audio. Please, can you normalize audio before you upload the video? For example, this video sound levels are so low that in order to listen to it I had to put volume to 100% and put even +12dB gain on my external mixer... when youtube played an ad in the middle of the video, it almost made me deaf... :-( just FYI: for example I listen to movies on Netflix or videos on other TH-cam channels on 25-40% volume (usually no more than 50%)...

    • @aminel2a
      @aminel2a 2 ปีที่แล้ว

      best comment 👌

    • @davidyoder5890
      @davidyoder5890 2 ปีที่แล้ว

      💯

    • @davidbellecy1709
      @davidbellecy1709 2 ปีที่แล้ว

      I have to connect my phone to a USB speaker and put both at 100%.

    • @Joel-gf4zl
      @Joel-gf4zl 2 ปีที่แล้ว

      I'm on my phone and hear it fine at 45% volume while in the same room as a loud TV. It is a little lower, but not that low. For me anyway.

  • @AlmostEpic89
    @AlmostEpic89 2 ปีที่แล้ว +3

    In early today, was awesome seeing you at the Ninja one summit!

  • @moosematrix
    @moosematrix ปีที่แล้ว

    Currently on my binary exploitation journey and this was engaging!! Thank you John

  • @KFLawless1412
    @KFLawless1412 ปีที่แล้ว +1

    Thank you for the awesome and educational video, John. I have a question that you or maybe someone else could answer (and I'll post it elsewhere too)
    Considering the stack was exectuable, could you not have done the following instead of using ROP?
    1. Load the shellcode for "cat flag.txt" in your initial input instead of the 500 'C' bytes
    2. For your injected return address after the buffer of 'A' bytes, simply put the address (in the stack) of the shellcode you just injected
    Maybe I'm missing something, but assuming that ASLR isn't enabled since you were able to discern the address of the jump instruction, you could know the address in memory of the stack location you pushed your initial input to in the first place.
    Maybe I'm not making any sense, but thank you again.

  • @timothysnyders1426
    @timothysnyders1426 2 ปีที่แล้ว

    JOHN!!!!!!
    I don't really understand what you did.. but you talking us through this challenge is inspiring.. This must be what my employers think when I'm explaining things to them haha..
    Love you man!! Keep doing this because I'm going to be here to watch and listen...
    Maybe stay away from binary bruv :)

  • @secinject814
    @secinject814 2 ปีที่แล้ว +1

    Hey Hey My. Hammond! Excuse any typos as I am barely awake right now. But I just wanted to ask if you knew any good reverse engineering/binary exploitation books/e-books out there. Or the best youtubers that showcase, explain, and demonstrate how binary exploit/reverse exploit works. As I have focused far more on web exploit like XSS, SSRF, LFI etc...
    Thanks again as always for all the educational content and hope you continue being an inspiration!! Thanks!!

  • @j3r3miasmg
    @j3r3miasmg 2 ปีที่แล้ว +3

    I don't get it why the stack canary is not accusing *** stack smashing detected *** when you overflow the buffer, canary and the return address. Did I miss something?

    • @sepp104
      @sepp104 2 ปีที่แล้ว +1

      The stack canary is not present in the vuln-function. it is only present in some library-functions.

    • @j3r3miasmg
      @j3r3miasmg 2 ปีที่แล้ว

      @@sepp104 I only know it's not present because his exploit worked (I didn't looked into the binary). But if you look at 02:20, it clearly says "Canary found". Something is misleading me.

    • @christiansanchez4883
      @christiansanchez4883 10 หลายเดือนก่อน

      @@j3r3miasmg yeah there are specific things that 'checksec' looks for when it's looking for a canary, and it found a canary "somewhere" in the file, but luckily for us, not in the vuln() function. Or for any function that would naturally be called for that matter. So there essentially is no Canary. Try using ghidra to disassemble and you'll see what i mean

    • @j3r3miasmg
      @j3r3miasmg 10 หลายเดือนก่อน

      @@christiansanchez4883 Thanks for your answer. A little bit misleading this if there is no canary in the function, but checksec did his best for us... ^^

  • @fhajji
    @fhajji 5 หลายเดือนก่อน

    This was really interesting!

  • @getellied
    @getellied 2 ปีที่แล้ว +1

    Okay, this one was really freaking cool

  • @themightiestofbooshes9443
    @themightiestofbooshes9443 2 ปีที่แล้ว +2

    There he is!

  • @v01d_r34l1ty
    @v01d_r34l1ty 2 ปีที่แล้ว

    NICE!~ANOTHER VIDEO LETS GO JOHN!

  • @hugos6717
    @hugos6717 19 วันที่ผ่านมา +1

    omg this is fuckin cool, i love it

  • @lethanhat361
    @lethanhat361 2 ปีที่แล้ว +3

    What is 16 bytes of nop for ? At first, I didn't use any nop instructions before the shell code and it failed. After that i tried adding 2 bytes of nop and it worked miraculously. Does it have anything to do with stack alignment ?

    • @weirdstuffsforyou
      @weirdstuffsforyou 2 ปีที่แล้ว

      That depends. processor can jump to any point. Just for safer side we can use long NOPs so that our shell code will not get effected by it.

  • @Dr.DomAPI
    @Dr.DomAPI 2 ปีที่แล้ว +5

    Make video on cryptography 😍

  • @SESUAV
    @SESUAV 2 ปีที่แล้ว +1

    Pardon my noob question but I would like to know if this exploit will work if we replace the "A" with a NOP sled.. It would automatically enter the buffer then. Would it not? We wouldn't need the short jump then

  • @learn-with-noob-007
    @learn-with-noob-007 2 ปีที่แล้ว +2

    Sir i am getting problems in Forensics last one left in 300 pts and one 400 pts

  • @zer001
    @zer001 2 ปีที่แล้ว

    Cool, now i know that there is a Bird in my (HayStack). Nice. :)

  • @BryanChance
    @BryanChance 2 ปีที่แล้ว

    Hmmmmm..i have no idea what's going on but it looks very interesting! And who are you talking to? LOL

  • @ani-zxk
    @ani-zxk 7 หลายเดือนก่อน

    i dont understand, why do the most interesting videos you post have get the least amount of views!

  • @sireynolds7334
    @sireynolds7334 2 ปีที่แล้ว

    Your Rop-Fu is strong.

  • @user-ql6rp7dr9m
    @user-ql6rp7dr9m ปีที่แล้ว

    This video is just great ! How do you write a python script to solve this challenge ?

  • @Dr.DomAPI
    @Dr.DomAPI 2 ปีที่แล้ว +2

    Hi

  • @ani-zxk
    @ani-zxk 6 หลายเดือนก่อน

    how did you automatically know to jmp 10
    bytes forward?

  • @franciscolucarini8761
    @franciscolucarini8761 2 ปีที่แล้ว +1

    When the Solfire challenge?

  • @vanievors2476
    @vanievors2476 ปีที่แล้ว

    How did you overwrite the EIP pointer if the executable is Canary-Protected??

    • @christiansanchez4883
      @christiansanchez4883 10 หลายเดือนก่อน +1

      The function we are using "vuln()" is not canary protected. A different function in the file is.

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 ปีที่แล้ว

    Ret vlu
    Designer explain powerful

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 ปีที่แล้ว

    Wos1,2,3?

  • @Johnstuart2023
    @Johnstuart2023 2 ปีที่แล้ว

    hey, can you tell me what does the short jump do and why do we need it in this case ?

    • @weirdstuffsforyou
      @weirdstuffsforyou 2 ปีที่แล้ว

      It's used for jumping from new_eip to NOPs as payload will get back to eax from short_jump so that we can add return address to stack for execution

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 ปีที่แล้ว

    John lon please

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 ปีที่แล้ว

    Atti. Time files?

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 ปีที่แล้ว

    Binck mins root madal Bank "credit card"filles ?

  • @fjr2go
    @fjr2go 2 ปีที่แล้ว

    interesting!

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 ปีที่แล้ว

    Please assembly code file's

  • @guilherme5094
    @guilherme5094 2 ปีที่แล้ว

    👍

  • @rsvv6828
    @rsvv6828 2 ปีที่แล้ว

    Why he took \xeb\x08

    • @weirdstuffsforyou
      @weirdstuffsforyou 2 ปีที่แล้ว +1

      It's for a short jump. Short jump can be used like EB 0 to EB 7F. He used eb 08 which jumped to the next address as mentioned and written as \xeb\x08.

    • @rsvv6828
      @rsvv6828 2 ปีที่แล้ว +1

      @@weirdstuffsforyou Thanks for your answer

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 ปีที่แล้ว

    Str

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 ปีที่แล้ว

    Dword ptr this fu ?

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 ปีที่แล้ว

    Emi lon please request 🎄🎁 give me lon please request

  • @SplitUnknown
    @SplitUnknown 2 ปีที่แล้ว +1

    Ohh my god how do you do that @john 🫣
    To hard for me to understand 😅🤣

  • @vanievors2476
    @vanievors2476 ปีที่แล้ว

    How did you overwrite the EIP pointer if the executable is Canary-Protected??

    • @christiansanchez4883
      @christiansanchez4883 10 หลายเดือนก่อน +1

      If you disassemble the source code in ghidra, you'll see that there is no canary in the vuln() function