Can you trust me now?
The Current State of Mobile Security

Atredis Partners | bene diagnoscitur, bene curaturBlack Hat USA
August 2016

Atredis Partners
Overview
Bene Diagnoscitur, Bene Curatur• “That which is well diagnosed is well
cured.”• Research Driven Security Consulting• Advanced Secure Design &Development• Advanced Penetration Testing• Advanced Risk Consulting
Josh Thomas• 16 Years in the field• Focus on mobile devices, development,
hardware design, architecture
Shawn Moyer• 20 years in the field• Focus on industrial, software andnetwork security

Atredis Partners | bene diagnoscitur, bene curatur

Today’s Focus
Mobile Layers and Landscape•

What are the actual components and layersof a production mobile device?

BYOD and Market share•

What to expect when we allow anything tohappenAndroid versus iOS•

The little engine that could train ageneration to break trusted bootHardware and components•

Reuse and architecture limitations

MDM•

A false sense of stability

Atredis Partners | bene diagnoscitur, bene curatur

Mobile Layers and LandscapeThe foundations of mobile trust

Apps & DataOS VersionOS Provider
OEM Device Manufacturer
OEM Processor Manufacturer
ARM Specification

4
Atredis Partners | bene diagnoscitur, bene curatur

Functional Layers:
App & Data
•Data
Apps & Data
OS Version
OS Provider
OEM Device Manufacturer
OEM Processor Manufacturer• Protected by App or OS•App• Written for OS and OS

version• Moderated by Platform App

Store
ARM Specification• Constrained by Platform API

5
Atredis Partners | bene diagnoscitur, bene curatur

Functional Layers:
OS & OS Version•OS Version
Apps & Data

• Incremental Approach toSecurity

OS Version• Incremental Approach toOS Provider

Functionality

OEM Device Manufacturer•OSOEM Processor Manufacturer• Fundamental Approach toSecurity

ARM Specification• Fundamental Approach toFunctionality

6
Atredis Partners | bene diagnoscitur, bene curatur

Functional Layers:
OEMApps & Data

•OEMOS Version•

Design of Hardware•

Selection of Secure Components•

Approach to Market•

Solution Customization

OS Provider
OEM Device Manufacturer
OEM Processor Manufacturer
ARM Specification

7
Atredis Partners | bene diagnoscitur, bene curatur

Functional Layers:
System on Chip

Apps & Data
OS VersionOS Provider
OEM Device Manufacturer•SoC

Design of Component Hardware• Control of Trust• Control of Security•SoC Version• Similar to OS Version• Incremental updates driven byplatform vision•

OEM Processor Manufacturer
ARM Specification

8Atredis Partners | bene diagnoscitur, bene curatur

Common Talking Points: Specification

Apps & Data
OS Version•ARM Specification

Core Design of Security• Applied Academic Design• As Much Theory as Reality•

OS Provider
OEM Device Manufacturer
OEM Processor Manufacturer
ARM Specification

9Atredis Partners | bene diagnoscitur, bene curatur

Who Writes The Software?

Atredis Partners | bene diagnoscitur, bene curatur

You

10App Dev

ARM Specification

Netflix & DRM

OEM Processor Manufacturer

SoC OEMOEM Device Manufacturer

OS Vendor

OS Provider

OEMService Provider

OS Version

MDM

Apps & Data

OS Market ShareOS US Market Share(2015 Q3)

OS Global Market Share(2015 Q2)

1%
3%

3%

14%

AndroidiOS
Windows Phone
BlackBerry OSOthers

83%

11
Atredis Partners | bene diagnoscitur, bene curatur

43%

53%

AndroidiOS
MicrosoftBlackBerryTrending Toward Irrelevance With Subscribers
Global Market Share: Smartphone Operating Systems
0.00

Millions

0.00

0.00

0.00

0.00

Q1 '09Q3 '09AndroidQ2 '10

Q4 '10iOS

Q2 '11

Q4 '11

Microsoft

Q2 '12RIM

12Atredis Partners | bene diagnoscitur, bene curatur

Q4 '12Bada*

Q2 '13Q4 '13

SymbianQ2 '14

Q1 '15Other

Q3 '15

Trending Toward Irrelevance With Sales
Global Smartphone Sales By Operating System
0.00

Millions

0.00

0.00

0.00

0.00

2009

2010

AndroidiOS

2011

RIM

2012

Symbian13
Atredis Partners | bene diagnoscitur, bene curatur

Microsoft2013

Bada

2014

Other

Android: Plagued by Version Fragmentation

40.0%

30.0%

20.0%

10.0%

0.0%

5.1

54.4

4.3

4.2

Android OS Version

14
Atredis Partners | bene diagnoscitur, bene curatur

4.1

42.3

2.2

Apple: Version Fragmentation

80.0%

60.0%40.0%

20.0%

0.0%
iOS 9.X

iOS 8.X

iOS 7.X

iOS 6.X

Series215
Atredis Partners | bene diagnoscitur, bene curatur

iOS 5.X

iOS 4.X

Market Share of the Leaders9067.5

45

22.5

0

Q4 '09Q2 '10

Q4 '10Q2 '11

Samsung

Q4 '11Q2 '12

Q4 '12

Apple

16
Atredis Partners | bene diagnoscitur, bene curaturQ2 '13Q4 '13Q2 '14

OthersQ4 '14Q2 '15Q4 '15

Foundations of Mobile Trust
OEM SoC Market Share
1%
1%
1%
18%

Qualcomm
MTKNvidia

20%

60%

17
Atredis Partners | bene diagnoscitur, bene curatur

Samsung LSIIntel
Other

Android versus iOS•Security Capabilities• Android tries things first, enters the market withpartial implementations• iOS enters the market with finished software•Iterative Android releases accidentally help train

security professionals to beat iOS protections

18
Atredis Partners | bene diagnoscitur, bene curatur

Layers of Security

OS/Platform

FirmwareHardware19
Atredis Partners | bene diagnoscitur, bene curatur

Mobile Security Starts Here20
Atredis Partners | bene diagnoscitur, bene curatur

System on a Chip

21
Atredis Partners | bene diagnoscitur, bene curatur

What OS Does This Run?

22
Atredis Partners | bene diagnoscitur, bene curatur•Android•

Little Kernel

•

REX•

QuRT

•

QSEE

Physical Attack Surface•

Direct memory access, Modem,TrustZone, power management•

USB often exposes diagnostic
or factory test modes•

JTAG, UART, FIQ debugging
cables•$2,00023
Atredis Partners | bene diagnoscitur, bene curatur

Remote Attack Surface•

Modem, TrustZone, HLOS•

Large attack surface between
DRM and cellular protocols•$2,000 + time fighting software

24
Atredis Partners | bene diagnoscitur, bene curatur

Trusted Execution Environments•Provide a separate execution

environment•Closed source blobs• Key storage• DRM•How trusted are they?

25
Atredis Partners | bene diagnoscitur, bene curatur

TrustZone TEE•TrustZone can introspect and interact with the mobileoperating system•The mobile operating system cannot introspect TrustZone•Controls sensitive information from keys to secure boot•Handles DRM and parses video and audio data
•Vulnerability affects large quantities of devices•Imagine malware that could…

26
Atredis Partners | bene diagnoscitur, bene curatur

Simcard TEE•Simcards are another example of a mobile TEE•Provide key storage for network encryption•GSM networks have privacy but not authentication• IMSI Catchers• Eavesdropping• Passive and Active• Base station controlled

27
Atredis Partners | bene diagnoscitur, bene curatur

Modem28
Atredis Partners | bene diagnoscitur, bene curatur

Modem•Contains stacks for telephony
protocols•

Direct access to peripherals andbusesNetwork•

Mostly ignored outside of law
enforcement and unlockers

29
Atredis Partners | bene diagnoscitur, bene curaturData Link

PhysicalModem•Local exploitation via proprietary protocols between application andbaseband processors• QMI, MMI, AT, Diag
•Remote exploitation via proprietary telephony stacks•

GSM: LAPDm, SNDCP, RLC, MAC, CM, MM, RR• LTE: PDCP, NAS, RRC, IP•Network exploitation•IMSI Catchers•

Eavesdropping30
Atredis Partners | bene diagnoscitur, bene curatur

Boot Loader / Secure Boot
•Android traditionally runs Little

Kernel bootloaders•Contains “apps” that implement
fastboot, recovery, android
debugging bridge•OEM-specific bootloaderscontain other proprietary
protocols for debugging, fault
analysis, or engineering

31
Atredis Partners | bene diagnoscitur, bene curatur

QFUSES•Software programmable fuses for one-time

programmable configuration• Device keys, carrier keys, OEM keys
• Security features toggles•Normally accessible only via interface to TrustZone•Often exploitation of TrustZone related to desire toblow fuses

32
Atredis Partners | bene diagnoscitur, bene curatur

Cross Device Impacts• One bug to cross OEMs?
• No Problem• One bug to cross Operating Systems?
• Likely33Atredis Partners | bene diagnoscitur, bene curatur

Aside about BYOD & MDM•Based on the Lowest Common Denominator ofSecurity Assumptions•Written for Cross Platform Use•Rarely take advantage of OS or Hardware Security
Capabilities

34
Atredis Partners | bene diagnoscitur, bene curatur

A Brief History of Failure:
Logic Flaws

Atredis Partners | bene diagnoscitur, bene curatur

A Brief History of Failure:
Debugging and Backdoors

Atredis Partners | bene diagnoscitur, bene curatur

A Brief History of Failure:
Authorization, Crypto, Bootloaders

Atredis Partners | bene diagnoscitur, bene curatur

Atredis Partners | bene diagnoscitur, bene curatur

Be Apple, notAndroid

Atredis Partners | bene diagnoscitur, bene curatur

Atredis Partners | bene diagnoscitur, bene curatur