CECS 378: Final - Buffer Overflow

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/23

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

24 Terms

1
New cards

Buffer Overflow

An attack that occurs when a process attempts to store data in RAM beyond the boundaries of a fixed-length storage buffer. Attacker can crash a system or insert a malicious code that allows them to gain access to the system.

2
New cards

Which worm used a buffer overflow attack back in 1988

Morris Worm

3
New cards

Is it still a major concern?

Yes.

Issues in legacy code

From careless programming practices

4
New cards

Ways of Identifying a vulnerable program

Inspect the program source code

Trace the execution of the program based on the inputs given to it.

5
New cards

Are modern high-level languages vulnerable to buffer overflows

No as they require a strong notion of type and valid operations. However, it does incur overhead.

6
New cards

Are C and related languages vulnerable to buffer overflows?

Yes as they have direct access to memory.

7
New cards

Stack Frame

A stack frame contains all the data for one function call: its parameters, the return address, and its local variables.

8
New cards

Common unsafe C Standard Library Routines (SLR)

gets(char *str) read line from standard input into str

sprintf(char str, char format) create str according to supplied format and variable

strcat(char dest, char src)

strcpy(char dest, char src)

vsprintf(char str, char fmt, va_list ap) create str according to supplied format and variables

9
New cards

Shellcode

Code that is supplied by the attacker. The code is saved in the buffer and when executed, the program would transfer control to the attacker.

10
New cards

Metasploit Project

Provides useful information to people who perform penetration, IDS signature development, and exploit research

11
New cards

Target Program can be:

A trusted system utility

Network service daemon

Commonly used library code

12
New cards

Shellcode Functions

Launch a remote shell when connected to

Create a reverse shell that connects back to the hacker

Use local exploits that establish a shell

Flush firewall rules that currently block other attacks

Break out of a chroot (restricted execution) environment, giving full access to the system

13
New cards

Two Buffer Overflow Defense

Compile Time - Aim to harden programs to resist attacks in new programs

Run Time - Aim to detect and abort attacks in existing programs

14
New cards

Disadvantages of Compile-Time Defenses

Additional code must be executed at run time to impose checks

Flexibility and safety comes at a cost in resource use

15
New cards

Compile-Time Def: Safe Coding Techniques

C designers placed much more emphasis on space efficiency and performance considerations than on type safety

Programmers have audited the existing code base, including the operating system, standard libraries, and common utilities

16
New cards

Compile-Time Def: Language Extensions/Safe Libraries

One approach has been to replace these with safer variants

17
New cards

Compile-Time Def: Stack Protection

Add function entry and exit code to check stack for signs of corruption

18
New cards

Run-Time Def: Executable Address Space Protection

Use virtual memory support to make some regions of memory non-executable

19
New cards

Run-Time Def: Address Space Randomization

Manipulate location of key data structures

Randomize location of heap buffers

Random location of standard library functions

20
New cards

Run-Time Def: Guard Pages

Place guard pages between critical regions of memory

21
New cards

Heap Overflow

Attack buffer located in heap

No return address

22
New cards

Heap Overflow Defense

Making the heap non-executable

Randomizing the allocation of memory on the heap

23
New cards

Global Data Overflow

Can attack buffer located in global data

24
New cards

Global Data Overflow Defense

Non executable or random global data region

Move function pointers

Guard pages