CIS-5373: 6.January.2020
1
Bogdan Carbunar
CIS-5373 Systems Security
Class 1
CIS-5373 Systems Security Class 1 Bogdan Carbunar 1 CIS-5373: - - PowerPoint PPT Presentation
CIS-5373 Systems Security Class 1 Bogdan Carbunar 1 CIS-5373: 6.January.2020 Outline Administrative Issues Textbooks Security Overview 2 CIS-5373: 6.January.2020 Administrative Issues Staff Bogdan Carbunar, associate
CIS-5373: 6.January.2020
1
Bogdan Carbunar
Class 1
CIS-5373: 6.January.2020
2
CIS-5373: 6.January.2020
3
CIS-5373: 6.January.2020
4
CIS-5373: 6.January.2020
5
CIS-5373: 6.January.2020
6
CIS-5373: 6.January.2020
7
CIS-5373: 6.January.2020
8
CIS-5373: 6.January.2020
9
CIS-5373: 6.January.2020
10
CIS-5373: 6.January.2020
11
CIS-5373: 6.January.2020
12
CIS-5373: 6.January.2020
13
CIS-5373: 6.January.2020
14
CIS-5373: 6.January.2020
15
CIS-5373: 6.January.2020
16
CIS-5373: 6.January.2020
17
CIS-5373: 6.January.2020
18
CIS-5373: 6.January.2020
19
CIS-5373: 6.January.2020
20
CIS-5373: 6.January.2020
21
CIS-5373: 6.January.2020
22 Class 2
CIS-5373: 6.January.2020
23
CIS-5373: 6.January.2020
24
CIS-5373: 6.January.2020
25
CIS-5373: 6.January.2020
26
slide 26
CIS-5373: 6.January.2020
27
slide 27
CIS-5373: 6.January.2020
28
slide 28
CIS-5373: 6.January.2020
29
slide 29
Allocate local buffer (126 bytes reserved on stack) Copy argument into local buffer
Stack grows this way
Local variables
Frame of the calling function
Execute code at this address after func() finishes
Arguments
Pointer to previous frame
CIS-5373: 6.January.2020
30
slide 30
Stack grows this way
Local variables
Frame of the calling function
Execute code at this address after func() finishes
Arguments
Pointer to previous frame
CIS-5373: 6.January.2020
31
slide 31
strcpy does NOT check whether the string at *str contains fewer than 126 characters
Stack grows this way
Frame of the calling function
This will be interpreted as return address!
CIS-5373: 6.January.2020
32
slide 32
Attacker puts actual assembly instructions into his input string, e.g., binary code of execve(“/bin/sh”) In the overflow, a pointer back into the buffer appears in the location where the system expects to find return address
Frame of the calling function
CIS-5373: 6.January.2020
33
CIS-5373: 6.January.2020
34
slide 34
Local variables
Frame of the calling function
Execute code at this address after func() finishes
Arguments
Pointer to previous frame
CIS-5373: 6.January.2020
35
slide 35
Local variables
Frame of the calling function
Execute code at this address after func() finishes
Arguments
Pointer to previous frame
CIS-5373: 6.January.2020
36
slide 36
slide 36
Local variables
Frame of the calling function
Execute code at this address even after func() finishes
Arguments
Pointer to previous frame
CIS-5373: 6.January.2020
37
slide 37
CIS-5373: 6.January.2020
38
slide 38
CIS-5373: 6.January.2020
39
slide 39
Copies username (“user”) into buffer (“record”), then appends “:” and hashed password (“cpw”)
CIS-5373: 6.January.2020
40
MAX_STRING_LEN bytes allocated for record buffer
Put up to MAX_STRING_LEN-1 characters into buffer
Put “:”
Again put up to MAX_STRING_LEN-1 characters into buffer
CIS-5373: 6.January.2020
41
slide 41