Chapter 10: 1
Computer Security 3e
Dieter Gollmann
Security.di.unimi.it/sicurezza1314/
Computer Security 3e Dieter Gollmann - - PowerPoint PPT Presentation
Computer Security 3e Dieter Gollmann Security.di.unimi.it/sicurezza1314/ Chapter 10: 1 Chapter 10: Software Security Chapter 10: 2 Secure Software Software is secure if it can handle intentionally malformed input; the attacker picks (the
Chapter 10: 1
Security.di.unimi.it/sicurezza1314/
Chapter 10: 2
Chapter 10: 3
Chapter 10: 4
Chapter 10: 5
Chapter 10: 6
Chapter 10: 7
Chapter 10: 8
Chapter 10: 9
Chapter 10: 10
Chapter 10: 11
Chapter 10: 12
Chapter 10: 13
00100101 00110010 01100110 = %2f ( = /)
Chapter 10: 14
Chapter 10: 15
Chapter 10: 16
16 ξ 17 = 16 0 – 1 = 255
127 + 1 = -128
Chapter 10: 17
Chapter 10: 18
char buf[128]; combine(char *s1, size_t len1, char *s2, size_t len2) { if (len1 + len2 + 1 <= sizeof(buf)) { strncpy(buf, s1, len1); strncat(buf, s2, len2); } } Example from Markus Kuhn’s lecture notes len1 < sizeof(buf) len2 = 0xffffffff len2 + 1 = 232-1 + 1 = 0 mod 232 strncat will be executed
Chapter 10: 19
Chapter 10: 20
0000 FFFF
Chapter 10: 21
Chapter 10: 22
Chapter 10: 23
Chapter 10: 24
. . .
Chapter 10: 25
value1 my_address value2
return address buffer for variable A write to A: value1| value2| my_address
Chapter 10: 26
Chapter 10: 27
address and address of the input containing the shellcode.
Chapter 10: 28
relative to a vulnerable buffer.
Chapter 10: 29
Chapter 10: 30
Chapter 10: 31
Chapter 10: 32
T t = the pointer tagged T; U u = the pointer tagged U; t.x = System.getSecurity(); MyObject m = u.x; class T { SecurityManager x; } class U { MyObject x; }
Chapter 10: 33
Chapter 10: 34
Chapter 10: 35
Chapter 10: 36
$sql = "SELECT * FROM client WHERE name= ‘$name’"
SELECT * FROM client WHERE name = Bob’ OR 1=1--
Chapter 10: 37
the construction of a command.
constructed and executed so that unsafe input can do no harm.
and the parameter values.
input.
Chapter 10: 38
the construction of a command.
constructed and executed so that unsafe input can do no harm.
and the parameter values.
input.
Chapter 10: 39
Chapter 10: 40
servlets).
Chapter 10: 41
Chapter 10: 42