Put more data than defined in a buffer to access other part of the memory that will be run later. Attacker can add commands for his benefit.
- Stack – Got access to the OS
- Heap – Got access to the memory of the application
Susceptible C functions: strcat, strcpy, sprintf, vspintf, bcopy, gets, scanf
Stack is created at the begining of the function and deleted at the end. LIFO – Last In, First Out.
- Push – place one item on the top of the stack
- Pop – remove one item from the top of the stack
Assembly Language Pointers
- EIP – Extended Instruction Pointer – Points to the code that you are currently executing
- ESP – Extended Stack Pointer – Points to the current position on the stack
- EBP – Extended Base Pointer – Points to the top of the stack