L.C.Smith College of Engineering and Computer Science AppSealer : Automatic Generation of Vulnerability-Specific Patches for Preventing Component Hijacking.

Slides:



Advertisements
Similar presentations
Delta Confidential 1 5/29 – 6/6, 2001 SAP R/3 V4.6c PP Module Order Change Management(OCM)
Advertisements

You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Advanced Piloting Cruise Plot.
Feichter_DPG-SYKL03_Bild-01. Feichter_DPG-SYKL03_Bild-02.
Kapitel S3 Astronomie Autor: Bennett et al. Raumzeit und Gravitation Kapitel S3 Raumzeit und Gravitation © Pearson Studium 2010 Folie: 1.
Kapitel 21 Astronomie Autor: Bennett et al. Galaxienentwicklung Kapitel 21 Galaxienentwicklung © Pearson Studium 2010 Folie: 1.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 38.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Chapter 1 Image Slides Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Document #07-12G 1 RXQ Customer Enrollment Using a Registration Agent Process Flow Diagram (Switch) Customer Supplier Customer authorizes Enrollment.
Document #07-12G 1 RXQ Customer Enrollment Using a Registration Agent Process Flow Diagram (Switch) Customer Supplier Customer authorizes Enrollment.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
Multiplying binomials You will have 20 seconds to answer each of the following multiplication problems. If you get hung up, go to the next problem when.
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Year 6 mental test 5 second questions
Year 6 mental test 10 second questions
ZMQS ZMQS
Richmond House, Liverpool (1) 26 th January 2004.
Break Time Remaining 10:00.
ABC Technology Project
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
VOORBLAD.
15. Oktober Oktober Oktober 2012.
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
1 public class Newton { public static double sqrt(double c) { double epsilon = 1E-15; if (c < 0) return Double.NaN; double t = c; while (Math.abs(t - c/t)
“Start-to-End” Simulations Imaging of Single Molecules at the European XFEL Igor Zagorodnov S2E Meeting DESY 10. February 2014.
BIOLOGY AUGUST 2013 OPENING ASSIGNMENTS. AUGUST 7, 2013  Question goes here!
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Squares and Square Root WALK. Solve each problem REVIEW:
1..
© 2012 National Heart Foundation of Australia. Slide 2.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Chapter 5 Test Review Sections 5-1 through 5-4.
SIMOCODE-DP Software.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
Addition 1’s to 20.
25 seconds left…...
Januar MDMDFSSMDMDFSSS
Week 1.
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Intracellular Compartments and Transport
1 Unit 1 Kinematics Chapter 1 Day
PSSA Preparation.
Immunobiology: The Immune System in Health & Disease Sixth Edition
Xiao Zhang and Wenliang Du Dept. of Electrical Engineering & Computer Science Syracuse University.
Essential Cell Biology
How Cells Obtain Energy from Food
Immunobiology: The Immune System in Health & Disease Sixth Edition
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
CpSc 3220 Designing a Database
Traktor- og motorlære Kapitel 1 1 Kopiering forbudt.
2014 Network and Distributed System Security Symposium AppSealer: Automatic Generation of Vulnerability-Specific Patches for Preventing Component Hijecking.
Presentation transcript:

L.C.Smith College of Engineering and Computer Science AppSealer : Automatic Generation of Vulnerability-Specific Patches for Preventing Component Hijacking Attacks in Android Applications Mu Zhang Heng Yin Department of Electrical Engineering and Computer Science, Syracuse University

Motivation: Component Hijacking Attacks in Android “A class of attacks that seek to gain unauthorized access to protected or private resources through exported components in vulnerable Android apps.” (L. Lu et al. CHEX, CCS’12)

Vulnerable APP: Location Service Android Framework Motivation: Component Hijacking Attacks in Android Component 1Component 2 Location Manager URL Send(URL, Loc) Loc URL’ Send(URL’, Loc)

Motivation: Current Countermeasures Detection: Static Dataflow Analysis – Conservative Fix: Manual Effort – Inexperienced – Not easy to confirm vulnerability 16 Reported in Oct Not fixed until Aug. 2013

AppSealer: Automatic Patch Generation Goal: to automatically generate a patch that is specific to the discovered component hijacking vulnerability. Design Requirements: No source code access. Vulnerability-specific patching. Minimal performance overhead. Minimal impact on usability.

Related Work: Automatic Patch Generation Data Patch – W. Cui et al. ShieldGen, Oakland’07 – D. Brumley et al. Oakland’06 – M. Costa et al. Vigilante, SOSP’05 – M. Costa et al. Bouncer, SOSP’07 – J. Caballero et al. RAID’09 Code Patch – Z. Lin et al. AutoPaG, ASIACCS’07 – C. Zhang et al. IntPatch, ESORICS’10 – Sidiroglou and Keromytis, IEEE Security and Privacy – J. Newsome et al. VSEF, NDSS’06

Technical Approach Key: to place minimally required code into the vulnerable program to accurately keep track of dangerous information. Resources DEX Vulnerable App Translation IR Taint Slice Computation Slices Patch Statement Placement New IR Patch Optimization Optimized IR Code Generation Resources DEX’ Patched App

A Running Example 1 public class VulActivity extends Activity{ 2 private String DEFAULT_ADDR = " 3 private byte DEFAULT_KEY = 127; 4 5 private String addr ; 6 private static Location location ; 7 private byte key; 8 9 /* Entry point of this Activity */ 10 public void onCreate (Bundle savedInstanceState){ 11 this.key = DEFAULT_KEY; this.addr = getIntent ().getExtras().getString("url"); 14 if(this.addr == null){ 15 this.addr = DEFAULT_ADDR ; 16 } 17 } public void onStart (){ 20 VulActivity.location = getLocation (); 21 } public void onDestroy (){ 24 String location = 25 Double.toString(location.getLongitude()) + "," + Double.toString(location.getLatitude()); 26 byte[] bytes = location.getBytes(); 27 for(int i=0; i<bytes.length; i++) 28 bytes[i] = crypt(bytes[i]); 29 String url = this.addr ; 30 post ( url, bytes ); 31 } public byte crypt(byte plain){ 34 return (byte)(plain ^ key); 35 } public Location getLocation (){ 38 Location location = null; 39 LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); 40 location = locationManager. getLastKnownLocation (LocationManager.GPS_PROVIDER); 41 return location; 42 } public void post (String addr, byte[] bytes){ 45 URL url = new URL( addr ); 46 HttpURLConnection conn = (HttpURLConnection)url.openConnection(); OutputStream output = conn.getOutputStream(); 49 output.write( bytes, 0, bytes.length); } 52 }

Taint Slice Computation

Patch Statement Placement 10 1 public class VulActivity extends Activity{... 5 private String addr; P public boolean addr_s0_t; 6 private static Location location; P public static boolean location_s1_t; public void onCreate(Bundle savedInstanceState){ this.addr=getIntent().getExtras().getString("url"); P if(isExternalIntent()){ P this.addr_s0_t = true; P }else{ P this.addr_s0_t = false; P } 14 if(this.addr == null){ 15 this.addr = DEFAULT_ADDR; P this.addr_s0_t = false; 16 } 17 } public void onStart(){ 20 VulActivity.location = getLocation(); P VulActivity.location_s1_t = true; 21 } public void onDestroy(){ String url = this.addr; P BoolWrapper bytes_s1_w = new BoolWrapper(); P bytes_s1_w.b = VulActivity.location_s1_t; P BoolWrapper url_s0_w = new BoolWrapper(); P url_s0_w.b = this.addr_s0_t; 30 post(url, bytes, url_s0_w, bytes_s1_w); 31 } public void post(String addr, byte[] bytes, BoolWrapper addr_s0_w, BoolWrapper bytes_s1_w){ P boolean output_s0_t = addr_s0_w.b; P boolean bytes_s1_t = bytes_s1_w.b; OutputStream output = conn.getOutputStream(); P if(output_s0_t == true && bytes_s1_t == true) P promptForUserDecision(); 49 output.write(bytes, 0, bytes.length); } 52 }

Patch Optimization public byte crypt(byte, BoolWrapper, BoolWrapper, BoolWrapper) { r0 VulActivity; b0 byte; w_p0 BoolWrapper; w_t BoolWrapper; w_r BoolWrapper; r0_t = w_t. ; b0_t = w_p0. ; $b2_t = w_r. ; $b1 = r0. ; $b2 = b0 ˆ $b1; $b2_t = b0_t | 0; w_t. = r0_t; w_p0. = b0_t; w_r. = $b2_t; return $b2; } O1: Removing Redundant BoolWrapper Statements O2: Removing Redundant Function Parameters public byte crypt(byte, BoolWrapper, BoolWrapper) {

Patch Optimization public byte crypt(byte, BoolWrapper, BoolWrapper) { r0 VulActivity; b0 byte; w_p0 BoolWrapper; w_r BoolWrapper; b0_t = w_p0. ; $b1 = r0. ; $b2 = b0 ˆ $b1; $b2_t = b0_t | 0; w_r. = $b2_t; return $b2; } 12 O3: Inlining Instrumentation Code O4: Soot Built-in Optimizations tmp23 = tmp21 | 0; tmp21 = $b2_t; $b3_t = tmp23 $b3 = virtualinvoke r0. ($b2); $b3_t = $b2_t | 0;

Evaluation: Overview 16 real-world apps with component hijacking vulnerabilities – Increase of Program Size – Performance of Patch Generation – Runtime Overhead Average: 2% Worst Case: 9.6% – Effectiveness Benign Context: No Interruption Under Attack: Warning 13

Evaluation: Case Study 6 apps with Pop-up Dialogs 3 apps with Selection Views 3 apps with Multiple Threads 14

Related Work [1] W. Cui, M. Peinado, and H. J. Wang, “ShieldGen: Automatic Data Patch Generation for Unknown Vulnerabilities with Informed Probing,” in Proceedings of Oakland’07. [2] D. Brumley, J. Newsome, D. Song, H. Wang, and S. Jha, “Towards Automatic Generation of Vulnerability- Based Signatures,” in Proceedings of Oakland’06. [3] M. Costa, J. Crowcroft, M. Castro, A. Rowstron, L. Zhou, L. Zhang, and P. Barham, “Vigilante: End-to-End Containment of Internet Worms,” in Proceedings of SOSP’05. [4] M. Costa, M. Castro, L. Zhou, L. Zhang, and M. Peinado, “Bouncer: Securing Software by Blocking Bad Input,” in Proceedings of SOSP’07. [5] J. Caballero, Z. Liang, Poosankam, and D. Song, “Towards Generating High Coverage Vulnerability-Based Signatures with Protocol-Level Constraint-Guided Exploration,” in Proceedings of RAID’09. [6] Z. Lin, X. Jiang, D. Xu, B. Mao, and L. Xie, “AutoPaG: Towards automated Software Patch Generation with Source Code Root Cause Identification and Repair,” in Proceedings of ASIACCS’07. [7] C. Zhang, T. Wang, T. Wei, Y. Chen, and W. Zou, “IntPatch: Automatically Fix Integer-Overflow-to-Buffer- Overflow Vulnerability at Compile-Time,” in Proceedings of ESORICS’10. [8] S. Sidiroglou and A. D. Keromytis, “Countering Network Worms Through Automatic Patch Generation,” IEEE Security and Privacy, vol. 3, no. 6, pp. 41–49, Nov [9] J. Newsome, D. Brumley, and D. Song, “Vulnerability-specific execution filtering for exploit prevention on commodity software,” in Proceedings of NDSS’06. 15

Conclusion We developed a technique to automatically generate patch for Android applications with component hijacking vulnerability. The key is to place minimally required code into the vulnerable program to accurately keep track of dangerous information and effectively block the attack at the security sensitive APIs.

Questions?

Discussion Soundness of Patch Generation – Static analysis: standard, FP – Taint tracking: taint policy of TaintDroid, FP – Optimization: compiler algorithms – In theory, FP; In practice, no FP observed. 18