What is Buffer Overflow?
Writing data to a buffer overruns the buffer boundary and overwrites the memory.
Located in the stack, heap and data section of the process
Consequences of Buffer Overflow
Exploiting Buffer Overflow attacks
Identify vulnerable programs
What is Stack Buffer Overflow?
What is Stack Frame?
Shell code and Machine code
Machine code
Stack Overflow variants + the target programs
Target programs:
Buffer Overflow Defence
Compile time: Hardens programs to resist attacks in new programs
Runtime: DETECT + ABORT attacks from **existing programs **
Compile Time Defences: Programming Language
Compile Time Defences: Safe Coding Techniques
Compile Time Defences: Languages Extensions/Safe Library
Compile Time Defences: Stack Protection
Run Time Defences: Executable Address Space Protection
Issues:
Run Time Defences: Address Space Randomisation
Stack, heap and global data
Run Time Defences: Guard Pages
Any attempted access aborts process
Replacement Stack Frame
Off-by-one attacks
Return to System call
Global Data Overflow
Defence:
SQL Injection Attack
Command injection
Cross site scripting