supor: precise and scalable sensitive user input …...supor: precise and scalable sensitive user...

111
SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu, Kangjie Lu, Xiangyu Zhang, Guofei Jiang

Upload: others

Post on 08-Jul-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

SUPOR: Precise and Scalable Sensitive User Input Detection

for Android Apps

Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu, Kangjie Lu, Xiangyu Zhang, Guofei Jiang

Page 2: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Sensitive Data Disclosures

Disclosed to public

Hijacked/maliciously retrieved

8/14/15 USENIX Security 2015 1

Page 3: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Sensitive Data Disclosures

Local Storage

Disclosed to public

Hijacked/maliciously retrieved

8/14/15 USENIX Security 2015 2

Page 4: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Sensitive Data Disclosures

Local Storage

Disclosed to public

Hijacked/maliciously retrieved

8/14/15 USENIX Security 2015 3

Page 5: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Sensitive Data Disclosures

Local Storage

Disclosed to public

Hijacked/maliciously retrieved

8/14/15 USENIX Security 2015 4

Page 6: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Sensitive Data Disclosures

Local Storage

Disclosed to public

Hijacked/maliciously retrieved

8/14/15 USENIX Security 2015 5

Page 7: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Sensitive Data

• Existing work focused on sensitive data defined by certain API methods.

TaintDroid[OSDI’10], AndroidLeaks[TRUST’12], FlowDroid[PLDI’14]

PiOS[NDSS’11]

8/14/15 USENIX Security 2015 6

Page 8: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Sensitive Data

• Existing work focused on sensitive data defined by certain API methods.• Most of them are permission protected

• E.g., in Android, TelephonyManager.getDeviceId()

8/14/15 USENIX Security 2015 7

Page 9: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Sensitive User Inputs

• We are among the first to detect user inputs as sensitive sources in mobile apps.• None of them are permission protected

• E.g., user id/password, credit card number…

8/14/15 USENIX Security 2015 8

Page 10: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Sensitive User Inputs

• We are among the first to detect user inputs as sensitive sources in mobile apps.• None of them are permission protected

• E.g., user id/password, credit card number…

Sensitive

8/14/15 USENIX Security 2015 9

Page 11: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Sensitive User Inputs

• We are among the first to detect user inputs as sensitive sources in mobile apps.• None of them are permission protected

• E.g., user id/password, credit card number…

Insensitive

8/14/15 USENIX Security 2015 10

Page 12: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Example User Inputs Disclosures

1 EditText txtCN = findViewById(R.id.cardnum);

2 String cnum = txtCN.getText().toString();

3 …

Web Server

HTTP

8/14/15 USENIX Security 2015 11

Page 13: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Example User Inputs Disclosures

1 EditText txtCM = findViewById(R.id.comment);

2 String comment = txtCM.getText().toString();

3 …

Web Server

HTTP

8/14/15 USENIX Security 2015 12

Page 14: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Research Problems

• How to systematically discover the input fields from an app’s UI?

• How to identify which input fields are sensitive?

• How to associate the sensitive input fields to the corresponding variables in the apps that store their values?

8/14/15 USENIX Security 2015 13

Page 15: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Research Problems

• How to systematically discover the input fields from an app’s UI?

• How to identify which input fields are sensitive?

• How to associate the sensitive input fields to the corresponding variables in the apps that store their values?

8/14/15 USENIX Security 2015 14

Page 16: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Intuition

• From the user’s perspective, if we can mimic how a user looks at the UIs, we can determine which input fields can contain sensitive data within the UI context.

8/14/15 USENIX Security 2015 15

Page 17: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Feasibility

• Render the statically defined UI layouts

8/14/15 USENIX Security 2015 16

Page 18: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Feasibility

• Render the statically defined UI layouts

Android iOS Windows Phone

Layout format XML NIB/XIB/Storyboard XAML/HTML

Static UI Render ADT Xcode Visual Studio

APIs map widgets to code Yes Yes Yes

8/14/15 USENIX Security 2015 17

Page 19: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Feasibility

Android iOS Windows Phone

Layout format XML NIB/XIB/Storyboard XAML/HTML

Static UI Render ADT Xcode Visual Studio

APIs map widgets to code Yes Yes Yes

• Associate labels to input fields based on physical locations

8/14/15 USENIX Security 2015 18

Page 20: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

SUPOR: Sensitive User inPutdetectOR

8/14/15 USENIX Security 2015 19

Page 21: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Background - UI

8/14/15 USENIX Security 2015 20

Page 22: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Background - UI

Text Label

8/14/15 USENIX Security 2015 21

Page 23: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Background - UI

Input Field

8/14/15 USENIX Security 2015 22

Page 24: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Background - UI

Input Hint

8/14/15 USENIX Security 2015 23

Page 25: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Background - UI

Text Label

Input Field

Widget

8/14/15 USENIX Security 2015 24

Page 26: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Background – Layout File

• A piece in an Android layout example.

<EditText

android:id="@+id/pwd“

android:inputType=“textPassword”/>

8/14/15 USENIX Security 2015 25

Page 27: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Background – Layout File

• A piece in an Android layout example.

<EditText

android:id="@+id/pwd“

android:inputType=“textPassword”/>

Identifier

8/14/15 USENIX Security 2015 26

Page 28: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Background – Layout File

• A piece in an Android layout example.

<EditText

android:id="@+id/pwd“

android:inputType=“textPassword”/>

Interesting Attribute8/14/15 USENIX Security 2015 27

Page 29: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Overview of SUPOR

Layout Analysis

Layout Parsing

UI Rendering

UI Sensitiveness

Analysis

Privacy Analysis

Disclosure

Keywords

Variable Binding

SUPOR

Vulnerability

App

8/14/15 USENIX Security 2015 28

Page 30: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Parsing Layout

• We need to know which layout files contain input fields.

Is Sensitive User Input

Detection Needed?

Layout file

8/14/15 USENIX Security 2015 29

Page 31: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Parsing Layout

• We need to know which layout files contain input fields.

Is Sensitive User Input

Detection Needed?

Layout file

layout contains input fields

layout doesn’t contain input fields

8/14/15 USENIX Security 2015 30

Page 32: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Rendering UI

• Statically render layout files to UIs as users look at on smartphones via tools like ADT in Android.

8/14/15 USENIX Security 2015 31

Page 33: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Rendering UI

Layout file A

• Statically render layout files to UIs as users look at on smartphones via tools like ADT in Android.

8/14/15 USENIX Security 2015 32

Page 34: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Rendering UI

Layout file B

• Statically render layout files to UIs as users look at on smartphones via tools like ADT in Android.

8/14/15 USENIX Security 2015 33

Page 35: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Extracting Information

8/14/15 USENIX Security 2015 34

Page 36: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Extracting Information

8/14/15 USENIX Security 2015 35

Page 37: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Extracting Information

Collect information

• Text Label• Text: Card Number• Coordinates: [16, 231, 109, 249]

• Input Field• Hint: 15 or 16 digit• Coordinates: [16, 249, 464, 297]

8/14/15 USENIX Security 2015 36

Page 38: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

UI Sensitiveness Analysis

8/14/15 USENIX Security 2015 37

Page 39: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

UI Sensitiveness Analysis

Sensitive Attributes in Layout Files

<EditText android:id="@+id/pwd“

android:inputType=“textPassword”/>

8/14/15 USENIX Security 2015 38

Page 40: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

UI Sensitiveness Analysis

Sensitive Attributes in Layout Files

The Input Field is Sensitive

Yes

8/14/15 USENIX Security 2015 39

Page 41: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

UI Sensitiveness Analysis

Sensitive Attributes in Layout Files

The Input Field is Sensitive

Sensitive Input HintNo

15 or 16 digitMM - YYYY

Enter Password

8/14/15 USENIX Security 2015 40

Page 42: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

UI Sensitiveness Analysis

Sensitive Attributes in Layout Files

The Input Field is Sensitive

Sensitive Input Hint

Yes

No

Enter Password

8/14/15 USENIX Security 2015 41

Page 43: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

UI Sensitiveness Analysis

Sensitive Attributes in Layout Files

The Input Field is Sensitive

Sensitive Input Hint

Sensitive Text Label

No

No

Card numberExpiration date

Comment

8/14/15 USENIX Security 2015 42

Page 44: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

UI Sensitiveness Analysis

Sensitive Attributes in Layout Files

The Input Field is Sensitive

Sensitive Input Hint

Sensitive Text Label

The Input Field is Insensitive

No

No

No

8/14/15 USENIX Security 2015 43

Page 45: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

UI Sensitiveness Analysis

Sensitive Attributes in Layout Files

The Input Field is Sensitive

Sensitive Input Hint

Sensitive Text Label

No

No

Yes

8/14/15 USENIX Security 2015 44

Page 46: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

UI Sensitiveness Analysis

Challenge: How to precisely associate the correlated text label to a given input field?

8/14/15 USENIX Security 2015 45

Page 47: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (1)

• Intuition: labels at different positions relative to the input field have different probabilities to be correlated.

8/14/15 USENIX Security 2015 46

Page 48: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (1)

• Intuition: labels at different positions relative to the input field have different probabilities to be correlated.

Input FieldLabel

Input Field

Label

Input Field Label

Input Field

Label

8/14/15 USENIX Security 2015 47

Page 49: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (2)

• Assign position-based weights based on empirical observations• The smaller the weight, the closer the correlation

8/14/15 USENIX Security 2015 48

Page 50: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (2)

• Assign position-based weights based on empirical observations• The smaller the weight, the closer the correlation

Input Field0.8

24 8

8 9

9

108/14/15 USENIX Security 2015 49

Page 51: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (2)

• Assign position-based weights based on empirical observations• The smaller the weight, the closer the correlation

Input Field0.8

24 8

8 9

9

108/14/15 USENIX Security 2015 50

Page 52: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (2)

• Assign position-based weights based on empirical observations• The smaller the weight, the closer the correlation

Input Field0.8

24 8

8 9

9

108/14/15 USENIX Security 2015 51

Page 53: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (3)

• Geometry-based correlation score computation

8/14/15 USENIX Security 2015 52

Page 54: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (3)

• Geometry-based correlation score computation

Label

Input Field (I)

(x1, y1)

(x2, y2)

8/14/15 USENIX Security 2015 53

Page 55: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (3)

• Geometry-based correlation score computation

Label

Input Field (I)

(x1, y1)

(x2, y2)

For each pixel (x,y) in a text label• distance(I, x, y) * posWeight(I, x, y)

8/14/15 USENIX Security 2015 54

Page 56: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (3)

• Geometry-based correlation score computation

Label

Input Field (I)

(x1, y1)

(x2, y2)

Average the correlation score for the text label

8/14/15 USENIX Security 2015 55

Page 57: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (4)

• Find out the label with the smallest correlation score among all potential labels for a given input field

8/14/15 USENIX Security 2015 56

Page 58: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (4)

• Find out the label with the smallest correlation score among all potential labels for a given input field

8/14/15 USENIX Security 2015 57

Page 59: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (4)

• Find out the label with the smallest correlation score among all potential labels for a given input field

Label Number Field Date Field

Credit card type 265.57 456.42

Card number 76.47 271.23

Expiration date 205.29 75.40

Correlation scores

8/14/15 USENIX Security 2015 58

Page 60: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Associating Labels (4)

• Find out the label with the smallest correlation score among all potential labels for a given input field

Label Number Field Date Field

Credit card type 265.57 456.42

Card number 76.47 271.23

Expiration date 205.29 75.40

Correlation scores

8/14/15 USENIX Security 2015 59

Page 61: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Determining Sensitiveness (1)

Card number

Expiration date

Comment

8/14/15 USENIX Security 2015 60

Page 62: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Determining Sensitiveness (1)

Sensitive Keywords Dataset

Card number

Expiration date

Comment

Matches?

• Keyword matching approach

8/14/15 USENIX Security 2015 61

Page 63: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Determining Sensitiveness (1)

Sensitive Keywords Dataset

Card number

Expiration date

Comment

Matches?

Sensitive

• Keyword matching approach

Yes

8/14/15 USENIX Security 2015 62

Page 64: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Determining Sensitiveness (1)

Sensitive Keywords Dataset

Comment

Matches?

Insensitive

• Keyword matching approach

No

8/14/15 USENIX Security 2015 63

Page 65: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Determining Sensitiveness (2)

• Why is keyword matching approach effective?

8/14/15 USENIX Security 2015 64

Page 66: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Determining Sensitiveness (2)

• Why is keyword matching approach effective?

• Small screen and short phrases or sentences

8/14/15 USENIX Security 2015 65

Page 67: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Determining Sensitiveness (2)

• Why is keyword matching approach effective?

• We only analyze the most relevant text label

• Small screen and short phrases or sentences

8/14/15 USENIX Security 2015 66

Page 68: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (1)

8/14/15 USENIX Security 2015 67

Page 69: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (1)

8/14/15 USENIX Security 2015 68

Page 70: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (1)

1 Widget txtCN = findViewById(X);

2 Data cnum = txtCN.getText();

3 // use of “cnum”

8/14/15 USENIX Security 2015 69

Page 71: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (1)

1 Widget txtCN = findViewById(X);

2 Data cnum = txtCN.getText();

3 // use of “cnum”

Identifier: X

8/14/15 USENIX Security 2015 70

Page 72: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (2)

• Challenge: different widgets within one apps have the same identifier

<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

8/14/15 USENIX Security 2015 71

Page 73: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (2)

• Challenge: different widgets within one apps have the same identifier

<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

txtInput1 = this.findViewById(input1);

txtInput2 = this.findViewById(input1);

8/14/15 USENIX Security 2015 72

Page 74: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (2)

• Challenge: different widgets within one apps have the same identifier

<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

txtInput1 = this.findViewById(input1);

txtInput2 = this.findViewById(input1);

8/14/15 USENIX Security 2015 73

Page 75: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (3)<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

[layout: billing_information.xml]<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

[layout: search.xml]

id/input1

Sensitive Insensitive

8/14/15 USENIX Security 2015 74

Page 76: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (3)

txtInput1 = this.findViewById(input1);

<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

[layout: billing_information.xml]<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

[layout: search.xml]

txtInput2 = this.findViewById(input1);

id/input1

Sensitive Insensitive

8/14/15 USENIX Security 2015 75

Page 77: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (3)

txtInput1 = this.findViewById(input1);

<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

[layout: billing_information.xml]<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

[layout: search.xml]

id/input1

Sensitive Insensitive

this.setContentView(billing_information);

8/14/15 USENIX Security 2015 76

Page 78: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (3)

txtInput1 = this.findViewById(input1);

<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

[layout: billing_information.xml]<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

[layout: search.xml]

id/input1

Sensitive Insensitive

this.setContentView(billing_information);

8/14/15 USENIX Security 2015 77

Page 79: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (3)

txtInput1 = this.findViewById(input1);

<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

[layout: billing_information.xml]<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

[layout: search.xml]

id/input1

Sensitive Insensitive

this.setContentView(billing_information);

Sensitive

8/14/15 USENIX Security 2015 78

Page 80: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (3)<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

[layout: billing_information.xml]<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

[layout: search.xml]

txtInput2 = this.findViewById(input1);

id/input1

Sensitive Insensitive

8/14/15 USENIX Security 2015 79

Page 81: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (3)<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

[layout: billing_information.xml]<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

[layout: search.xml]

txtInput2 = this.findViewById(input1);

id/input1

Sensitive Insensitive

this.setContentView(search);

8/14/15 USENIX Security 2015 80

Page 82: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (3)<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

[layout: billing_information.xml]<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

[layout: search.xml]

txtInput2 = this.findViewById(input1);

id/input1

Sensitive Insensitive

this.setContentView(search);

8/14/15 USENIX Security 2015 81

Page 83: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Binding Variables (3)<TextView android:text= =“Card Number“ />

<EditText android:id=“@+id/input1“ … />

[layout: billing_information.xml]<TextView android:text= =“Search“ />

<EditText android:id=“@+id/input1“ … />

[layout: search.xml]

txtInput2 = this.findViewById(input1);

id/input1

Sensitive Insensitive

this.setContentView(search);

Insensitive

8/14/15 USENIX Security 2015 82

Page 84: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Implementation & Evaluation

• Implemented for Android apps and built on Dalysis[CHEX CCS’12], IBM WALA and ADT.

• Only input fields of type EditText are analyzed, i.e. other user inputs like checkbox are ignored.

• Implemented a sensitive user inputs disclosure detection system by combining SUPOR and static taint analysis

• 16,000 apps were evaluated

8/14/15 USENIX Security 2015 83

Page 85: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Evaluating UI Sensitiveness Analysis (1)• 9,653 apps (60.33%) contains input fields

• Performance:• Average analysis time is 5.7 seconds for one app

96.30%

3.70%

<= 10 seconds

> 10 seconds

8/14/15 USENIX Security 2015 84

Page 86: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Evaluating UI Sensitiveness Analysis (2)• 9,653 apps (60.33%) contains input fields

• Accuracy• Manually examined 40 apps . 115 layouts are rendered and 485

input fields are analyzed.

• TP: sensitive user inputs are identified as sensitive

• FP: insensitive user inputs are identified as sensitive

• FN: sensitive user inputs are identified as insensitive

8/14/15 USENIX Security 2015 85

Page 87: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

• Causes for FN and FP

• Insufficient context to identify sensitive keywords. • False negative: “Answer” vs “Security Answer”

• False Positive: “Height” of an image file and for a human being

8/14/15 USENIX Security 2015 86

Page 88: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

• Causes for FN and FP

• Inaccurate text label association• False positive: e.g. the long sentence (with keyword “email”) is

associated with the “Delivery Instructions” field

8/14/15 USENIX Security 2015 87

Page 89: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

• Causes for FN and FP

• Inaccurate text label association• False positive: e.g. the long sentence (with keyword “email”) is

associated with the “Delivery Instructions” field

Input Field

Input Field

Text Label

8/14/15 USENIX Security 2015 88

Page 90: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

• Causes for FN and FP

• Inaccurate text label association• False positive: e.g. the long sentence (with keyword “email”) is

associated with the “Delivery Instructions” field

Input Field

Input Field

Text Label

8/14/15 USENIX Security 2015 89

Page 91: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

• Causes for FN and FP

• Inaccurate text label association• False positive: e.g. the long sentence (with keyword “email”) is

associated with the “Delivery Instructions” field

Input Field

Input Field

Text Label

8/14/15 USENIX Security 2015 90

Page 92: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

• Causes for FN and FP

• Inaccurate text label association• False positive: e.g. the long sentence (with keyword “email”) is

associated with the “Delivery Instructions” field

Input Field

Input Field

Text Label

8/14/15 USENIX Security 2015 91

Page 93: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

• Causes for FN and FP

• Inaccurate text label association• False positive: e.g. the long sentence (with keyword “email”) is

associated with the “Delivery Instructions” field

Input Field

Input Field

Text Label

8/14/15 USENIX Security 2015 92

Page 94: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Evaluating Disclosure Analysis

• For all 16,000 apps

• Throughput: 11.1 apps/minute• A cluster of 8 servers

• 3 apps are analyzed on each server in parallel

8/14/15 USENIX Security 2015 93

Page 95: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Evaluating Disclosure Analysis

• For all 16,000 apps

• Manually examined 104 apps

• False positive rate is 8.7%• Limitations of underlying taint analysis framework

• E.g. lack of accurate modeling of arrays

8/14/15 USENIX Security 2015 94

Page 96: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Case Studies (1)com.canofsleep.wwdiary

3 input fields associated with labels “Weight”, “Height” and “Age” are identified sensitive.

8/14/15 USENIX Security 2015 95

Page 97: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Case Studies (1)

com.nitrogen.android

The 3 marked inputs fields are identified sensitive and their data are disclosed.

8/14/15 USENIX Security 2015 96

Page 98: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Case Studies (2)

txtWeight = this.findViewById(R.id.edt_weight);

valWeight = txtWeight.getText().toString();

Log.i(“weight”, valWeight);

8/14/15 USENIX Security 2015 97

Page 99: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Case Studies (2)

txtWeight = this.findViewById(R.id.edt_weight);

valWeight = txtWeight.getText().toString();

Log.i(“weight”, valWeight);Sink

• Disclosure analysis based on existing approachwhich directly define certain APIs as sensitive sources.

8/14/15 USENIX Security 2015 98

Page 100: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Case Studies (2)

txtWeight = this.findViewById(R.id.edt_weight);

valWeight = txtWeight.getText().toString();

Log.i(“weight”, valWeight);Sink

• Disclosure analysis based on existing approachwhich directly define certain APIs as sensitive sources.

8/14/15 USENIX Security 2015 99

Page 101: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Case Studies (2)

txtWeight = this.findViewById(R.id.edt_weight);

valWeight = txtWeight.getText().toString();

Log.i(“weight”, valWeight);

Source

Sink

• Disclosure analysis based on SUPOR

8/14/15 USENIX Security 2015 100

Page 102: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Conclusion

• We study the possibility of detecting sensitive user inputs, an important yet mostly neglected sensitive source in mobile apps.

8/14/15 USENIX Security 2015 101

Page 103: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Conclusion

• We propose SUPOR, among the first known approaches to detect sensitive user inputs with high recall and precision.• Mimics from the user’s perspective by statically and scalably

rendering the layout files.

• Leverages a geometry-based approach to precisely associated text labels to input fields.

• Utilizes textual analysis to determine the sensitiveness of the texts in labels.

8/14/15 USENIX Security 2015 102

Page 104: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Conclusion

• We perform a sensitive user inputs disclosure analysis, with FP rate of 8.7%, to demonstrate the usefulness of SUPOR.

8/14/15 USENIX Security 2015 103

Page 105: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Thank You!

Q & A

8/14/15 USENIX Security 2015 104

Page 106: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Related work

• A lot of work focus on privacy disclosure problems on predefined sensitive data sources in the phone.[FlowDroidPLDI’14, PiOS NDSS’11, AAPL NDSS’15]

• FlowDroid employs a limited form of sensitive input fields—password fields.[PLDI’14]

• AsDroid checks checks UI text to detect the contradiction between the expected behaviors and program behaviors.[ICSE’14]

• UIPicker uses supervised learning to collect sensitive keywords and corresponding layouts. It also uses the sibling elements in layout files as the description text for a widget.[USENIX Security’15]

8/14/15 USENIX Security 2015 105

Page 107: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Keyword dataset construction

• Crawl texts from apps’ resource files

• Adapt NLP techniques to extract nouns andnoun phrases from the top 5,000 frequent text lines.

• Manually inspect top frequent nouns and noun phrases to identify sensitive keywords.

8/14/15 USENIX Security 2015 106

Page 108: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Why not use XML structure to compute correlation scores?• Many developers defines relative positions of the

widgets, which are not what users perceive • XML structure in this case does not guarantee that

sibling widgets are physically close.

8/14/15 USENIX Security 2015 107

Page 109: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Why not use XML structure to compute correlation scores?• Some cases in real Android apps.

Input 1Label 1

Input 2Label 2

8/14/15 USENIX Security 2015 108

Page 110: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Why not use XML structure to compute correlation scores?• Some cases in real Android apps.

<LinearLayout android:orientation=“horizontal”>

<LinearLayout android:orientation=“vertical”>

<TextView android:text=“Label 1“ />

<TextView android:text=“Label 2“ />

</LinearLayout>

<LinearLayout android:orientation=“vertical”>

<EditText android:id=“@+id/input1“ … />

<EditText android:id=“@+id/input2“ … />

</LinearLayout>

</LinearLayout>

Input 1Label 1

Input 2Label 2

8/14/15 USENIX Security 2015 109

Page 111: SUPOR: Precise and Scalable Sensitive User Input …...SUPOR: Precise and Scalable Sensitive User Input Detection for Android Apps Jianjun Huang, Zhichun Li, Xusheng Xiao, Zhenyu Wu,

Why not use XML structure to compute correlation scores?• Some cases in real Android apps.

<LinearLayout android:orientation=“horizontal”>

<LinearLayout android:orientation=“vertical”>

<TextView android:text=“Label 1“ />

<TextView android:text=“Label 2“ />

</LinearLayout>

<LinearLayout android:orientation=“vertical”>

<EditText android:id=“@+id/input1“ … />

<EditText android:id=“@+id/input2“ … />

</LinearLayout>

</LinearLayout>

Input 1Label 1

Input 2Label 2

8/14/15 USENIX Security 2015 110