Secure storage on Android with context-aware access control

28
Secure storage on Android with context- aware access control CMS 2014 Aveiro, 25-26 September 2014 Faysal Boukayoua Jorn Lapon Vincent Naessens Bart De Decker KU Leuven

description

Android devices are increasingly used in corporate settings. Although openness and cost-effectiveness are key factors to opt for the platform, its level of data protection is often inadequate for corporate use. This paper presents a strategy for secure credential and data storage in Android. It is supplemented by a context-aware mechanism that restricts data availability according to predefined policies. Our approach protects stored data better than iOS in case of device theft. Contrary to other Android-based solutions, we do not depend on device brand, hardware specs, price range or platform version. No modifications to the operating system are required. The proposed concepts are validated by a context-aware file management prototype.

Transcript of Secure storage on Android with context-aware access control

Page 1: Secure storage on Android with context-aware access control

Secure storage on

Android with context-

aware access control

CMS 2014

Aveiro, 25-26 September 2014

Faysal Boukayoua Jorn Lapon

Vincent Naessens Bart De Decker

KU Leuven

Page 2: Secure storage on Android with context-aware access control

Overview

• Intro

• Motivation

• Requirements

• Secure storage

• Context-aware module

• Integration

• Prototype

• Evaluation

• Conclusions

Page 3: Secure storage on Android with context-aware access control

Intro: corporate mobile computing

Opportunities

• Consumerisation

• BYOD

• New application scenarios

Threats

• Greyware and malware

• Theft and loss

Risk

Compromise of sensitive data

Page 4: Secure storage on Android with context-aware access control

Intro: data protection in Android

1.0 sandboxed internal app storage

1.6 certificate and private key store

• system only

• no public APIs

2.2 Device Administration API

(password restrictions, remote wiping,…)

2.3 Content Providers

• Sharing of structured data

• Dynamic permission granting and revocation

3.0 Filesystem encryption

• Not by default

• External storage unencrypted

Page 5: Secure storage on Android with context-aware access control

Intro: data protection in Android

4.0 KeyChain

• System-wide private key and certificate store

• User consent for import and use

• Public API

4.3 Android KeyStore Provider

• App-specific

• Standard Java API

Hardware-backed RSA keys

4.4 Restricted external storage

• Private, per app

• Read permission for shared part

Page 6: Secure storage on Android with context-aware access control

Motivation: other technologies and evolutions

Samsung KNOX for Android

• OS isolation

(application containers)

• Container encryption

• Requires TrustZone-enabled Samsung devices

Upcoming Android L release

• Integration of KNOX features

• Encryption by default

Page 7: Secure storage on Android with context-aware access control

Motivation: security concerns

Filesystem encryption

• Currently not by default

• Hardware backing not used (only user secret)

• No application control

External storage

• Not encrypted

• Residual data from apps

• Pre-4.4: readable by all apps

Page 8: Secure storage on Android with context-aware access control

Motivation: corporate Android?

• Significant: ≈79% market share (2013, Q3)

• Fragmentation

o Low- vs. high-end devices

o OS versions

o OEM customisations

• BYOD: devices need level playing field

Page 9: Secure storage on Android with context-aware access control

Requirements

Security

• Prevent brute-force and dictionary

attacks against user secret

• Withstand rooting after theft

• Reduce asset exposure

• Automation and contextual policies

Page 10: Secure storage on Android with context-aware access control

Requirements

Interoperability

• Unmodified OS

• Unmodified apps

• Support wide device range and Android base

Usability

• No substantial overhead to user (e.g. long, complex passphrase)

Page 11: Secure storage on Android with context-aware access control

General approach

11

Secure storage module

Page 12: Secure storage on Android with context-aware access control

Secure storage: protocol constituents

• 1 keypair SKSE,PKSE

• 1 passcode KSE,A per app

• 1 symmetric encryption key per app

• SE public key PKSE

• App-specific passcode KSE,A

Trusted OS rely on private application

storage to store KSE,A

Page 13: Secure storage on Android with context-aware access control

Secure storage: protocol flow

2: prompt for

passcode 3: passcode

1: Ksession AuthKeyAgreement

6: authentication successful

7: request decryption key KD

8: return KD

9: retrieve encrypted data

10: decrypt

data with KD

5: verify(passcode, )

4: {passcode, }Ksession

Page 14: Secure storage on Android with context-aware access control

Secure storage: app enrollment

Distribution of KSE,A

• Option 1: enrollment PUK

o User enters PUK

o Secure element generates KSE,A

o KSE,A released to new app

• Option 2: MDM server

MDM server

Page 15: Secure storage on Android with context-aware access control

General approach

15

Context-awareness module

Page 16: Secure storage on Android with context-aware access control

Context-aware module: purpose

Assistive technology

• Automate user actions

• Relieve user from management burden

• Auto-download, auto-delete, …

Soft security

• Limit residual data

• Reduce asset exposure

• Controlled provisioning to apps

Page 17: Secure storage on Android with context-aware access control

Context-aware module: policy examples

If location

offsite “Residence of patient X”

OR unused > 1hour

Then Remove “DoorCredential X”

If 8:00 ≤ time ≤ 18:00

Then App.Contract has R/W-access to

“Contract Z”

Page 18: Secure storage on Android with context-aware access control

Integration: option 1

Each app manages its own assets

• Less complex setup

• Requires cooperation from developer

• Typically: in-house corporate apps

App 1 App 2 App 3

Page 19: Secure storage on Android with context-aware access control

Integration: option 2

Dedicated app manages and provisions assets

• Allows centralised policy administration

• No changes to client apps

• Suitable for 3rd party apps

Dedicated app

Client app 1

Client app 2

Context

OK?

Page 20: Secure storage on Android with context-aware access control

Prototype: corporate file mgmt

Mobile component (option 2)

• Samsung Galaxy Tab 2 with Android 4.1.2

• Secure storage module

o G&D Mobile Security Card 1.0 with SEEK4Android

o Java-based symmetric crypto (BouncyCastle 1.47)

o C-based symmetric crypto (PolarSSL 1.3.2)

o C-based version up to 5 times faster

• Context-aware module

o Automated tasks: Android Service

o File provisioning: Android Content Provider

• File access by URI

• Dynamic permission granting and revocation

Page 21: Secure storage on Android with context-aware access control

Prototype: corporate file mgmt

File server

• Apache Commons Net 3.2

• Legacy protocol: FTP over TLS

• Client authentication (X.509)

MDM server

• Policy creation and update

• Push:

o to file server

o to affected mobiles

o file conflict resolution on mobile

• Google Cloud Messaging

Page 22: Secure storage on Android with context-aware access control

Evaluation: assumptions

• Authenticated user is trusted!

• OS security mechanisms correctly

enforced during legitimate use

(no prior malware infection)

• User does not weaken platform security

o No rooting

o ADB disabled

o Bootloader locked

Page 23: Secure storage on Android with context-aware access control

Evaluation: attack countermeasures

Attack 1: rooting and doing a dictionary or brute-force

attack on the device

• Android

o Pre-4.4: PBKDF2 (weak)

o 4.4+: Scrypt (stronger)

• iOS

o PBKDF2 (weak)

o Hardware-based delay

• Android with our solution

o Tamperproof storage of decryption keys

o Passcode attempts limited

Page 24: Secure storage on Android with context-aware access control

Evaluation: attack countermeasures

Attack 2: dumping flash memory and doing a dictionary

or brute-force attack offline

• Android

o Pre-4.4: PBKDF2 (weak)

o 4.4+: Scrypt (stronger)

• iOS

o Hardware-backed encryption

• Android with our solution

o Hardware-backed encryption with tamperproof

hardware

Page 25: Secure storage on Android with context-aware access control

Evaluation: attack countermeasures

Attack 3: app exhausting the passcode attempt limit by

repeated tries

• Android: n/a

• iOS: n/a

• Android with our solution

o App must be enrolled to secure element

(resulting in app passcode KSE,A)

o Passcode attempt only counted if KSE,A verifies

Page 26: Secure storage on Android with context-aware access control

Evaluation: discussion

• Data on external storage also encrypted

• Unmodified OS

• Suitable for 3rd party apps

• Accomodates wide range of devices and Android versions

o Content Provider: requires Android 2.3+

o Multiple options for SE: - µSD-based

- embedded

- contactless NFC card

o may need extra hardware, depending on device

• Passcode attempt limit short passcode (PIN) sufficient

Page 27: Secure storage on Android with context-aware access control

Conclusions

• Android data protection

o Fragmentation!

o Filesystem encryption not hardware-backed

o External storage exposed

• Android with our solution:

o Secure storage module with tamperproof key storage

o Context-aware module with reduced asset exposure

o Centralised, policy-based asset mgmt

• Future work

o Trustworthy passcode entry

o Integration in Android KeyStore Provider

Page 28: Secure storage on Android with context-aware access control

Q&A