DETECTING LOGIC BOMBS IN ANDROID APPLICATIONS

Slides:



Advertisements
Similar presentations
Design by Contract.
Advertisements

Information System Audit : © South-Asian Management Technologies Foundation Chapter 4: Information System Audit Requirements.
Kapsalakis Giorgos - AM: 1959 HY459 - Internet Measurements Fall 2010.
By Philipp Vogt, Florian Nentwich, Nenad Jovanovic, Engin Kirda, Christopher Kruegel, and Giovanni Vigna Network and Distributed System Security(NDSS ‘07)
Peeking into Your App without Actually Seeing It: UI State Inference and Novel Android Attacks Qi Alfred Chen, Zhiyun Qian†, Z. Morley Mao University of.
Atomicity in Multi-Threaded Programs Prachi Tiwari University of California, Santa Cruz CMPS 203 Programming Languages, Fall 2004.
 Firewalls and Application Level Gateways (ALGs)  Usually configured to protect from at least two types of attack ▪ Control sites which local users.
Security in Databases. 2 Srini & Nandita (CSE2500)DB Security Outline review of databases reliability & integrity protection of sensitive data protection.
Security in Databases. 2 Outline review of databases reliability & integrity protection of sensitive data protection against inference multi-level security.
GPS Tracking & Inventory Management GPS Tracking & Inventory Management Presented by: Product Activation Group.
Android Security Enforcement and Refinement. Android Applications --- Example Example of location-sensitive social networking application for mobile phones.
Efficient Privilege De-Escalation for Ad Libraries in Mobile Apps Bin Liu (SRA), Bin Liu (CMU), Hongxia Jin (SRA), Ramesh Govindan (USC)
Understanding Android Security Yinshu Wu William Enck, Machigar Ongtang, and PatrickMcDaniel Pennsylvania State University.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 17: Code Mining.
Lei Wu, Michael Grace, Yajin Zhou, Chiachih Wu, Xuxian Jiang Department of Computer Science North Carolina State University CCS 2013.
Presented by: Kushal Mehta University of Central Florida Michael Spreitzenbarth, Felix Freiling Friedrich-Alexander- University Erlangen, Germany michael.spreitzenbart,
Presented by: Tom Staley. Introduction Rising security concerns in the smartphone app community Use of private data: Passwords Financial records GPS locations.
Behavior-based Spyware Detection By Engin Kirda and Christopher Kruegel Secure Systems Lab Technical University Vienna Greg Banks, Giovanni Vigna, and.
CloudAppSec : Cloud Based Application Security for Android Applications Animesh Nandanwar Kshitij Desai Mayuresh Randive
Effective Real-time Android Application Auditing
Leave Me Alone: App- level Protection Against Runtime Information Gathering on Android NAN ZHANG, KAN YUAN, MUHAMMAD NAVEED†, XIAOYONG ZHOU AND XIAOFENG.
David Adams ATLAS DIAL: Distributed Interactive Analysis of Large datasets David Adams BNL August 5, 2002 BNL OMEGA talk.
Title of Presentation DD/MM/YYYY © 2015 Skycure Why Are Hackers Winning the Mobile Malware Battle.
Android Permissions Demystified
PROGRAMMING TESTING B MODULE 2: SOFTWARE SYSTEMS 22 NOVEMBER 2013.
VMM Based Rootkit Detection on Android
Race conditions and synchronization issues Exploiting UNIX.
/ PSWLAB Evidence-Based Analysis and Inferring Preconditions for Bug Detection By D. Brand, M. Buss, V. C. Sreedhar published in ICSM 2007.
Online Consumers produce histograms (from a limited sample of events) which provide information about the status of the different sub-detectors. The DQM.
Mohssen Mohammed Sakib Pathan Building Customer Trust in Cloud Computing with an ICT-Enabled Global Regulatory Body Mohssen Mohammed Sakib Pathan.
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.
Lecturer: Eng. Mohamed Adam Isak PH.D Researcher in CS M.Sc. and B.Sc. of Information Technology Engineering, Lecturer in University of Somalia and Mogadishu.
Lecture 2 Page 1 CS 236 Online Security Policies Security policies describe how a secure system should behave Policy says what should happen, not how you.
“What the is That? Deception and Countermeasures in the Android User Interface” Presented by Luke Moors.
CopperDroid Logan Horton. Android - Background Android is complicated to analyse due to having 2 places to check for code execution Normally, code is.
GroddDroid A Gorilla for Triggering Malicious Behavior 10th Int. Conference on Malicious and Unwanted Software October 20-23rd 2015  Abraham, R. Andriatsimandefitra,
Privacy in Mobile Systems Karthik Dantu and Steve Ko.
SOFTWARE TESTING TRAINING TOOLS SUPPORT FOR SOFTWARE TESTING Chapter 6 immaculateres 1.
Security Issues in Information Technology
Joshua Garcia Institute for Software Research
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.
TMG Client Protection 6NPS – Session 7.
Security and Programming Language Work on SmartPhones
Monitoring systems COMET types MS55 & MS6
TriggerScope: Towards Detecting Logic Bombs in Android Applications
Understanding Android Security
TriggerScope: Towards Detecting Logic Bombs in Android Applications
AUDACIOUS: USER DRIVEN ACCESS CONTROL WITH UNMODIFIED OPERATING SYSTEM
Harvesting Runtime Values in Android Applications That Feature Anti-Analysis Techniques Presented by Vikraman Mohan.
TaintART: A Practical Multi-level Information-Flow Tracking System for Android RunTime Sadiq Basha.
Presented by Xiaohui (Amy) Lin
Chapter 8 – Software Testing
Siegfried Rasthofer, Steven Arzt, Marc Miltenberger, Eric Bodden
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
^ About the.
TriggerScope Towards Detecting Logic Bombs in Android Applications
BotCatch: A Behavior and Signature Correlated Bot Detection Approach
Un</br>able’s MySecretSecrets
Systematic Detection of capability leaks in stock android smartphones
TriggerScope Towards detecting logic bombs in android applications
All You Ever Wanted to Know About Dynamic Taint Analysis & Forward Symbolic Execution (but might have been afraid to ask) Edward J. Schwartz, Thanassis.
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.
The role of the test organization in a Security Sensitive project
Motivation and Problem Statement
Understanding Android Security
Autonomous Network Alerting Systems and Programmable Networks
Presentation transcript:

DETECTING LOGIC BOMBS IN ANDROID APPLICATIONS TRIGGER SCOPE DETECTING LOGIC BOMBS IN ANDROID APPLICATIONS

Possible Implementation of a Logic Bomb

Logic Bomb: - Subtly modifies the program output - is only triggered under certain narrow circumstances.

Logic Bomb It is a powerful mechanism that is commonly employed by targeted malware, often used as part of APT(Advanced Persistent Threat) and state sponsored attacks. Eg: Hacking Team’s Android RCS- It was used for targeted attacks on the activists. It was able to capture screenshot, track GPS location.

Key Idea: Focus is on triggers, not the triggered behaviour. Isn’t it weird?? Key Idea: Focus is on triggers, not the triggered behaviour.

Logic Bombs are detected using TRIGGER ANALYSIS TriggerScope: Detects Logic Bombs by precisely analysing and characterizing the checks that guard a given behaviour. Logic Bombs are detected using TRIGGER ANALYSIS

Trigger Analysis Static Program Analysis technique used to identify triggers. - Input: Android App’s Dalvik Bytecode - Output: Suspicious Triggers and Triggered Behaviours Four main Analysis steps.:- - The analysis combines symbolic execution, path predicate reconstruction and minimization, and inter-procedural control dependency analysis to enable the precise detection of the triggers.

SUSPICIOUS??? 1.method public f()V 2 // Date now = new Date(); 3 new-instance v0, Ljava/util/Date; 4 invoke-direct {v0}, \ 5 Ljava/util/Date;-><init>()V 6 7 // Date target = new Date(12,22,2016); 8 new-instance v1, Ljava/util/Date; 9 const/16 v2, 0xc 10 const/16 v3, 0x16 11 const/16 v4, 0x7e0 12 invoke-direct {v1, v2, v3, v4}, \ 13 Ljava/util/Date;-><init>(III)V 14 15 // if (now.after(target)) {...} 16 invoke-virtual {v0, v1}, \ 17 Ljava/util/Date;-> \ 18 after(Ljava/util/Date;)Z 19 move-result v2 20 21 // suspicious check! 22 if-eqz v2, :cond_0 23 24 // g(); 25 invoke-virtual {p0}, LApp;->g()V 26 goto :goto_0 27 28 :cond_0 29 // h(); 30 invoke-virtual {p0}, LApp;->h()V 31 32 :goto_0 33 return-void 34 35.end method SUSPICIOUS???

ANALYSIS STEPS:

1. Symbolic Execution Forward Symbolic Execution - Time, SMS, Location - Strings, Intents, Bundles A symbolic value is introduced whenever a relevant object is created. The analysis records operations on relevant objects.

1. Symbolic Execution- example

Expression Tree if-eqz v2, : cond_0 Date.after(Date) # now 10/10/2017

2. Predicate Extraction Each block is annotated with its block predicate. This step recovers intra procedural path predicates..

Counter Flow Graph

3. Predicate Characterization This step gauges how suspicious a predicate is. Our current policy: - Ordering comparison between symbolic time and constant - Bound checks on symbolic location - Matching constant values against SMS body or sender.

if-eqz v2, : cond_0 Date.after(Date) # now 10/10/2017

if-eqz v2, : cond_0 Date.after(Date) # now 10/10/2017 SUSPICIOUS!!!

Control Dependencies Identify control dependencies between suspicious predicates and invocations of sensitive Android API methods. The definition of sensitivity can be specified through a user-defined policy. A list of potentially sensitive operations were compiled by considering all Android API’s protected by a permission and by augmenting it with operations that involve the file system. Forward traversal of the sCFG starting from each suspicious predicate. This step is inter-procedural.

4. Post Filter Steps Filter out cases that match the definition of suspiciousness, but are actuall clearly benign. - Null Checks - Checks against the constant ‘0’ or ‘-1’ - “Is this field already set with a valid timestamp?”

Evaluation Is it fast enough to analyse real world Android apps? Does the trigger analysis find interesting triggers with low false positives on real apps?

Dataset To assess the precision of the trigger scope tool, manual analysis was performed. A dataset of applications was built including both benign and malicious samples. 21747 benign apps 5803 with time 1400 with SMS 4135 with location 11 malicious apps from DARPA red teams.

Results Analysis runs with 1hr time out Analysis terminated before timeout for - 85.30% apps with time operations (4950 out of 5803) - 82.95% apps with location operations (3430 out of 4135) - 81.29% apps with SMS operations (1138 out of 1400) 90% of the applications tested were completely analysed for triggers in under 750 seconds. Moreover, on an average, each application requires 219.21 seconds

Results 10 + 8 + 17 = 35 apps flagged as suspicious (0.38 % false positive rate)

HOW PRECISE AND ACCURATE IS OUR ANALYSIS? Accuracy Evaluation HOW PRECISE AND ACCURATE IS OUR ANALYSIS?

Accuracy Evaluation Firstly, false positive ratio was computed- which gave us the number of false alarms over the number of the considered benign samples. To assess whether TriggerScope is affected by false negatives, manual inspection of two sets of applications was done. - Firstly, all those applications, which were filtered out during the post filter steps, were manually inspected. - Second, a manual inspection on a random set of 20 applications were done but no suspicious checks were identified.

Comparison with existing approaches Kirin and DroidAPI Miner- Some of the most representative works in the area of Android Malware Analysis. Kirin – relies on permission analysis. - A logic bomb can be implemented without requesting highly- privileged permissions. - Gave a lot of false positive results.

Triggers in Benign Apps Time related triggers - Checks for licences expiration - Scheduled events

Triggers in Benign Apps if ( 37.733 < latitude < 39.208) && (139.52 < longitude < 140.64) drawText(“山形駅へようこそ”,..); “Welcome to Yamagata Station”

App that lets user locate his/her phone through SMS. MyRemotePhone App that lets user locate his/her phone through SMS.

MyRemotePhone App that lets user locate his/her phone through SMS. Output of analysis: (&& (!= (#sms / #body contains “MPS: gps”) 0) )

MyRemotePhone App that lets user locate his/her phone through SMS. Output of analysis: (&& (!= (#sms / #body contains “MPS: gps”) 0) ) When the condition is satisfied (i.e “MPS:gps”) the app sends back the device’s GPS co-ordinates!! NO AUTHENTICATION

Remote Lock App that lets user lock the phone with a user-selected password. Output of analysis: (!= (#sms/#body equals “adgbcgjsgjkkayrrwuiolkaghjkd”))0)” Whenever an SMS with this string is received, the phone unlocks.

Trigger in Malicious App- Real World Malware HACKING TEAM’S AndroidRCS Leak the victim’s private conversations, GPS location and device tracking information. Capture screenshots, collect information about online accounts, and capture real-time voice calls.

Trigger in Malicious App-Real World Malware Another example, Holy Colbert- taken from Android Malware Genome Project. TriggerScope was automatically able to discover a time-bomb. The app first retrieves the current date, converts it into a string by using SimpleDateFormat and then compares it with the hard coded string – ”05212011”.

Limitations Handles a limited number of trigger inputs- a subset of potential trigger sources covered. Also, the possibility of having false negative rate is not always excluded.

Conclusion Trigger Analysis was developed and this technique was used to identify logic bombs in Android Apps. Key Idea: focus on triggers, not on the triggered behaviour. TriggerScope is automatically able to handle several time-, location- , and SMS- related triggers. It achieves a very low false positive rate and achieves 100% detection rate on the malware set.

Reference: TriggerScope- Towards Detecting Logic Bombs in Android Applications by Yanick Fratantonio, Antonio Bianchi- UC Santa Barbara, Security & Privacy, 2016.

THANK YOU!