Solving Pwnable CTF Challenge With Docker Workflow

  Рет қаралды 61,021

LiveOverflow

LiveOverflow

Күн бұрын

A very simple pwnable challenge to checkout the docker workflow.
pwn_docker_example: github.com/Liv...
=[ ❤️ Support ]=
→ per Video: / liveoverflow
→ per Month: / @liveoverflow
=[ 🐕 Social ]=
→ Twitter: / liveoverflow
→ Website: liveoverflow.com/
→ Subreddit: / liveoverflow
→ Facebook: / liveoverflow

Пікірлер: 79
@Alkiiis
@Alkiiis 5 жыл бұрын
You can attach simply attach gdb with: *gdb.attach(**p.pid**, "c")* (The c is to continue gdb after attached.) This will open a new terminal window with gdb.
@mal-nr3ym
@mal-nr3ym 5 жыл бұрын
Does this work from within docker?
@ritabandas
@ritabandas 5 жыл бұрын
That's for python2 For python3 I think it's more comfortable to use p = gdb.debug("./binary")
@kirdow
@kirdow 5 жыл бұрын
Really nice to see you've taken on a series about Docker. I am really looking forward to the next episodes. Keep it up man :D
@notyoursurya
@notyoursurya 5 жыл бұрын
*Idol on youtube:-* _1. LiveOverflow_ _2. Ippsec_ _3. Ghidra Ninja_ *Thanks for my job* ❤
@0dyss3us51
@0dyss3us51 5 жыл бұрын
You got a job in sec from learning from them? :)
@MRGolum
@MRGolum 5 жыл бұрын
@@0dyss3us51 go away job lover....we don't want a job..
@LisaD478
@LisaD478 5 жыл бұрын
Those videos helped me a lot, too. Studying computer science was really helpful to understand these things in a short amount of time. Even though IT-security wasn't my first intention for studying. Btw I met LiveOverflow in real life last december, he was shorter than me XD.. Didn't know who he was back then. A friend of mine introduced me to his channel afterwards.
@sontapaa11jokulainen94
@sontapaa11jokulainen94 5 жыл бұрын
You forgot Ben Eater and John Kelly.
@amyshaw893
@amyshaw893 4 жыл бұрын
forgot john hammond
@conqu3red545
@conqu3red545 5 жыл бұрын
Love your vids bro, you have taught me so much, also inspired me to head into this industry when I grow up 😃
@D-mw8vr
@D-mw8vr 5 жыл бұрын
My man, ZSH with my fav theme lol i love when i see others use Zsh i really love autocomplete on it as well.
@disconnect3d_pl
@disconnect3d_pl 4 жыл бұрын
Pwntools comes up with CLI tools too. One of such is "template" which generates a solver script. E.g. `pwn template --host --port > solv.py` will give us script that we can launch as: python solv.py LOCAL - run local binary python solv.py GDB LOCAL - run local binary under GDB (with gdbserver; we can also provide gdbscript for that) python solv.py REMOTE - connect to remote There's also DEBUG arg which enables pwntools debugging mode that prints out all read/writes etc.
@dannielpineda2026
@dannielpineda2026 5 жыл бұрын
Just wow Keep it up men I will support until the end..
@sudorm-rf9032
@sudorm-rf9032 5 жыл бұрын
15:00 sounds like a lot of time went into finding this problem...
@ari_archer
@ari_archer 4 жыл бұрын
aye, ur minecraft texture is missing
4 жыл бұрын
@@ari_archer Nah it's just a pink BMW logo
@conceptualprogress
@conceptualprogress 5 жыл бұрын
Awessoommme video! Thx! This really helped me getting an idea about where to start!
@ムワ-d7n
@ムワ-d7n 5 жыл бұрын
Nice, another binex videos Hope u make some of them again but this time lets make the binex chall from intermediate level to hardcore level!
@mrhappysmiley2968
@mrhappysmiley2968 5 жыл бұрын
Never would I thought that I would ever see "uwu" from LiveOverflow 15:24
@alexzander5948
@alexzander5948 4 жыл бұрын
It's hard to digest, When you spoke about all Advanced stuff in your Previous videos and came back into very Basics in latest Videos
@TheOxis1
@TheOxis1 5 жыл бұрын
Great video, as always! However, I didn't understand something: why is the RSP misaligned? We are overwriting exactly the buffer bytes + the already existing ret ptr and nothing more, so why after the ret the RSP isn't aligned? Wouldn't it be misaligned even if we didn't overwrite the ptr?
@bgo271
@bgo271 5 жыл бұрын
Exactly what I thought! I'm trying to figure that out myself, but I'd like someone to comment over here so we both have the answer.
@scottjcrouch
@scottjcrouch 5 жыл бұрын
I'm only guessing here but perhaps the compiler knows that, on the normal execution path, the stack will always be 16-byte aligned (or perhaps misaligned, and so inserts asm to push padding bytes to the stack somewhere ahead of the call to "backdoor"). Or maybe it doesn't even bother checking since backdoor() isn't actually called from anywhere.
@kevinwydler4405
@kevinwydler4405 4 жыл бұрын
Very well explained! Thank you!
@mal-nr3ym
@mal-nr3ym 5 жыл бұрын
Not sure if I missed something out or if docker is configured slightly different on mac but I had to add both containers to a network before I could connect to the other. I think you could also connect both to the host network though. There's also the ROP api within pwntools, which would have let you do: padding = 'A' * cyclic_find('acla') rop = ROP(binary) rop.call(rop.search(move=8)) rop.call('backdoor') p.sendline("sUp3r_S3cr3T_P4s5w0rD\x00" + padding + str(rop))
@adi331
@adi331 4 жыл бұрын
Regarding the ROP Api: This doesn't work for me . I printed str(rop) for debugging and it's only 5 bytes , when it should be 16 bytes ( 8 byte for aligning, 8 byte for the jump into the backdoor function) . Output: "\x89\x11\x00\x12\x00"
@mal-nr3ym
@mal-nr3ym 4 жыл бұрын
@@adi331 try adding context.clear(arch='i386') to the top of your exploit to force it to use 32bit pointers
@adi331
@adi331 4 жыл бұрын
@@mal-nr3ym Changing it to arch='i386' didn't change anything. But I asked myself why i386 when it's a 64 bit binary. So I changed it to arch='x86_64' . Then it worked :) ! . I guess that's what you probably meant . Thx :) Though i find it a bit bad that the ROP Class doesn't automatically detect this .
@qwkc
@qwkc 5 жыл бұрын
hell yea time to watch a video where i understand pretty much nothing but enjoy it regardless
@madghostek3026
@madghostek3026 5 жыл бұрын
That kinda... doesn't fit into this channel
@qwkc
@qwkc 5 жыл бұрын
Madghostek i haven’t ever really learned more than some basic c++ and making a few websites however i enjoy watching his workflow, especially on CTF videos
@madghostek3026
@madghostek3026 5 жыл бұрын
@@qwkc wait sorry I must've misclicked a comment, it wasn't supposed to be here
@qwkc
@qwkc 5 жыл бұрын
Madghostek ah no problem all good
@zzh1996
@zzh1996 5 жыл бұрын
e = ELF('./foo') and then use p64(e.symbols['backdoor'])
@MrBrendanpdx
@MrBrendanpdx 5 жыл бұрын
A note about the word “canary”. You are pronouncing the word “cannery” not “canary”. I don’t mean to be critical rather I am assuming you’re the type of person who would like to know the difference. Thanks for all the content!
@LisaD478
@LisaD478 5 жыл бұрын
The german accent is strong in this one... I know the pain too well~
@feifeilooper8312
@feifeilooper8312 5 жыл бұрын
Thanks so much.
@zbigniewchlebicki478
@zbigniewchlebicki478 5 жыл бұрын
One does not simply `gets()` into `char *`.
@wardijien_official149
@wardijien_official149 4 жыл бұрын
I really want to be like that but it's difficult for me because I'm still a beginner :( Semanta is always a teacher:)
@sotakawaii
@sotakawaii 5 жыл бұрын
Just make a Docker-Compose file.
@waplet
@waplet 5 жыл бұрын
Wouldnt it read BBBBCCCC , but due to endianess reversed?
@piticarrara
@piticarrara 5 жыл бұрын
15:24 owo what's this
@scuroguardiano5511
@scuroguardiano5511 5 жыл бұрын
uwu
@neerajnigam6
@neerajnigam6 4 жыл бұрын
Hey nice video. I working on a similar challenge where I redirected the code flow to backdoor function. system("/bin/bash") is getting executed within the backdoor (verfied via GDB) however I am still not able to spawn a shell, instead of an interactive shell the backdoor function returns and go back to main function and program crashes ( Because stack is messed up as we overwritten over other stored registers) any ideas what is going wrong? Any help or resource would be appreciated. Thanks.
@GameTimeWithVargaArmy
@GameTimeWithVargaArmy 5 жыл бұрын
I'd love to see you code a mmorpg bot with like C#, that would be so cool!
@pyryvartiovaara230
@pyryvartiovaara230 5 жыл бұрын
Begone future osrs botter
@GameTimeWithVargaArmy
@GameTimeWithVargaArmy 5 жыл бұрын
@@pyryvartiovaara230 Writing a osrs bot thats not based on color detection but rather injection and memory was surprisingly easy, I was thinking more like world of warcraft of even Tibia, I found this really cool one on GitHub for tibia the other day, pretty interesting topic but that might just be me
@LukenSkyne
@LukenSkyne 5 жыл бұрын
15:26 killed me uwu
@MinhNguyen-kv2mz
@MinhNguyen-kv2mz 5 жыл бұрын
just notice lol
@michaelhoefler5118
@michaelhoefler5118 5 жыл бұрын
This is great!
@timtomlan4183
@timtomlan4183 5 жыл бұрын
Sadly I don't know how to do this but I like to watch you explain it if someone has some tips HoW tO gEt Started you can comment it ^^
@timtomlan4183
@timtomlan4183 5 жыл бұрын
Btw You do a great job live overflow stay how you are
@simone9485
@simone9485 4 жыл бұрын
Try picoCTF they are really simple and there are plenty of writeups I've started there last year and I'm slowly learning. I'm using this video to try and solve one of the 2019 picoCTF wish me luck
@pwndumb2903
@pwndumb2903 4 жыл бұрын
elf = context.binary = ELF("./binary") io = process(elf.path) context.log_level="DEBUG" gdb.attach(io, ''' break *main break *0x08049019 ''')
@richardlighthouse5328
@richardlighthouse5328 5 жыл бұрын
8 bit computer update?
@trungthanhbp
@trungthanhbp 4 жыл бұрын
love you
@pascal5848
@pascal5848 5 жыл бұрын
Nice :)
@Va47i
@Va47i 5 жыл бұрын
Python2 in 2020.
@dexdevlon
@dexdevlon 5 жыл бұрын
What is redstarOSX, is it some kind of hackintosh?
@eIicit
@eIicit 5 жыл бұрын
It's a joke. Red Star OS is North Korea's state-made linux distribution, some observed that it had similarities with Apple.
@Whiterabbit124
@Whiterabbit124 5 жыл бұрын
No pie :(
@launumins3102
@launumins3102 5 жыл бұрын
Love u :)
@TheMas-sk7nd
@TheMas-sk7nd 5 жыл бұрын
"raw_input" is python 2, makes me sad which has been EOL for 2 months now
@LiveOverflow
@LiveOverflow 5 жыл бұрын
It’s not dead on my computer
@TheMas-sk7nd
@TheMas-sk7nd 5 жыл бұрын
@@LiveOverflow true, but it wont be getting any security updates or anything anymore
@recklessroges
@recklessroges 5 жыл бұрын
If it makes you sad, then tell people what would make you happy. "This is how I do it" is more useful than "thing BAD!"
@vinos1629
@vinos1629 5 жыл бұрын
*pretends to understand*
@adrianopinaffo
@adrianopinaffo 4 жыл бұрын
At some point you just start enjoying his voice
@_mvr_
@_mvr_ 5 жыл бұрын
did you just invent cheatengine?
@zergberg1278
@zergberg1278 5 жыл бұрын
YO
@cassandradawn780
@cassandradawn780 5 жыл бұрын
3 hours ago
@RepublikSivizien
@RepublikSivizien 5 жыл бұрын
uwu
Finding iOS Kernel Exploit // SockPuppet Jailbreak - CVE-2019-8605
23:45
Mindmapping a Pwnable Challenge - intro_pwn/pwn1 CSCG 2020
17:28
LiveOverflow
Рет қаралды 39 М.
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 298 М.
How Docker Works - Intro to Namespaces
12:56
LiveOverflow
Рет қаралды 173 М.
DEF CON CTF 2018 Finals
16:04
LiveOverflow
Рет қаралды 183 М.
Hands-on Hacking Demo | CTF - Capture the Flag in 15 Minutes!
15:59
ACI Learning
Рет қаралды 126 М.
Malware Development: Processes, Threads, and Handles
31:29
Patching Binaries (with vim, Binary Ninja, Ghidra and radare2)
21:00
Deepdive Containers - Kernel Sources and nsenter
11:46
LiveOverflow
Рет қаралды 44 М.
I've been Hacking for 10 Years! (Stripe CTF Speedrun)
28:58
LiveOverflow
Рет қаралды 68 М.
Finding The .webp Vulnerability in 8s (Fuzzing with AFL++)
24:11
LiveOverflow
Рет қаралды 65 М.