Software Security Flashcards

1
Q

Buffer Overflow

A

takes advantage of the stack

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

What is unique about C strings?

A

null terminating character at the end

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

What directions do strings grow in?

A

Upwards

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

What direction does the stack grow in?

A

Downward (from high memory addresses to low memory addresses)

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

What direction does the heap grow in?

A

Upward

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

Where are the stack and heap in relation to each other?

A

They share space, but grow in different directions

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

Shell Code

A

Creates a code that will execute any code

Has same privilege level as the host program that launched it

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

Shell Injection

A

return address of function is overwritten to point to shell code in the buffer

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

Return-to-libc

A

return address of function is overwritten to point to a standard library function

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

Heap Overflows

A

data stored in the heap is overwritten

manipulation using malloc()/free()

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

OpenSSL Heartbleed Vulnerability

A

Query database for information, setting the length of the return regardless of what the information contains

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

How does a programming language prevent buffer overflow attacks?

A

Strongly typed, autobound checks, auto memory management

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

What is a drawback of using a programming language to prevent buffer overflow attacks?

A

Performance suffers

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

If you have to use an unsafe language, what should you do to prevent buffer overflow attacks?

A

Check inputs, check bounds, perform code analysis

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

How do stack canaries work?

A

Random integer put before a return address that is checked to see if the buffer has been manipulated

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

How does address space layout randomization work?

A

Randomizes the memory location of the stack, heap, libc, etc

Can use a non-executable stack with ASLR for added security