Collaborative Verification of Information Flow for a High-Assurance - - PowerPoint PPT Presentation

collaborative verification of information flow for a high
SMART_READER_LITE
LIVE PREVIEW

Collaborative Verification of Information Flow for a High-Assurance - - PowerPoint PPT Presentation

Collaborative Verification of Information Flow for a High-Assurance App Store Michael D. Ernst, Ren Just , Suzanne Millstein, Werner Dietl*, Stuart Pernsteiner, Franziska Roesner, Karl Koscher, Paulo Barros, Ravi Bhoraskar, Seungyeop Han, Paul


slide-1
SLIDE 1

Collaborative Verification of Information Flow for a High-Assurance App Store

Michael D. Ernst, René Just, Suzanne Millstein, Werner Dietl*, Stuart Pernsteiner, Franziska Roesner, Karl Koscher, Paulo Barros, Ravi Bhoraskar, Seungyeop Han, Paul Vines, and Edward X. Wu

University of Washington *University of Waterloo

November 6, 2014

slide-2
SLIDE 2

Introduction Approach Evaluation Conclusion

Current commercial app stores

Approval process Several hundred new apps per day

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 1/24

slide-3
SLIDE 3

Introduction Approach Evaluation Conclusion

Current commercial app stores

Approval process Several hundred new apps per day Problem: Every major app store has approved malware!

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 1/24

slide-4
SLIDE 4

Introduction Approach Evaluation Conclusion

Current commercial app stores

Approval process Several hundred new apps per day Problem: Every major app store has approved malware! Best-effort solution: Malware removed when encountered

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 1/24

slide-5
SLIDE 5

Introduction Approach Evaluation Conclusion

High-assurance app stores

Needed in multiple domains

◮ Government app stores (e.g., DoD) ◮ Corporate app stores (e.g., financial sector) ◮ App stores for medical apps

Require stronger guarantees

◮ Verified absence of (certain types of) malware

Verification is costly

◮ Effort is solely on app store side ◮ Analyst needs to understand/reverse-engineer the app

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 2/24

slide-6
SLIDE 6

Introduction Approach Evaluation Conclusion

High-assurance app stores

Needed in multiple domains

◮ Government app stores (e.g., DoD) ◮ Corporate app stores (e.g., financial sector) ◮ App stores for medical apps

Require stronger guarantees

◮ Verified absence of (certain types of) malware

Verification is costly

◮ Effort is solely on app store side ◮ Analyst needs to understand/reverse-engineer the app

Our solution: Collaboratively verify absence of malware Our focus: Information-flow malware

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 2/24

slide-7
SLIDE 7

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Sudoku Read location Internet

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-8
SLIDE 8

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Sudoku Read location Internet

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-9
SLIDE 9

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Sudoku Read location Internet Camera Read location Internet

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-10
SLIDE 10

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Sudoku Read location Internet Camera Read location Internet

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-11
SLIDE 11

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Information flow Sudoku Read location Internet Camera Read location Internet Location → Internet

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-12
SLIDE 12

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Information flow Sudoku Read location Internet Camera Read location Internet Location → Internet

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-13
SLIDE 13

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Information flow Sudoku Read location Internet Camera Read location Internet Location → Internet Map Read location Internet

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-14
SLIDE 14

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Information flow Sudoku Read location Internet Camera Read location Internet Location → Internet Map Read location Internet

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-15
SLIDE 15

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Information flow Sudoku Read location Internet Camera Read location Internet Location → Internet Map Read location Internet Location → Internet

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-16
SLIDE 16

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Information flow Sudoku Read location Internet Camera Read location Internet Location → Internet Map Read location Internet Location → Internet

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-17
SLIDE 17

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Information flow Sudoku Read location Internet Camera Read location Internet Location → Internet Map Read location Internet Location → Internet Location → BadGuy.com

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-18
SLIDE 18

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Information flow Sudoku Read location Internet Camera Read location Internet Location → Internet Map Read location Internet Location → Internet Location → BadGuy.com

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-19
SLIDE 19

Introduction Approach Evaluation Conclusion

Example: Information-flow malware

App Permissions Information flow Sudoku Read location Internet Camera Read location Internet Location → Internet Map Read location Internet Location → Internet Location → BadGuy.com Prevent malware using an information flow type-system

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 3/24

slide-20
SLIDE 20

Introduction Approach Evaluation Conclusion

Approach: Overview

Collaborative verification model

◮ Leverage but don’t trust the developer

Information Flow Type-checker (IFT)

◮ Finer-grained permission model for Android ◮ False positives and declassifications ◮ Implicit information flow

Evaluation

◮ Effectiveness: Effective for real malware in real apps ◮ Usability: Low annotation and auditing burden

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 4/24

slide-21
SLIDE 21

Introduction Approach Evaluation Conclusion

Collaborative verification model

Developer provides

Annotated source code

App description

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 5/24

slide-22
SLIDE 22

Introduction Approach Evaluation Conclusion

Collaborative verification model

Developer provides

Information flow policy High-level description of information flows in app

(LOCATION -> INTERNET)

Annotated source code

App description Declassification justifications

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 5/24

slide-23
SLIDE 23

Introduction Approach Evaluation Conclusion

Collaborative verification model

Developer provides

Information flow policy Annotated source code

App description Declassification justifications

App store verifies

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 5/24

slide-24
SLIDE 24

Introduction Approach Evaluation Conclusion

Collaborative verification model

Developer provides

Information flow policy Annotated source code

App description Declassification justifications

App store verifies

Analyst verifies: acceptable behavior 1

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 5/24

slide-25
SLIDE 25

Introduction Approach Evaluation Conclusion

Collaborative verification model

Developer provides

Information flow policy Annotated source code

App description Declassification justifications

App store verifies

Analyst verifies: acceptable behavior 1 Type checker verifies: annotations consistent 2

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 5/24

slide-26
SLIDE 26

Introduction Approach Evaluation Conclusion

Collaborative verification model

Developer provides

Information flow policy Annotated source code

App description Declassification justifications

App store verifies

Analyst verifies: acceptable behavior 1 Type checker verifies: annotations consistent 2 Analyst verifies: declassifications 3

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 5/24

slide-27
SLIDE 27

Introduction Approach Evaluation Conclusion

Collaborative verification model

Developer provides

Information flow policy Annotated source code

App description Declassification justifications

App store verifies

Analyst verifies: acceptable behavior 1 Type checker verifies: annotations consistent 2 Analyst verifies: declassifications 3

Developer and analyst do tasks that are easy for them

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 5/24

slide-28
SLIDE 28

Introduction Approach Evaluation Conclusion

Verification of information flow

Information flow policy Annotated source code Type checker verifies: annotations consistent

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 6/24

slide-29
SLIDE 29

Introduction Approach Evaluation Conclusion

Verification of information flow

Information flow policy Annotated source code Type checker verifies: annotations consistent

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 6/24

slide-30
SLIDE 30

Introduction Approach Evaluation Conclusion

Information flow policy

High-level description of permitted information flows READ_SMS

  • >

INTERNET READ_CLIPBOARD

  • >

DISPLAY USER_INPUT

  • >

CALL_PHONE ACCESS_FINE_LOCATION

  • >

INTERNET(maps.google.com)

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 7/24

slide-31
SLIDE 31

Introduction Approach Evaluation Conclusion

Information flow policy

High-level description of permitted information flows READ_SMS

  • >

INTERNET READ_CLIPBOARD

  • >

DISPLAY USER_INPUT

  • >

CALL_PHONE ACCESS_FINE_LOCATION

  • >

INTERNET(maps.google.com) Source flows to Sink

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 7/24

slide-32
SLIDE 32

Introduction Approach Evaluation Conclusion

Information flow policy

High-level description of permitted information flows READ_SMS

  • >

INTERNET READ_CLIPBOARD

  • >

DISPLAY USER_INPUT

  • >

CALL_PHONE ACCESS_FINE_LOCATION

  • >

INTERNET(maps.google.com) Source flows to Sink

Not sufficient to model information flow!

Sources and Sinks

◮ Default Android permissions (145)

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 7/24

slide-33
SLIDE 33

Introduction Approach Evaluation Conclusion

Information flow policy

High-level description of permitted information flows READ_SMS

  • >

INTERNET READ_CLIPBOARD

  • >

DISPLAY USER_INPUT

  • >

CALL_PHONE ACCESS_FINE_LOCATION

  • >

INTERNET(maps.google.com) Source flows to Sink Sources and Sinks

◮ Default Android permissions (145) ◮ Additional sensitive resources (28)

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 7/24

slide-34
SLIDE 34

Introduction Approach Evaluation Conclusion

Information flow policy

High-level description of permitted information flows READ_SMS

  • >

INTERNET READ_CLIPBOARD

  • >

DISPLAY USER_INPUT

  • >

CALL_PHONE ACCESS_FINE_LOCATION

  • >

INTERNET(maps.google.com) Source flows to Sink Sources and Sinks

◮ Default Android permissions (145) ◮ Additional sensitive resources (28) ◮ Parameterized permissions

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 7/24

slide-35
SLIDE 35

Introduction Approach Evaluation Conclusion

Verification of information flow

Information flow policy Annotated source code Type checker verifies: annotations consistent

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 8/24

slide-36
SLIDE 36

Introduction Approach Evaluation Conclusion

Information flow types: sources and sinks

@Source Where might a value come from? @Sink Where might a value flow to?

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 9/24

slide-37
SLIDE 37

Introduction Approach Evaluation Conclusion

Information flow types: sources and sinks

@Source Where might a value come from? @Sink Where might a value flow to?

void sendToInternet(String message); String readGPS();

Android API

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 9/24

slide-38
SLIDE 38

Introduction Approach Evaluation Conclusion

Information flow types: sources and sinks

@Source Where might a value come from? @Sink Where might a value flow to?

void sendToInternet(String message); String readGPS();

Android API To Internet

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 9/24

slide-39
SLIDE 39

Introduction Approach Evaluation Conclusion

Information flow types: sources and sinks

@Source Where might a value come from? @Sink Where might a value flow to?

void sendToInternet(@Sink(INTERNET)String message); String readGPS();

Android API

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 9/24

slide-40
SLIDE 40

Introduction Approach Evaluation Conclusion

Information flow types: sources and sinks

@Source Where might a value come from? @Sink Where might a value flow to?

void sendToInternet(@Sink(INTERNET)String message); String readGPS();

Android API From Location

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 9/24

slide-41
SLIDE 41

Introduction Approach Evaluation Conclusion

Information flow types: sources and sinks

@Source Where might a value come from? @Sink Where might a value flow to?

void sendToInternet(@Sink(INTERNET)String message);

@Source(LOCATION)String readGPS(); Android API

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 9/24

slide-42
SLIDE 42

Introduction Approach Evaluation Conclusion

Information flow types: sources and sinks

@Source Where might a value come from? @Sink Where might a value flow to?

void sendToInternet(@Sink(INTERNET)String message);

@Source(LOCATION)String readGPS(); Android API

String loc = readGPS(); sendToInternet(loc);

App code

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 9/24

slide-43
SLIDE 43

Introduction Approach Evaluation Conclusion

Information flow types: sources and sinks

@Source Where might a value come from? @Sink Where might a value flow to?

void sendToInternet(@Sink(INTERNET)String message);

@Source(LOCATION)String readGPS(); Android API @Source(LOCATION)@Sink(INTERNET)String loc = readGPS();

sendToInternet(loc);

App code

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 9/24

slide-44
SLIDE 44

Introduction Approach Evaluation Conclusion

Information flow types: sources and sinks

@Source Where might a value come from? @Sink Where might a value flow to?

void sendToInternet(@Sink(INTERNET)String message);

@Source(LOCATION)String readGPS(); Android API @Source(LOCATION)@Sink(INTERNET)String loc = readGPS();

sendToInternet(loc);

App code API annotations are pre-verified Developer annotations are not trusted

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 9/24

slide-45
SLIDE 45

Introduction Approach Evaluation Conclusion

Type hierarchy for sources and sinks

@Source(ANY) @Source({SMS, LOCATION}) @Source(SMS) @Source(LOCATION) @Source({}) @Sink({}) @Sink(INTERNET) @Sink(SMS) @Sink({INTERNET, SMS}) @Sink(ANY)

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 10/24

slide-46
SLIDE 46

Introduction Approach Evaluation Conclusion

Type hierarchy for sources and sinks

@Source(ANY) @Source({SMS, LOCATION}) @Source(SMS) @Source(LOCATION) @Source({}) @Sink({}) @Sink(INTERNET) @Sink(SMS) @Sink({INTERNET, SMS}) @Sink(ANY) @Source(ANY) ≡ @Source({SMS, LOCATION, INTERNET, ...})

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 10/24

slide-47
SLIDE 47

Introduction Approach Evaluation Conclusion

Type hierarchy for sources and sinks

@Source(ANY) @Source({SMS, LOCATION}) @Source(SMS) @Source(LOCATION) @Source({}) @Sink({}) @Sink(INTERNET) @Sink(SMS) @Sink({INTERNET, SMS}) @Sink(ANY) @Source(SMS)String sms = ...; @Source({SMS, LOCATION})String smsLoc = sms;

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 10/24

slide-48
SLIDE 48

Introduction Approach Evaluation Conclusion

Type hierarchy for sources and sinks

@Source(ANY) @Source({SMS, LOCATION}) @Source(SMS) @Source(LOCATION) @Source({}) @Sink({}) @Sink(INTERNET) @Sink(SMS) @Sink({INTERNET, SMS}) @Sink(ANY) @Source(SMS)String sms = ...; @Source(LOCATION)String loc = sms;

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 10/24

slide-49
SLIDE 49

Introduction Approach Evaluation Conclusion

Type hierarchy for sources and sinks

@Source(ANY) @Source({SMS, LOCATION}) @Source(SMS) @Source(LOCATION) @Source({}) @Sink({}) @Sink(INTERNET) @Sink(SMS) @Sink({INTERNET, SMS}) @Sink(ANY)

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 10/24

slide-50
SLIDE 50

Introduction Approach Evaluation Conclusion

Type hierarchy for sources and sinks

@Source(ANY) @Source({SMS, LOCATION}) @Source(SMS) @Source(LOCATION) @Source({}) @Sink({}) @Sink(INTERNET) @Sink(SMS) @Sink({INTERNET, SMS}) @Sink(ANY) @Sink({INTERNET, SMS})String toInetSms; @Sink(SMS)String toSms = toInetSms;

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 10/24

slide-51
SLIDE 51

Introduction Approach Evaluation Conclusion

Type hierarchy for sources and sinks

@Source(ANY) @Source({SMS, LOCATION}) @Source(SMS) @Source(LOCATION) @Source({}) @Sink({}) @Sink(INTERNET) @Sink(SMS) @Sink({INTERNET, SMS}) @Sink(ANY) @Sink(SMS)String toSms; @Sink(INTERNET)String toInet = toSms;

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 10/24

slide-52
SLIDE 52

Introduction Approach Evaluation Conclusion

Verification of information flow

Information flow policy Annotated source code Type checker verifies: annotations consistent

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 11/24

slide-53
SLIDE 53

Introduction Approach Evaluation Conclusion

Information Flow Type-checker (IFT): Overview

Type checker verifies: annotations consistent

Guarantees of type-checking

  • 1. Annotations are consistent with code (type correctness)
  • 2. Annotations are consistent with flow policy

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 12/24

slide-54
SLIDE 54

Introduction Approach Evaluation Conclusion

Information Flow Type-checker (IFT): Overview

Type checker verifies: annotations consistent Android API App code Flow policy

Guarantees of type-checking

  • 1. Annotations are consistent with code (type correctness)
  • 2. Annotations are consistent with flow policy

No undisclosed information flows in app

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 12/24

slide-55
SLIDE 55

Introduction Approach Evaluation Conclusion

Information Flow Type-checker (IFT): Example

Type checker verifies: annotations consistent

LOCATION -> INTERNET

Flow policy @Source(LOCATION)@Sink(INTERNET)String loc = readGPS();

sendToInternet(loc);

App code

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 13/24

slide-56
SLIDE 56

Introduction Approach Evaluation Conclusion

Information Flow Type-checker (IFT): Example

Type checker verifies: annotations consistent

LOCATION -> INTERNET

Flow policy @Source(LOCATION)@Sink(INTERNET)String loc = readGPS();

sendToInternet(loc);

App code

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 13/24

slide-57
SLIDE 57

Introduction Approach Evaluation Conclusion

Information Flow Type-checker (IFT): Example

Type checker verifies: annotations consistent

LOCATION -> INTERNET

Flow policy @Source(LOCATION)@Sink(INTERNET)String loc = readGPS();

sendSms(loc);

App code

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 13/24

slide-58
SLIDE 58

Introduction Approach Evaluation Conclusion

Information Flow Type-checker (IFT): Example

Type checker verifies: annotations consistent

LOCATION -> INTERNET

Flow policy @Source(LOCATION)@Sink(INTERNET)String loc = readGPS();

sendSms(loc);

App code Incompatible sinks:

INTERNET <: SMS

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 13/24

slide-59
SLIDE 59

Introduction Approach Evaluation Conclusion

Information Flow Type-checker (IFT): Example

Type checker verifies: annotations consistent

LOCATION -> INTERNET

Flow policy @Source(LOCATION)@Sink(SMS)String loc = readGPS();

sendSms(loc);

App code

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 13/24

slide-60
SLIDE 60

Introduction Approach Evaluation Conclusion

Information Flow Type-checker (IFT): Example

Type checker verifies: annotations consistent

LOCATION -> INTERNET

Flow policy @Source(LOCATION)@Sink(SMS)String loc = readGPS();

sendSms(loc);

App code Forbidden flow:

LOCATION -> SMS

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 13/24

slide-61
SLIDE 61

Introduction Approach Evaluation Conclusion

False positives and declassifications

@Source({LOCATION, SMS})String [] array;

array[0] = readGPS(); array[1] = readSMS();

@Source(LOCATION)String loc = array[0]; App code

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 14/24

slide-62
SLIDE 62

Introduction Approach Evaluation Conclusion

False positives and declassifications

@Source({LOCATION, SMS})String [] array;

array[0] = readGPS(); array[1] = readSMS();

@Source(LOCATION)String loc = array[0]; App code @Source(LOCATION)

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 14/24

slide-63
SLIDE 63

Introduction Approach Evaluation Conclusion

False positives and declassifications

@Source({LOCATION, SMS})String [] array;

array[0] = readGPS(); array[1] = readSMS();

@Source(LOCATION)String loc = array[0]; App code @Source(LOCATION) @Source(LOCATION, SMS)

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 14/24

slide-64
SLIDE 64

Introduction Approach Evaluation Conclusion

False positives and declassifications

@Source({LOCATION, SMS})String [] array;

array[0] = readGPS(); array[1] = readSMS();

@SuppressWarnings("flow") // Safe: returns location data @Source(LOCATION)String loc = array[0]; App code

Declassifications

◮ Developer can suppress false-positive warnings ◮ App store employee verifies each declassification

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 14/24

slide-65
SLIDE 65

Introduction Approach Evaluation Conclusion

Reducing false positives

@Source({LOCATION, SMS})String value;

if (...) { value = readSMS(); ... } ...

App code value: @Source(SMS) value: @Source({LOCATION, SMS})

Flow sensitivity

◮ Type refinement with intra-procedural data flow analysis

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 15/24

slide-66
SLIDE 66

Introduction Approach Evaluation Conclusion

Reducing false positives

@Source({LOCATION, SMS})String value = ...;

String substring = value.substring(0,8);

App code Returns @Source({LOCATION, SMS})

Flow sensitivity

◮ Type refinement with intra-procedural data flow analysis

Context sensitivity

◮ Polymorphism (e.g., String operations, I/O streams, etc.)

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 15/24

slide-67
SLIDE 67

Introduction Approach Evaluation Conclusion

Reducing false positives

Flow sensitivity

◮ Type refinement with intra-procedural data flow analysis

Context sensitivity

◮ Polymorphism (e.g., String operations, I/O streams, etc.)

Indirect control flow

◮ Constant value propagation ◮ Reflection analysis ◮ Intent analysis

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 15/24

slide-68
SLIDE 68

Introduction Approach Evaluation Conclusion

Implicit information flow

@Source(USER_INPUT)long creditCard = getCard(); long i=0; while (true) { if (++i == creditCard) { sendToInternet(i); } } App code

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 16/24

slide-69
SLIDE 69

Introduction Approach Evaluation Conclusion

Implicit information flow

@Source(USER_INPUT)long creditCard = getCard(); long i=0; while (true) { if (++i == creditCard) { sendToInternet(i); } } App code Card number implicitly leaked

Classic approach (Denning and Denning, CACM’77)

◮ Taint all computations in dynamic scope ◮ Over-tainting may lead to taint explosion

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 16/24

slide-70
SLIDE 70

Introduction Approach Evaluation Conclusion

Implicit information flow

@Source(USER_INPUT)long creditCard = getCard(); long i=0; while (true) { if (++i == creditCard) { sendToInternet(i); } } App code

USER_INPUT -> CONDITIONAL Our approach: Prune irrelevant conditions

◮ Add additional sink CONDITIONAL ◮ Type-checker warning for conditions with sensitive source

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 16/24

slide-71
SLIDE 71

Introduction Approach Evaluation Conclusion

Implicit information flow

@Source(USER_INPUT)long creditCard = getCard(); long i=0; while (true) { if (++i == creditCard) { sendToInternet(i); } } App code

USER_INPUT -> CONDITIONAL Our approach: Prune irrelevant conditions

◮ Add additional sink CONDITIONAL ◮ Type-checker warning for conditions with sensitive source

Analyst must manually verify

◮ Analyst is aware of context ◮ No need to analyze dynamic scope for irrelevant conditions

(e.g., null checks, malicious conditions, or trigger)

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 16/24

slide-72
SLIDE 72

Introduction Approach Evaluation Conclusion

Evaluation: Overview

Are our permission model and type system effective?

◮ Adversarial Red Team challenge ◮ Evaluation of effectiveness for real malware

Is our approach effective and efficient in a time- constrained set up?

◮ Control team study ◮ Comparison of effectiveness and efficiency to control team

Is our verification model applicable for real-world apps?

◮ Usability study with annotators and auditors ◮ Evaluation of annotation and auditing burden

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 17/24

slide-73
SLIDE 73

Introduction Approach Evaluation Conclusion

Evaluation: Overview

Are our permission model and type system effective?

◮ Adversarial Red Team challenge ◮ Evaluation of effectiveness for real malware

Is our approach effective and efficient in a time- constrained set up?

◮ Control team study ◮ Comparison of effectiveness and efficiency to control team

Is our verification model applicable for real-world apps?

◮ Usability study with annotators and auditors ◮ Evaluation of annotation and auditing burden

Apps are not pre-annotated

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 17/24

slide-74
SLIDE 74

Introduction Approach Evaluation Conclusion

Adversarial Red Team challenge

Setup

◮ 5 independent Red Teams ◮ 72 Android apps (47 malicious with information-flow malware) ◮ 8,000 LOC and 12 permissions per app on average

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 18/24

slide-75
SLIDE 75

Introduction Approach Evaluation Conclusion

Adversarial Red Team challenge

Setup

◮ 5 independent Red Teams ◮ 72 Android apps (47 malicious with information-flow malware) ◮ 8,000 LOC and 12 permissions per app on average

Results for 47 malicious apps

Android permissions Additional Sources and Sinks Parameterized permissions Undetected

4% 20% 36% 40%

◮ 96% overall detection rate — 4% require modeling of

information flow paths (LOCATION -> ENCRYPT -> INTERNET)

◮ 60% of apps require our finer-grained sources and sinks

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 18/24

slide-76
SLIDE 76

Introduction Approach Evaluation Conclusion

Control team study

Setup

◮ Control team using dynamic and static analysis tools ◮ 18 Android apps (13 malicious) ◮ 7,000 LOC and 16 permissions per app on average

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 19/24

slide-77
SLIDE 77

Introduction Approach Evaluation Conclusion

Control team study

Setup

◮ Control team using dynamic and static analysis tools ◮ 18 Android apps (13 malicious) ◮ 7,000 LOC and 16 permissions per app on average

Results

Detection rate Analysis time 20 40 60 80 100

Ratio in %

Control

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 19/24

slide-78
SLIDE 78

Introduction Approach Evaluation Conclusion

Usability study

Setup

◮ 2 groups acting as annotators and auditors ◮ 11 Android apps (1 malicious) ◮ 900 LOC and 12 permissions per app on average

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 20/24

slide-79
SLIDE 79

Introduction Approach Evaluation Conclusion

Usability study

Setup

◮ 2 groups acting as annotators and auditors ◮ 11 Android apps (1 malicious) ◮ 900 LOC and 12 permissions per app on average

Annotation burden

◮ 96% of type annotations are inferred ◮ Annotations required: 6 per 100 lines of code ◮ Annotation time: 16 minutes per 100 lines of code

Most time spent on reverse engineering

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 20/24

slide-80
SLIDE 80

Introduction Approach Evaluation Conclusion

Usability study

Declassifications

◮ 50% of apps had no declassifications ◮ On average 3 declassification per 1,000 lines of code

IFT’s features effectively reduce false positives

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 21/24

slide-81
SLIDE 81

Introduction Approach Evaluation Conclusion

Usability study

Declassifications

◮ 50% of apps had no declassifications ◮ On average 3 declassification per 1,000 lines of code

IFT’s features effectively reduce false positives Auditing burden

◮ Overall review time: 3 minutes per 100 lines of code ◮ 35% of time: review the flow policy ◮ 65% of time: review declassifications & conditionals

Only 23% of conditionals needed to be reviewed

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 21/24

slide-82
SLIDE 82

Introduction Approach Evaluation Conclusion

Related work: Information flow

Jif (Myers, POPL’99)

◮ A security-typed language (incompatible Java extension) ◮ Supports dynamic checks and focuses on expressiveness

FlowDroid (Arzt et al., PLDI’14), SuSi (Rasthofer et al., NDSS’14)

◮ FlowDroid propagates sources and sinks found by SuSi ◮ SuSi classifies Android API methods using machine learning

IFT makes static verification of Android apps practical

◮ Finer-grained sources and sinks at type level ◮ Compiler plug-in using standard Java type annotations

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 22/24

slide-83
SLIDE 83

Introduction Approach Evaluation Conclusion

Related work: Collaborative verification model

Verifying browser extensions

◮ IBEX (Guha et al., S&P’11)

◮ Verification of Fine (ML dialect) against complex policies

◮ Lerner et al., ESORICS’13

◮ Verification of private browsing using annotated JavaScript

IFT verifies information flow in Android apps using a high-level flow policy Automated policy verification

◮ Crowd-sourcing (Agarwal & Hall, MobiSys’13) ◮ Natural language processing (Pandita et al., USENIX’13) ◮ Clustering (Gorla et al., ICSE’14)

Could aid manual verification of flow policies

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 23/24

slide-84
SLIDE 84

Introduction Approach Evaluation Conclusion

Conclusions

Developer provides Information flow policy Annotated source code

App description Declassification justifications

App store verifies Analyst verifies: acceptable behavior 1 Type checker verifies: annotations consistent 2 Analyst verifies: declassifications 3 Type checker verifies: annotations consistent Android API App code Flow policy

Collaborative verification model

◮ Low overall verification effort for

developer and app store analyst

◮ IFT combined with other analyses

Information Flow Type-checker (IFT)

◮ Context and flow-sensitive type system ◮ Fine-grained model for sources and sinks ◮ High-level information flow policy

Evaluation

◮ Detected 96% information-flow malware ◮ Low annotation and auditing burden ◮ Low false-positive rate

Android permissions Additional Sources and Sinks Parameterized permissions Undetected 4% 20% 36% 40%

https://www.cs.washington.edu/sparta

René Just, UW CSE Collaborative Verification of Information Flow for a High-Assurance App Store 24/24