The Heap: Once upon a free() - bin 0x17

  Рет қаралды 59,773

LiveOverflow

LiveOverflow

Күн бұрын

Пікірлер: 65
@samsemp10l23
@samsemp10l23 8 жыл бұрын
well that was a depressing ending.....
@ashikombat
@ashikombat 8 жыл бұрын
You have an amazing talent at teaching and explaining!
@LiveOverflow
@LiveOverflow 8 жыл бұрын
+ashikombat aww thank you!
@GreenyDe
@GreenyDe 8 жыл бұрын
I bet its really hard work :D But thank you so much for the videos!
@denrua423
@denrua423 5 жыл бұрын
I spent nearly 3 hours on this video for playing it 3 times to understand all concepts and technology. I'm a newbie at Exploiting. Thanks for all your videos.
@1e1001
@1e1001 5 жыл бұрын
did you also play at 0.25x speed?
@shiskeyoffles
@shiskeyoffles 5 жыл бұрын
@@1e1001 r/theydidthemath
@thecrazzxz3383
@thecrazzxz3383 2 жыл бұрын
3:08 It allocated 32+8 = 40 bytes for the chunk, the 8 bytes are for the size dword + the 4 bytes before the size dword, it's logical : malloc(x) creates a chunk of x+8 bytes
@thecrazzxz3383
@thecrazzxz3383 Жыл бұрын
not really
@omardarwish396
@omardarwish396 5 жыл бұрын
Thank you so much for making this! My favorite security teacher on KZbin
@zaphooxx8779
@zaphooxx8779 3 жыл бұрын
that's why i love these videos so much. even the "pros" sometimes make "stupid" mistakes ...
@acatisfinetoo3018
@acatisfinetoo3018 4 жыл бұрын
Just got to say your videos are #1 tier.
@nukexplosion6679
@nukexplosion6679 4 жыл бұрын
I agree
@nadavcohen4166
@nadavcohen4166 8 жыл бұрын
where did you find the source code for this old malloc?
@scarlas7071
@scarlas7071 7 жыл бұрын
9:48 This solution would obviously not work if W^X is followed. This can't be bypassed using ret2libc or rop like with stack overflows. It may still be possible to switch around some data to cause further problems later on, but that will be application specific. Do you know if there is a more general technique to overcome this?
@LiveOverflow
@LiveOverflow 7 жыл бұрын
+Scarlas totally depends on the Heap implementation. Current malloc/free version have this technique fixed anyway. Though Might also be not exploitable at all with these limited malloc/free steps. Sounds like a cool challenge to try :P You should also checkout the cookbook writeup. There I used the heap exploitation technique "house of force" in a modern environment but it requires that you control the size to a malloc() call.
@myselcrun111
@myselcrun111 8 жыл бұрын
#12:15 Hey ! this is LiveOverflow from the future , man u are freaking awesome :) :) :) i wish u were my teacher
@FyberOptic
@FyberOptic 4 жыл бұрын
What I learned from experimenting is that the heap algorithm differs depending on the compiler and OS, which is obviously relevant when creating an exploit.
@steefant
@steefant 5 жыл бұрын
thumbs up for showing your failures and the whole plan collapse! it was way too straight forward and easy before that anyway :)
@oleksijm
@oleksijm 4 жыл бұрын
Why didn't i see this channel 2 years ago?
@nukexplosion6679
@nukexplosion6679 4 жыл бұрын
A golden mine of knowledge
@alastiertan1914
@alastiertan1914 5 жыл бұрын
#11:07 Can someone explain what he meant by "This will be the forward pointer where the 2nd pointer will be written to at +12"? Where did '12' come from?
@uuuuuhhlettuce3909
@uuuuuhhlettuce3909 5 жыл бұрын
In this video (and jn the previous one) you saw how to access properties in an 'object' on a heap. With the '->' arrow like this: 'auth->service'. Now what that really means is: Take the pointer of the auth 'object' and add the proper amount of bytes until the service section begins. So the unlink part from the source code will say "take the address of the beginning of the heap chunk and add 12, since at that address will ALWAYS be the forward pointer in case this chunk wants to be unlinked". And since we are abusing this forward pointer stuff with the "->" arrow, the innocent unlink thingy thinks we wanna jump to the address we give to it + 12 bytes since at that address (in a normal heap chunk) will always be the forward pointer. So we give it the GOT address MINUS 12 because the unlink function will ADD 12. I hope u understood this now and didnt loose motivation since the month you posted this :)). If anything is unclear please let me know so I can better my teaching skills. Have fun
@armorbackthursday2068
@armorbackthursday2068 4 жыл бұрын
@@uuuuuhhlettuce3909 wouldn't the +12 point to the backward pointer? still woefully new at this stuff, but i thought the forward pointer is first after the metadata (i.e., at +8)
@TonelessR
@TonelessR 8 жыл бұрын
Another very interesting episode, thanks again for all your work Live. :)
@FalcoGer
@FalcoGer 4 жыл бұрын
and that right there is exactly why you don't leave out {...}, even if there is just one command afterwards. Always use {...} Especially if you're inept in indenting correctly.
@mariuszmario5557
@mariuszmario5557 8 жыл бұрын
Do you have irc chanel like Gynavale's #gynvaelstream-en on Freenode?
@Rrancido
@Rrancido 7 жыл бұрын
You can do also a tutorial about jemalloc?
@manju7717
@manju7717 7 жыл бұрын
1. To make this attack be successful in the end, I suggest that you export shellcode into ENV (export EGG= "0x90909090" + "shellcode"). 2. Then find the address of the shellcode using " $ find $esp, $esp+2000, 0x90909090 " command. 3. Now you have the address of shellcode, replace the GOT for puts with this address Let me know, if it works for you Cheers!
@LiveOverflow
@LiveOverflow 7 жыл бұрын
thanks for the suggestion, but that's not the issue here ;) I don't see why egghunting shellcode would help here. The issue here is a different one. But watch the following video where I successfully exploit it.
@Briesanji
@Briesanji 8 жыл бұрын
This video is amazing.. Please continue teaching this
@Occcc12
@Occcc12 8 жыл бұрын
I was waiting for this one, thanks a lot :)
@antoniomh1061
@antoniomh1061 Жыл бұрын
Can someone explain me what is the exact vulnerability he exploited? He says there are 3 mallocs and 3 frees, so I don't see there any obvious vuln So I'm confused, what is he exploiting? is the the old malloc algorithm? Is it some vulnerability in the code? what is his input?
@cyancoyote7366
@cyancoyote7366 8 жыл бұрын
Your videos are amazingly helpful :D You've become my favourite youtuber, because you can always teach me something new. Can you recommend me some books on the topic of computers and electronics? I'm currently 16 years old, and I'm now trying to learn as much about communications, computers, language, electronics and human interactions as possible. English is not my native language, so I'm still getting better and better at it, mainly by extending my vocabulary as much as possible, and I've passed an advanced language exam (written and verbal). Also, I'm learning German in school and Finnish in the meantime. Thanks again for being my inspiration in life :D You are better at teaching than all of my teachers combined!
@LiveOverflow
@LiveOverflow 8 жыл бұрын
+cyancoyote that is so nice of you to say! I have never really read books. And books are so quickly outdated. But I plan to work through beginners.re myself. Also "the art of exploitation" is nice.
@cyancoyote7366
@cyancoyote7366 8 жыл бұрын
Thank you very much :)
@benasin1724
@benasin1724 2 жыл бұрын
@@cyancoyote7366 How is your journey now :D?
@vincenthaepp
@vincenthaepp 6 жыл бұрын
Damn till this video i've understood all very good but this and the next are screwing up my head. I think i need to watch them multiple times and play around with that, to understand the Heap-Architecture completely.
@uuuuuhhlettuce3909
@uuuuuhhlettuce3909 5 жыл бұрын
So..did you wrap your head around it yet? :)
@huyvuquang2041
@huyvuquang2041 4 жыл бұрын
I'm in the same situation as yours now :((
@Ryges
@Ryges 4 жыл бұрын
Interesting. I did not know that Linux uses dlmalloc. Do you have any idea why this was chosen and not, say, phkmalloc? Also I’m curious if you think phkmalloc is susceptible to the same kind of attack?
@amlamarra
@amlamarra 5 жыл бұрын
What font do you use in your editor?
@sontapaa11jokulainen94
@sontapaa11jokulainen94 4 жыл бұрын
Holy crap the ending was sad.
@niektuytel9519
@niektuytel9519 4 жыл бұрын
mind blows off here
@YumekuiNeru
@YumekuiNeru 6 жыл бұрын
this is why you should put the curly braces on the far left you know :^) the brace is not part of the if-statement after all it just ties a block into a single line and that single line is what "belongs" to the if personally I think curly braces and C-style syntax is an absolute travesty that should never have happened
@iuse9646
@iuse9646 6 жыл бұрын
YumekuiNeru explain please ?
@YumekuiNeru
@YumekuiNeru 6 жыл бұрын
in C the {}-blocks are not part of the if/while statements they just group a bunch of statements together and then the {}-block can appear immediately after say an if-statement, and that block is what will run if the condition is true it is pretty much the same as putting a single statement like i=1 after an if without any {}, except when not using a block multiple statements/lines can not be used so the point was that by placing the { on the far right on the same line it gives the false impression that the block is part of the if statement, not to mention it is easy to miss whether there is an opening brace or not (as happens in 12:36 of this video) by always placing the two braces aligned with eachother on the left, it is easy to tell at a glance when you have a block and when you have just a single line
@typedeaf
@typedeaf 5 жыл бұрын
Confused. You are using the 15yr-old documentation on dlmalloc, but you aren't using the 15yr-old glibc, are you?
@LiveOverflow
@LiveOverflow 5 жыл бұрын
This old VM still uses the old implementation. It’s an introduction practice VM
@fsquad8191
@fsquad8191 7 жыл бұрын
why ,,disassemble" instead of ,,disas" ?
@LiveOverflow
@LiveOverflow 7 жыл бұрын
+F Squad clearer for the viewer. Also I'm used to do tab completion
@Abdelhamidovitch
@Abdelhamidovitch 6 жыл бұрын
i love you
@nullnull6032
@nullnull6032 5 жыл бұрын
Is anybody here having the feeling that he will never be something useful, like look at us struggling to understand a science that is 10 years old from now? Fuck My Life\0
@heaptv2348
@heaptv2348 8 жыл бұрын
headache teacher T.T
@z4q.mictlan
@z4q.mictlan 5 жыл бұрын
ヒープわからん、、、
@dukap8669
@dukap8669 8 жыл бұрын
FIRST
@payanggabang
@payanggabang 9 ай бұрын
who cares...
@TesikLP
@TesikLP 6 жыл бұрын
From my abstract high-level point of view, I've always thought heap metadata was owned by the kernel. I guess system devs are dumber than I thought.
@ParallaxThe
@ParallaxThe 6 жыл бұрын
its about speed versus security. Having only one large block be the heap is easy. if the user needs to increase the heap or the process wants to fork all it has to do is copy the heap in one go.
@TesikLP
@TesikLP 6 жыл бұрын
As you said, one heap block is easy, for the programmer it is. The performance isn't affected much by copying two blocks instead of one, in fact two blocks are easier to parallelize. The tradeoff here seems to be about security vs. complexity.
@w0ttheh3ll
@w0ttheh3ll 6 жыл бұрын
what affects performance is that with kernel-controlled metadata you would need to make a system call every time the heap changes, even if it's just a couple of bytes, even if it happens dozens of times in a single function.
The Heap: dlmalloc unlink() exploit - bin 0x18
10:33
LiveOverflow
Рет қаралды 35 М.
Local Root Exploit in HospitalRun Software
20:48
LiveOverflow
Рет қаралды 69 М.
[BEFORE vs AFTER] Incredibox Sprunki - Freaky Song
00:15
Horror Skunx 2
Рет қаралды 21 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 56 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 59 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 42 МЛН
Trying to Find a Bug in WordPress
18:07
LiveOverflow
Рет қаралды 92 М.
Developing an intuition for binary exploitation - bin 0x20
11:43
LiveOverflow
Рет қаралды 52 М.
The Heap: How to exploit a Heap Overflow - bin 0x15
12:11
LiveOverflow
Рет қаралды 104 М.
Heap Exploitation
41:20
RPISEC
Рет қаралды 6 М.
Hacker Tweets Explained
13:47
LiveOverflow
Рет қаралды 160 М.
Finding The .webp Vulnerability in 8s (Fuzzing with AFL++)
24:11
LiveOverflow
Рет қаралды 63 М.
A simple Format String exploit example - bin 0x11
10:01
LiveOverflow
Рет қаралды 172 М.
[BEFORE vs AFTER] Incredibox Sprunki - Freaky Song
00:15
Horror Skunx 2
Рет қаралды 21 МЛН