GENERIC TRUSTED COMPONENT BRUNO VAVALA CMU / UL Nuno Neves Peter - - PowerPoint PPT Presentation

generic trusted component
SMART_READER_LITE
LIVE PREVIEW

GENERIC TRUSTED COMPONENT BRUNO VAVALA CMU / UL Nuno Neves Peter - - PowerPoint PPT Presentation

SECURE IDENTIFICATION of ACTIVELY EXECUTED CODE on a GENERIC TRUSTED COMPONENT BRUNO VAVALA CMU / UL Nuno Neves Peter Steenkiste UL CMU IEEE/IFIP Conference on Dependable Systems & Networks (DSN16) outline Trusted Practical


slide-1
SLIDE 1

SECURE IDENTIFICATION of ACTIVELY EXECUTED CODE on a GENERIC TRUSTED COMPONENT

Nuno Neves

UL IEEE/IFIP Conference on Dependable Systems & Networks (DSN’16)

BRUNO VAVALA

CMU / UL

Peter Steenkiste

CMU

slide-2
SLIDE 2
  • utline

Problem definition Identifying Actively Executed Code Practical Analysis Conclusions

Trusted Executions: trends & tradeoffs

slide-3
SLIDE 3

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Anatomy of a Trusted Execution

3

Execute

client untrusted third party

slide-4
SLIDE 4

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

secure environment

Anatomy of a Trusted Execution

Load & Identify Outsource Execute Attest Verify

untrusted third party client

4

slide-5
SLIDE 5

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

secure environment

Anatomy of a Trusted Execution

Load & Identify Outsource Execute Attest V erify

untrusted third party client

5

  • Code must have an ID (i.e. hash)
  • Trusted hardware computes ID
  • Hardware attests the ID
  • Client trusts hardware & ID
slide-6
SLIDE 6

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Generic TCC Interface

  • execute
  • code loading + identification + isolated execution
  • attest
  • TCC-signed code identity and I/O data
  • auth_put
  • secure storage for a specific recipient 


(TCC authenticates the sender)

  • auth_get
  • secure storage from a specific sender 


(TCC authenticates the recipient)

  • verify


6

UTP-side client-side

Implementable with:

  • Intel TXT + TPM
  • Hypervisor-based TCC
  • Intel SGX
slide-7
SLIDE 7

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Trends

7

Reduced TCB On-demand execution Improved efficiency Richer services in TCB +security +efficiency Now

timeline

Static Root of Trust: a system is able to boot in a verifiable trusted state. [2004] TOCTOU Problem: static measurements do not reflect later changes. [2005-] Dynamic Root

  • f Trust: build

a new robust and verifiable chain of trust

  • n demand.

[2008] Fast Trusted Computing: combine slow trusted chips with software

  • n main CPU.

[2010-] Large Trusted Executions: implement large services in the trusted environment. [2011-]

slide-8
SLIDE 8

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Security/Efficiency Tradeoff 
 for Large-Scale Services

8

identify-once- execute-once

?

identify-once- execute-forever

security efficiency

high high low

slide-9
SLIDE 9

Trusted Executions: trends & tradeoffs

  • utline

Identifying Actively Executed Code Practical Analysis Conclusions Problem definition

slide-10
SLIDE 10

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Code Identity

10

/* SQLite code */ int main () { switch(op) { case SELECT: do_select(); case DELETE: do_delete(); case INSERT: do_insert(); . . case FOOBAR: do_foobar(); }

1 0 1 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 1 1 0 1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 1 0 1 1 1 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 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1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Execution Verification

11

VERIFIES VOUCHES FOR

executed code attested identity client

SQLite

slide-12
SLIDE 12

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Identified ≠ Executed

12

identified binary code

1 0 1 0 1 0 1 1 1 0 1 0 0 1 0 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 0 1 0 1 0 0 1 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 1 0 1 0 0 0 1 0 1 1 1 0 1 0 1 1 1 1 0 1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 1 0 1 1 1 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 1 0 1 0 0 1 0 0 0 1 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 1 1 0 1 1 0 1 0 0 0 0 1 0 1 1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 1 1 1 0 1 0 0 1 0 0 0 1 0 0 1 0 1 0 0 1 0 1 1 1 1 1 0 1 1 0 0 0 1 1 1 0 1 1 1 1 0 1 1 1 1 0 1 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 1 0 1 1 0 1 0 0 1 1 1 1 1 1 0 1 0 0 0 1 1 0 0 1 0 0 1 0 1 0 1 1 0 0 1 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 1 0 0 1 0 0 0 1 0 0 1 0 1 1 0 0 1 0 1 0 1 1 0 1 0 0 1 0 0 1 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 0 1 0 1 1 0 1 0 1 1 0 1 0 0 1 0 0 0 1 1 0 0 1 1 0 1 0 1 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 0 1 0 0 1 1 1 0 0 1 1 1 0 1 0 0 1 0 0 1 0 0 0 1 1 1 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 0 0 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 1 1 1

actually executed binary code

slide-13
SLIDE 13

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Desirable Properties

  • Identifying what is “actually” executed
  • TCC agnostic execution
  • Keeping efficient client-side verification

13

slide-14
SLIDE 14

Trusted Executions: trends & tradeoffs

  • utline

Problem definition Practical Analysis Conclusions Identifying Actively Executed Code

slide-15
SLIDE 15

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Trusted Environment

Model

15

hardware OS TCC untrusted services

  • OS and services are untrusted
  • Client knows service identity and TCC certificate

trusted service TPM/SGX

slide-16
SLIDE 16

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Enriching the Interface

  • execute
  • code loading + identification + isolated execution
  • attest
  • TCC-signed code identity and I/O data
  • auth-put
  • secure storage for a specific recipient 


(TCC authenticates the sender)

  • auth-get
  • secure storage from a specific sender 


(TCC authenticates the recipient)

  • verify


16

UTP-side client-side

Implementable with:

  • Intel TXT + TPM
  • Hypervisor-based TCC
  • Intel SGX
slide-17
SLIDE 17

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

One ID Per Code Module

17

/* SQLite code */ int main () { switch(op) { case SELECT: do_select(); case DELETE: do_delete(); case INSERT: do_insert(); . . case FOOBAR: do_foobar(); }

select delete insert foobar

slide-18
SLIDE 18

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

18

A B C

hardware OS TCC A B C A B C

code base

  • Execution flows: A-to-B, A-to-C
  • If C must be executed, then B is not loaded
slide-19
SLIDE 19

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

19

A B C

hardware OS TCC A B C A B C

code base

input, ID’s Tab

slide-20
SLIDE 20

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

20

A B C

hardware OS TCC A B C A B C

code base

input, ID’s Tab

slide-21
SLIDE 21

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

21

A B C

hardware OS TCC A B C A B C

code base

  • int. results,

ID’s Tab

slide-22
SLIDE 22

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

22

A B C

hardware OS TCC A B C A B C

code base

1.id(A) 2.id(B) 3.id(C)

identity table

secure channel

  • int. results,

ID’s Tab

slide-23
SLIDE 23

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

23

A B C

hardware OS TCC A B C A B C

code base

  • int. results,

ID’s Tab

A —>C

slide-24
SLIDE 24

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

24

A B C

hardware OS TCC A B C A B C

code base

  • int. results,

ID’s Tab

A —>C

slide-25
SLIDE 25

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

25

A B C

hardware OS TCC A B C A B C

code base

  • int. results,

ID’s Tab

A —>C

slide-26
SLIDE 26

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

26

A B C

hardware OS TCC A B C A B C

code base

  • int. results,

ID’s Tab

A —>C

1.id(A) 2.id(B) 3.id(C)

identity table

secure channel

slide-27
SLIDE 27

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

27

A B C

hardware OS TCC A B C A B C

code base

  • int. results,

ID’s Tab

slide-28
SLIDE 28

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

28

A B C

hardware OS TCC A B C A B C

code base

  • utput

ID’s Tab

attested

slide-29
SLIDE 29

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

29

A B C

hardware OS TCC A B C A B C

code base

  • utput

ID’s Tab

attested

slide-30
SLIDE 30

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

30

hardware OS TCC A B C

  • utput

ID’s Tab

attested

slide-31
SLIDE 31

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Execution Protocol

31

hardware OS TCC A B C

  • utput

ID’s Tab

slide-32
SLIDE 32

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Solved Challenges for General Executions

  • 1. Client/Verifier does not verify intermediate results
  • Results are secured locally
  • 2. Client does not verify execution flow
  • Verification of last module & ID’s Table implies correct execution flow
  • 3. Build mutually authenticated secure channels
  • Using TCC-based secure storage
  • 4. Fast (zero round) identity-based key sharing
  • Construction: 1 hash using sender-receiver identity pairs


(see paper for details)

  • 5. Avoid hash loops in general executions
  • Detach identity from code module using the ID’s Table

32

slide-33
SLIDE 33

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

  • General execution may have loops

33

A B C

A B C

code base

  • 5. Avoiding Hash Loops
slide-34
SLIDE 34

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

  • General execution may have loops

34

A B C

A B C

code base

A

ID(C)

C

ID(A)

problem

(hash loop)

  • 5. Avoiding Hash Loops
slide-35
SLIDE 35

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

  • 5. Avoiding Hash Loops
  • General execution may have loops

35

A B C

A B C

code base

A

ID(C)

C

ID(A)

1.id(A) 2.id(B) 3.id(C)

identity table

problem

(hash loop)

solution

(ID’s in input table)

A

next: 3

C

next: 1

slide-36
SLIDE 36

Trusted Executions: trends & tradeoffs

  • utline

Problem definition Identifying Actively Executed Code Conclusions Practical Analysis

slide-37
SLIDE 37

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Practical Analysis

  • Hypervisor-based TCC Implementation
  • Protocol applied to a real-world service (SQLite)
  • End-To-End experiments on server cluster

37

slide-38
SLIDE 38

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Code Size

  • SQLite (full implementation) is ~1MB
  • 5-10x reduction of used code 


for single operation
 (PAL = Piece of Application Logic)

38

300 600 900 1200

PAL0 PALSEL PALINS PALDEL PALSQLITE Code Size (kilobytes)

monolithic SQLite (baseline) multi-PAL SQLite

12 135 90 155 1085 300 600 900 1200

PAL0 PALSEL PALINS PALDEL PALSQLITE Code Size (kilobytes)

monolithic SQLite (baseline) multi-PAL SQLite

12 135 90 155 1085

slide-39
SLIDE 39

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

End-to-End Evaluation

39

  • Same critical path, different code identification
  • Monolithic SQLite is up 46% slower


(w/ attestation)

30 60 90 120 150

Insert Delete Select Time (milliseconds)

monolithic SQLite (baseline) multi-PAL SQLite

90 106 96 132 134 127

W/ Attestation

slide-40
SLIDE 40

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

End-to-End Evaluation

40 20 40 60 80

Insert Delete Select Time (milliseconds)

monolithic SQLite (baseline) multi-PAL SQLite

35 47 41 75 77 71

W/O Attestation

  • Multi-PAL SQLite up to 2x faster


(w/o attestation)

slide-41
SLIDE 41

Trusted Executions: trends & tradeoffs

  • utline

Problem definition Identifying Actively Executed Code Practical Analysis Conclusions

slide-42
SLIDE 42

/ 42 Bruno Vavala - IEEE/IFIP DSN'16

Real-World Service

Conclusions

  • Code identification has security/efficiency tradeoffs
  • Identification of just actively executed code can:
  • provide fresher integrity guarantees
  • improved resource usage & performance
  • be done retrofitting existing trusted components

42

Generic Trusted Component

Our Solution

slide-43
SLIDE 43

Nuno Neves

UL IEEE/IFIP Conference on Dependable Systems & Networks (DSN’16)

BRUNO VAVALA

CMU/UL

Peter Steenkiste

CMU

t h a n k s

slide-44
SLIDE 44

blank

slide-45
SLIDE 45

blank

slide-46
SLIDE 46

backup slides

slide-47
SLIDE 47

/ 42 Bruno Vavala - IEEE/IFIP DSN'16 47

  • Identity Dependent keys
  • Sender specifies recipient’s identity to TCC
  • Recipient specifies sender’s identity to TCC
  • Very efficient construction (one hash per-key)

Efficient Mutually- Authenticated Channels

A C

Untrusted environment (OS+other applications) TCC

  • 4. get KAC

auth data

  • 2. release data
  • 3. retrieve data
  • 1. get KAC

MAC data