software security goes mobile

51
©2011 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Software Security Goes Mobile Jacob West Director, Software Security Research HP Enterprise Security Products

Upload: cassie

Post on 26-Feb-2016

41 views

Category:

Documents


0 download

DESCRIPTION

Software Security Goes Mobile. Jacob West Director, Software Security Research HP Enterprise Security Products. Motivation Redefining the phone and the computer Money : Beyond ringtones and 99¢ games. Landscape What is mobile? What matters ? Who cares?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Software Security  Goes Mobile

©2011 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice

Software Security Goes Mobile

Jacob West

Director, Software Security Research

HP Enterprise Security Products

Page 2: Software Security  Goes Mobile

Motivation

Redefining the phone and the computer

Money: Beyond ringtones and 99¢ games

Page 3: Software Security  Goes Mobile

3

Landscape

What is mobile?

What matters?

Who cares?

Page 4: Software Security  Goes Mobile

4

Mobile Threats

Seven ways to hang yourself

with Google Android

Page 5: Software Security  Goes Mobile

5

Parting Thoughts

Questions you can ask to begin improving your mobile security today

Page 6: Software Security  Goes Mobile

Motivation

Page 7: Software Security  Goes Mobile

7

Smartphones > Feature Phones

2005 2006 2007 2008 2009 2010E 2011E 2012E 2013E

6 1021

3851

71

93

119

154140

150 149140 140

10890

67

34

Smartphone Feature Phone

Source: Morgan Stanley Research

Page 8: Software Security  Goes Mobile

8

Smartphones > PCs

2005 2006 2007 2008 2009 2010E 2011E 2012E 2013E0%10%20%30%40%50%60%70%80%90%

100%

Smartphones Laptops DesktopsSource: Morgan Stanley Research

Page 9: Software Security  Goes Mobile

9

Page Views on the Rise

6½3½2½

?

Source: Morgan Stanley Research

Page 10: Software Security  Goes Mobile
Page 11: Software Security  Goes Mobile
Page 12: Software Security  Goes Mobile

12

Mobile Purchasers

Ente

rtainm

ent

Electr

onics

Clothin

g

Wireles

s Ser

vice

Trav

el

Retail

and T

ech

Beaut

y

Jewelr

y0

10

20

30

40

50

$300/year/user

% o

f pur

chas

ers

Source: Google The Mobile Movement Study

Page 13: Software Security  Goes Mobile

Why Mobile Users Don’t Buy

Security is #2 reason to avoid purchases

Page 14: Software Security  Goes Mobile

Mobile Landscape

Page 15: Software Security  Goes Mobile

Big Questions

What is mobile?

What matters?

Who cares?

Page 16: Software Security  Goes Mobile

What is Mobile?

serverconnection

device

os

Page 17: Software Security  Goes Mobile

Familiar Model

server

device

browser

Page 18: Software Security  Goes Mobile

Same Ol’ Server

Security Services

Operations Software

Information

Page 19: Software Security  Goes Mobile

Client-Side Persistence

Local data persistence

Similar to HTML 5

Invisible to users and always available

Alex

******321-15-5124

Page 20: Software Security  Goes Mobile

Mobile OS

Benefit of hindsight

Security features- Read-only stack- Data encryption- Permissions

Confusing- Wait, permissions?

Page 21: Software Security  Goes Mobile

Can’t We All Get Along?

Formal communication- Inter-application- Intra-application- With the OS

A new trust boundary

Page 22: Software Security  Goes Mobile

What Matters?

Old Handling sensitive user and app data Environment and configuration Old standbys like XSS and SQL injection

New Local storage (SD card, …) Communication (SMS, MMS, GPS, …) Security features (Permissions, crypto, …)

Page 23: Software Security  Goes Mobile

Who Cares?

App Owners and Developers CIA (intra-app)

Device Makers / OS Builder / Providers CIA (inter-app) Privacy (beyond data: location, behavior, …) Generating unexpected charges

… Users?

Page 24: Software Security  Goes Mobile

Mobile Threats

Page 25: Software Security  Goes Mobile

Google Android Vulnerabilities

1. Intent Hijacking2. Intent Spoofing3. Sticky Broadcast Tampering4. Insecure Storage5. Insecure Network Communication6. SQL Injection7. Promiscuous Privileges

Page 26: Software Security  Goes Mobile

1. Intent Hijacking

Description Malicious app intercepts an intent bound for

another app, which can compromise data or alter behavior

Cause Implicit intents

(do not require strong permissions to receive)Fix Explicit intents and require special receiver

permissions

Page 27: Software Security  Goes Mobile

1. Intent Hijacking

ShowtimeSearch Results UI Handles Actions:

willUpdateShowtimes,showtimesNoLocationError

Implicit IntentAction: willUpdateShowtimes

IMDb App

Page 28: Software Security  Goes Mobile

1. Intent Hijacking

Page 29: Software Security  Goes Mobile

1. Intent Hijacking

MaliciousReceiver

ShowtimeSearch Results UI Handles Actions:

willUpdateShowtimes,showtimesNoLocationError

Implicit IntentAction: willUpdateShowtimes

Handles Actions: willUpdateShowtimes,showtimesNoLocationError

Eavesdropping App

IMDb App

Page 30: Software Security  Goes Mobile

2. Intent Spoofing

Description Malicious app spoofs a legitimate intent, which

can inject data or alter behaviorCause Public components

(necessary to receive implicit intents)Fix Use explicit intents and receiver permissions Only perform sensitive operations in private

components

Page 31: Software Security  Goes Mobile

2. Intent Spoofing

MaliciousComponent

Spoofing App

ShowtimeSearch Results UI Handles Actions:

willUpdateShowtimes,showtimesNoLocationError

IMDb App

Action: showtimesNoLocationError

Page 32: Software Security  Goes Mobile

2. Intent Spoofing

Attack case

Page 33: Software Security  Goes Mobile

3. Sticky Broadcast Tampering

Description Persistent intents used by legitimate

apps can be accessed and removed by malicious apps

Cause BROADCAST_STICKY allows to full

access to any sticky broadcastsFix Use explicit, non-sticky broadcasts

protected by receiver permissions

Page 34: Software Security  Goes Mobile

3. Sticky Broadcast Tampering

Requests BROADCAST_STICKY Permission

Sticky broadcasts (intents):

Malicious App

SB1

SB2

SB3

Victim App

Receiver(expects SB2)

?

Page 35: Software Security  Goes Mobile

4. Insecure Storage

Description Local storage is accessible to

attackers, which can compromise sensitive data

Causes Local files are world-readable and

persistFix SQLite or internal storage for private

data Encrypt the data (keep keys off the

SD)

Page 36: Software Security  Goes Mobile

4. Insecure Storage

Kindle app saves e-books (.mbp and .prc) in a folder on the SD card- Depending on DRM, accessible to other apps - Saves covers of books (privacy violation)- Folder is retained after uninstall of app

Page 37: Software Security  Goes Mobile

5. Insecure Communication

Description Data sent over unencrypted channels can

be intercepted by attackers sniffing network

Cause Non-HTTPS WebView connectionsFix Ensure sensitive data only sent over

encrypted channels

Page 38: Software Security  Goes Mobile

5.a Insecure Communication

Twitter: Tweets are sent in the clear

https://freedom-to-tinker.com/blog/dwallach/things-overheard-wifi-my-android-smartphone

Page 39: Software Security  Goes Mobile

5.b Insecure Communication

Facebook: Despite ‘fully encrypted’ option on the Web, mobile app sends in the clear

Page 40: Software Security  Goes Mobile

6. SQL Injection

Description Allows malicious users to alter or view

(query string injection) database recordsCause Untrusted data used to construct a SQL

query or clauseFix Parameterized queries

Page 41: Software Security  Goes Mobile

6. SQL Injection

c = invoicesDB.query(

Uri.parse(invoices),

columns,

"productCategory = '" +

productCategory + "' and

customerID = '" + customerID + "'",

null, null, null,

"'" + sortColumn + "'",

null

);

Page 42: Software Security  Goes Mobile

6. SQL Injection

select * from invoices

where productCategory = 'Fax Machines' and

customerID = '12345678'

order by 'price'

productCategory = Fax MachinescustomerID = 12345678sortColumn = price

Page 43: Software Security  Goes Mobile

6. SQL Injection

select * from invoices

where productCategory = 'Fax Machines' or

productCategory = "' and customerID =

'12345678' order by '"

order by 'price'

productCategory = Fax Machines' or productCategory = \"customerID = 12345678sortColumn = \" order by ‘price

Page 44: Software Security  Goes Mobile

6. SQL Injection

c = invoicesDB.query(

Uri.parse(invoices),

columns,

"productCategory = ? and customerID = ?",

{productCategory, customerID},

null,

null,

"sortColumn = ?",

sortColumn

);

Page 45: Software Security  Goes Mobile

7. Promiscuous Privileges

Description Requesting unneeded permits privilege

escalation attacks and desensitize users Causes Deputies Artifacts from testing Confusion (inaccurate/incomplete

resources)Fix Identify unnecessary permissions

Page 46: Software Security  Goes Mobile

7.a Promiscuous Privileges

Wants Picture TakesPicture

User App

Handles Action: IMAGE_CAPTURE

Implicit IntentAction: IMAGE_CAPTURE

Camera App

Does NOT need CAMERA permission

Needs CAMERA permission

Page 47: Software Security  Goes Mobile

7.b Promiscuous Privileges

http://stackoverflow.com/questions/2676044/broadcast-intent-when-network-state-has-changend

Not true for android.net.wifi.STATE_CHANGE

Third hit on Google search

Page 48: Software Security  Goes Mobile

Empirical Results: DEFCON ‘11

Vulnerability Type % of apps with > 1 1. Intent Hijacking 50%

2. Intent Spoofing 40%

3. Sticky Broadcast Tampering 6%

4. Insecure Storage 28%

5. Insecure Communication N/A

6. SQL Injection 17%

7. Promiscuous Privileges 31%

Page 49: Software Security  Goes Mobile

Parting Thoughts

Page 50: Software Security  Goes Mobile

What Questions to Ask?

What do your apps do and for whom? What platform(s) do your apps support and how? Who develops your apps and where? Is there an existing SDL for other development? Do you rely on platform providers or app

distributors for any security assurance? Are mobile apps prompting back-end changes? Are your apps appropriately permissioned?

Page 51: Software Security  Goes Mobile

©2011 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice

Software Security Goes Mobile

Jacob West

Director, Software Security Research

HP Enterprise Security Products