DroidScribe Classifying Android Malware Based on Runtime Behavior - - PowerPoint PPT Presentation

droidscribe
SMART_READER_LITE
LIVE PREVIEW

DroidScribe Classifying Android Malware Based on Runtime Behavior - - PowerPoint PPT Presentation

DroidScribe Classifying Android Malware Based on Runtime Behavior Santanu Kumar Dash, Guillermo Suarez-Tangil , Salahuddin Khan, Kimberly Tam, Mansour Ahmadi, Johannes Kinder, and Lorenzo Cavallaro Royal Holloway, University of London


slide-1
SLIDE 1

1/23

DroidScribe

Classifying Android Malware Based on Runtime Behavior Santanu Kumar Dash, Guillermo Suarez-Tangil, Salahuddin Khan, Kimberly Tam, Mansour Ahmadi, Johannes Kinder, and Lorenzo Cavallaro

Royal Holloway, University of London University of Cagliari

May 26, 2016 Mobile Security Technologies (MoST)

Research supported by the UK EPSRC grants EP/K033344/1 and EP/L022710/1

slide-2
SLIDE 2

2/23

Background

Automated Analysis Obtain rich static view of an app Obtain rich dynamic view of an app Type of Problems Malware Detection

Crucial for final users

Family Identification

Crucial for analysis of threats and mitigation planning

slide-3
SLIDE 3

3/23

State of the Art

On Family Identification

Smart Phones Desktop Static Dynamic Static Dynamic 1 In the mobile realm

1 Dendroid : CFG

API: Application Programming Interface, API-F: Information Flow between APIs, INT: Intents, CG: Call Graph, PER: Requested Permissions, CFG: Control Flow Graph, PKG: Package information of API, SYS: System Calls

slide-4
SLIDE 4

3/23

State of the Art

On Family Identification

Smart Phones Desktop Static Dynamic Static Dynamic 2 In the mobile realm

1 Dendroid : CFG 2 DroidLegacy : API

API: Application Programming Interface, API-F: Information Flow between APIs, INT: Intents, CG: Call Graph, PER: Requested Permissions, CFG: Control Flow Graph, PKG: Package information of API, SYS: System Calls

slide-5
SLIDE 5

3/23

State of the Art

On Family Identification

Smart Phones Desktop Static Dynamic Static Dynamic 3 In the mobile realm

1 Dendroid : CFG 2 DroidLegacy : API 3 DroidMiner : CG, API

API: Application Programming Interface, API-F: Information Flow between APIs, INT: Intents, CG: Call Graph, PER: Requested Permissions, CFG: Control Flow Graph, PKG: Package information of API, SYS: System Calls

slide-6
SLIDE 6

3/23

State of the Art

On Family Identification

Smart Phones Desktop Static Dynamic Static Dynamic 4 In the mobile realm

1 Dendroid : CFG 2 DroidLegacy : API 3 DroidMiner : CG, API 4 DroidSIFT : API-F

API: Application Programming Interface, API-F: Information Flow between APIs, INT: Intents, CG: Call Graph, PER: Requested Permissions, CFG: Control Flow Graph, PKG: Package information of API, SYS: System Calls

slide-7
SLIDE 7

3/23

State of the Art

On Family Identification

Smart Phones Desktop Static Dynamic Static Dynamic 5 In the mobile realm

1 Dendroid : CFG 2 DroidLegacy : API 3 DroidMiner : CG, API 4 DroidSIFT : API-F 5 RevealDroid : PER, API, API-F, INT, PKG

API: Application Programming Interface, API-F: Information Flow between APIs, INT: Intents, CG: Call Graph, PER: Requested Permissions, CFG: Control Flow Graph, PKG: Package information of API, SYS: System Calls

slide-8
SLIDE 8

3/23

State of the Art

On Family Identification

Smart Phones Desktop Static Dynamic Static Dynamic In the mobile realm

1 Dendroid : CFG 2 DroidLegacy : API 3 DroidMiner : CG, API 4 DroidSIFT : API-F 5 RevealDroid : PER, API, API-F, INT, PKG

API: Application Programming Interface, API-F: Information Flow between APIs, INT: Intents, CG: Call Graph, PER: Requested Permissions, CFG: Control Flow Graph, PKG: Package information of API, SYS: System Calls

slide-9
SLIDE 9

3/23

State of the Art

On Family Identification

Smart Phones Desktop Static Dynamic Static Dynamic In the mobile realm

1 Dendroid : CFG 2 DroidLegacy : API 3 DroidMiner : CG, API 4 DroidSIFT : API-F 5 RevealDroid : PER, API, API-F, INT, PKG

API: Application Programming Interface, API-F: Information Flow between APIs, INT: Intents, CG: Call Graph, PER: Requested Permissions, CFG: Control Flow Graph, PKG: Package information of API, SYS: System Calls

slide-10
SLIDE 10

3/23

State of the Art

On Family Identification

Smart Phones Desktop Static Dynamic Static Dynamic In the mobile realm

1 Dendroid : CFG 2 DroidLegacy : API 3 DroidMiner : CG, API 4 DroidSIFT : API-F 5 RevealDroid : PER, API, API-F, INT, PKG

API: Application Programming Interface, API-F: Information Flow between APIs, INT: Intents, CG: Call Graph, PER: Requested Permissions, CFG: Control Flow Graph, PKG: Package information of API, SYS: System Calls

slide-11
SLIDE 11

3/23

State of the Art

On Family Identification

Smart Phones Desktop Static Dynamic Static Dynamic In the mobile realm

1 Dendroid : CFG 2 DroidLegacy : API 3 DroidMiner : CG, API 4 DroidSIFT : API-F 5 RevealDroid : PER, API, API-F, INT, PKG

In the desktop realm

SYS have been successfully used

API: Application Programming Interface, API-F: Information Flow between APIs, INT: Intents, CG: Call Graph, PER: Requested Permissions, CFG: Control Flow Graph, PKG: Package information of API, SYS: System Calls

slide-12
SLIDE 12

4/23

State of the Art

On Family Identification

Smart Phones Desktop Static Dynamic Static Dynamic Android System Call Profile Android services are invoked through ioctl ioctls are dispatched to the Binder kernel driver, which implements Android’s main IPC and ICC Distinguishing Binder calls is essential for the malware classif.

slide-13
SLIDE 13

5/23

Our Contribution

Smart Phones Desktop Static Dynamic Static Dynamic Goal To evaluate the use of dynamic analysis for family identification under challenging conditions Challenges Similar/sparse behaviors Our contributions RQ1: What is the best level abstraction? RQ2: Can we deal with sparse behaviors?

slide-14
SLIDE 14

6/23

Dynamic Analysis Component

CopperDroid1 Runs apps in a sandbox, records system calls and their arguments, and reconstructs high-level behavior Reconstructs contents of all transactions going through the Binder mechanism for inter-process communication

1Tam, K., Khan, S.J., Fattori, A. and Cavallaro, L. “CopperDroid: Automatic

Reconstruction of Android Malware Behaviors.” NDSS. 2015.

slide-15
SLIDE 15

7/23

Machine Learning Component

Use existing malware classified into families as training data Use Support Vector Machines as the classification algorithm

Linear function Radial-basis function

Source: An Introduction to Statistical Learning–G. James et al.

slide-16
SLIDE 16

8/23

Overview of the Classification Framework

Family 1 Family 2 Family N

slide-17
SLIDE 17

9/23

System-calls vs. abstract behaviors

RQ1 What is the best level abstraction? Experiments on the Drebin dataset (5,246 malware samples). Reconstructing Binder calls adds 141 meaningful features. High level behaviors added 3 explanatory features.

sys rec_b rec_b+ 30 40 50 60 70 80 90 Accuracy (%)

(a) Accuracy

sys rec_b rec_b+ 10 15 20 25 30 35 Runtime (sec)

(b) Runtime

slide-18
SLIDE 18

10/23

Set-Based Prediction Dynamic analysis is limited by code coverage Classifier has only partial information about its behaviors Identify when malware cannot be classified into a family

Based on a measure of the statistical confidence

Helpful human analyst by identifying the top matching families

slide-19
SLIDE 19

11/23

Classification from Observed Features

When more than one choice of similar likelihood exists, ... ... traditional classification algorithms are prone to error

slide-20
SLIDE 20

12/23

Classification with Statistically Confidence

Conformal Predictor (CP) Is statistical learning algorithm tailored at classification Provides statistical evidences on the results Credibility Supports how good a sample fits into a class Confidence Indicates if there are other good choices Robust Against Outliers Aware of values from other members of the same class

slide-21
SLIDE 21

13/23

CP: Overview and Example

P-value is the probability of truth for the hypothesis that a sample belongs to a class

slide-22
SLIDE 22

14/23

In an ideal world

Given a new object s, conformal predictor picks the class with the highest p-value and return a singular prediction.

slide-23
SLIDE 23

15/23

Obtaining Prediction Sets

Given a new object s, we can set a significance-level e for p-values and obtain a prediction set Γ e includes labels whose p-value is greater than e for the sample.

P-value

e

A B C D

Prediction Set = {A, C, D} 0.50

confidence

0.20 0.60 0.40 0.30 0.00 1.00

significance-level (e) = 0.30 confidence = (1 - e) = 0.70

slide-24
SLIDE 24

16/23

When to use Conformal Prediction?

In an Operational Setting

CP is an expensive algorithm

For each sample, we need to derive a p-value for each class Computation complexity of O(nc) where n is number of samples and c is the number of classes

Conformation Evaluation Provide statistical evaluation of the quality of a ML algorithm

Quality threshold to understand when should be trusting SVM Statistical evidences of the choices of SVM Selectively invoke CP to alleviate runtime performance

slide-25
SLIDE 25

17/23

Step 1. Computing Confidence in Training Decisions

During training, compute p-values for each sample for each class Compute the confidence in the decision for each sample

P-value

Confidence in SVM's decision Credibility of SVM's decision

A B C D

SVM's decision Best match

1

slide-26
SLIDE 26

18/23

Step 2. Using Class-level Confidence Scores

For each class, calculate the mean confidence for all decisions mapping to the class Use the median of the class-level confidence across all classes as a reliability threshold

slide-27
SLIDE 27

19/23

Step 3. Invoking the Conformal Predictor

Threshold The threshold for picking prediction sets is fully tunable

slide-28
SLIDE 28

20/23

Confidence of correct SVM decisions

Invoke CP with a set of desired p-value cutoff size

SMSreg Kmin Imlog FakeInstaller Glodream Yzhc Jifake DroidKungFu SendPay BaseBridge Boxer Adrd LinuxLotoor Iconosys GinMaster MobileTx FakeDoc Opfake Plankton Gappusin Geinimi DroidDream FakeRun

0.0 0.2 0.4 0.6 0.8 1.0

Confidence

slide-29
SLIDE 29

21/23

Accuracy vs. Prediction Set Size

RQ2 Can we deal with sparse behaviors?

0.5 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0.0 p-value thresholds (1.0-confidence) 0.82 0.84 0.86 0.88 0.90 0.92 0.94 0.96 0.98 1.00 Precision/Recall Recall Precision Set size 5 10 15 20 25 Number of classes

Accuracy improves with the prediction set size

slide-30
SLIDE 30

22/23

Conclusion

Resolving Binder invocations improves classification accuracy Poor coverage leads to misclassification in dynamic analysis Predicting sets of top matches ameliorates this problem Statistical evaluation can be used to minimize computation DroidScribe can be integrated into dynamic analysis frameworks such as CopperDroid

slide-31
SLIDE 31

23/23

DroidScribe

Classifying Android Malware Based on Runtime Behavior Santanu Kumar Dash, Guillermo Suarez-Tangil, Salahuddin Khan, Kimberly Tam, Mansour Ahmadi, Johannes Kinder, and Lorenzo Cavallaro

Royal Holloway, University of London University of Cagliari

May 26, 2016 Mobile Security Technologies (MoST)

Research supported by the UK EPSRC grants EP/K033344/1 and EP/L022710/1

slide-32
SLIDE 32

23/23

Computing P-values

Nonconformity Measure (NCM) is a geometric measure of how well a sample is far from a class.

For SVM, the NCM N z

D of a sample z w.r.t. class D is sum

distances from all hyperplanes bounding the class D.

N z

D =

  • i

d(z, Hi) P-value is a statistical measure of how well a sample fits in a class.

P-value Pz

D represents the proportion of samples in D that

more different than z w.r.t. D.

Pz

D = |{j = 1, ..., n : N j D ≥ N z D}|

n

slide-33
SLIDE 33

23/23

Probability of Membership

Standard classification algorithms calculate probability of a sample belonging to a class For the case of SVM, this is based on Euclidean distance (Platt’s scaling ) Using Probabilites Platt’s scaling is based on logistic regression Logistic regression is sensitive to outliers which introduces inaccuracies Probabilities to sum up to one which introduces skewing