whyper : towards automating risk assessment of mobile applications

31
WHYPER: Towards Automating Risk Assessment of Mobile Applications Rahul Pandita, Xusheng Xiao, Wei Yang, William Enck, and Tao Xie Department of Computer Science North Carolina State University University of Illinois at Urbana-Champaign 1

Upload: bruis

Post on 24-Feb-2016

38 views

Category:

Documents


0 download

DESCRIPTION

WHYPER : Towards Automating Risk Assessment of Mobile Applications Rahul Pandita , Xusheng Xiao, Wei Yang, William Enck , and Tao Xie ♠ Department of Computer Science North Carolina State University ♠ University of Illinois at Urbana-Champaign. Application Markets. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

1

WHYPER: Towards Automating Risk Assessment

of Mobile Applications

Rahul Pandita, Xusheng Xiao, Wei Yang, William Enck, and Tao Xie♠

Department of Computer ScienceNorth Carolina State University

♠ University of Illinois at Urbana-Champaign

Page 2: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

2

Application Markets

Apple App Store Google Play Microsoft Windows Phone

“Application markets have played an important role in the popularity of smartphones and mobile devices.”

Page 3: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

3

oApple (Market’s Responsibility)o Apple performs manual inspection

oGoogle (User’s Responsibility)o Users approve permissions for

security/privacyo Bouncer (static/dynamic malware analysis)

oWindows Phone (Hybrid)o Permissions / manual inspection

Predominant approaches towards Market Security/Privacy

Page 4: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

4

oPrevious approaches look at permissions, code, and runtime behaviors

oCaveat: what does the users expect?o GPS Tracker: record and send locationo Phone-Call Recorder: record audio during phone

callo One-Click Root: exploit a privilege escalation

vulnerabilityo Others are more subtle

Is Program Analysis sufficient?

Page 5: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

5

oA first step in this directionoFocus on permission and application

descriptionso permissions protecting user

understandable resources should be discussed

o low-level system permissions are unlikely to be mentioned

Vision

“Bridging the gap between user expectation and app behaviors”

Page 6: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

6

WHYPER Overview

Application

Market

WHYPER

DEVELOPERS

USERS

Page 7: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

7

Application

MarketWHYPER

DEVELOPERS

USERS

oEnhance user experienceo while installing Apps

oFunctionality disclosureo enforce on part of developers

oComplementing program analysis o to ensure more appropriate justifications

Use Cases

Page 8: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

8

Solution

Page 9: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

9

Simple Solution?

Keyword-based search on application descriptions

Photo Credit: Ahora estoy en via Flickr

Page 10: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

10

Problems with Ctrl + Fo Confounding effects:o Certain keywords such as “contact” have a confounding meaning. o For instance, “... displays user contacts, ...” vs “... contact me

at [email protected]”.

o Semantic Inference: o Sentences often describe a sensitive operation such as reading

contacts without actually referring to keyword “contact”. o For instance, “share yoga exercises with your friends via

email, sms”.

Page 11: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

11

• NLP techniques help computers understand NL artifacts

• NLP is still difficult

• NLP on domain specific sentences with specific styles is feasible

Natural Language Processing (NLP)

Page 12: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

12

oParts Of Speech (POS) Taggingo E.g., noun, verb, prepositions…

oPhrase and Clause Parsingo E.g., noun phrases (basketball players) and verb

phrases (make sure)…oStanford-Typed Dependencies

o E.g., subject, object , adverbial modifiers…oNamed Entity Recognition

o E.g., ‘Pandora Internet Radio’ is a name, ‘$5’ refers to a currency amount…

NLP Preliminaries

Page 13: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

13

WHYPER Framework

APP Description

APP Permission

SemanticGraphs

PreprocessorIntermediate

RepresentationGenerator

SemanticEngine

NLP Parser

Semantic GraphGeneratorAPI Docs

AnnotatedDescription

FOLRepresentation

WHYPER

Preprocessor

Page 14: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

14

oPeriod Handlingo Decimals, ellipsis, shorthand notations (Mr.,

Dr.)oSentence Boundaries

o Tabs, bullet points, delimiters (:)o Symbols (*,-) and enumeration sentence

oNamed Entity Handlingo E.g., “Pandora internet radio”,

oAbbreviation Handlingo E.g., “Instant Message (IM)”

Preprocessor

Page 15: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

15

WHYPER Framework

APP Description

APP Permission

SemanticGraphs

PreprocessorIntermediate

RepresentationGenerator

SemanticEngine

NLP Parser

Semantic GraphGeneratorAPI Docs

AnnotatedDescription

FOLRepresentation

WHYPER

Page 16: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

16

“Also you can share the yoga exercise to your friends via Email and SMS.”

Also you can share yoga exercise to your friends via Email and SMS

Alsoyou

can

share

exercise

yourfriends

EmailSMS

VBRB PRP MD NNDT NN NNSPRP NNP NNPthe

yoga

advmodnsubjauxdobj

detnn

prep_topossprep_via

conj_and

the

shareto

youyoga exercise

ownedyouvia

friendsand

emailSMS

Page 17: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

17

WHYPER Framework

APP Description

APP Permission

SemanticGraphs

PreprocessorIntermediate

RepresentationGenerator

SemanticEngine

NLP Parser

Semantic GraphGeneratorAPI Docs

AnnotatedDescription

FOLRepresentation

WHYPER

Page 18: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

18

“Also you can share the yoga exercise to your friends via Email and SMS.”

shareto

youyoga exercise

ownedyouvia

friendsand

emailSMSemail

share

WordNet Similarity

Page 19: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

19

oWHYoto perform deep semantic analysis

oHOWoinfer graphs from API documents

Semantic-Graph Generator

Page 20: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

20

oSystematic approach to infer graphso Find related API documents based on

PScout [CCS 2012]o Identify resource associated with the

permissions from the API class nameo ContactsContract.Contacts

o Inspect the member variables and member methods to identify actions and subordinate resourceso ContactsContract.CommonDataKinds.Email

Semantic-Graph Generator

Page 21: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

21

oSubjectso Permissions:

o READ_CONTACTSo READ_CALENDARo RECORD_AUDIO

o 581/600* application descriptions (only English descriptions)

o 9,953 sentencesoResearch Questions (RQs)

o RQ1: What are the precision, recall and F-Score of WHYPER in identifying permission sentences?

o RQ2: How effective WHYPER is in identifying permission sentences, compared to keyword-based searching ?

Evaluation

Page 22: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

22

Permissions #N #S Sp

READ_CONTACTS 190 3,379 235

READ_CALENDAR 191 2,752 283

RECORD_AUDIO 200 3,822 245

TOTAL 581 9,953 763

Statistics of Subject Applications

Page 23: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

23

o True Positive (TP): o WHYPER(sentence) && Manual(sentence)

o False Positive (FP): o WHYPER(sentence) && ! Manual(sentence)

o True Negative (TN): o ! WHYPER(sentence) && !

Manual(sentence) o False Negative (FN): o ! WHYPER(sentence) && Manual(sentence)

Classification

Page 24: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

24

RQ1 Results: Effectiveness of WHYPER

• Low FPs and FNs• out of 9,061 sentences, only 129 are flagged as FPs• among 581 applications, 109 applications (18.8%) contain at least one FP• among 581 applications, 86 applications (14.8%) contain at least one FN

Permission SI TP FP FN TN Prec.

Recall

F-Score

Acc

READ_CONTACTS

204 186 18 49 2,930 91.2 79.2 84.8 97.9

READ_CALENDAR

288 241 47 42 2,422 83.7 85.2 84.5 96.8

RECORD_AUDIO

259 195 64 50 3,470 75.3 79.6 77.4 97.0

TOTAL 751 622 129 141 9,061 82.8 81.5 82.2 97.3

Page 25: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

25

Permission KeywordsREAD_CONTACTS contact, data, number,

name, emailREAD_CALENDAR calendar, event, date,

month, day, yearRECORD_AUDIO record, audio, voice,

capture, microphone

RQ2 Results: Comparison to Keyword-based Search

Page 26: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

26

RQ2 Results: Comparison to Keyword-based Search

Permission DeltaPrecision

DeltaRecall

DeltaF-score

DeltaAccuracy

READ_CONTACTS 50.4 1.3 31.2 7.3READ_CALENDAR 39.3 1.5 26.4 9.2RECORD_AUDIO 36.9 -6.6 24.3 6.8

WHYPER Improvement

41.6 -1.2 27.2 7.7

Page 27: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

27

• Incorrect parsing• “MyLink Advanced provides full synchronization of

all Microsoft Outlook emails (inbox, sent, outbox and drafts), contacts, calendar, tasks and notes with all Android phones via USB”

• Synonym analysis• “You can now turn recordings into ringtones.”

Result Analysis (False Positives)

Page 28: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

28

• Incorrect parsing• Incorrect identification of sentence boundaries and limitations

of underlying NLP infrastructure• Limitations of Semantic Graphs

• Manual Augmentation• microphone-blow into and call-record• significant improvement of Delta Recalls: -6.6% to 0.6%

• Automatic mining from user comments and forums

Result Analysis (False Negatives)

Page 29: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

29

• Generalization to other permissions• user-understandable permissions:

calls, SMS• location and phone identifiers• internet

Discussions

Page 30: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

30

ConclusionWe propose the use of NLP techniques to

help bridge the semantic gap between what mobile applications do and what users expect them to do.

Our evaluation demonstrates an improvement over a simple keyword-based searching.

Page 31: WHYPER : Towards Automating Risk Assessment  of Mobile  Applications

31

Thank You