Top Banner
Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning Rock Stevens, Octavian Suciu, Andrew Ruef, Sanghyun Hong, Michael Hicks, Tudor Dumitras University of Maryland 1
34

Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Jun 24, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Rock Stevens, Octavian Suciu, Andrew Ruef, Sanghyun Hong, Michael Hicks, Tudor DumitrasUniversity of Maryland

1

Page 2: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

How can ML be Subverted?

2

Panda

src: Coursera

Page 3: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

How can ML be Subverted?

3

Gibbon

src: Veracode

Page 4: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Exploiting the Underlying System

4

Attackers controlling the underlying system can dictate the output of ML systems

Gibbon

Page 5: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Adversarial Machine Learning

5

Gibbon+

Adversarial sample crafting exploits the decision boundary:

• bypassing it (evasion)• modifying it (poisoning)sign(∇xJ(Θ, x, y))

x x + εsign(∇xJ(Θ, x, y))

Goodfellow, I. J., Shlens, J., & Szegedy, C. (2014). Explaining and harnessing adversarial examples. arXiv:1412.6572.

Page 6: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Exploiting the Implementation

6

Can attackers exploit the implementation in order to control the output of predictors?

Gibbon+

<exploit>

xsrc: National Geographic

Page 7: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Problem• Attackers can craft inputs that exploit the

implementation of ML algorithms – As opposed to perturbing the decision boundary of correct

implementation

• These logical errors cause implementation to diverge from algorithm specification– Execution terminates prematurely or follows unintended code

branches; memory content changes

• Exploits have no visible effects on system functionality– Existing defense tools are not designed to detect these errors

7

Page 8: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Research Questions• Can we map attack vectors to ML architectures?

• Can we discover exploitable ML vulnerabilities

systematically?

• Can we asses the magnitude of the threat?

8

Page 9: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Outline• Attack Vector Mapping

• Discovery Methods

• Preliminary Results

• Conclusions

9

Page 10: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Impact of Exploits

10

Poisoning, Evasion, Misclustering

Denial of Service (DoS)

Code Execution

atta

cker

ben

efit

Page 11: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Attack Surface

11

Page 12: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Attacking Feature Extraction (FE)

12

Insufficient integrity checks

Poisoning / Evasion / Misclustering

DoS Code Execution

Page 13: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Attacking Prediction

13

Overflow / Underflow NaN

Loss of PrecisionPoisoning / Evasion

Page 14: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Attacking Training

14

Overflow / Underflow NaN

Loss of Precision

Poisoning DoS

Page 15: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Attacking Model Representation

15

Loss of Precision Poisoning / Evasion

Page 16: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Attacking Clustering

16

Overflow / Underflow NaN

Loss of PrecisionMisclustering

Page 17: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Outline• Attack Vector Mapping

• Discovery Methods

• Preliminary Results

• Conclusions

17

Page 18: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Fuzzing1

• Testing tool used for discovering application crashes indicative of memory corruption

• Mutates input by flipping bits and serving it to the program under test

• American Fuzzy Lop2: tries to maximize code coverage, favoring inputs that result in different branches

18

Poisoning, Evasion,

Misclustering

Denial of Service (DoS)

Code Execution

1 - Miller, B.P., Fredriksen, L. and So, B., 1990. An empirical study of the reliability of UNIX utilities. 2 - http://lcamtuf.coredump.cx/afl/

Page 19: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Steered Fuzzing• Find decision points in ML implementations that

could be vulnerable

• Set failure conditions to the desired impact (e.g. evasion)

19

if failure_condition then: crash_program()

end ifPoisoning, Evasion,

Misclustering

Denial of Service (DoS)

Code Execution

Page 20: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Outline• Attack Vector Mapping

• Discovery Methods

• Preliminary Results

• Conclusions

20

Page 21: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Targeted Applications• OpenCV

– Computer vision library

• Malheur– Malware clustering tool

21

Page 22: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Bugs in OpenCV

22

CVE-ID Vulnerability Impact

2016-1516 Heap Corruption in FE Code Execution

2016-1517 Heap Corruption in FE DoS

n/a Inconsistent rendering in FE

Evasion

Page 23: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Bugs in OpenCV

23

CVE-ID Vulnerability Impact

2016-1516 Heap Corruption in FE Code Execution

2016-1517 Heap Corruption in FE DoS

n/a Inconsistent rendering in FE

Evasion

Vulnerabilities allow access to illegal memory locations

Page 24: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Bugs in OpenCV

24

CVE-ID Vulnerability Impact

2016-1516 Heap Corruption in FE Code Execution

2016-1517 Heap Corruption in FE DoS

n/a Inconsistent rendering in FE

Evasion

Vulnerability allows legitimate input to bypass facial detection

Attack requires no queries to the model!

Page 25: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Facial Detection Evasion Example

25

Rendering mutated image using Adobe Photoshop

Rendering mutated image using Preview

Page 26: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

More Evasion Examples

26

src: Imgur

src: Imgur

Page 27: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Bugs in Malheur

27

CVE-ID Vulnerability Impact

2016-1541 Heap Corruption in FE Code Execution

n/a Heap Corruption in FE Misclustering

n/a Loss of precision in Clustering

Misclustering

Page 28: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Bugs in Malheur

28

CVE-ID Vulnerability Impact

2016-1541 Heap Corruption in FE Code Execution

n/a Heap Corruption in FE Misclustering

n/a Loss of precision in Clustering

Misclustering

Vulnerabilities in underlying libarchive library affects every version of Linux and OS X

Page 29: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Bugs in Malheur

29

CVE-ID Vulnerability Impact

2016-1541 Heap Corruption in FE Code Execution

n/a Heap Corruption in FE Misclustering

n/a Loss of precision in Clustering

Misclustering

Additional Malheur vulnerability triggered by the one in libarchive

Attack can manipulate memory representation of inputs they do not control!

Page 30: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Bugs in Malheur

30

CVE-ID Vulnerability Impact

2016-1541 Heap Corruption in FE Code Execution

n/a Heap Corruption in FE Misclustering

n/a Loss of precision in Clustering

Misclustering

Casting double to float when computing L1 & L2 norms

Page 31: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Results Summary• Bugs in ML implementations represent a new

attack vector– Disclosed 5 exploitable vulnerabilities in 2 systems,

many of which were marked as WONTFIX– Response after reporting code execution vulnerability:

“Although security and safety is one of important aspect of software, currently it's not among our top priorities”

• Threat model also applicable outside the scope of ML– Any application that ingests uncurated inputs might be

vulnerable

31

Page 32: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Outline• Attack Vector Mapping

• Discovery Methods

• Preliminary Results

• Conclusions

32

Page 33: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Conclusions• Can we map attack vectors to ML architectures?

– Presented a baseline architecture and vector mapping– Future: need an attack taxonomy, unification with AML

• Can we discover exploitable ML vulnerabilities systematically?

– Steered fuzzing for semi-automatic discovery– Future: automatic techniques designed specifically for ML

• Can we asses the magnitude of the threat?– Discovered exploitable vulnerabilities in real-world systems– Future: asses the adversarial gain, compare to other exploitation

techniques

33

Page 34: Summoning Demons: The Pursuit of Exploitable Bugs in ... · How can ML be Subverted? 2 Panda src: Coursera. Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in

Thank you!

Octavian Suciu :: Summoning Demons: The Pursuit of Exploitable Bugs in Machine Learning

Octavian [email protected]

34