+ All Categories
Home > Documents > Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis...

Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis...

Date post: 01-Apr-2018
Category:
Upload: dangkien
View: 239 times
Download: 3 times
Share this document with a friend
68
PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries Marcel Böhme Thuan Pham Abhik Roychoudhury ASE 2016 September 3-7, 2016 Singapore
Transcript
Page 1: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

PhD Thesis Defense

Presented by Marcel Boehme

Model-Based Whitebox Fuzzing for Program Binaries

Marcel BöhmeThuan Pham Abhik Roychoudhury

ASE 2016 September 3-7, 2016

Singapore

Page 2: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Vulnerabilities in file-processing programs

2

#CVE-assigned vulnerabilities by year

0

100

200

300

400

2007 2008 2009 2010 2011 2012 2013 2014 2015 2016

315

399

328352

304 310

199 203

343

169

(US National Vulnerability Database) (By 30/8)

File Processing Programs

Page 3: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Vulnerabilities in file-processing programs

2

#CVE-assigned vulnerabilities by year

0

100

200

300

400

2007 2008 2009 2010 2011 2012 2013 2014 2015 2016

315

399

328352

304 310

199 203

343

169

(US National Vulnerability Database) (By 30/8)

File Processing Programs

Page 4: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Challenge

•Generating test cases to expose vulnerabilities in file-processing software is challenging !

3

•Highly Structured

• Having both syntactic and semantic relationships

• Compression/decompression algorithms

• Integrity constraints e.g., Checksums

Page 5: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

File as a Tree

4

PNG

CHUNKS

CHUNKSCHUNK

CHUNKlength type

Signature

CRCDATA

xxx yyy…

length of cry of

Data chunk

Data field

Integrity constraint

length type CRCDATA

zzz txt…length of cry of

Page 6: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

File as a Tree

4

PNG

CHUNKS

CHUNKSCHUNK

CHUNKlength type

Signature

CRCDATA

xxx yyy…

length of cry of

Data chunk

Data field

Integrity constraint

length type CRCDATA

zzz txt…length of cry of

1. (Model-Based) Blackbox Fuzzing 2. Whitebox Fuzzing

Page 7: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Blackbox Fuzzing

📄 📄

📄

📄

Blackbox Fuzzing

5

Seed Input

Mutated Inputs

Page 8: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Blackbox Fuzzing

📄 📄

📄

📄

Blackbox Fuzzing Rejected !

Rejected !

Rejected !

5

Seed Input

Mutated Inputs

Page 9: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Blackbox Fuzzing

📄 Model-Based Blackbox Fuzzing

Peach, Spike …

6

Seed Input

Page 10: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Blackbox Fuzzing

📄 Model-Based Blackbox Fuzzing

Input model

Peach, Spike …

6

Seed Input

Page 11: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Blackbox Fuzzing

📄 Model-Based Blackbox Fuzzing

Input model

Peach, Spike …

6

Seed Input

📄📄

📄

Pass all checks

Satisfy some checks

Satisfy some checks

Mutated Inputs

Page 12: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Blackbox Fuzzing (MoBF)

7

MoBF struggles at generating specific values for data fields !

Page 13: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Blackbox Fuzzing (MoBF)

7

MoBF struggles at generating specific values for data fields !

Probability to generate correct value(s) for

Page 14: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Blackbox Fuzzing (MoBF)

7

MoBF struggles at generating specific values for data fields !

Probability to generate correct value(s) for One 32-bit data field: 1/2^32

Page 15: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Blackbox Fuzzing (MoBF)

7

MoBF struggles at generating specific values for data fields !

Probability to generate correct value(s) for One 32-bit data field: 1/2^32Two 32-bit data fields: 1/2^64

Page 16: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Blackbox Fuzzing (MoBF)

7

MoBF struggles at generating specific values for data fields !

Probability to generate correct value(s) for One 32-bit data field: 1/2^32Two 32-bit data fields: 1/2^64Three 32-bit data fields: 1/2^96

Page 17: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Blackbox Fuzzing (MoBF)

7

MoBF struggles at generating specific values for data fields !

Probability to generate correct value(s) for One 32-bit data field: 1/2^32Two 32-bit data fields: 1/2^64Three 32-bit data fields: 1/2^96…

Page 18: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Whitebox Fuzzing

📄Symbolic

Symbolic

Dynamic Symbolic Execution

📄Rejected !

📄Rejected !

📄Benign

📄Crash!

NDSS’08, ICSE’09, ASPLOS’11, ICSE’15 …

8

Seed Input

(potential) crash locations

Page 19: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Whitebox Fuzzing (WF)

9

Page 20: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Whitebox Fuzzing (WF)

9

WF comfortably generates specific values for data fields

Page 21: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Whitebox Fuzzing (WF)

9

WF easily gets bogged down by large space of invalid inputs while

• adding missing data chunk(s) or • enforcing integrity constraints like checksums, size-of, offset-of …

WF comfortably generates specific values for data fields

Page 22: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Motivating Example A PNG file triggers a crash in VLC media player

10

Page 23: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Motivating Example A PNG file triggers a crash in VLC media player

10

Requires an optional data chunk

Page 24: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Motivating Example A PNG file triggers a crash in VLC media player

10

Requires an optional data chunk

Requires specific values for some data fields

Page 25: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Motivating Example A PNG file triggers a crash in VLC media player

10

Requires an optional data chunk

Requires specific values for some data fields

Page 26: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Motivating Example A PNG file triggers a crash in VLC media player

10

Requires an optional data chunk

Requires specific values for some data fieldsMoBF & WF are very unlikely to generate the crashing input

IF the selected seed file does not have optional tRNS

data chunk

Page 27: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Observation & Solution

•A missing data chunk can be obtained from other seed inputs in the test suite

•OR it can be directly instantiated from the input model

11

Page 28: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Observation & Solution

•A missing data chunk can be obtained from other seed inputs in the test suite

•OR it can be directly instantiated from the input model

11

New File having necessary part

Input File with a missing part

Test suites

Input model

Data chunk Transplantation

Page 29: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Whitebox Fuzzing

12

Augmented MoBF MoBF + Transplantation

Selective and Targeted Whitebox Fuzzing

Page 30: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Whitebox Fuzzing

12

Augmented MoBF MoBF + Transplantation

Selective and Targeted Whitebox Fuzzing

•Handles missing data chunks by data chunk transplantation •Enforces integrity

checks

Page 31: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Whitebox Fuzzing

12

Augmented MoBF MoBF + Transplantation

Selective and Targeted Whitebox Fuzzing

•Handles missing data chunks by data chunk transplantation •Enforces integrity

checks

•Guides data chunk transplantation •Explores deep

paths •Generates specific

values causing program crashes

Page 32: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Whitebox Fuzzing

12

Augmented MoBF MoBF + Transplantation

Selective and Targeted Whitebox Fuzzing

•Handles missing data chunks by data chunk transplantation •Enforces integrity

checks

•Guides data chunk transplantation •Explores deep

paths •Generates specific

values causing program crashes

Peach Fuzzer Production-quality MoBF

Page 33: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Model-Based Whitebox Fuzzing

12

Augmented MoBF MoBF + Transplantation

Selective and Targeted Whitebox Fuzzing

•Handles missing data chunks by data chunk transplantation •Enforces integrity

checks

•Guides data chunk transplantation •Explores deep

paths •Generates specific

values causing program crashes

Peach Fuzzer Production-quality MoBF

Hercules (ICSE’15) Scale to WMP, Adobe Reader

Page 34: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

What the input model looks like?

13

Page 35: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

XML-based Input Model (Peach Fuzzer)Data model for a generic data chunk

14

Page 36: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

XML-based Input Model (Peach Fuzzer)Data model for a generic data chunk

14

Page 37: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

XML-based Input Model (Peach Fuzzer)Data model for a generic data chunk

14

Page 38: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

XML-based Input Model (Peach Fuzzer)Data model for a generic data chunk

14

Page 39: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

XML-based Input Model (Peach Fuzzer)Data model for a generic data chunk

14

inherits common data fields & relationships

Page 40: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

XML-based Input Model (Peach Fuzzer)Data model for a generic data chunk

14

inherits common data fields & relationships

Page 41: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

XML-based Input Model (Peach Fuzzer)Data model for a generic data chunk

14

Data model for PNG image files

inherits common data fields & relationships

Page 42: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

XML-based Input Model (Peach Fuzzer)Data model for a generic data chunk

14

Data model for PNG image files

inherits common data fields & relationships

Page 43: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

XML-based Input Model (Peach Fuzzer)Data model for a generic data chunk

14

Data model for PNG image files

inherits common data fields & relationships

Page 44: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham 15

File Cracker

Generator + Mutator

Test suite

Mutated File

Input Model

Decomposes file into data elements — data chunks & data fields

Integrity constraints are enforced

Page 45: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Peach Fuzzer + Transplantation

16

Modified File Cracker

File Sticher

Test suite

Mutated File

Input Model

Fragment Pool

Symbolic Execution

Page 46: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Peach Fuzzer + Transplantation

16

Modified File Cracker

File Sticher

Test suite

Mutated File

Input Model

Fragment Pool

Symbolic Execution

Page 47: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Peach Fuzzer + Transplantation

16

Modified File Cracker

File Sticher

Test suite

Mutated File

Input Model

Fragment Pool

Symbolic Execution

What to transplant?

Page 48: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Peach Fuzzer + Transplantation

16

Modified File Cracker

File Sticher

Test suite

Mutated File

Input Model

Fragment Pool

Symbolic Execution

What to transplant?

Where to transplant?

Page 49: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Peach Fuzzer + Transplantation

16

Modified File Cracker

File Sticher

Test suite

Mutated File

Input Model

Fragment Pool

Symbolic Execution

Crucial IF Statements

Page 50: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Crucial IF Statements

17

Code extracted from LibPNG

Page 51: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Crucial IF Statements

17

A Crucial IF Statement - Only one branch has been taken - depends on the presence of a data chunk in the input file

Code extracted from LibPNG

Page 52: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Detecting Crucial IF Statements

18

Page 53: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Detecting Crucial IF Statements

18

📄Symbolic• Step 1. Mark input file (partially) symbolic

Page 54: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Detecting Crucial IF Statements

18

📄Symbolic• Step 1. Mark input file (partially) symbolic

• Step 2. Concolically execute program in one path - same path as concrete input

if_1

if_2

if_3

Page 55: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Detecting Crucial IF Statements

18

📄Symbolic• Step 1. Mark input file (partially) symbolic

• Step 2. Concolically execute program in one path - same path as concrete input

• Step 3. Collect branch conditions of IF statements at which only one branch has been taken (e.g., if_2)

if_1

if_2

if_3

Page 56: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Detecting Crucial IF Statements

18

📄Symbolic• Step 1. Mark input file (partially) symbolic

• Step 2. Concolically execute program in one path - same path as concrete input

• Step 3. Collect branch conditions of IF statements at which only one branch has been taken (e.g., if_2)

• Step 4. Use symbolic-execution-based taint analysis & input model to analyse branch conditions (at if_2) to validate crucial IFs statements

if_1

if_2

if_3

Page 57: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Evaluation - Subjects & Input Models

19

Page 58: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Evaluation - Subjects & Input Models

19

9 subject programs

Page 59: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Evaluation - Subjects & Input Models

19

9 subject programs

6 Input models

One-time effort 34 hrs

Page 60: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Evaluation - Effectiveness of MoWF

Program Advisory ID Input Model #Seed files MoWF Peach Hercules

VLC 2.0.7 OSVDB-95632 PNG 10

VLC 2.0.3 CVE-2012-5470 PNG 10

LTP 1.5.4 CVE-2011-3328 PNG 10

XNV1.98 Unknown-1 PNG 10

XNV1.98 Unknown-2 PNG 10

XNV1.98 Unknown-3 PNG 10

WMP 9.0 Unknown-4 WAV 10

WMP 9.0 CVE-2014-2671 WAV 10

WMP 9.0 CVE-2010-0718 MIDI 10

AR 9.2 CVE-2010-2204 PDF 10

RP 1.0 CVE-2010-3000 FLV 10

MP 0.35 CVE-2011-0502 MIDI 10

OV 1.04 CVE-2010-0688 ORB 10

20

Time bound: 24hrs

Page 61: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Evaluation - Seed Input Dependence

Program Advisory ID Input Model #Seed files Hercules++

VLC 2.0.7 OSVDB-95632 PNG 0

VLC 2.0.3 CVE-2012-5470 PNG 0

LTP 1.5.4 CVE-2011-3328 PNG 0

XNV1.98 Unknown-1 PNG 0

XNV1.98 Unknown-2 PNG 0

XNV1.98 Unknown-3 PNG 0

WMP 9.0 Unknown-4 WAV 0

WMP 9.0 CVE-2014-2671 WAV 0

WMP 9.0 CVE-2010-0718 MIDI 0

AR 9.2 CVE-2010-2204 PDF 0

RP 1.0 CVE-2010-3000 FLV 0

MP 0.35 CVE-2011-0502 MIDI 0

OV 1.04 CVE-2010-0688 ORB 0

21

Page 62: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Evaluation - Seed Input Dependence

Program Advisory ID Input Model #Seed files Hercules++

VLC 2.0.7 OSVDB-95632 PNG 0

VLC 2.0.3 CVE-2012-5470 PNG 0

LTP 1.5.4 CVE-2011-3328 PNG 0

XNV1.98 Unknown-1 PNG 0

XNV1.98 Unknown-2 PNG 0

XNV1.98 Unknown-3 PNG 0

WMP 9.0 Unknown-4 WAV 0

WMP 9.0 CVE-2014-2671 WAV 0

WMP 9.0 CVE-2010-0718 MIDI 0

AR 9.2 CVE-2010-2204 PDF 0

RP 1.0 CVE-2010-3000 FLV 0

MP 0.35 CVE-2011-0502 MIDI 0

OV 1.04 CVE-2010-0688 ORB 0

21

70% No seed file is needed

Page 63: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Related Work

22

Page 64: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Related Work

22

Grammar-based whitebox fuzzing (PLDI’08)

Page 65: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

Grammar-based Whitebox Fuzzing (GWF)

Grammar-Based Whitebox Fuzzing

Context-Free Solver

Regular Expression

Context-Free Grammar

SAT/ UNSAT

📄Conform

to grammar

📄📄

📄

PLDI’08

23

Javascript file

Page 66: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham

MoWF vs GWF

•Regular Expression (GWF) is much weaker than full Path Condition - it cannot encode simple arithmetic constraint like “x<y’’

•MoWF maintains full Path Condition and has no impact on the soundness and completeness of Whitebox Fuzzing technique

•MoWF leverages File format input model - more expressive yet simple than Context-Free Grammar. It can comfortably handle integrity constraints like length-of, offset-of and checksums

24

Page 67: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham 25

Page 68: Model-Based Whitebox Fuzzing - NUS Computingthuanpv/publications/MoWF_ASE2016.pdf · PhD Thesis Defense Presented by Marcel Boehme Model-Based Whitebox Fuzzing for Program Binaries

Presented by Thuan Pham 25


Recommended