Protecting Computer Systems through Eli liminating or Analyzing Vulnerabilities
Byoungyoung Lee Georgia Institute of Technology
1
Protecting Computer Systems through Eli liminating or Analyzing - - PowerPoint PPT Presentation
Protecting Computer Systems through Eli liminating or Analyzing Vulnerabilities Byoungyoung Lee Georgia Institute of Technology 1 Computers are every rywhere 2 Computers are every rywhere Affecting every aspect of our life 2
1
2
2
3
3
4
4
Applications Operating system Hardware
5
Applications Operating system Hardware
5
Applications Operating system Hardware
5
Applications Operating system Hardware
5
Applications Operating system Hardware 9 million lines of code
5
Applications Operating system Hardware 9 million lines of code 9 million lines of code
5
6
7
Vulnerability Exploitation Compromise
8
Vulnerability Exploitation Compromise Offer unexpected actions
8
Vulnerability Exploitation Compromise Abuse vulnerabilities Offer unexpected actions
8
Vulnerability Exploitation Compromise Abuse vulnerabilities Run malicious actions Offer unexpected actions
8
Vulnerability Exploitation Compromise
9
Vulnerability Exploitation Compromise
9
Vulnerability Exploitation Compromise
9
Vulnerability Exploitation Compromise
9
10
Vulnerability Exploitation Compromise
11
Vulnerability Exploitation Compromise
11
Vulnerability Exploitation Compromise
11
Vulnerability Exploitation Compromise
11
Vulnerability Exploitation Compromise
11
Vulnerability Exploitation Compromise
11
Vulnerability Exploitation Compromise
11
Vulnerability Exploitation Compromise
11
Vulnerability Exploitation Compromise
11
Vulnerability Exploitation Compromise
11
12
12
12
12
12
12
12
12
12
Vulnerability Exploitation Compromise
13
Vulnerability Exploitation Compromise
13
Vulnerability Exploitation Compromise
13
Vulnerability Exploitation Compromise
13
Vulnerability Exploitation Compromise
13
14
15
Exploitation Trends: From Potential Risk to Actual Risk, Microsoft
15
Exploitation Trends: From Potential Risk to Actual Risk, Microsoft
16
class Doc : public Element { // … Element *child; }; class Body : public Element { // … Element *child; }; Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign();
17
A simplified use-after-free example from Chromium
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child Allocate objects
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child Propagate pointers Allocate objects
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child Propagate pointers Allocate objects
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child Propagate pointers Allocate objects
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child Propagate pointers Allocate objects
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child
Free an object
Propagate pointers Allocate objects
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child
Free an object
Propagate pointers Allocate objects
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child
freed Free an object
Propagate pointers Allocate objects
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child
freed Free an object
Propagate pointers Allocate objects
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child
freed Free an object
Propagate pointers Allocate objects
a dangling pointer
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child
freed
Use a dangling pointer
Free an object
Propagate pointers Allocate objects
a dangling pointer
18
*doc *body Doc Body Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); *child *child
freed
Use a dangling pointer
Free an object
Propagate pointers Allocate objects
a dangling pointer
Attacker controlled
19
Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign();
19
Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign();
19
Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); Doc *doc = new Doc(); doc->child = body; Body *body = new Body(); doc->child->getAlign(); delete body;
19
Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); Doc *doc = new Doc(); doc->child = body; Body *body = new Body(); doc->child->getAlign(); delete body;
19
Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); Doc *doc = new Doc(); doc->child = body; Body *body = new Body(); doc->child->getAlign(); delete body;
19
Doc *doc = new Doc(); Body *body = new Body(); doc->child = body; delete body; doc->child->getAlign(); Doc *doc = new Doc(); doc->child = body; Body *body = new Body(); doc->child->getAlign(); delete body;
20
21
21
Doc *doc = new Doc();
21
Doc *doc = new Doc();
21
Doc *doc = new Doc();
21
delete body; Doc *doc = new Doc();
21
delete body; Doc *doc = new Doc();
Remove shadow obj:
22
Shadow obj. of Doc back fwd back fwd Shadow obj. of Body
doc->child = body;
*doc *body Doc Body *child
22
Shadow obj. of Doc back fwd back fwd Shadow obj. of Body
doc->child = body; doc->child = body; trace(&doc->child, body);
*doc *body Doc Body *child
22
Shadow obj. of Doc back fwd back fwd Shadow obj. of Body
doc->child = body; doc->child = body; trace(&doc->child, body);
*doc *body Doc Body *child
Forward
22
Shadow obj. of Doc back fwd back fwd Shadow obj. of Body
doc->child = body; doc->child = body; trace(&doc->child, body);
*doc *body Doc Body *child
Backward Forward
22
Shadow obj. of Doc back fwd back fwd Shadow obj. of Body
doc->child = body; doc->child = body; trace(&doc->child, body);
*doc *body Doc Body *child
Backward Forward
22
Shadow obj. of Doc back fwd back fwd Shadow obj. of Body
doc->child = body; doc->child = body; trace(&doc->child, body);
*doc *body Doc Body *child
Backward Forward
23
*doc Freed *body Doc Body *child
24
25
26
27
Exploitation Trends: From Potential Risk to Actual Risk, Microsoft
28
29
29
29
Element HTMLElement SVGElement
29
Element HTMLElement SVGElement
29
Element HTMLElement SVGElement
29
Element HTMLElement SVGElement
30
30
vftptr for P int m_P class P { virtual ~P() {} int m_P; }; class D: public P { virtual ~D() {} int m_D; }; Access scope of P*
30
vftptr for P int m_P class P { virtual ~P() {} int m_P; }; class D: public P { virtual ~D() {} int m_D; }; Access scope of P*
30
vftptr for P int m_P vftptr for D int m_P int m_D class P { virtual ~P() {} int m_P; }; class D: public P { virtual ~D() {} int m_D; }; Access scope of P* Access scope of D*
31
vftptr for P int m_P int m_D
31
vftptr for P int m_P int m_D
31
Memory corruptions vftptr for P int m_P int m_D
31
Memory corruptions vftptr for P int m_P int m_D
31
Memory corruptions vftptr for P int m_P int m_D
31
Memory corruptions vftptr for P int m_P int m_D
32
Element SVGElement HTMLElement HTMLUnknownElement ContainerNode
32
Element SVGElement HTMLElement HTMLUnknownElement ContainerNode
32
Element SVGElement HTMLElement HTMLUnknownElement ContainerNode
32
Element SVGElement HTMLElement HTMLUnknownElement ContainerNode
32
Element SVGElement HTMLElement HTMLUnknownElement ContainerNode
33
34
34
34
34
35
THTable (P) THTable (D)
35
THTable (P) THTable (D)
35
THTable (P) THTable (D)
36
36
36
36
36
37
37
37
37
with the object
37
37
37
and check if hash(“D”) exists.
37
43
39
40
41
42
43
#0 bucket #1 bucket #2 bucket #3 bucket inode_hashtable
43
#0 bucket #1 bucket #2 bucket #3 bucket inode_hashtable
43
#0 bucket #1 bucket #2 bucket #3 bucket inode_hashtable inode_hash(sb, ino1)
43
#0 bucket #1 bucket #2 bucket #3 bucket inode1 inode_hashtable inode_hash(sb, ino1)
43
#0 bucket #1 bucket #2 bucket #3 bucket inode1 inode_hashtable inode_hash(sb, ino1) inode_hash(sb, ino2)
43
#0 bucket #1 bucket #2 bucket #3 bucket inode1 inode_hashtable inode_hash(sb, ino1) inode_hash(sb, ino2)
43
#0 bucket #1 bucket #2 bucket #3 bucket inode1 inode_hashtable inode_hash(sb, ino1) inode_hash(sb, ino2) inode2
43
#0 bucket #1 bucket #2 bucket #3 bucket inode1 inode_hashtable inode_hash(sb, ino1) inode_hash(sb, ino2) inode2
43
#0 bucket #1 bucket #2 bucket #3 bucket inode1 inode_hashtable inode_hash(sb, ino1) inode_hash(sb, ino2) inode2 …
43
#0 bucket #1 bucket #2 bucket #3 bucket inode1 inode_hashtable inode_hash(sb, ino1) inode_hash(sb, ino2) inode_hash(sb, inok) inode2 …
43
#0 bucket #1 bucket #2 bucket #3 bucket inode1 inode_hashtable inode_hash(sb, ino1) inode_hash(sb, ino2) inode_hash(sb, inok) inode2 …
43
#0 bucket #1 bucket #2 bucket #3 bucket inode1 … inode_hashtable inode_hash(sb, ino1) inode_hash(sb, ino2) inode_hash(sb, inok) inode2 inodek …
43
#0 bucket #1 bucket #2 bucket #3 bucket inode1 … inode_hashtable inode_hash(sb, ino1) inode_hash(sb, ino2) inode_hash(sb, inok) inode2 inodek …
SideFinder
44
45
46
…
inode_hash(sb, ino)
46
… …
inode_hash(sb, ino)
…
46
… …
inode_hash(sb, ino)
…
…
46
… …
inode_hash(sb, ino)
…
…
46
… … …
inode_hash(sb, ino)
…
reiserfs
…
…
46
… … …
ext4 inode_hash(sb, ino)
…
ext2 reiserfs
…
…
46
… … …
ext4 inode_hash(sb, ino)
…
ext2 reiserfs
…
…
46
… … …
ext4 inode_hash(sb, ino)
…
ext2 reiserfs
…
…
46
… … …
ext4 inode_hash(sb, ino)
…
ext2 reiserfs
…
…
46
… … …
ext4 inode_hash(sb, ino)
…
ext2 reiserfs
…
…
46
… … …
ext4 inode_hash(sb, ino)
…
ext2 reiserfs
…
47
48
48
# of taint sources SideFinder identified
48
A true interface reaching to inode_hash (i.e., to control an inode number)
48
SideFinder successfully identified all true sources
48
XFS implements its own hash table
49
Complexity: the number of clauses in a bucket expression Efficiency: time taken to synthesize 2,048 colliding inputs
50
51
52
53