Chapter 10 (Buffer Overflow) Flashcards

1
Q

what is a buffer overflow

A

when more input can be placed into a buffer or data holding area than the capacity allocated for so it overwrites neighboring information

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

where are 3 locations a buffer could be located

A

stack, heap, data section of a process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what are 4 possible consequences of a buffer overflow attack

A

corruption of prog data

unexpected transfer of control

mem access violations

execution of code selected by attacker

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what are 2 things an attacker needs to know to execute a buffer overflow attack

A

identify vulnerability in some prog that can be triggered using external sourced data

understand how that buffer is stored in memory and determine potential for corruption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

3 ways that you can identify vulnerable programs

A

inspect program source

trace execution of prog as they process oversize input

using tools such as fuzzing to automaticcly identify potential programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what makes a prog lang vulnerable to buffer overflow attacks

A

when they allow direct access to memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

why is a stack frame needed

A

when one function calls another it needs somewhere to save return address

also saves parameters to be passed into function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what are some common unsafe C standard lib functions

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is shell code

A

provided by attacker, transfers control to user command line interpreter (shell)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

where is shell code saved

A

in buffer being overflowed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

3 possible things the target program can be

A

trusted sys utility

network service daemon

commonly used library code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what are these possible functions of

A

shellcode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

2 broad defense approaches against buffer overflow and their aims

A

compile time: harden programs to resist attacks in new programs

runtime: aim to detect and abort attacks in existing programs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

what was the goal of the openBSD project

A

rewrite unsafe coding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what is 1 compile time defense with C

A

use a safe variant of std lib functions like libsafe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is stack protection, and what is important to do when implementing it

A

add functions to entry and exit code to check stack for signs of corruption

use a random canary so diff on diff systems

17
Q

how does stackshield and return address defender work

A
18
Q

what does executable address space protection do? and what type of overflow protection is it

A

uses virtual mem support to make some regions of memory non-executable

run time defense

19
Q

what does address space randomization do and what type of defense is it

A

randomizes location of key data structures (stack, heap, global data)

20
Q

what do guard pages do and what type of defense is this

A

places guard pages between critical regions of memory, run time defense

21
Q

why is it not easy to transfer control in a heap overflow

A

heap has no return address

22
Q

what are targeted in heap overflows

A

function pointers

manipulate management data structures

23
Q
A