f unctionality a ware
play

F unctionality- A ware FA FASE: S ecurity E nforcement Petar - PowerPoint PPT Presentation

F unctionality- A ware FA FASE: S ecurity E nforcement Petar Tsankov Marco Pistoia Omer Tripp Martin Vechev Pietro Ferrara ETH Zurich IBM T.J. Watson Google Inc. ETH Zurich Julia Research Center Information Flow Vulnerabilities in


  1. F unctionality- A ware FA FASE: S ecurity E nforcement Petar Tsankov Marco Pistoia Omer Tripp Martin Vechev Pietro Ferrara ETH Zurich IBM T.J. Watson Google Inc. ETH Zurich Julia Research Center

  2. Information Flow Vulnerabilities in Mobile Apps Confidential data ‘ OR 1 = 1 Attacker Untrusted inputs App Manual analysis of information flow threats is challenging 2

  3. Existing Solutions Detection § TaintDroid (dynamic) Source § FlowDroid (static) Mask/block Enforcement bad flows § AppFence (masking & blocking) Sink Raise an alarm when bad flow is detected 3

  4. Existing Solutions Detection § TaintDroid (dynamic) Source § FlowDroid (static) Mask/block Enforcement bad flows § AppFence (masking & blocking) Sink However, correct security enforcement depends on the app’s functionality 4

  5. The Lack of Functionality-Awareness Normal Behavior App secured with AppFence 5

  6. The Lack of Functionality-Awareness Normal Behavior App secured with AppFence What causes these side effects and crashes? 6

  7. Illus Illustr trativ tive e Exam ample ple 7

  8. Illustrative Example Source returns the International Mobile Subscriber Identity (IMSI) String imsi = getSubscriberId(); // source // imsi ↦ "310152843957264" 310152843957264 HttpGet request = new HttpGet("analytics.com?id=" + imsi); // request.uri ↦ "analytics.com?id=310152843957264" httpClient.execute(req); // sink The IMSI flows into a sink as part of the URI 8

  9. Illustrative Example Source returns the International Mobile Subscriber Identity (IMSI) String imsi = getSubscriberId(); // source // imsi ↦ "310152843957264" 310152843957264 HttpGet request = new HttpGet("analytics.com?id=" + imsi); // request.uri ↦ "analytics.com?id=310152843957264" httpClient.execute(req); // sink How can we correctly anonymize the URI that contains the IMSI? 9

  10. Common Functionality Constraints App-specific constraint Generic constraint “Keep first six digits intact” “Must abide URI format” request.uri ↦ "analytics.com?id=310152843957264" Must not modify trusted parts Incorrect request.uri = "XYZ" Incorrect request.uri = "xyz.com?id=XYZ" Incorrect request.uri = "analytics.com?id=000000000000000" Correct request.uri = "analytics.com?id=310152000000000" 10

  11. How can we enforce security y while satisfyi ying such functionality y constraints? 11

  12. Functionality-Aware Security Enforcement (FASE) Fine-grained Data Flow Capture generic and Tracking app-specific constraints Source Functionality Constraints Synthesize constraint- compliant value Safe values Sink synthesizer 12

  13. Functionality-Aware Security Enforcement (FASE) Fine-grained Data Flow App secured with FASE Capture generic and Tracking app-specific constraints Source Functionality Constraints Safe values Sink synthesizer 13

  14. Functionality-Aware Security Enforcement (FASE) Fine-grained Data Flow Tracking Source Functionality Constraints Safe values Sink synthesizer 14

  15. Fine-Grained Data Flow Tracking Character-level Tracking for Strings String imsi = getSubscriberId(); // source (IMSI) // imsi ↦ "310152843957264" HttpGet request = new HttpGet("analytics.com?id=" + imsi); // request.uri ↦ "analytics.com?id=310152843957264" Each character Value-based Tracking for Primitives is mapped to label a IMSI Location l = getLastKnownLocation(GPS); // l.lat ↦ 37.3876, l.lon ↦ 122.0575 Each value is mapped to label a Location 15

  16. Functionality-Aware Security Enforcement (FASE) Fine-grained Data Flow Tracking Source Functionality Constraints Safe values Sink synthesizer 16

  17. Two Kinds of Functionality Constraints Example: “URI strings must be valid” Generic <Uri> ::= “http” “s”? “://” § Specified once for all apps <Chars> “.” <Dom> <Args> § Capture sink pre-conditions <Chars> ::= [a-zA-Z0-9] + <Dom> ::= “com” | “net” | ... Application-specific Example: “First 6 chars of IMSI must be kept intact when sent to analytics.com” § Specified by developers § Captured in a designated DSL if uri.startsWith(“analytics.com”) constrain uri< > IMSI to val .substr(0,6).[0-9] 9 17

  18. Functionality-Aware Security Enforcement (FASE) Fine-grained Data Flow Tracking Source Functionality Constraints Safe values Sink synthesizer 18

  19. Synthesizer Labeled string "analytics.com?id= " 310152843957264 App-specific constraint if uri.startsWith(“analytics.com”) constrain uri< > IMSI to val .substr(0,6).[0-9] 9 Derived regular expression Generic constraint <Uri> ::= [a-zA-Z0-9] + . <Dom> "analytics.com?id=310152".[0-9] 9 Constraint-compliant string "analytics.com?id=31015200000000" 19

  20. Im Implem plemen entatio tion n & & Exper perim imen ents ts 20

  21. FASE System Implementation Data Flow Tracking § Instruments Android Libraries (String, StringBuilder, ...) as well as sources and sinks (>10K) § Efficiency achieved by locality-aware memory allocation for labels Synthesizer § Uses the ACLA framework for analysis context-free and regular languages § Efficiency achieved by combination of caching and short-circuiting heuristics App-level Instrumentation § Rewrites source and sink calls to invoke synthesizer 21

  22. Experiments Robustness Can the FASE system secure apps while preserving functionality? Overhead What is the overhead caused by the FASE system? Benchmark Applications § 20 apps used in prior studies § On average, these apps have 500 source/sink call sites and 10 security-relevant flows 22

  23. Robustness Experiment Fine-grained Tracking Generic Constraints App-specific Constraints Coarse No Generic FASE Tracking Constraints Constraints System 23

  24. Robustness Experiment # of applications Crash Major side effects 8 Minor side effects 4 Only 1 app shows No crashes a minor side effect 0 Coarse No Generic FASE Tracking Constraints Constraints System The FASE system secures apps in a robust way 24

  25. Overhead Experiment Task completion time (in seconds) Stock Android device 3 With FASE 2 1 0 Applications Roughly 10% overhead 25

  26. Summary Data Flow Tracking Source Functionality Constraints Safe values Sink synthesizer FASE Coarse System Tracking Existing enforcement Functionality-aware Robust security solutions often break security enforcement enforcement with functionality low overhead 26

Recommend


More recommend