Exploit Dev Pitfall Corrupted Shellcode

  Рет қаралды 35,431

LiveOverflow

LiveOverflow

Күн бұрын

Пікірлер: 73
@column.01
@column.01 5 жыл бұрын
Never thought to consider that I may overwrite my exploit when using an overflow. Very informative video, thank you so much for sharing all you've learned with us newbies!
@nug203
@nug203 5 жыл бұрын
What kind of monster doesnt use A's for buffer overflow exploitation
@paulstelian97
@paulstelian97 5 жыл бұрын
😂
@jhbonarius
@jhbonarius 5 жыл бұрын
1337 |-|@c|
@ariss3304
@ariss3304 4 жыл бұрын
Blasphemous
@cassandradawn780
@cassandradawn780 4 жыл бұрын
i use "8"
@dplastico
@dplastico 5 жыл бұрын
Hello! I never comment on your videos but Im following you for years now, you do an amazing job and I learn so much from this channel, keep up the good work!, anyway I want to let you know that im studying for a certification focus on exploitation, and this is very good on explaining why EIP should not be close to ESP, also could be a good intro to stack alignment, something that was very frustrating for me and there's not good tutorials about it, maybe you should try to do one :) Again, amazing job, congrats!
@Ariana-dn4mm
@Ariana-dn4mm 5 жыл бұрын
Oh gosh i remember having the same problem too but never figured how makes so much sense now
@DDBAA24
@DDBAA24 5 жыл бұрын
; 😉
@zaneoblaneo7624
@zaneoblaneo7624 5 жыл бұрын
I get the feeling this is the exact issue I've been having while trying to write custom shellcode for a picoCTF 2019 challenge... I'll have to fire it up after I get off work tomorrow morning. Thank you for the amazing videos!
@lukaprsina9041
@lukaprsina9041 4 жыл бұрын
Another solution for shellcode overwriting problem that worked for me was to add "add rsp,0x50" before the start of the actual shellcode. That way the stack moves far away from the RIP. The bytes representation of that instruction is \x48\x83\xc4\x50, compiled with rasm2 -a x86 -b 64 "add rsp,0x50" (for linux 64-bit). So the payload looks like: nopslide + add rsp,0x50 + shellcode + padding + RIP. I also like to remove the padding, because this shellcode will never overwrite the RIP and the longer the nopslide, the better.
@machinexa1
@machinexa1 4 жыл бұрын
Love the part when he says "Then my CAF will block it." 2:15
@anishamdi4405
@anishamdi4405 5 жыл бұрын
Man , You're Awesome with your magic explanation ! Debug FTW !
@douwehuysmans5959
@douwehuysmans5959 5 жыл бұрын
Another pitfall can happen is when exploiting gets on an x86 machine and it writes its returnvalue on the stack also corrupting your shellcode
@christiansacks9198
@christiansacks9198 5 жыл бұрын
This is really a great explanation and example, I'm really starting to understand a bit better thanks to your great explanations. I hope you feel better so you can get the rest of your videos done without feeling too Ill.
@LoukaJC
@LoukaJC 5 жыл бұрын
Hi man, really cool video as usual ! ;) Yet I wonder.. Did you use pure gdb for "minimalistic look = more meaning to what's shown" or just forgot to enable a enhancer? Imho, gef or peda are way more pleasant to use + more pedagodic for newcomers.. :D
@BBones_
@BBones_ 5 жыл бұрын
Love the effort you’re putting in these videos!
@hexrabbit5984
@hexrabbit5984 5 жыл бұрын
@LiveOverflow So to be clear, it’s because there’s different ret opcode(0xC3, 0xCB) used for near return & far return that cause the “ret pitfall” ?
@simon9740
@simon9740 5 жыл бұрын
This is absolutely brilliant content. Thank you!
@PetWanties
@PetWanties 5 жыл бұрын
Hope u feel better soon!
@thecrazzxz3383
@thecrazzxz3383 3 жыл бұрын
For the program execution redirection problem, it won't work because gets() shouldn't be in main, it should be something like : #include void vuln() { char buffer[64]; gets(buffer); } int main() { vuln(); }
@2011Filmer
@2011Filmer 5 жыл бұрын
Keep up the good work man! I love your vids :)
@BillyHudson1
@BillyHudson1 2 жыл бұрын
Coming back around to this cause I think I'm hitting this problem xD
@GodlikeGER
@GodlikeGER 5 жыл бұрын
3:53 sagste zweimal das gleiche direkt nacheinander :D
@jhbonarius
@jhbonarius 5 жыл бұрын
Deja vu.... It's a glitch in the matrix!
@DDBAA24
@DDBAA24 5 жыл бұрын
@@jhbonarius We just patched the matrix. He was actually talking about 2 different things and referencing them being confusing , which says to the beginner " its okay to be lost right now" . ↓
@zuzzo661
@zuzzo661 4 жыл бұрын
I thought you considered to be nicer to your audience by replacing “might be confusing to a beginner” with just “might be confusing” :)
@frognik79
@frognik79 5 жыл бұрын
Nice vid, love to see a video on rop and how it can be Turing complete. Anyone else here watched all the c3 console hacking videos?
@LiveOverflow
@LiveOverflow 5 жыл бұрын
I have made a two part video about ROP covering that before. Checkout the binary exploitation playlist
@Jonasonweb
@Jonasonweb 3 жыл бұрын
I had a similar issue, where the shellcode got corrupted. Adding sub $40,$rsp (bytes: \x48\x83\xec\x40) to the start of shellcode does also solve the issue, basically moving the stackpointer out of the way.
@T3sl4
@T3sl4 5 жыл бұрын
Question, how does this (self modifying code) interact with cache coherency? Was my understanding, some or most CPUs won't respond to modified code within some number of instructions before execution. (Maybe that was true of, say, P4 era CPUs, and modern ones are more correct?)
@meithecatte8492
@meithecatte8492 5 жыл бұрын
As far as I know, all x86 processors detect this, for backwards compatibility with the processors that didn't have cache. Newer designs, such as ARM, may require the cache to be flushed manually.
@f.andersen3824
@f.andersen3824 5 жыл бұрын
Nice Demo, well done!
@Deaple
@Deaple 5 жыл бұрын
Aaaaw that really sucks when happens, specially if you have a small length to put a shellcode into(it happened when I was trying to use a an egg hunter). Nop slides always save the day :)
@honestindianpeople
@honestindianpeople 5 жыл бұрын
Hi LiveOverflow, I will really appreciate it if you could put all your code snippets into a GitHub repo which will be really helpful to practice !!
@column.01
@column.01 5 жыл бұрын
This ^
@dplastico
@dplastico 5 жыл бұрын
there is one, but not updated with all the codes used, but is useful for the bin xpl series github.com/LiveOverflow/liveoverflow_youtube
@brkzlr
@brkzlr 5 жыл бұрын
I just had the overwritten/corrupted shellcode problem yesterday and guess what video is uploaded right after I fixed it? :D
@otesunki
@otesunki 3 жыл бұрын
8:36 right now im thinking "oh it pushed to the shellcode and overwrote the pop" id probably put a nop slide here or maybe do mov ax, sp add ax, 300 mov sp, ax
@goebbelsx
@goebbelsx 5 жыл бұрын
What is your opinion about Offensive Security's OSCE training course? Majority of its content is devoted to exploit development. But it's old and maybe doesn't worth it. Your opinion? :)
@Cubinator73
@Cubinator73 5 жыл бұрын
8:25 well, obviously you assumed wrong register values or the code modified itself. I guess movabs is the culprit. 10:04 Nowaaay... I never would have thought of the possibility that the stack could be this close to the code :D
@paulstelian97
@paulstelian97 5 жыл бұрын
You were right, "the code modified itself".
@whetfaartz6685
@whetfaartz6685 2 жыл бұрын
Why would someone use A's instead of any other char when doing a buffer overflow, what's the difference? I'm just getting into this stuff
@ChillerDragon
@ChillerDragon 5 жыл бұрын
Idk its so dry and forced humor but still I didn't cringe and actually enjoyed it xxD
@berndeckenfels
@berndeckenfels 3 жыл бұрын
Why is it a SEGV and not a SIGILL, is the signal Handler crashing?
@ezioarno15
@ezioarno15 5 жыл бұрын
even if you had used fgets or something like that there is still a format string vuln in the code
@arameskchannel
@arameskchannel 5 жыл бұрын
Nice haircut :)
@Vagelis_Prokopiou
@Vagelis_Prokopiou 5 жыл бұрын
Awesome 👍
@alkeryn1700
@alkeryn1700 5 жыл бұрын
I once used \xeb\x10 to jump forward after some byte that would always get corrupted for some reasons so my payload was \xeb\x10 + nop padding + actual shellcode
@Saimon404
@Saimon404 3 жыл бұрын
How to compile py file elf binary danayamic link.
@exploitify1716
@exploitify1716 5 жыл бұрын
He's obviously joking about the "wep application firewall" for c programs lol
@mrlithium69
@mrlithium69 4 жыл бұрын
he said "web" but yeah it was a very long way to go for a bad enterprise software dad-joke, lol.
@matzibeater
@matzibeater 5 жыл бұрын
Is it really necessary to write a "firewall" for buffer overflows in gets, when you should always just use fgets instead or am I missing something here? Let me quote from the man page: "BUGS Never use gets(). Because it is impossible to tell without knowing the data in advance how many characters gets() will read, and because gets() will continue to store characters past the end of the buffer, it is extremely dangerous to use. It has been used to break computer security. Use fgets() instead." Is it still that common to encounter gets() in the wild?
@steaboo9050
@steaboo9050 5 жыл бұрын
Yeah, you're missing the joke 🙃 The whole "firewall" thing is just making fun of stupid shit that people say. And you're right that gets() is ever used, but the purpose of this video is more about how to exploit a buffer overflow, rather than find one. The easiest way to create a BO is through gets(), so that's what you typically in these introductory videos.
@LiveOverflow
@LiveOverflow 5 жыл бұрын
Just making fun of web application firewalls ;)
@Tiogar60
@Tiogar60 5 жыл бұрын
Hi :)
@Mohsinkhan-bh7py
@Mohsinkhan-bh7py 5 жыл бұрын
Hi sir can you please share some web pen testing resources with me.
@gameglitcher
@gameglitcher 5 жыл бұрын
The hacker caught a bug.. 🤢
@zuhayr1337
@zuhayr1337 5 жыл бұрын
Is it only me that the video (face) doesn't match with audio?
@matthewsmeets
@matthewsmeets 5 жыл бұрын
You should have saved this for april 1rst
@xBZZZZyt
@xBZZZZyt 4 жыл бұрын
who uses lowercase "a"?
@saketshetty
@saketshetty 5 жыл бұрын
please do a hacker meme review
@happygimp0
@happygimp0 5 жыл бұрын
Please put to open and closing brackets on the same vertical or horizontal (most likely vertical) line. It is very hard otherwise.
@dxdarrel8843
@dxdarrel8843 4 жыл бұрын
I use a's for padding XD
@haydenallen888
@haydenallen888 5 жыл бұрын
Lol jokes at 1:45
@_livep
@_livep 5 жыл бұрын
16:06 Gesundheit
@u0000-u2x
@u0000-u2x 5 жыл бұрын
Self modifying shellcode, anyone?
@meudta293
@meudta293 5 жыл бұрын
666 likes (iluminaty)
@gamingdave5193
@gamingdave5193 5 жыл бұрын
Someone disliked already
@DantalionNl
@DantalionNl 5 жыл бұрын
This intro is sketchy AF lol
@RuneScapeH0sti
@RuneScapeH0sti 5 жыл бұрын
first here \o/
@payangbadrul8998
@payangbadrul8998 4 жыл бұрын
Sigfault I think its your mic. No seriously
Writing a Simple Buffer Overflow Exploit
19:41
LiveOverflow
Рет қаралды 146 М.
How Hackers Hide From Memory Scanners
21:11
John Hammond
Рет қаралды 60 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
File Path Race Condition & How To Prevent It - bin 0x31
7:55
LiveOverflow
Рет қаралды 48 М.
Exploit Fails? Debug Your Shellcode - bin 0x2B
10:01
LiveOverflow
Рет қаралды 61 М.
Generic HTML Sanitizer Bypass Investigation
14:05
LiveOverflow
Рет қаралды 142 М.
C++ Super Optimization: 1000X Faster
15:33
Dave's Garage
Рет қаралды 336 М.
My theory on how the webp 0day was discovered (BLASTPASS)
15:03
LiveOverflow
Рет қаралды 61 М.
Python 2 vs 3 for Binary Exploitation Scripts
18:43
LiveOverflow
Рет қаралды 86 М.
Malware Development: Processes, Threads, and Handles
31:29
The Circle of Unfixable Security Issues
22:13
LiveOverflow
Рет қаралды 117 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 296 М.
The Heap: Once upon a free() - bin 0x17
15:12
LiveOverflow
Рет қаралды 60 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН