INTELLIDROID
A Targeted Input Generator for the Dynamic Analysis of Android Malware
Michelle Y. Wong and David Lie
University of Toronto Department of Electrical and Computer Engineering NDSS Symposium 2016
Static vs. Dynamic Analysis Static analysis: analyze source code or - - PowerPoint PPT Presentation
I NTELLI D ROID A Targeted Input Generator for the Dynamic Analysis of Android Malware Michelle Y. Wong and David Lie University of Toronto Department of Electrical and Computer Engineering NDSS Symposium 2016 ! ! ! B ACKGROUND Static vs.
A Targeted Input Generator for the Dynamic Analysis of Android Malware
Michelle Y. Wong and David Lie
University of Toronto Department of Electrical and Computer Engineering NDSS Symposium 2016
UNIVERSITY OF TORONTO INTELLIDROID
2
UNIVERSITY OF TORONTO INTELLIDROID
message = <receive confirmation SMS> <malicious action>
3
if message.number == ‘1234’:
UNIVERSITY OF TORONTO INTELLIDROID
4
constraint 1 constraint 2 constraint 1 !(constraint 2) !(constraint 1) constraint 3 !(constraint 1) !(constraint 3)
UNIVERSITY OF TORONTO INTELLIDROID
5
malicious code
UNIVERSITY OF TORONTO INTELLIDROID
6 ! • ! ! DESIGN
UNIVERSITY OF TORONTO INTELLIDROID
7 malicious code ! • ! ! DESIGN
UNIVERSITY OF TORONTO INTELLIDROID
8 malicious code ! • ! ! DESIGN
UNIVERSITY OF TORONTO INTELLIDROID
9 suspicious code ! • ! ! DESIGN suspicious code suspicious code
UNIVERSITY OF TORONTO INTELLIDROID
10 ! • ! ! DESIGN suspicious code suspicious code suspicious code
UNIVERSITY OF TORONTO INTELLIDROID
for Android:
11
❌
Dynamic Tool Goal Features for Analysis AASandbox [10] Monitor behavior via track- ing of system calls System calls Andromaly [36] Malware detection via sys- tem resource usage Low-level device fea- tures (e.g. battery us- age, CPU load) CopperDroid [39] Monitor behavior via sys- tem call tracking System calls Crowdroid [12] Monitor behavior via track- ing of system calls System calls DroidBox [18] Sandbox to monitor exter- nal accesses Sink API methods DroidRanger [50] Detect malware using pre- specified behavioral foot- prints and heuristics Sequence
API method invocations and parameters DroidScope [39] Plugins for API track- ing, instruction tracing, and taint tracking API methods; source/sink API methods RiskRanker [39] Detect malware using known vulnerability signatures Sequence
API method invocations TaintDroid [19] Detect privacy leakage Source/sink API meth-
VetDroid [47] Malware detection via per- mission use behavior Permission requests (can be mapped to API methods)
! • ! ! DESIGN
UNIVERSITY OF TORONTO INTELLIDROID
12 ! • ! ! DESIGN
Path Constraints Path Constraints Path Constraints
suspicious code
UNIVERSITY OF TORONTO INTELLIDROID
Run-time
Static Dynamic
Path Constraints Path Constraints
! • ! ! DESIGN
inputs inputs
…
UNIVERSITY OF TORONTO INTELLIDROID
14 ! • ! ! DESIGN
UNIVERSITY OF TORONTO INTELLIDROID
message = <receive confirmation SMS> <malicious action>
15 ! • ! ! DESIGN
Constraint <SMS message>.number == <file A>
if message.number == <file A>.text:
UNIVERSITY OF TORONTO INTELLIDROID
Run-time
file A “1234” location
San Diego
file A “1234” location
San Diego
16 constraints constraint solver
Static Dynamic
Path 1 Constraints Path N Constraints
…
! • ! ! DESIGN …
<SMS message>.number == <file A> “1234”
UNIVERSITY OF TORONTO INTELLIDROID
17 malicious code ! • ! ! DESIGN
data flow
write X read X
UNIVERSITY OF TORONTO INTELLIDROID
18 malicious code ! • ! ! DESIGN 1 2
Event Chain
1) <path to write X> 2) <path to malicious code>
write X read X
UNIVERSITY OF TORONTO INTELLIDROID
19
Application
Event Handler SMS Handler Event Handler
Framework
System Service SMS Service System Service
Hardware/Device
Cellular Radio Sensor
! • ! ! DESIGN
UNIVERSITY OF TORONTO INTELLIDROID
20
Application
Event Handler SMS Handler Event Handler
Framework
System Service SMS Service System Service
Hardware/Device
Cellular Radio Sensor
what SMS? info on SMS?
! • ! ! DESIGN
UNIVERSITY OF TORONTO INTELLIDROID
21
Application
Event Handler SMS Handler Event Handler
Framework
System Service SMS Service System Service
Hardware/Device
Cellular Radio Sensor
OK! info on SMS?
! • ! ! DESIGN
UNIVERSITY OF TORONTO INTELLIDROID
22 ! • ! ! DESIGN
UNIVERSITY OF TORONTO INTELLIDROID
23
Application
BootReceiver
if i == BOOT_COMPLETED: a = 1234 SMSReceiver
if i == SMS_RECEIVED: handleSMS(…) handleSMS(addr, msg): if a == addr: sendTextMessage(…)
! ! • ! IMPLEMENTATION
App APK
IntelliDroid
Static Component Targeted Behaviors
UNIVERSITY OF TORONTO INTELLIDROID
24
Extract event handlers Find call paths Extract path constraints If dependency: find dependent path Application
BootReceiver
if i == BOOT_COMPLETED: a = 1234 SMSReceiver
if i == SMS_RECEIVED: handleSMS(…) handleSMS(addr, msg): if a == addr: sendTextMessage(…)
Add to event chain
! ! • ! IMPLEMENTATION
Targeted Behaviors App APK
2 1
UNIVERSITY OF TORONTO INTELLIDROID
25
Extract event handlers Find call paths Extract path constraints If dependency: find dependent path Application
BootReceiver
if i == BOOT_COMPLETED: a = 1234 SMSReceiver
if i == SMS_RECEIVED: handleSMS(…) handleSMS(addr, msg): if a == addr: sendTextMessage(…)
Output: target call paths and constraints Add to event chain
! ! • ! IMPLEMENTATION
Targeted Behaviors App APK
2 1
UNIVERSITY OF TORONTO INTELLIDROID
information and inject events
26
1 Watson libraries for analysis. http://wala.sourceforge.net. Accessed: September 2014. 2 Leonardo De Moura and Nikolaj Bjørner. Z3: An efficient SMT solver. In Tools and Algorithms for the Construction and Analysis of
Systems, pages 337–340. Springer, 2008.
! ! • ! IMPLEMENTATION
UNIVERSITY OF TORONTO INTELLIDROID
malware detectors?
27 ! ! ! • EVALUATION
UNIVERSITY OF TORONTO INTELLIDROID
28
IntelliDroid (Dynamic)
taint source taint sink
IntelliDroid (Static)
paths inputs
TaintDroid
Dynamic Detector
leakage paths
e.g. getDeviceId() sendTextMessage() ! ! ! • EVALUATION
UNIVERSITY OF TORONTO INTELLIDROID
29
1 Yajin Zhou and Xuxian Jiang. Dissecting Android malware: Characterization and evolution. In Proceedings of the 2012 IEEE Symposium
2 M. Parkour, “Contagio mobile,” 2015, http://contagiominidump. blogspot.ca/, Last Accessed Aug, 2015.
! ! ! • EVALUATION
UNIVERSITY OF TORONTO INTELLIDROID
in Android Malware Genome and Contagio
behaviours
not supported)
30 ! ! ! • EVALUATION
Known Malicious Activity Method Invocations
IntelliDroid
UNIVERSITY OF TORONTO INTELLIDROID
31
1 David Barrera, Jeremy Clark, Daniel McCarney, and Paul C. van Oorschot. Understanding and improving app installation security
mechanisms through empirical analysis of android. In Proceed- ings of the Second ACM Workshop on Security and Privacy in Smartphones and Mobile Devices, SPSM ’12, pages 81–92, New York, NY, USA, 2012. ACM.
! ! ! • EVALUATION
UNIVERSITY OF TORONTO INTELLIDROID
detection
executed (< 5%)
32