7: Format String Vulnerabilities (printf) - Buffer Overflows - Intro to Binary Exploitation (Pwn)

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ธ.ค. 2024

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

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

    An example of printf() format vuln being used to leak flag in CTF: th-cam.com/video/BekVaShD9HE/w-d-xo.html

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

    Nice! I've been wanting to dive into format string vulnerabilities.

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

      Awesome! Hope you stick around for the next couple of vids, we'll take full advantage of these vulns 😈

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

    Hello again, CryptoCat. so at 5:00 you're saying printf("%s", buf); would fix the vulnerability? I''ve tested a similar code on my machine and the binary's still vulnerable.

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

      Hey, that's right! Fixes it OK on my end. If I enter %p after patching the code, it just prints "%p" instead of an address.

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

      ​@@_CryptoCat Thanks for testing it on your end. I have changed the line of code from "printf(teste);" to "printf("%s", teste);", compiled the code with "gcc main_fixed.c -o main_fixed -m32", but the binary still prints an address if I enter %p :(

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

      @@AUBCodeII That's super weird lol. I made the same change and it fixed it 😕 Let me know if you work out the issue!

  • @zezokaro7845
    @zezokaro7845 5 หลายเดือนก่อน +1

    Hello, what is the difference with the 64bit version? I cannot print the string even if I know the offset, it always print null

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

      Hmmm been a while since I did pwn but should be similar, obviously with 64 bit addresses instead of 32-bit.

  • @kiraishagaming
    @kiraishagaming 9 หลายเดือนก่อน +1

    What did u do to make the "checksec" command to display in that table format?
    My checksec command only display in one line which is so hard to see.

    • @_CryptoCat
      @_CryptoCat  9 หลายเดือนก่อน

      Hmmm did you provide it in the same way, e.g. "checksec --file [filename]"? Does it seem to be up to date?

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

    been waiting for this one 😍

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

      Thanks mate! Will be putting these format string vulns to good use in the next few videos 😉

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

    Sir , I have a question ,how does great black hackers just hack into company
    and how can I learn more advance binary exploitaion
    and is know about x64 assembly is enough for binary exploit

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

      Some of my favourite binary exploitation resources: github.com/Crypto-Cat/CTF/tree/main/pwn/binary_exploitation_101#additional-resources-for-learning-pwn

  • @UcheMark-hp1rl
    @UcheMark-hp1rl ปีที่แล้ว +2

    Great Video 👊👏

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

    Hey, do you recommend any book's to learn pentesting?

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

      Ermm not really tbh 😆 I have a lot of old books around pen-testing and malware analysis but unless you want some material for when you don't have access to a computer, i'd recommend just getting stuck into HackTheBox, TryHackMe etc - my favourite resources here: github.com/Crypto-Cat/CTF#readme
      "The web application hackers handbook" used to be the goto book for web pentesting (bug bounty) but since the makers of the book realised interactice, practical learning is better, they replaced it with Portswigger's Web Security Academy (again, highly recommended) 😁

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

      @@_CryptoCat Yes, i have been doing some labs apreciated the help tho, keep the good content :)

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

      @@L9Zodiac thanks mate 🥰

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

    Thank you som much, it was very helpful.
    Can you please upload the last three videos?

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

      Thanks mate 🥰 Going to release the last few videos next week, after some pico CTF videos 😇

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

    Another awesome video 👊👏

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

      cheers mate! 👊

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

    Another awesome video mate! Keep it up

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

      Cheers bro! 💜

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

    hehehe, This one was a bit confusing xD but that's because I didn't understand the format string thingy when you used code arcane or the pwntools to explain but I'll get the hang of it
    My question now is, The fuzzer script is there a template for it somewhere or do we write our own script ?
    Just asking for future purpose

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

      Honestly, manual format string exploits are something I feel like I have to re-learn all the time. It's definitely tricky to get your head around.
      Here's the fuzzing script from the video: github.com/Crypto-Cat/CTF/blob/main/pwn/binary_exploitation_101/07-format_string_vulns/fuzz.py - I have a few of these scattered around the repo so normally just go and grab one when solving a new chall 🙂

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

      @@_CryptoCat hehe First thing I did was clone your repo
      I've been holding my teammates back alot in ctfs so decided to be good at binary exploitation and yh I love it too