authenticated booting, remote attestation, sealed memory ... › studium › dos › ss2009 ›...

44
Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing” Hermann Härtig Technische Universität Dresden Summer Semester 2009

Upload: others

Post on 26-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Authenticated Booting, Remote Attestation,

Sealed Memoryaka “Trusted Computing”

Hermann Härtig

Technische Universität Dresden

Summer Semester 2009

Page 2: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 2

Goals

Understand principles of:

• authenticated booting

• the difference to (closed) secure booting

• remote attestation

• sealed memory

Non-Goal:lots of TPM, TCG-Spec details→ read the documents once needed

Page 3: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 3

Some terms

Secure Booting

Authenticated Booting

(Remote) Attestation

Sealed Memory

Late launch / dynamic root of trust

Trusted Computing

Trusted Computing Base

Attention:

terminology has changed ...

Page 4: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 4

Trusted Computing (Base)

Trusted Computing Base (TCB)The set of all components, hardware, software, procedures, that must be relied upon to enforce a security policy

Trusted Computing (TC)A particular technology comprised ofauthenticated booting, remote attestation and sealed memory

Page 5: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 5

TC key problems

• Can running certain SW be prevented ?

• Which computer system do I communicate with ?

• Which stack of Software is running ?

• in front of me ?

• on my server somewhere ?

• Can I restrict access to certain secrets (keys) to certain programs ?

Page 6: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 6

Trusted Computing Terminology

Measuring

“process of obtaining metrics of platform characteristics”

Example for metric: Hash- Codes of SW

Attestation

“vouching for accuracy of information”

Sealed Memory

binding information to a configuration

Page 7: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 7

DRM: Trust ./. No Trust in end user

Decoder

{Digital Content}K

K

Internet

TV

Page 8: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 8

An Example Application: DRM

• „Digital Content“ is encrypted using symmetric key

• Smart- Card

• contains key

• authenticates device

• delivers key only after successful authentication

• Assumptions

• Smart Card can protect the key

• „allowed“ OS can protect the key

• OS cannot be exchanged

Page 9: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 9

Secure Booting / Authenticated Booting

Hardware

Linux

X11

Appl

GUI

DRM

Mini OS

Page 10: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 10

Notation

SKpriv Skpub Asymmetric key pair of some entity S

• { M }Skpriv Digital Signature for message M using the private key of signer S

{ M }Skpub Message encrypted using public concellation key of S

• H(M) Collision-Resistant Hash Function

• Certificate by authority Ca:

{ ID, SKpub , other properties } CaKpriv

Page 11: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 11

Notation

Note:

• “{ M }Skpriv Digital Signature” is short for:

encrypt(H(M),Skpriv)

• “{ M }Skpub Message concealed ...”

does not necessarily imply public key encryption for all of M (rather a combination of symmetric and asymmetric methods

Page 12: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 12

Identification of Software

Program vendor: Foosoft FS

Two ways to identify Software:

• H(Program)

• {Program, ID- Program}FSKpriv

use FSKpub to checkthe signature must be made available, e.g. shipped with the Program

The „ID” of SW must be made available somehow.

Page 13: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 13

Tamperresistant black box (TRB)

Platform Configuration Registers:

Non-Volatile Memory:CPU

Memory

Page 14: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 14

Ways to “burn in” the OS or secure booting

• Read- Only Memory

• Allowed H(OS) in NV memory preset by manufacturer

• load OS- Code

• compare H(loaded OS code) to preset H(OS)

• abort if different

• Preset FSKpub in NV memory preset by manufacturer

• load OS- Code

• check signature of loaded OS-Code using FSKpub

• abort if check fails

Page 15: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 15

Authenticated Booting (AB)

Phases:

• Preparation by Manufacturers (TRB and OS)

• Booting & “Measuring”

• Remote attestation

Page 16: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 16

Authenticated Booting (AB)

Platform Configuration Registers:Hash-Code obtained during boot

Non-Volatile Memory:“Endorsement Key” EKpreset by Manufacturer

CPU

Memory

Page 17: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 17

Vendors of TRB and OS

TRB generates key pair: „Endorsement Key“ (EK)

stores in TRB NV Memory: EKpriv

emits: EKpub

TRB vendor certifies: {“a valid EK”, EKpub}TVKpriv

OS-Vendor certifies:{„a valid OS“, H(OS)}OSVKpriv

serve as identifiers: EKpub and H(OS)

Page 18: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 18

Booting & Attestation

Booting:

TRB “measures” OS- Code (computes H(OS-Code))

stores in PCR

no other way to write PCR

Attestation:

Challenge: nonce

TRB generates Response:

{PCR, nonce' }EKpriv

Page 19: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 19

Remaining problems

Now we know identities: H(loaded-OS) and EKpub

Problems to solve:

• OS versioning

• Remote attestation on each message (what about reboot ?)

• not only “OS” on platform (SW stacks or trees)

• Privacy: remote attestation always reveals EKpub

• Black box to big

• Sealed memory

Page 20: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 20

AB (Variant 2, allow OS versions)

Platform Configuration Registers:

OSKpub used to check OS

Non-Volatile Memory:“Endorsement Key” EKpreset by Manufacturer

CPU

Memory

Page 21: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 21

Vendors of TRB and OS

TRB generates key pair:

stores in TRB NV Memory: EKpriv

emits: EKpub

TRB vendor certifies: {“a valid EK”, EKpub}TVKpriv

OS-Vendor certifies:{„a valid OS“, OSKpub}OSVKpriv

and signs OS-Code: {OS-Code}OSKpriv

serve as identifiers: EKpub and OSKpub

Page 22: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 22

Booting & Attestation (Variant 2)

Booting:

TRB checks OS- Code using some OSKpub

stores OSKpub in PCR

no other way to write PCR

Attestation:

Challenge: nonce

TRB generates Response:

{PCR, nonce' }EKpriv

Page 23: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 23

AB (Variant 3, check for reboot)

attestation required at each request:

{PCR, nonce' }EKpriv

PCR: H(OS) bzw. OSKpub

always requires access to and usage of EK

race condition!

Instead:

create new keypair on every reboot:

OSrunningAuthKpriv OSrunningAuthKpub

Page 24: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 24

Booting (Variant 3)

Booting:

TRB checks OS- Code using some OSKpub

stores OSKpub in PCR

creates OSrunningAuthK keypair

certifies: { OSrunningAuthKpub, H(OS)}EKpriv

Page 25: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 25

Attestation (Variant 3)

Attestation:

Challenge: nonce

OS generates response:

{ OSrunningAuthKpub, H(OS)}EKpriv

{nonce} OsrunningAuthKpriv

Page 26: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 26

Establish Secure Channel to OSRunning

Booting:TRB checks OS- Code using some OSKpub

stores OSKpub in PCR

creates OSrunningAuthK keypair

creates OSrunningConsK keypair

certifies: { OSrunningAuthKpub, OSrunningConsKpub,H(OS)}EKpriv

Secure Channel:

{ message } OSrunningConsKpub

Page 27: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 27

Assumptions

• TRB can protect: EK, PCR

• OS can protect: OSrunningKpriv

• Rebooting destroys content of

• PCR and Memory Holding OSrunningKpriv

Page 28: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 28

Software stacks and trees

ROOT

OS Loader

OS Code

GUI

Application

ROOT

OS Loader

OS Code

GUI

Application

GUI

Application

Page 29: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 29

Software stacks and trees

• “Extend” Operation

• stack: PCRn = H(PCR

n-1 || next-component )

• tree: difficult (unpublished ?)

• Key pairs:

• OS controls applications -> generate key pair per application

• OS certifies{ Application 1, App1Kpub

} OSrunningKpriv

{ Application 2, App2Kpub } OSrunningKpriv

Page 30: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 30

Remote Attestation and Privacy

• Remote attestation reveals platform identity: EKpub

• add intermediate step:

• Attestation Identity Key (AIK)

• Trusted third party as anonymizer (TTP)

Page 31: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 31

Remote Attestation and Privacy

Platform Configuration Registers:

Non-Volatile Memory:EK preset by ManufacturerAIK signed by third party

CPU

Memory

Page 32: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 32

Remote Attestation and Privacy

• Generate AIK in TRB

• send { AIK } EKpriv to trusted third party

• third party certifies: {AIK, “good ID” } TTPKpriv

• AIK used instead of EK during remote attestation, response:

{AIK, “good ID” } TTPKpriv

{ OSrunningKpub, H(OS)}AIKpriv

{nonce} OSrunningKpriv

Page 33: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 33

Late Launch

• Use arbitrary SW to start system and load all SW

• provide specific instruction to enter “secure mode”

• - set HW in specific state (stop all processors, IO, ...)

• - Measure “root of trust” SW

• - store measurement in PCR

• AMD: “skinit” (Hash) arbitrary root of trust

• Intel: “senter” (must be signed by chip set manufacturer)

Page 34: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 34

Sealed Memory

• Bind sensitive information to specific configuration (for example: keys to specific machine, specific OS)

• Provide information using secure channels

• How to store information in the absence of communication channels?

Page 35: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 35

Tamperresistant black box (TRB)

CPU

Memory Platform Configuration Registers:“SW-CONFIG”

Non-Volatile Memory:storage key

Page 36: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 36

Sealed Memory

Tamperresistant black box

Microsoft

SUSE

add/delete entry read write

MyOwn

PCR:H(OS)

Page 37: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 37

Sealed Memory

• Seal(PCR, message):

• encrypt( “PCR, message”, Storage-Key)

• Seal(SW config, message):

• encrypt( “SW config, message”, Storage-Key)

• Unseal(sealed message):

• decrypt( “sealed message”, Storage-Key) -> “SW config, message”

• If SW config == PCR then emit message else abort

Page 38: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 38

Migration ?

• How to transfer information form one TRB to another

• for example: key for decryption of videos

• Send information to third party

• Destroy information locally and prove to third party

• Thirds party provides information to another entity

Page 39: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 39

Tamper Resistant Box ?

Ideally, includes CPU, Memory, …

• In practise: very rarely, for example IBM 4758 ...

• In practise:separate “Trusted Platform Modules”replacing BIOS breaks TRB

Page 40: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 40

TCG PC Platforms

memoryCPU

BIOS TPM

FSB

PCI

LPC

Page 41: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 41

TPM

IO

NVStore

PCREKAIK

InternalProgram

Randomnumber gen

Keygen

RSASHA-1

Page 42: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 42

Usage Scenarios and Technical Risks

Operating System

DRM Bank Game*

Page 43: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 43

Technical Risks

Hardware:

• Authenticity, Integrity, Tamper-Resistance

• Protection of CPU-privIntegrity of RKey-OS-pub

Operating System

• Protection of keys (OSRunning, ...), Content, ...

• Isolation Applications

• Assurance

Side Channels !

Page 44: Authenticated Booting, Remote Attestation, Sealed Memory ... › Studium › DOS › SS2009 › 02... · Authenticated Booting, Remote Attestation, Sealed Memory aka “Trusted Computing”

Copyright: Hermann Härtig, TU Dresden Distributed OS SS 2009 Authenticated Booting, 44

References

• Specifications:

• https://www.trustedcomputinggroup.org/groups/TCG_1_3_Architecture_Overview.pdf

• Important Foundational Paper:

• Authentication in distributed systems: theory and practice

• Butler Lampson, Martin Abadi, Michael Burrows, Edward Wobber

• ACM Transactions on Computer Systems (TOCS)