Chapter 10 Flashcards
buffer overflow
Buffer overflow
more input can be placed into buffer /data holding area than capacity allocated, overwriting other info-crash system /gain control
Consequences
- corruption
- transfer of control
- memory access violations
- execution of code
Needs for buffer overflow attack
- identify buffer overflow vulnerability in program
- understand how buffer stored in memory
Attacks
- stack buffer overflows
- Shellcode -code from attacker
eax
arithmetical + IO operations + interrupt calls
ebx
base register - access memory , pass system call arguments + return values
ecx
count register
edx
arithmetic, interrupt calls , IO operations
ebp
base pointer - address of current stack frame
eip
instruction pointer - address of next instruction
esi
source index - pointer for string /array operations
esp
stack pointer - address of top of stack
Defenses - compile time
harden programs to resist attacks
1. high-level language
2. safe coding techniques
3. safe libraries
4. stack protection - function entry + exit code
- entry write copy of return address in safe space in memory
- exit check return address in stack against saved
Defences - run time
- executable address space protection
- address space randomization
- Guard pages - page between critical portions in memory
replacement stack frame
way to get control using dummy stack frame