PWN - Bruteforcing Stack Canaries (PicoCTF 2022 #44 'buffer-overflow3')

Поделиться
HTML-код
  • Опубликовано: 10 май 2022
  • (PS, jump into the HackTheBox Cyber Apocalypse CTF! j-h.io/htb-cyber-apocalypse2022)
    Help the channel grow with a Like, Comment, & Subscribe!
    ❤️ Support ➡ j-h.io/patreon ↔ j-h.io/paypal ↔ j-h.io/buymeacoffee
    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/humblebundle
    🐶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/sponsorship
    🚩 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

Комментарии • 64

  • @MrToast72
    @MrToast72 2 года назад +12

    I've been watching all of your CTF videos for 2022 and dude, you do a fantastic job at explaining everything, even when your dead tired at 1 in the morning you still take time to explain everything in detail. Thank you for making me fall in love with pen testing and cyber security even more than I already am! You go John!
    PS I did the RUclips things 😉

  • @kevinwilson7213
    @kevinwilson7213 2 года назад +6

    Dude! Please do more of these. It is way more helpful to see you "bump around" (and thereby realize that you are human) than to just see you figure out complex problems in a millisecond and feel like a complete dummy when it takes me hours to figure out the same thing (if I ever do!). PLUS, we get to see your "debugging" process, which is super, super helpful. Thanks for the content as always.

  • @CrazedMachine
    @CrazedMachine Год назад +2

    I appreciate watching the full process of figuring it out. A lot of videos just speed through things and I’m left thinking “how did you see that so quickly?” Watching you do your thing as is also teaches the problem solving process which is just as important.

  • @logiciananimal
    @logiciananimal 2 года назад +5

    Great stuff! I'm finally getting to piece together what pwntools does. (I understand buffer overruns etc. fairly well, but these automated tools are new to me). What would be even better would be some sort of O'Reilly book or the like on it. (Yes, I'd even buy a dead tree edition.)

  • @yurilsaps
    @yurilsaps 2 года назад +1

    Great!!! Please never stop!!!!

  • @LDowning0190
    @LDowning0190 2 года назад +3

    Great content as always. Thank you for sharing. I am learning a lot about python.

  • @SalmanKhan.78692
    @SalmanKhan.78692 2 года назад +3

    Great content
    Thanks sir for providing this type of knowledge 🔥🔥🔥

  • @WhyCantIFindAname657
    @WhyCantIFindAname657 2 года назад +2

    Great video, really learned a lot👍

  • @sudoer92
    @sudoer92 2 года назад

    You are the best dude Keep up 🔥🔥🔥

  • @0root1
    @0root1 Год назад +1

    18:40 that offset variable was haunting me since the last two videos.
    Great video.

  • @jacobfinder7476
    @jacobfinder7476 2 года назад

    John is a Genius!!!!

  • @edi33416
    @edi33416 2 года назад +3

    You can access the man pages of read with `man 2 read`.
    This is because read is a syscall, not a library function, so it's docs are in section 2 of the manual. Section 3 is for libraries.
    Hope ppl will find it helpful.
    Keep up the great work!

    • @marcovalentinoalvarado3290
      @marcovalentinoalvarado3290 2 года назад +1

      Interesting, thank you for sharing :)

    • @edi33416
      @edi33416 2 года назад

      @@marcovalentinoalvarado3290 You're very welcome. If you want to find out more about the other sections of the manual, inspect the manual page of the manual itself (I know, Inception much?) with `man man`

    • @moistgiraffe3574
      @moistgiraffe3574 Год назад +1

      This is was a niche, BUT EXTREMELY helpful comment. I've been wondering for ages

  • @sgtreckless5183
    @sgtreckless5183 2 года назад +1

    Ah, now we're getting into the interesting stuff!

  • @tpai302
    @tpai302 2 года назад

    And of course it’s another “banger” video.

  • @verolyn8459
    @verolyn8459 2 года назад +4

    First, t'looks like gonna learn something new again..

  • @charlesnathansmith
    @charlesnathansmith Год назад

    Just a programming note: byte arrays are mutable, so you don't need to completely rebuild the payload every loop. You can just build it once with 4 random bytes for the canary, then when solving for the first byte just modify the payload[offset] byte and send off payload[:offset+1], then once that's found, loop through values for payload[offset+1] and send off payload[:offset+2], etc
    It's more efficient, and you don't have to keep up with the values of the positions you've found so far because they're already saved correctly in the payload

  • @ugurre
    @ugurre Год назад +1

    Can we somehow exploit the fact that the local stack canary is copied from a global variable instead of brute forcing (e.g. if the canary was less "brute-forceable")?

  • @tbremard
    @tbremard Год назад

    Hello my friend,
    at startup of video you are struggling with sscanf, it seems to me that you do didn t spotted the 2 's' : sscanf is different than scanf.
    first parameter of sscanf is a pointer to a buffer which is called length in this instance, thats why your printf %d returns random number , and should be replaced by %p in order to be compliant with the type which is a pointer
    thanks for all the rest

  • @yajusgakhar6969
    @yajusgakhar6969 2 года назад

    Should we attempt buffer overflow challenges without checking the source code?

  • @adamsiek6438
    @adamsiek6438 2 года назад

    Happy RUclips Comment~!

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Value hai

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Concrete wall for you breaking information

  • @bech2342
    @bech2342 2 года назад +1

    next time try socat for the binary as local service listen over tcp.

  • @ArSiddharth
    @ArSiddharth 2 года назад

    Hey!

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Relying

  • @depon91
    @depon91 2 года назад

    Can you please have a go on device called deeper connection Pico DPN (like VPN) and they are claiming that nobody can hack it . Since you are very creative i was wondering if u wanna have a go ? Thanks you’re great 👍

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Rdi ,RSI,rdx buf function using number

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Library here

  • @Lukemagic01
    @Lukemagic01 Год назад

    My solution appears to work locally, but once I connect to the remote server the 'leaking canary values' are returned in hex ('\x03\x01\x01\x01') and I get a UnicodeDecodeError: "utf-8 codec can't decode byte 0x93 in position 25: invalid start byte"
    Any ideas why this is happening and how to resolve. I've googled my brains out but can't figure it out.

    • @exosfear512
      @exosfear512 Год назад

      I think due to the remote system being slightly different, \x03 is a bad char which will kick off the false 'Flag?', since this is a custom canary we can safely assume the four bytes of canary are printable characters because it comes out of canary.txt. Instead of iterating bytes 1-255, 'from strings import printable' and then run 'for i in printable'

    • @ugurre
      @ugurre Год назад

      ​@@exosfear512 I agree that's probably the case given PicoCTF is very cooperative with that sort of thing. But in reality that could be a big "gotcha!" because you could really name any kind of file anything (e.g. canary.txt could easily be a binary file).

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Rax,rex,rdx, 0x86?

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Canry 1,2vlun explain.

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Sal , change?

  • @CashtynSomethingCool
    @CashtynSomethingCool Год назад

    Heyo

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Malloc ?

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Rflag?

  • @unutilisateurdeyoutube1256
    @unutilisateurdeyoutube1256 2 года назад +1

    Damn my script works locally but somehow it doesn't work remotely. Could you please provide your source code to test? Thanks! :)))))

    • @FunkadelicFeed
      @FunkadelicFeed 2 года назад

      Same for me it's spitting out hex when bruteforcing canary and that too incorrect hex values. For me the canary is coming \x03\x01\x01\x01

    • @unutilisateurdeyoutube1256
      @unutilisateurdeyoutube1256 2 года назад

      @@FunkadelicFeed lol me too :D

    • @unutilisateurdeyoutube1256
      @unutilisateurdeyoutube1256 2 года назад

      @@FunkadelicFeed Have you figured it out why? Found a way to solve it tho.

    • @FunkadelicFeed
      @FunkadelicFeed Год назад

      @@unutilisateurdeyoutube1256 naah I haven't been able to. What solution did you figure out?

  • @prasadsawool6670
    @prasadsawool6670 2 года назад

    Yt algo bump

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Banck employees sylres nover coming.

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Today is my eyes chemical to facing problem nover problem chemical to face 👀 not problem

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Desc,asc date rood ing number attending time........

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Conr vlu?

  • @AntonioSouza
    @AntonioSouza 2 года назад

    @_JohnHammond you are amazing.
    I love your way and I have learned a lot from you.
    Thank you very much.

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Volume button purposes hi volume
    Exl,rop reply

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Jump number cinr

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Canary vuln report new video creation 🤦🤖

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Search ? number name

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Dive to ip address number dive files open remo light attending after again to everyone that red colour process signal to dry flowers

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Canr vilu number meine in

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Ato z

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    DemJ vlyuu

  • @msasdc2087
    @msasdc2087 2 года назад +1

    Disgusting

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    Volume button purposes hi volume
    Exl,rop reply

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    DemJ vlyuu

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    DemJ vlyuu

  • @bhagyalakshmi1053
    @bhagyalakshmi1053 Год назад

    DemJ vlyuu