Lec 9: Software Security 2: Implementation Vulnerabilities 2: Heap, Integer, Format Strings Flashcards

1
Q

What is the malicious code assumption of Return-oriented Programming?

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

Suppose you have a stack overflow but can only redirect control flow to existing code. What can you (the attacker) do?

A

You can still jump to any legitimate instruction

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

Suppose you have a stack overflow but can only redirect control flow to existing code? What if you jump into the middle of some code and that code ends witha RET instruction? Where does control flow go now? Who controls that value?

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

What is return-oriented programming?

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

What vulnerability in a RET instruction is used in ROP?

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

What does ROP do?

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

What is an example of an ROP attack?

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

Are heap overflows are reliable exploit?

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

How do simple heap overflows work?

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

What is PointerGuard?

A

A defense against heap overflows and return-to-libc attacks that allow adversary to currpy code pointers but prevent them from controling the contents

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

How does PointerGuard work?

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

In PointerGuard, when are pointers encrpyed and decrypted?

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

How do generic heap overflows work?

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

What is a typical heap overflow problem?

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

When can you do a heap overflow attack?

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

What has been done to prevent heap overflows from happening on Windows?

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

What causes integer vulnerabilities?

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

What is an example of an integer vulnerability?

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

C/C++ Integer review (type representation)

How many bits in a char, short, int, long long, and what are the ranges os signed vs unsigned?

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

What type of integer errors can occur?

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

What is an integer truncation error?

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

What are integer sign errors?

A
23
Q

What is done to protect from integer errors?

A
24
Q

How does SafeInt work?

A
25
Q

What are format strings?

A
26
Q

How are format strings implemented?

A
27
Q

What does printf look like on the stack?

A
28
Q

What is the key problem with format strings?

A
29
Q

How can format strings be exploited?

A
30
Q

How can you use format strings to read the stack?

A
31
Q

How do you use format strings to view other parts of memory besides the stack?

A
32
Q

Can format strings be overflowed? Why or why not?

A
33
Q

How can you perform a writing format string exploit?

A
34
Q

What can be done to prevent format string exploits?

A
35
Q

What is cannonicalization?

A

In computer science, canonicalization (sometimes standardization or normalization) is a process for converting data that has more than one possible representation into a “standard”, “normal”, or canonical form.

36
Q

What is a cannonicalization problem in security?

A
37
Q

What is the Turkish-I problem and how do you properly handle it?

A
38
Q

What is the problem with terminating a loop (*url++ != ‘/’)?

A
39
Q

What is the vulnerability in terminating a loop with (*url++ != ‘/’) && (*url != 0);?

A
40
Q

What is a bitfield?

A
41
Q

What are the vulnerabilities with Bitfields?

A
42
Q

How are arrays of objects allocated/deallocated?

A
43
Q

What is the problem with using delete on an array of objects instead of delete[]?

A
44
Q

What is wrong with this code?

A
45
Q

What does TOCTOU stand for?

A

Time of check/time of use

46
Q

What is the key issue that causes TOCTOU vulnerabilities?

A
47
Q

What is an example of TOCTOU?

A
48
Q

What is the problem with this?

A
49
Q

What is suid and what does it do?

A
50
Q

What is the vulnerability of this code? How would you attack it?

A
51
Q

How realistic is a TOCTOU suid attack?

A
52
Q

What do you do to protect against TOCTOU attacks?

A
53
Q

What are prevention tips against suid attacks?

A