Section 18.175 Buffer Overflow Flashcards

Objectives 2.2 Explain common threat vectors and attack strategies. Objectives 2.3 Explain various types of vulnerabilities Objectives 2.4 Given a scenario, you must be able to analyse indicators of malicious activity. Objectives 2.5 Explain the purpose of mitigation techniques used to secure the enterprise. Objectives 2.6 Given a scenario, you must be able to apply common security techniques to computing resources.

1
Q

Buffer Overflow

A

Occurs when data exceeds allocated memory, potentially enabling unauthorised access or code execution

■ Common initial attack vector in data breaches

● 85% of data breaches used buffer overflow as the initial vector

■ Attackers exploit the excess data written beyond buffer boundaries to manipulate program execution

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

Buffer

A

A temporary storage area where a program stores its data

■ They have a defined memory capacity, just like a glass holding a limited amount
of water

■ Overflowing a buffer results in data spilling into adjacent memory locations,
causing unintended consequences

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

Buffer Overflow Attack - Technical Aspects

Stack

A

Programs have a reserved memory area called a stack to store data during
processing

■ The stack uses a “first in, last out” organisation

■ Stack contains return addresses when a function call instruction is received

■ Attackers aim to overwrite the return address with their malicious code’s address

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

Smashing the Stack

A

Attackers aim to overwrite the return address with a pointer to their malicious
code

■ When the non-malicious program hits the modified return address, it runs the
attacker’s code

■ This gives attackers a command prompt on the victim’s system for remote code execution

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

NOP Slide

A

Attackers fill the buffer with NOP (No-Operation) instructions

■ The return address slides down the NOP instructions until it reaches the
attacker’s code

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

Mitigations against Buffer Overflow Attack

A

Address Space Layout Randomization (ASLR)

● Helps prevent attackers from guessing return pointer addresses

● Randomises memory addresses used by well-known programs, making it
harder to predict the location of the attacker’s code

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