Welcome to Part 6 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 understand how to use the
shellcode created in the previous video to exploit an actual program. We will first take an example program
ExploitMe.c and look at how it's stack is organized. Then, we will create a environment variable "EGG" which will be custom made to smash ExploitMe.c's stack and overwrite it with the shellcode and replace the original RET address with a new one pointing to our shellcode. Once this is done, we have full control of the EIP and once main() returns, our shellcode will be executed. Though this video is entirely in presentation mode, it is probably the most important video of this entire series. If you understand the stack overwriting logic explanied here, you are done learning buffer overflows :) The next video will consist of the actual demo of the exploitation process.