Stack Buffer Overflows
Understand stack layout, overflow EIP/RIP, write a working exploit for a vulnerable C binary.
What is a Buffer Overflow?
A buffer overflow occurs when more data is written to a buffer than it can hold. The excess data overwrites adjacent memory, potentially corrupting control structures and redirecting program execution.
Stack Memory Layout
The call stack holds: local variables (buffers), saved frame pointer (SFP), and the return address (RIP/EIP) — where execution continues after the function returns. Overflowing a local buffer can overwrite the return address.