27
Decoupling Dynamic Information Flow Tracking with a Dedicated Coprocessor Hari Kannan, Michael Dalton, Christos Kozyrakis Presenter: Yue Zheng Yulin Shi 1

Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

Decoupling Dynamic Information Flow Tracking with a Dedicated Coprocessor

Hari Kannan, Michael Dalton, Christos Kozyrakis

Presenter: Yue Zheng Yulin Shi

1

Page 2: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

2

Outline

• Motivation & Background• Hardware DIFT overview• DIFT Coprocessor Design• Prototype System• Evaluation• Conclusion• Discussion points

2

Page 3: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

3

Outline

• Motivation & Background• Hardware DIFT overview• DIFT Coprocessor Design• Prototype System• Evaluation• Conclusion• Discussion points

3

Page 4: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

4

Motivation & Background

• Dynamic Information Flow Tracking (DIFT)• Tag data from untrusted source• Track tainted data propagation• Check unsafe tainted data usage

int idx = tainted_input;buffer[idx] = x; // memory corruption

Vulnerable C Code

#Reg

Data Tag

R1

R2

R3

R4

R5

R1 &tainted_input

load R2 M[R1]

store M[R4] R5

add R4 R2 + R3

&tainted_input

idx (tainted_input)

&buffer

&buffer + idx

x TRAPTainted Pointer Dereference

Why is the pointer dereference potentially dangerous

?

4

Page 5: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

5

Why is the pointer dereference potentially dangerous?• Buffer Overflow Attack store M[R4] R5

TRAP

char buf[126]; strcpy(buf,str);

Vulnerable C Code

5

Page 6: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

6

Motivation & Background

• Software DIFT

•Use Dynamic Binary Translation (DBT) to implement DIFT• Avoid recompilation• Introduce significant overheads

•Limitation• Incompatible with self-modifying and multithreaded programs

6

Page 7: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

7

Outline

• Motivation & Background• Hardware DIFT overview• DIFT Coprocessor Design• Prototype System• Evaluation• Conclusion• Discussion points

7

Page 8: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

8

Hardware DIFT overview

• In-core DIFT

• Minimize runtime overhead• Require significant modifications to processor structure

8

Page 9: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

9

Hardware DIFT overview

• Offloading DIFT

• Offer the flexibility of analysis in software• Introduce significant overheads

• halve the throughput, double the power consumption• Require pipeline changes

9

Page 10: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

10

Hardware DIFT overview

• Off-core DIFT

• DIFT synchronizes with main core only on system calls• Eliminate the changes to processor• Allow pairing with multiple processor designs

10

Page 11: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

11

Outline

• Motivation & Background• Hardware DIFT overview• DIFT Coprocessor Design• Prototype System• Evaluation• Conclusion• Discussion points

11

Page 12: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

12

DIFT Coprocessor Design – Security Model• Security Model

IF

ID REN

R O B

Coprocessor

Commit

EX EX

R1 &tainted_input

load R2 M[R1]

store M[R4] R5

add R4 R2 + R3

TRAP

Tainted Pointer DereferenceTRAP

SystemCall

Instruction Exception

Main Core

Synchronization

12

Page 13: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

13

DIFT Coprocessor Design - Architecture Main Core Processor VS Coprocessor

Main Core Processor

Coprocessor

• Handle data• 32 bits• Complexity

• Handle tag propagation and check• 4 bits• Simple

13

Page 14: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

14

DIFT Coprocessor Design - Architecture•Four-stage pipeline: Decode, Execution, TagCheck, WriteBack

MainCore

Queue Stall

DecouplingQueue

SecurityDecode

Tag Reg File

Tag Cache

Tag

ALU

Tag CheckLogic Writeback

L2 Cache

DRAM Tags

WriteBackTagCheckExecutionDecode

14

DIFT Coprocessor

Page 15: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

15

DIFT Coprocessor Design - Interface• Coprocessor Setup

• Instruction Flow Information

• Decoupling

• Security Exceptions

• Software control security policies

• PC, Instruction Encoding and Memory Address

• Greater or equal processing rate to avoid full queue

• Asynchronous interrupts and run in trusted mode

15

SecurityDecode

PC, Inst Encoding, Mem Addr

Page 16: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

16

Outline

• Motivation & Background• Hardware DIFT overview• DIFT Coprocessor Design• Prototype System• Evaluation• Conclusion• Discussion points

16

Page 17: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

17

Prototype•Hardware

•Software

•Design Statistics

• SPARC V8 Processor

• FPGA Board

• Gentoo Linux 2.6

• 7.64% area overhead

17

Page 18: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

18

Outline

• Motivation & Background• Hardware DIFT overview• DIFT Coprocessor Architecture• Prototype System• Evaluation• Conclusion• Discussion points

18

Page 19: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

19

Evaluation

• Security EvaluationProgram Lan

g.Attack Detected Vulnerability

Gzip C Directory traversal Open tainted directoryTar C Directory traversal Open tainted directoryScry PHP Cross-site scripting Tainted <script> tagHtdig C++ Cross-site scripting Tainted <script> tag

Polymorph C Buffer overflow Tainted code ptr dereferenceSendmail C Buffer overflow Tainted data ptr dereference

Quotactl syscall C User/kernel pointer dereference

Tainted pointer to kernelspace

SUS C Format string bug Tainted ‘%n’ in syslogWU_FTPD C Format string bug Tainted ‘%n’ in vfprintf

Independent of programming languageWide workload range

CommonUtilitiesServers

Web appsKernel code

High level attacksLow level attacks

19

Page 20: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

20

Evaluation

• Performance Evaluation – Execution time

• 512-byte tag cache• 6-entry queue

Runtime overhead < 1%

20

Page 21: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

21

Evaluation

• Performance Evaluation – Scaling the tag cache

21

Page 22: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

22

Evaluation

• Performance Evaluation – Scaling the decoupling queue

• 16-byte tag cache• Tag miss ↑

22

Page 23: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

23

Evaluation

• Processor/Coprocessor Performance Ratio

• 16-entry queue3.8%

11.7%

Can be paired with various main cores

23

Page 24: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

24

Outline

• Motivation & Background• Hardware DIFT overview• DIFT Coprocessor Architecture• Prototype System• Evaluation• Conclusion• Discussion points

24

Page 25: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

25

Conclusion

• DIFT: a promising security technique

• Proposed an off-core, decoupling coprocessor for DIFT• Provide the same security features as in-core DIFT• Reduce DIFT implementation cost drastically• Has low area and performance overheads

• Developed a full-system prototype• Protect real-world Linux applications

25

Page 26: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

26

Questions?

26

Page 27: Decoupling Dynamic Information Flow Tracking with a ...Evaluation •Security Evaluation Program Lan g. Attack Detected Vulnerability Gzip C Directory traversal Open tainted directory

Debate

• Is a wider-issue coprocessor better than a single-issue coprocessor for 3-way superscalar processors?

• Is it worth to add a checkpoint scheme to DIFT to provide reliable recovery? ( A checkpoint scheme allows the system to rollback for recovery)

27