Tutor: Guillaume Didier guillaume.didier AT irisa.fr
Out of bound accesses (and writes) to buffer are a recurring issue in computer security, especially for code bases written in C based language. In this project we explore how to exploit buffer overflows (that is writes past the end of buffers) in order to hijack the control flow of the program.
This project will involve learning about the program stack memory layout, assembly, and in the last part memory allocator structures.
Your mission is to exploit our target programs in various ways to demonstrate that you are able to execute code of your choice.
You should be able to each time take control of the instruction pointer and pass parameters of your choice to the target function.
You should start with the unprotected stack target, then the protected stack, and last with the heap buffer overflow.
We will provide a Virtual machine on which to run the targets, in order to have a reproducible environment. You can find more details on how to exploit the target here: [PDF]
We expect a report of how you set up your different attacks. We also expect you to provide the hex representation of all your attack strings.
On the first target, ctarget :
On the second target you should try to:
On the last target, you are expected to create an exploit string that:
Are you, really?
You can explore how to get an actual shell instead of calling target functions.
Read this seminal publication first to familiarize yourself with buffer overflows:
During the final presentation, you should summarize these two papers:
More publications about attacks on the heap for the last part of the project (to read in order):
And other resources for more background information: