68
Ferdinand Brasser, David Gens, Patrick Jauernig, Ahmad-Reza Sadeghi, Emmanuel Stapf Technische Universität Darmstadt Sanctuary: ARMing TrustZone with User-space Enclaves

Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Ferdinand Brasser, David Gens, Patrick Jauernig, Ahmad-Reza Sadeghi, Emmanuel Stapf Technische Universität Darmstadt

Sanctuary: ARMing TrustZonewith User-space Enclaves

Page 2: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Research Problem

How can we construct an ecosystem of mutually distrusted enclaves on mobile

devices?

Page 3: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

Commodity OS

App

Operating System

AppSensitive

App

Page 4: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

Commodity OS

App

Operating System

AppSensitive

App

• OS large attack surface

• Insufficient sensitive app protection

Page 5: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

Commodity OS

App

Operating System

AppSensitive

App

• OS large attack surface

• Insufficient sensitive app protection

App

Operating System

SensitiveApp

Page 6: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

Commodity OS

App

Operating System

AppSensitive

App

ARM TrustZone

• OS large attack surface

• Insufficient sensitive app protection

App

Operating System

SensitiveApp

Page 7: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

Commodity OS

App

Operating System

AppSensitive

App

ARM TrustZone

Normal World Secure World

• OS large attack surface

• Insufficient sensitive app protection

App

Operating System

SensitiveApp

Page 8: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

Commodity OS

App

Operating System

AppSensitive

App

ARM TrustZone

Normal World Secure World

App App

OS

• OS large attack surface

• Insufficient sensitive app protection

App

Operating System

SensitiveApp

Page 9: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

Commodity OS

App

Operating System

AppSensitive

App

ARM TrustZone

Normal World Secure World

App App

OS Trusted OS

Sensitive App

Sensitive App

• OS large attack surface

• Insufficient sensitive app protection

App

Operating System

SensitiveApp

Page 10: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

Commodity OS

App

Operating System

AppSensitive

App

ARM TrustZone

Normal World Secure World

Trusted Firmware

App App

OS Trusted OS

Sensitive App

Sensitive App

• OS large attack surface

• Insufficient sensitive app protection

App

Operating System

SensitiveApp

Page 11: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

ARM TrustZoneThe Solution?

Normal World Secure World

Trusted Firmware

App App

OS Trusted OS

Sensitive App

Sensitive App

Page 12: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

ARM TrustZoneThe Solution?

Normal World Secure World

Trusted Firmware

App App

OS Trusted OS

Sensitive App

Sensitive App

• Trusted OS still large attack surface

• High costs to protect apps with TrustZone

• Main problem: Single security domain

Page 13: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

ARM TrustZoneThe Solution?

Normal World Secure World

Trusted Firmware

App App

OS Trusted OS

Sensitive App

Sensitive App

• Trusted OS still large attack surface

• High costs to protect apps with TrustZone

• Main problem: Single security domain

Sensitive App

Sensitive App

Trusted OS

Page 14: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

ARM TrustZoneThe Solution?

Normal World Secure World

Trusted Firmware

App App

OS Trusted OS

Sensitive App

Sensitive App

SanctuaryMultiple Security Domains

EL0

EL1

EL3

Normal World Secure World

Trusted Firmware

App

OS

VendorCode

Sensitive App

Sensitive App

• Trusted OS still large attack surface

• High costs to protect apps with TrustZone

• Main problem: Single security domain

Sensitive App

Sensitive App

Trusted OS

Page 15: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

ARM TrustZoneThe Solution?

Normal World Secure World

Trusted Firmware

App App

OS Trusted OS

Sensitive App

Sensitive App

SanctuaryMultiple Security Domains

EL0

EL1

EL3

Normal World Secure World

Trusted Firmware

App

OS

VendorCode

Sensitive App

Sensitive App

• Trusted OS still large attack surface

• High costs to protect apps with TrustZone

• Main problem: Single security domain

Sensitive App

Sensitive App

Trusted OS

Sensitive App

Page 16: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

ARM TrustZoneThe Solution?

Normal World Secure World

Trusted Firmware

App App

OS Trusted OS

Sensitive App

Sensitive App

SanctuaryMultiple Security Domains

EL0

EL1

EL3

Normal World Secure World

Trusted Firmware

App

OS

VendorCode

Sensitive App

Sensitive App

• Trusted OS still large attack surface

• High costs to protect apps with TrustZone

• Main problem: Single security domain

• Sensitive apps can remain untrusted

• Make TrustZone protection available to third parties

Sensitive App

Sensitive App

Trusted OS

Sensitive App

Page 17: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Untrusted Compromised

ARM TrustZoneThe Solution?

Normal World Secure World

Trusted Firmware

App App

OS Trusted OS

Sensitive App

Sensitive App

SanctuaryMultiple Security Domains

EL0

EL1

EL3

Normal World Secure World

Trusted Firmware

App

OS

VendorCode

Sensitive App

Sensitive App

• Trusted OS still large attack surface

• High costs to protect apps with TrustZone

• Main problem: Single security domain

• Sensitive apps can remain untrusted

• Make TrustZone protection available to third parties

Sensitive App

Sensitive App

Trusted OS

Sensitive App

Challenges

• No new hardware components• No replacement of existing code bases (e.g. Trusted OS)• Only minor impact on commodity OS

Page 18: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Adversary Model

• Adversary can

• compromise normal-world software at all privilege levels

• run malicious sensitive apps

• Adversary cannot

• compromise TrustZone (trust anchor)

• perform physical attacks

Page 19: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Related Work

Page 20: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Existing Research Proposals

Normal World Secure World

Software ApproachesUtilizing TrustZone

AppApp

App

Sensitive App

Page 21: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Existing Research Proposals

Normal World Secure World

Software ApproachesUtilizing TrustZone

among others,

[Ferraiuolo et al., SOSP 2017]

[Sun et al., DSN 2015]

Improve isolation of sensitive apps without add. HW features

AppApp

App

Sensitive App

Page 22: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Existing Research Proposals

Normal World Secure World

Software ApproachesUtilizing TrustZone

among others,

[Ferraiuolo et al., SOSP 2017]

[Sun et al., DSN 2015]

among others,

[Hua et al., USENIX 2017]

[Cho et al., USENIX 2016]

Improve isolation of sensitive apps without add. HW features

Use virtualization to protect sensitive apps.Use TrustZone as trust anchor

AppApp

App

Sensitive App

Hypervisor

Hypervisor-based IsolationUtilizing TrustZone

AppApp

App

Sensitive App

Page 23: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Existing Research Proposals

Normal World Secure World

Software ApproachesUtilizing TrustZone

Cache

Memory

Architectural Modifications

among others,

[Ferraiuolo et al., SOSP 2017]

[Sun et al., DSN 2015]

among others,

[Hua et al., USENIX 2017]

[Cho et al., USENIX 2016]

among others,

[Costan et al., USENIX 2016]

[Evtyushkin et al., MICRO 2014]

Improve isolation of sensitive apps without add. HW features

Use virtualization to protect sensitive apps.Use TrustZone as trust anchor

Overcome TrustZone’sshortcomings with own HW

AppApp

App

Sensitive App

Hypervisor

Hypervisor-based IsolationUtilizing TrustZone

AppApp

App

Sensitive App

App Sensitive App

Page 24: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Existing Research Proposals - Problems

Replaces existing code base Hypervisor blocked New hardware design

Normal World Secure World

Software ApproachesUtilizing TrustZone

Cache

Memory

Architectural Modifications

AppApp

App

Sensitive App

App Sensitive App

Hypervisor

Hypervisor-based IsolationUtilizing TrustZone

AppApp

App

Sensitive App

Page 25: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Existing Research Proposals - Problems

Replaces existing code base Hypervisor blocked New hardware design

Slows down commodity OS

Additional HW for DMA access control

No support for multi-core environments

OS needs to be suspended

Additional TCB component

Normal World Secure World

Software ApproachesUtilizing TrustZone

Cache

Memory

Architectural Modifications

AppApp

App

Sensitive App

App Sensitive App

Hypervisor

Hypervisor-based IsolationUtilizing TrustZone

AppApp

App

Sensitive App

Low adoption by industry

High deployment costs

Page 26: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Sanctuary provides Multi-Domain Isolation

NW SW

Memory

Core A

NW = Normal WorldSW = Secure World

NW SW

AppApp

App

Security Primitives

Page 27: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Sanctuary provides Multi-Domain Isolation

NW SW

Memory

Core A

NW = Normal WorldSW = Secure World

NW SW

AppApp

App

Security Primitives

Secure world forms our trust anchor

Page 28: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Sanctuary provides Multi-Domain Isolation

NW SW

Memory

Core A

NW = Normal WorldSW = Secure World

NW SW

AppApp

App

Security Primitives

Contains security primitives provided by

the device vendor

Secure world forms our trust anchor

Page 29: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Sanctuary provides Multi-Domain Isolation

NW SW

Memory

Core A

NW = Normal WorldSW = Secure World

NW SW

AppApp

App

Security Primitives

Core B

NW SW

SecurityPrimitives

Core C

NW SW

Security Primitives

Every core can access same security

primitives

Page 30: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Sanctuary provides Multi-Domain Isolation

NW SW

Memory

Core A

NW = Normal WorldSW = Secure World

NW SWNW SW Sanctuary I (Core B)

AppApp

App

Security Primitives

Core B

NW SW

SecurityPrimitives

Core C

NW SW

Security Primitives

Isolate core using TrustZone features

Page 31: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Sanctuary provides Multi-Domain Isolation

NW SW

Memory

Core A

NW = Normal WorldSW = Secure World

NW SWNW SW Sanctuary I (Core B)

AppApp

App

Security Primitives

Core B

NW SW

SecurityPrimitives

Core C

NW SW

Security Primitives

Sensitive App I

Isolate core using TrustZone features

Page 32: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Sanctuary provides Multi-Domain Isolation

NW SW

Memory

Core A

NW = Normal WorldSW = Secure World

NW SWNW SW Sanctuary I (Core B)NW SW Sanctuary I (Core B) Sanctuary II (Core C)

AppApp

App

Security Primitives

Core B

NW SW

SecurityPrimitives

Core C

NW SW

Security Primitives

Sensitive App I

Sensitive App II

Page 33: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Sanctuary provides Multi-Domain Isolation

• Only using TrustZone features.No new HW design

• Vendor can keep existing code in SW

• No heavy influence on commodity OS

NW SW

Memory

Core A

NW = Normal WorldSW = Secure World

NW SWNW SW Sanctuary I (Core B)NW SW Sanctuary I (Core B) Sanctuary II (Core C)

AppApp

App

Security Primitives

Core B

NW SW

SecurityPrimitives

Core C

NW SW

Security Primitives

Sensitive App I

Sensitive App II

Challenges revisited

Page 34: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Technical Details of Sanctuary

Page 35: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Going Beyond TrustZone …

Har

dw

are

RAM

NM SM

Normal World Secure World

NM SM

Memory Controller

Soft

war

eCore A Core B

SM = Secure Mode

NM = Normal Mode

Page 36: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Going Beyond TrustZone …

Har

dw

are

RAM

NM SM

Normal World Secure World

NM SM

NS = 0/1NS = 0/1

Memory Controller

NS = Non-Secure

Soft

war

eCore A Core B

SM = Secure Mode

NM = Normal Mode

Page 37: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Going Beyond TrustZone …

Har

dw

are

RAM

NM SM

Normal World Secure World

NM SM

NS = 0/1NS = 0/1

Memory Controller

NS = Non-Secure

Soft

war

eSW

OS

NW

Trusted Firmware

App

TOS

SA

SW

OS

NW

Trusted Firmware

App

TOS

SA

Core A Core B

SM = Secure Mode

NM = Normal Mode

TOS = Trusted OS

SA = Sensitive App

SW = Secure World

NW = Normal World

Page 38: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Going Beyond TrustZone …

Har

dw

are

RAM

NM SM

Normal World Secure World

NM SM

NS = 0/1NS = 0/1 NSAID = BNSAID = A

Memory Controller

NS = Non-Secure

NSAID = Non-Secure Access ID

Soft

war

eSW

OS

NW

Trusted Firmware

App

TOS

SA

SW

OS

NW

Trusted Firmware

App

TOS

SA

Core A Core B

SM = Secure Mode

NM = Normal Mode

TOS = Trusted OS

SA = Sensitive App

SW = Secure World

NW = Normal World

Page 39: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Going Beyond TrustZone …

Har

dw

are

RAM

NM SM NM SM

NS = 0/1NS = 0/1 NSAID = BNSAID = A

Memory Controller

NW – Core A NW – Core B Secure World

NS = Non-Secure

NSAID = Non-Secure Access ID

Soft

war

eSW

OS

NW

Trusted Firmware

App

TOS

SA

SW

OS

NW

Trusted Firmware

App

TOS

SA

Core A Core B

SM = Secure Mode

NM = Normal Mode

TOS = Trusted OS

SA = Sensitive App

SW = Secure World

NW = Normal World

Page 40: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Going Beyond TrustZone …

Har

dw

are

RAM

NM SM NM SM

NS = 0/1NS = 0/1 NSAID = BNSAID = A

Memory Controller

NW – Core A NW – Core B Secure World

NS = Non-Secure

NSAID = Non-Secure Access ID

Soft

war

eSW

OS

NW

Trusted Firmware

App

SW

OS

NW

Trusted Firmware

App

Core A Core B

SM = Secure Mode

NM = Normal Mode

TOS = Trusted OS

SA = Sensitive App

SW = Secure World

NW = Normal World

Page 41: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Going Beyond TrustZone …

Har

dw

are

RAM

NM SM NM SM

NS = 0/1NS = 0/1 NSAID = BNSAID = A

Memory Controller

NW – Core A NW – Core B Secure World

NS = Non-Secure

NSAID = Non-Secure Access ID

Soft

war

eSW

OS

NW

Trusted Firmware

App

SW

OS

NW

Trusted Firmware

App

Core A Core B

SM = Secure Mode

NM = Normal Mode

TOS = Trusted OS

SA = Sensitive App

SW = Secure World

NW = Normal World

SPSP = Security Primitives

SP

Page 42: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

OS

Trusted Firmware

App

OS

Trusted Firmware

App

Sanctuary (Core C)

NM SM NM SM

Memory Controller

NS = 0/1 NSAID = CNS = 0/1 NSAID = BNS = 0/1 NSAID = A

Normal World Sanctuary Secure World

Soft

war

eCore A

NW SWNW SW

Core BH

ard

war

e

Going Beyond TrustZone …

RAM

SP SP

NM SM

Page 43: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

OS

Trusted Firmware

App

OS

Trusted Firmware

App

Sanctuary (Core C)

NM SM NM SM

Memory Controller

NS = 0/1 NSAID = CNS = 0/1 NSAID = BNS = 0/1 NSAID = A

Normal World Sanctuary Secure World

Soft

war

eCore A

NW SWNW SW

Core BH

ard

war

e

Going Beyond TrustZone …

RAM

SP SP

Trusted Firmware

NW

Sanct. Library

Sensitive App

SW

SP

NM SM

Page 44: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

OS

Trusted Firmware

App

OS

Trusted Firmware

App

Sanctuary (Core C)

NM SM NM SM

Memory Controller

NS = 0/1 NSAID = CNS = 0/1 NSAID = BNS = 0/1 NSAID = A

Normal World Sanctuary Secure World

Soft

war

eCore A

NW SWNW SW

Core BH

ard

war

e

Going Beyond TrustZone …

RAM

SP SP

Trusted Firmware

NW

Sanct. Library

Sensitive App

SW

SP

NM SM

Provides mgmt. functionalities. Not part of system TCB

Page 45: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Evaluation of Sanctuary PoC

Page 46: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Security Considerations

✔ Protection from compromised OSbefore, after and during runtime of sensitive app

✔ Protection from malicious sensitive appsensitive app isolated from OS and other sensitive apps

✔ Protection from cache-side channel attacksflush exclusive caches, exclude sensitive apps from shared caches

Page 47: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Page 48: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Sanctuary Life Cycle

Page 49: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Sanctuary Life Cycle

OSExecution

Page 50: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Sanctuary Life Cycle

OSExecution

Sensitive app execution triggered

Page 51: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Sanctuary Life Cycle

SanctuarySetup

OSExecution

Sensitive app execution triggered

Page 52: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Sanctuary Life Cycle

Sensitive App Execution

SanctuarySetup

OSExecution

Sensitive app execution triggered

Page 53: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Sanctuary Life Cycle

Sensitive App Execution

SanctuarySetup

OSExecution

OS still runs in parallel on other cores

Sensitive app execution triggered

Page 54: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Sanctuary Life Cycle

Sensitive App Execution

SanctuarySetup

SanctuaryTeardown

OSExecution

OS still runs in parallel on other cores

Sensitive app execution triggered

Page 55: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Sanctuary Life Cycle

Sensitive App Execution

SanctuarySetup

SanctuaryTeardown

OSExecution

OSExecution

OS still runs in parallel on other cores

Sensitive app execution triggered

Page 56: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Sanctuary Life Cycle

Sensitive App Execution

SanctuarySetup

SanctuaryTeardown

OSExecution

OSExecution

OS still runs in parallel on other cores

Sensitive app execution triggered

Return core to OS

Page 57: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Sanctuary Life Cycle

Sensitive App Execution

SanctuarySetup

SanctuaryTeardown

OSExecution

OSExecution

OS still runs in parallel on other cores

Sensitive app execution triggered

440 msw/o

shared cache

110 msw/o

shared cache

Return core to OS

Page 58: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Performance Evaluation

Sanctuary Life Cycle

Sensitive App Execution

SanctuarySetup

SanctuaryTeardown

OSExecution

OSExecution

Sensitive app execution triggered

Return core to OS

Provision OTP Key:1.2 s (w/o shared cache)

Display OTP:600 ms (w/o shared cache)

Page 59: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Firmware

Normal World

Sanctuary Library

Sensitive App

SecureWorld

SecurityPrimitives

Code Modifications

Page 60: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Firmware

Normal World

Sanctuary Library

Sensitive App

SecureWorld

SecurityPrimitives

Reused OP-TEEModified 530 LOC

Code Modifications

Page 61: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Firmware

Normal World

Sanctuary Library

Sensitive App

SecureWorld

SecurityPrimitives

Reused OP-TEEModified 530 LOC

Reused ARM-TFmodified 92 LOC

Code Modifications

Page 62: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Trusted Firmware

Normal World

Sanctuary Library

Sensitive App

SecureWorld

SecurityPrimitives

Reused OP-TEEModified 530 LOC

Reused ARM-TFmodified 92 LOC

Used Zircon micro kernel

modified 211 LOC

Code Modifications

Page 63: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Conclusion

• Sanctuary provides an ecosystem of mutually distrusted enclaves on ARM devices

Page 64: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Conclusion

• Sanctuary provides an ecosystem of mutually distrusted enclaves on ARM devices

✔ Sanctuary does not introduce new HW designs

Page 65: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Conclusion

• Sanctuary provides an ecosystem of mutually distrusted enclaves on ARM devices

✔ Sanctuary does not introduce new HW designs

✔ Sanctuary does not replace existing code bases

Page 66: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Conclusion

• Sanctuary provides an ecosystem of mutually distrusted enclaves on ARM devices

✔ Sanctuary does not introduce new HW designs

✔ Sanctuary does not replace existing code bases

✔ Sanctuary does not impact the commodity OS heavily

Page 67: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Conclusion

• Sanctuary provides an ecosystem of mutually distrusted enclaves on ARM devices

✔ Sanctuary does not introduce new HW designs

✔ Sanctuary does not replace existing code bases

✔ Sanctuary does not impact the commodity OS heavily

• Current Work

➢ Implement further use cases (IP protection of ML algorithms, digital car key)

➢ Sanctuary for RISC-V

Page 68: Sanctuary: ARMing TrustZone with User-space Enclaves · with User-space Enclaves. Research Problem How can we construct an ecosystem of mutually distrusted enclaves on mobile devices?

Questions ?

[email protected]