security analysis of android for work - research project #1delaat/rp/2015... · binder ipc isolate...

17
Security Analysis of Android for Work Research Project #1 Tom Curran & Ruben de Vries RP1 project presentation, 2016 Tom Curran & Ruben de Vries (University of Amsterdam) Security Analysis of Android for Work RP1 project presentation, 2016 1 / 17

Upload: others

Post on 26-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Security Analysis of Android for WorkResearch Project #1

Tom Curran & Ruben de Vries

RP1 project presentation, 2016

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for Work RP1 project presentation, 2016 1 / 17

Page 2: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

What is Android for Work

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for Work RP1 project presentation, 2016 2 / 17

Page 3: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Why is it interesting?

Data separation achieved using separate user profilesProfiles run concurrently

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for Work RP1 project presentation, 2016 3 / 17

Page 4: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Research Question

Is it possible to read data from the work profile using a process started bythe personal profile?

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for Work RP1 project presentation, 2016 4 / 17

Page 5: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Research Question; narrowed down

Is it possible to read data from a managed profile from the userprofile using the binder?

How does Android for Work handle encryption of data?

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for Work RP1 project presentation, 2016 5 / 17

Page 6: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Findings

Data can be read via the Binder

Data is encrypted when device is switched off, but not once it isrunning.

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for Work RP1 project presentation, 2016 6 / 17

Page 7: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Encryption; Demo

[...] Once a device is encrypted, all user-created data is automaticallyencrypted before committing it to disk and all reads automatically decryptdata before returning it to the calling process.

- Android for Work Security White Paper

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for Work RP1 project presentation, 2016 7 / 17

Page 8: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Root?

Root exploits uncovered in the past

Towel Root, affecting up to KitKat 4.4.2 (2014)Stagefright 2.0, affects up to Lollipop 5.1 (2015)

Rooting Marshmallow 6.0+ Harder but possible

SELinuxExploits in Linux kernel e.g. CVE-2016-0728 (2016)Fuzzing Android System Services by Binder, Blackhat 2015

Once you have root, lie about having it

All Your Root Checks Are Belong to Us, Blackhat 2015

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for Work RP1 project presentation, 2016 8 / 17

Page 9: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Android Version Distribution

Figure: Collected over 7-day period ending on 4th January 2016, Google.

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for Work RP1 project presentation, 2016 9 / 17

Page 10: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Application Sandboxing

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for WorkRP1 project presentation, 2016 10 /

17

Page 11: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Binder IPC

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for WorkRP1 project presentation, 2016 11 /

17

Page 12: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Binder IPC

Isolate kernel from user apps

All communication between processes passes via the Binder

Any data type can be sent

Two components: kernel driver and library loaded in applications

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for WorkRP1 project presentation, 2016 12 /

17

Page 13: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Attacking the Binder?

1 Inject code into target service

2 Hook the function writing data to the driver

3 Listen on target service

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for WorkRP1 project presentation, 2016 13 /

17

Page 14: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Attacking Android for Work?

Services shared between users

KeyboardPhone calls...

Flexible

Nothing displayed on UI

Subvert file-based encryption from Enterprise apps (e.g. SophosMobile Encryption)?

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for WorkRP1 project presentation, 2016 14 /

17

Page 15: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Is it really practical?

Number of obstacles to first overcome

Gaining root accessBypassing SELinuxAvoiding root detection

Will never achieve 100% security

Layered securityEncrypt the trafficMinimize data travelling acrosss Binder

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for WorkRP1 project presentation, 2016 15 /

17

Page 16: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Conclusion

Data is not encrypted while device is running

Bypassing root detection from MDMs is possible

Data flowing through the Binder can be read by other rooted users

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for WorkRP1 project presentation, 2016 16 /

17

Page 17: Security Analysis of Android for Work - Research Project #1delaat/rp/2015... · Binder IPC Isolate kernel from user apps All communication between processes passes via the Binder

Questions?

Tom Curran & Ruben de Vries (University of Amsterdam)Security Analysis of Android for WorkRP1 project presentation, 2016 17 /

17