P1L2: Software Security Flashcards

1
Q

What are stack buffer overflows?

A

Inserting extra instructions into a command to force an overlfow that inserts calls to malware.

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

The stack buffer is used for

A
Local variables
Parameters passed to the function
Control information (ie return address)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is shellcode?

A

The code the attacker whats to launch

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

What does shellcode do?

A
  1. Creates a shell from machine code.

2. Must have a return address that is a legitimate return address.

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

What privileges does shellcode allow?

A

The same privileges that the host program exploited by the shellcode has.
The system service or OS root privileges

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

What variations of buffer overflow exist?

A

Return-to-libc: return address is overwritten to point to a funciton in a library.

Heap Overflows: Long lived data get stored on the heap (alloc/malloc/globals)

OpenSSL Heartbleed: Attacker reads sensitive data

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

What is Return-to-libc?

A

return address is overwritten to point to a funciton in a library.

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

Heap Overflows

A

Long lived data get stored on the heap (alloc/malloc/globals)

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

OpenSSL Heartbleed

A

Attacker reads sensitive data

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

Example of safe language

A

Java

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

Example of an unsafe language

A

C

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

What is the defense if unsafe languages must be used?

A

Check all input
Use safer functions that do bounds checking
Use automatic tools to analyze code for unsafe functions.

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

What are ways to thwart Buffer Overflow Attacks?

A

Stack canaries: Values written into the stack frame just before the return address

Address Space Layout Randomization(ASLR): Randomized the stack, heap, etc.

Non-executable Stack: Used with ASLR. Requires hardware support

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

To exploit any type of buffer overflow the attacker needs to identify a buffer overflow vulnerability in some program that can be triggered using externally sourced data under the attackers control. T/F

A

True

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

At the basic machine level, all of the data manipulated by machine instructions executed by the computer processor are stored in either the processor?s registers or in memory. T/F

A

True

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

A stack overflow can result in some form of a denial-of-service attack on a system. T/F

17
Q

An attacker is more interested in transferring control to a location and code of the attacker’s choosing rather than immediately crashing the program. T/F

18
Q

The potential for a buffer overflow exists anywhere that data is copied or merged into a buffer, where at least some of the data is read from outside the program. T/F

19
Q

Shell code is not specific to a particular processor architecture. T/F

20
Q

There are several generic restrictions on the content of shell-code T/F

21
Q

An attacker can generally determine in advance exactly where the targeted buffer will be located in the stack frame of the function in which it is defined. T/F

22
Q

It is possible to write a compiler tool to check a program and identify all possible buffer overflow bugs. T/F

23
Q

It is possible to develop a run-time monitoring tool to detect the effects of all possible buffer overflow attacks. T/F

24
Q

A consequence of a buffer overflow error is _____.

A
  1. corruption of data used by the program.
  2. unexpected transfer of control in the program.
  3. possible memory access violation.
25
The function of _____ was to transfer control to a user command-line interpreter, which gave access to any program available on the system with the privileges of the attacked program.
Shellcode
26
_____ is a form of overflow attack.
1. Heap overflows 2. Return to system call 3. Replacement stack frame
27
Data is simply an array of
bytes
28
Shellcode has to be ______, which means it cannot contain any absolute address referring to itself.
position dependent
29
______is one of the best known mechanisms that is a GCC compiler extension that inserts additional function entry and exit code.
Stackguard
30
The ____is typically located above the program code and global data and grows up in memory (while the stack grows down towards it).
Heap
31
A _____ value is named after the miner's bird used to detect poisonous air in a mine and warn miners in time for them to escape.
Canary
32
OpenSSL Heartbleed Vulnerability
read much more of the buffer than just the data, which may include sensitive data.
33
NOP Sled
A bunch of NOPs that helps the attacker make the program run his shellcode
34
What does a Stackguard do at compile time?
writes the canary
35
Guard pages
A range of addresses that are flagged as illegal addresses in case an attacker tries to overflow to them
36
Replacement Stack Frame attack
Overwrites buffer and saved frame pointer address. The saved frame pointer points to a dummy stack frame whose return address is the start of the shellcode in the buffer.