Buffer Overflow Primer Part 1 (Smashing The Stack)
|
|
|
||||||||||
Description: In this video series we will learn the basics of Buffer Overflow attacks and demonstrate how one can exploit Buffer Overflows in programs for fun and profit. The pre-requisite for this video series is that you are familiar with Assembly language. If you are not familiar with Assembly language, no worries, I have created detailed video tutorials for Assembly language here - Assembly Language Primer for Hackers.
In Part 1 of the Buffer Overflow series we will look at why buffer overflow attacks happen. We will discuss how the program stack is laid out when a function call happens, then how a buffer can be overwritten if proper bounds checking does not happen and finally how a hacker could take control of the program by overwriting the return address stored on the stack to an arbitrary value. We will use a sample program - Demo.c to demonstrate how it is possible to change the Return address by overwriting the stack using user supplied input.
This video is part of the following groups:
1. Buffer Overflow Exploitation Megaprimer for Linux ( 9 videos)
Comments (35)
|
sailboat on Sat 26 Feb 2011 For anyone who is trying to make these examples work, make sure that when you compile, you include the following option -fno-stack-protector so gcc -ggdb -mpreferred-stack-boundary=2 -fno-stack-protector -o demo demo.c |
|
|
c-b51 on Tue 01 Mar 2011 firstly thank you for the assam example-videos. |
|
|
H4TT1fn4TT on Thu 03 Mar 2011 Did you had to write them in reverse order because there is a last in first out rule? |
|
|
c-b51 on Fri 04 Mar 2011 yes, that was my own mistake. thank you for your fast help. i found that error on the same day. but i have an another question. my esp show me 0x14 and not 0x8. what should i do in this case? |
|
|
raju on Tue 22 Mar 2011 its a amazing video |
|
|
tektonik on Sat 26 Mar 2011 [quote]c-b51: yes, that was my own mistake. thank you for your fast help. i found that error on the same day. but i have an another question. my esp show me 0x14 and not 0x8. what should i do in this case?[/quote] |
|
|
atoi on Wed 20 Apr 2011 First off, awesome vid once again! Thanks for the information :) |
|
|
Col_Loki on Tue 26 Apr 2011 Just so helpful, quite a complex topic to cover and you do it so well. Keep up the good work! |
|
|
resoliwan on Sun 08 May 2011 it so good but i have a question |
|
|
oscarozuna on Mon 30 May 2011 nice videos |
|
|
4dm1n on Sun 05 Jun 2011 Nice presentation. ru from chennai.. Mr.ramchandhran |
|
|
rails345 on Mon 06 Jun 2011 Excellent presentation evident of a lot of thought and work. Interesting that the gdb step function follows the lines of the program (language) that is actually executed. |
|
|
smartboy on Thu 30 Jun 2011 Excellent presentation. I really appreciate your efforts. thanks. |
|
|
xsurf on Wed 06 Jul 2011 Thank sailboat for your comment. |
|
|
rakesh on Sun 31 Jul 2011 excellent mr.ramchandhran.. |
|
|
SpEcTeR on Tue 02 Aug 2011 thank you so much.Actually for a long time I was spending many time for understanding buffer overflow.Moreover I found many books about that.But your video was perfect and clear. |
|
|
ethico on Sat 20 Aug 2011 i am glad i found this video. thanks and looking forward to see the exploitation part. |
|
|
Alos on Sun 16 Oct 2011 thank u! vivek!!!! :) greetings from mexico |
|
|
t0ph4tter on Sun 16 Oct 2011 I watched your assembly primer and found it really helpful, but this video is where the really cool stuff happens! I finally registered just to comment on this video. The memory addresses were a bit different so I had to work some of it out on my own, but I got it working and feel like I really understand it. Thank you and keep up the great work! |
|
|
Kao on Wed 02 Nov 2011 Which Linux version shoul I use to test it and where to download, please? I always get the message from some security solution :( |
|
|
dZONE on Fri 04 Nov 2011 Great work Vivek..it all goes down nice and clear now.....Keep it up..we need more guys like u!! |
|
|
stock on Thu 01 Dec 2011 I tried to run the demo in gdb but instead of reserving 8 bytes, cpu go ahead to do `sup $10, %esp`. I can't figure out why the reservation of space is double (from 8 to 16 byte). Does anyone got the similar problem? I understand the memory map may not be the same (coz address randomizer at start), but the amount of memory reserved should be fixed by 8 (because we did "char buffer[8]")?? |
|
|
PuN1sh3r on Thu 08 Dec 2011 hey man, i want to thank you for taking the time to do all this videos. good damn work, please keep it up man you r doing fantastic... :) |
|
|
dikien on Sun 25 Dec 2011 thank you! from south korea!! |
|
|
Prd_schumy on Thu 29 Dec 2011 Loved it...thanks ! -as ever...you smooth as silk ! |
|
|
JuanV on Wed 25 Jan 2012 I always been looking for some good explanation about the exploits until i found this. |
|
|
hacknix on Thu 26 Jan 2012 I need someone who is capable of hacking* websites & accessing their email database |
|
|
G3RM4N on Thu 15 Mar 2012 Thank you for the great video!! |
|
|
gundu on Sun 18 Mar 2012 excellent video........:) |
|
|
adam on Wed 28 Mar 2012 Thank you for wonderful videos Vivek, this also works nicely for 64bit :D |
|
|
genuine on Sun 15 Apr 2012 Very well explained, could i get more information on the machine setup you have in the video? software, OS etc.. |
|
|
SeshaKiran on Thu 26 Apr 2012 Awesome video. very thorough. |
|
|
Wilson on Thu 26 Apr 2012 Hi guys, could somebody help me please ? In the assembly megaprimer i've successfully ported all the programs to x64 ( i'm working on a x64 Backtrack R2 ) but i can't make this vulnerability work on my x64 system , and i just can't figure out why , i've tried to search after tutorials on overflowing x64 programs but i haven't found one yet |
|
|
mayurkumar on Thu 03 May 2012 hello sir, |
|
|
orrala on Sat 05 May 2012 @stock: I had the same problem, it looks like some versions of gcc have a stack smashing detection module, so, it can be disabled adding -fno-stack-protector parameter to the compilation. |


