TriggerScope: Towards Detecting Logic Bombs in Android Applications

Slides:



Advertisements
Similar presentations
Saumya Debray The University of Arizona Tucson, AZ
Advertisements

SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
1 Detection of Injected, Dynamically Generated, and Obfuscated Malicious Code (DOME) Subha Ramanathan & Arun Krishnamurthy Nov 15, 2005.
Linear Obfuscation to Combat Symbolic Execution Zhi Wang 1, Jiang Ming 2, Chunfu Jia 1 and Debin Gao 3 1 Nankai University 2 Pennsylvania State University.
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Impeding Malware Analysis Using Conditional Code Obfuscation Paper by: Monirul Sharif, Andrea Lanzi, Jonathon Giffin, and Wenke Lee Conference: Network.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
State coverage: an empirical analysis based on a user study Dries Vanoverberghe, Emma Eyckmans, and Frank Piessens.
Efficient Privilege De-Escalation for Ad Libraries in Mobile Apps Bin Liu (SRA), Bin Liu (CMU), Hongxia Jin (SRA), Ramesh Govindan (USC)
Jarhead Analysis and Detection of Malicious Java Applets Johannes Schlumberger, Christopher Kruegel, Giovanni Vigna University of California Annual Computer.
Automated malware classification based on network behavior
Reverse Engineering State Machines by Interactive Grammar Inference Neil Walkinshaw, Kirill Bogdanov, Mike Holcombe, Sarah Salahuddin.
Lecture slides prepared for “Computer Security: Principles and Practice”, 3/e, by William Stallings and Lawrie Brown, Chapter 5 “Database and Cloud Security”.
University of Central Florida TaintDroid: An Information-Flow Tracking System for Realtime Privacy Monitoring on Smartphones Written by Enck, Gilbert,
Ether: Malware Analysis via Hardware Virtualization Extensions Author: Artem Dinaburg, Paul Royal, Monirul Sharif, Wenke Lee Presenter: Yi Yang Presenter:
Effective Real-time Android Application Auditing
AccessMiner Using System- Centric Models for Malware Protection Andrea Lanzi, Davide Balzarotti, Christopher Kruegel, Mihai Christodorescu and Engin Kirda.
Christopher Kruegel University of California Engin Kirda Institute Eurecom Clemens Kolbitsch Thorsten Holz Secure Systems Lab Vienna University of Technology.
Grace. M, Zhou. Y, Shilong. Z, Jiang. X.  RiskRanker analyses the paths within an android application  Potentially malicious security risks are flagged.
2012 IEEE/IPSJ 12 th International Symposium on Applications and the Internet 陳盈妤 1/10.
Title of Presentation DD/MM/YYYY © 2015 Skycure Why Are Hackers Winning the Mobile Malware Battle.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
Automated Worm Fingerprinting Authors: Sumeet Singh, Cristian Estan, George Varghese and Stefan Savage Publish: OSDI'04. Presenter: YanYan Wang.
AppAudit Effective Real-time Android Application Auditing Andrew Jeong
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
INFORMATION-FLOW ANALYSIS OF ANDROID APPLICATIONS IN DROIDSAFE JARED YOUNG.
What mobile ads know about mobile users
Chapter 40 Internet Security.
CACheck: Detecting and Repairing Cell Arrays in Spreadsheets
Database and Cloud Security
Joshua Garcia Institute for Software Research
Optimistic Hybrid Analysis
DETECTING LOGIC BOMBS IN ANDROID APPLICATIONS
More Security and Programming Language Work on SmartPhones
Free for All! Assessing User Data Exposure to Advertising Libraries on Android Campbell Foskin.
CMSC 345 Defensive Programming Practices from Software Engineering 6th Edition by Ian Sommerville.
Security and Programming Language Work on SmartPhones
TriggerScope: Towards Detecting Logic Bombs in Android Applications
Soteris Demetriou, Whitney Merrill, Wei Yang, Aston Zhang and Carl A
Software Testing.
Control Flow Testing Handouts
Testing and Debugging PPT By :Dr. R. Mall.
Handouts Software Testing and Quality Assurance Theory and Practice Chapter 4 Control Flow Testing
Software Testing Techniques
Rule Induction for Classification Using
Input Space Partition Testing CS 4501 / 6501 Software Testing
Harvesting Runtime Values in Android Applications That Feature Anti-Analysis Techniques Presented by Vikraman Mohan.
Presented by Xiaohui (Amy) Lin
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Automated Pattern Based Mobile Testing
Outline of the Chapter Basic Idea Outline of Control Flow Testing
TriggerScope Towards Detecting Logic Bombs in Android Applications
Structural testing, Path Testing
Un</br>able’s MySecretSecrets
Systematic Detection of capability leaks in stock android smartphones
TriggerScope Towards detecting logic bombs in android applications
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Human Complexity of Software
Multiple Aspect Modeling of the Synchronous Language Signal
All You Ever Wanted to Know About Dynamic Taint Analysis & Forward Symbolic Execution (but might have been afraid to ask) Edward J. Schwartz, Thanassis.
iSRD Spam Review Detection with Imbalanced Data Distributions
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
Control Structure Testing
Chapter 3: Selection Structures: Making Decisions
Motivation and Problem Statement
Automatically Diagnosing and Repairing Error Handling Bugs in C
When Machine Learning Meets Security – Secure ML or Use ML to Secure sth.? ECE 693.
UNIT-4 BLACKBOX AND WHITEBOX TESTING
Real-Time RAT-based APT Detection
Presentation transcript:

TriggerScope: Towards Detecting Logic Bombs in Android Applications Presented by: Mohankumar kandavel

Introduction to Logic bombs

Logic bombs Logic bomb: malicious application logic that is triggered only under certain (narrow) conditions. Malicious application logic: violation of user’s reasonable expectations Malware is designed to target specific victims, under certain circumstances Example: take a navigation application, supposed to help a soldier in a war zone find the shortest route to a location. After a given (hardcoded) date, it gives to him longer, more dangerous

Problems with traditional defenses App Stores employ some defenses, but they are not sufficient. Static Analysis: malicious application logic doesn’t require additional privileges or make “strange” API calls Malicious behavior is deeply hidden within the app logic Example: the malicious navigation app… behaved like any navigation app! Dynamic Analysis: likely won’t executive code triggered only on a future date or a certain location Code coverage problems Can be detected evaded Even if covered, how to find out malicious behavior from benign? Manual Audit: If source code is not available, no guarantees Code can be obfuscated

TriggerScope

Key Observation TriggerScope detects logic bombs precisely analyzing and characterizing the checks (conditional, predicates) that guard a given behavior. It gives less importance to the (malicious) behavior itself. if (sms.getBody(). equals(“adfbdf…”) ) // Look here ! { myObject.doSomething(); // … not there. }

Trigger Analysis Predicate: logic formula used in a conditional statement (&& (!=#sms/#body contains “MPS:”) 0) (!= (#sms/#body contains “gps”) 0)) Suspicious Predicate: a predicate satisfied only under very specific, narrow conditions Functionality: a set of basic blocks in a program Sensitive functionality: a functionality performing directly or indirectly in a sensitive operations In practice: all calls to Android APIs protected by permissions, and operations involving the filesystem Trigger: suspicious predicate involving in the execution of a sensitive functionality

Analysis overview (1) Static analysis of bytecode: building of Control Flow Graph Symbolic Values Modeling for integer, string, time, location and SMS-based objects Expression Trees are built and appended to each symbolic object referenced in a check Reconstruction of the semantics of the check, often lost in bytecode Date.after(Date) #now 2017/10/25 Figure 1. Example of expression tree.

Analysis overview (2) Block Predicate Extraction: edges of Control Flow Graph are annotated with simple predicates Simple predicate: P in if P then X else Y Path Predicate Recovery and Minimization Combine simple predicates to get full path predicate that reaches each basic block Minimization: elimination of redundant terms in predicates Important to reduce false dependencies

Path Predicate Recovery and Minimization

Analysis overview (3) Predicate Classification: a check of suspicious if its equivalent to: Comparison to current time value and constant Bounds checks on GPS location Hard-coded patterns on body or sender of SMS Control-Dependency Analysis: control dependency between suspicious predicates and sensitive functionalities. sensitive = privileged Android APIs + filesystem ops Suspicious propagates with data flows and callbacks Problems: data flows through files When in doubt: suspicious! Post-processing: whitelisting for some edge cases

Experiment

Data sets Benign applications: 9582 apps from Google Play Store They all use time-, location- or SMS-related APIs Actually TriggerScope identified in two “benign” apps, confirmed by manual inspection! Malicious applications: 14 apps from several sources Stealthy malware developed for previous researches Real-world malware samples HackingTeam RCSAndroid

Results of analysis Domain Apps Apps with checks Apps with suspicious checks Apps with suspicious triggered behaviour Apps after post-filter steps Time 4,950 1,026 302 30 10 Location 3,430 137 71 23 8 SMS 1,138 223 89 64 17 Table 2. Different steps of Trigger analysis result TriggerScope flagged 35 applications are suspicious apps

Accuracy Evaluation Predicate Detection 14 1386 7927 14.88% 0% Analysis Steps True Positives False Negatives Positive Rate Negative Predicate Detection 14 1386 7927 14.88% 0% Suspicious Predicate 462 8851 4.96% Control-Dependency 117 9196 1.26% TriggerScope (all) 35 9278 0.38% Table 2. The accuracy results of TriggerScope

False positives decreasing step after step Figure 2. Each analysis stage is useful, because it reduces False Positives

Critique

Strengths TriggerScope provides rich semantics on predicates Great help for manual audits This makes the tool extensible, open for future research Novel approach: focus on checks, not malicious behavior Fewer False Positives, False Negatives than other tools

Issues: Limits of analysis Definition of suspicious predicate is too narrow Only checks against the hardcoded values are considered Triggers can come from the network or elsewhere Authors claim 0% False Negatives, but the evaluation is not conclusive We manually inspect a random subset of 20 applications for which our analysis did not identify any suspicious check. We spent about 10 minutes per application, and we did not find any false negatives. Difficult to assess False Negatives if no tool finds anything and source code is unavailable

Issues: evasion techniques Reflection, dynamic code loading, polymorphism and conditional code obfuscation [3] can defeat static analysis Authors can say that these techniques are themselves suspicious, by they also have legitimate uses Predicate minimization is NP-complete Is it possible to design “pathological” code to slow down and defeat analysis? Or result in very complex, meaningless predicates? Exceptions were not cited as a control flow subversion method Statically reasoning is the presence of exceptions and about the effects of exceptions in challenging [1] Unclear how the static analysis engine handles exceptions Unchecked exceptions (e.g. division by zero) could be exploited as stealthy triggers

Related and future work

Related work: AppContext AppContext [2] : supervised machine learning method to classify malicious behavior statically Starts identifying suspicious actions Context: which category of input controls the execution of those actions? Similar idea: just looking at the action isn’t enough. Differences: AppContext only classifies triggers as suspicious or not; TriggerScope also provides semantics about the predicates, helping manual inspection AppContext does not consider the typology of the predicate, only the type of its inputs Higher False Positive rate than TriggerScope

Future evolutions Extended trigger analysis is not only to time, location, SMSs The trigger could come e.g. from the network The framework is easily extensible to other types of triggers with more work to model other symbolic values Quantitative analysis of predicate “suspiciousness” Currently, it’s defined in a qualitative, ad-hoc way Could be combined with classification methods

References 1. Gilray T, Lyde S, Adams MD, Might M, Van Horn D. Pushdown control-flow analysis for free. Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. 2016:691– 704. http://doi.acm.org/10.1145/2837614.2837631. Accessed May 9, 2017. doi: 10.1145/2837614.2837631. 2. Yang W, Xiao X, Andow B, Li S, Xie T, Enck W. Appcontext: Differentiating malicious and benign mobile app behaviors using context. . 2015;1:303-313. 3. Sharif MI, Lanzi A, Giffin JT, Lee W. Impeding malware analysis using conditional code obfuscation. . 2008.