Top Banner
TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May 17, 2010
22

TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

TrustVisor: Efficient TCB Reduction and Attestation

Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou,

Anupam Datta, Virgil Gligor, Adrian Perrig

May 17, 2010

Page 2: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

2

Motivating Example

• Conscientious web server admin / dev• Wants to protect most critical data

– SSL private key, password file, ACL, …• Evaluates low-cost options• Her best efforts rest on a

house of cards…

Page 3: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

Challenge: Reducing the Trusted Computing Base

• Today’s OSes have too much power• Total access to application data

• App may require little OS support– Self-contained computation ‘S’

• Trusted computing base for S includes majority of:OS, drivers, and privileged applications!!!

OS Kernel(ring 0)

App(ring 3)

Hardware

OS

AppApp 1 … S

DeviceDriver

1

DeviceDriver

2

KernelModule

1

KernelModule

2

KernelModule

l

DeviceDriver

m

3

Page 4: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

4

What is S?

• Self-contained code in an application• Data secrecy and integrity requirements• General-purpose computing• Some examples

– Manages a private key for web server or CA– Manages Access Control List (ACL)– Is a compute client in distributed setting– Is similar to a Flicker session [McPaPeReIs2008]

Page 5: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

5

Outline

• Motivation (done)• High-Level Overview• Detailed Description• Prototype: Apache + SSL• Limitations• Summary & Conclusions

Page 6: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

6

Meet TrustVisor

• Tiny hypervisor for isolation of code S– No scheduling or Inter-Process Communication

• Efficient transitions between OS and S• External verification of Output = S(Input)• Protected storage for S

Untrusted

Trusted

Attestable

OSwhite

HW

App App

TrustVisor

S

V

Page 7: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

7

External Verification: Attestation

What code areyou running?

TrustVisor

S InputsOutputsSign( ), K-1 KTPM, K-1

• Trust in attestation rooted in hardware TPM (Trusted Platform Module)

• SSL-enabled web server scenario:– Client can evaluate server before sending data– Enables more meaningful SSL server validation

Verifier Target

Page 8: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

8

Protected Storage

• Initially, S is “red” (untrusted)• App can register S “blue” (attestable)• TV enables “blue” code to protect data…

Appn

TrustVisor

OS

App1 … S

SμTPM

• Access-controlled by identity of S (hash)

• Enabled by TPM-like Sealed Storage

• “Micro-TPM” in software

Page 9: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

9

MetricApproach

TCB Size (LoC)

Protection granularity Performance

Monolithic kernel millions – best

Virtualization millions VM good

Virtual TPM (vTPM) millions consistent code good

Overshadow etc. millions process good

Security / μ kernel ~100K process moderate

Flicker <1K fine poor

TrustVisor <10K fine good

Alternative Approaches

TrustVisor runtime TCB in lines of code: • ~6500 C/ASM + ~2800 Headers• Hypervisor + crypto

white

white

white

white

whitewhite

white

Page 10: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

10

Outline

• Motivation (done)• High-Level Overview (done)• Detailed Description• Prototype: Apache + SSL• Limitations• Summary & Conclusions

Page 11: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

Appn

TrustVisor OS Architecture

11

CPU, RAMChipset

DMA Devices (Network, Disk,

USB, etc.)

OS

App1 …

TPM

Device Drivers

WhiteTrustVisorTPMDriver

Locality 2Locality 1

TrustVisor:• Virtualizes RAM, CPU• Restricts DMA• Restricts TPM to

Locality 1

Hardware

Page 12: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

Appn

TrustVisor S Architecture

12

TrustVisor

OS

App1 … S

SμTPM

SState

TrustVisor API• Registration• Invocation• Micro-TPM

CPU, RAMChipset

DMA Devices (Network, Disk,

USB, etc.)TPM

Page 13: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

13

Identifying S to TrustVisor

• Applications identify S via registration– Page-level protection granularity

• Applications make “normal” function calls– TrustVisor detects switch to S via traps

• S runs with no access to legacy OS– One set of Inputs and Outputs per invocation

Page 14: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

Sensitive Code Timeline

14

Initi

aliz

e Tr

ustV

isor

App

licat

ion

Star

ts

Reg

iste

r SIn

voke

S: S

SL S

essi

on In

it

S C

ompl

ete:

Ses

sion

act

ive

Unr

egis

ter S

App

licat

ion

Exits

S’s Runtime State Protected

Multiple invocations duringa single registration cycle

Invo

ke S

: SSL

Ses

sion

Init

S C

ompl

ete:

Ses

sion

act

ive

Page 15: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

Micro-TPM Design• Small subset of hardware TPM operations for:

– Protected Storage + External Verification

• TPMs are optimized for cost, not speed• TrustVisor implements critical-path TPM

operations in software on main CPU– Extend, Seal, Unseal, Quote, GetRand– Reduces latency by orders of magnitude

• Trust in Micro-TPM still rooted in hardware TPM• Infrequent TPM operations do not require

virtualization

15

Page 16: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

16

Outline

• Motivation (done)• High-Level Overview (done)• Detailed Description (done)• Prototype: Apache + SSL• Limitations• Summary & Conclusions

Page 17: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

17

Example App: Apache + SSL• Goal: Protect long-term private key KSSL

-1

– Cert revocation is abysmal in practice• Desired properties

– Malware, malicious admin unable to learn KSSL-1

– Externally verifiable configuration• Two sensitive code modules (S)

– S1: Generate and seal the long-term key (rare)– S2: Unseal and use the key during SSL session

establishment (frequent)

Page 18: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

18

200 txns0

0.2

0.4

0.6

0.8

1

Vanilla LinuxTrustVisor onlyTrustVisor + S

Apache + SSL Performance

• ‘ab’ with 10,000 txns / trial, avg 10 trials

Normalized to Vanilla Linux

(higher is better)

Context SwitchingMemoryVirt.

200 Concurrent Transactions

Page 19: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

19

Outline

• Motivation (done)• High-Level Overview (done)• Detailed Description (done)• Prototype: Apache + SSL (done)• Limitations• Summary & Conclusions

Page 20: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

Limitations• Design-level

– Does not currently provide trusted path to user– Requires application awareness

• Prototype-level– No SMP support (currently single CPU)– Only protects KSSL

-1

– Executable code for S must be proactively paged into memory before registration

– AMD-only

20

Page 21: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

Summary & Conclusions

• Tiny hypervisor to support isolation• Externally verifiable via attestation• Frequent TPM operations in software• Compelling performance argument• Requires no OS changes• Conclusions

– Interesting point in the design space– Foundation for future trustworthy systems

21

Page 22: TrustVisor: Efficient TCB Reduction and Attestation Jonathan M. McCune, Yanlin Li, Ning Qu, Zongwei Zhou, Anupam Datta, Virgil Gligor, Adrian Perrig May.

22

Q & A

• Thank you!

[email protected]• http://www.ece.cmu.edu/~jmmccune