Buffer Overflow Primer Part 7 (Exploiting A Program Demo)
|
|
|
||||||||||||
Description: Welcome to Part 7 of the Buffer Overflow Primer. If you have not already done so, please start this series by viewing Part 1. The Buffer Overflow Primer requires that you know at least some basic Assembly Language. I have created a series of Assembly Language video tutorials for Hackers here, for those not familiar with the language.
In this video we will do a buffer overflow exploitation demo using HackYou.c and ExploitMe.c . We will first execute HackYou.c to inject the shellcode into the environment variable EGG. Then, we will invoke ExploitMe.c with the $EGG input. This will cause the stack to be over written by the $EGG environment variable and plant our shellcode on the stack, and replace the RET address to point to our shellcode. Now, when main() returns, our shellcode is called. As expected the shellcode runs and spawns a shell :) It is important to note that in this video there are no protection mechanisms for the stack such as NX, ASLR etc. We will deal with how to exploit the stack in presence of these protections in later videos.
This video is part of the following groups:
1. Buffer Overflow Exploitation Megaprimer for Linux ( 9 videos)
Comments (13)
|
xplt on Wed 02 Mar 2011 You're the best! =D |
|
|
xplt on Wed 02 Mar 2011 I forgot to ask you something. Why does this don't work on ubuntu 9.10? That's because the ubuntu manage the stack diferently than slackware? Because i tried to execute the programs desabling the SSP, but it still didn't work. |
|
|
Vivek-Ramachandran on Wed 02 Mar 2011 I'd have to probably check what mitigations that specific version of Ubuntu ships by default but it could be anything - DEP, ASLR, Stack Cookies etc. In some circumstances, some or all of these protections can be bypassed. |
|
|
Col_Loki on Sat 30 Apr 2011 Brilliant. Looking forward to finishing this series tomorrow. |
|
|
escube on Sat 04 Jun 2011 Hi Vivek, and Hi to everybody. |
|
|
3ntropy on Sat 18 Jun 2011 thank you for the tutorial, it was really excellent. |
|
|
smartboy on Tue 12 Jul 2011 Thanks you very much. |
|
|
Josh on Sun 21 Aug 2011 So to find the return address, you just sued the top of the stack? You surely can not always do this, so how would you work out the return address otherwise? |
|
|
kilgore on Sat 17 Sep 2011 Once again, thank you for the time and effort you've taken to share your knowledge. |
|
|
t0ph4tter on Tue 18 Oct 2011 I am having some problems getting this to work. As you can see below, I have gotten ret to point back to esp: |
|
|
t0ph4tter on Tue 18 Oct 2011 Thanks for the video by the way. Even though I haven't gotten it working, I feel like I understand the concepts a lot better. |
|
|
Patcher on Wed 21 Dec 2011 @t0ph4tter same error, did u find a fix?? |
|
|
dikien on Sun 25 Dec 2011 thank you, I failed because security cookies...Now I'm figuring out what it is!! |







