Trusted System Elements and Examples CS461/ECE422 Spring - - PowerPoint PPT Presentation

trusted system elements and examples
SMART_READER_LITE
LIVE PREVIEW

Trusted System Elements and Examples CS461/ECE422 Spring - - PowerPoint PPT Presentation

Trusted System Elements and Examples CS461/ECE422 Spring 2012 Reading Material Chapter 10 in the text. Sec@ons 3, 4, and 5 Intel Architectures


slide-1
SLIDE 1

Trusted ¡System ¡Elements ¡and ¡ Examples ¡

CS461/ECE422 ¡ Spring ¡2012 ¡

slide-2
SLIDE 2

Reading ¡Material ¡

  • Chapter ¡10 ¡in ¡the ¡text. ¡ ¡Sec@ons ¡3, ¡4, ¡and ¡5 ¡
  • Intel ¡Architectures ¡SoGware ¡Developer ¡Manuals ¡

– hKp://www.intel.com/content/www/us/en/ processors/architectures-­‑soGware-­‑developer-­‑ manuals.html ¡

  • TCG ¡Specifica@on ¡Architecture ¡Overview ¡

Specifica@on ¡

– hKp://www.trustedcompu@nggroup.org/resources/ tcg_architecture_overview_version_14 ¡ – More ¡details ¡on ¡TPM ¡

slide-3
SLIDE 3

What ¡is ¡a ¡Trusted ¡Computer ¡System? ¡

  • A ¡system ¡that ¡employs ¡sufficient ¡hardware ¡

and ¡soGware ¡assurance ¡mechanisms ¡to ¡allow ¡ its ¡use ¡for ¡simultaneous ¡processing ¡of ¡a ¡range ¡

  • f ¡sensi@ve ¡or ¡classified ¡informa@on. ¡
  • Implements ¡strong ¡security ¡mechanisms ¡

– Effec@ve ¡ – Expressible ¡

  • High ¡assurance ¡implementa@on ¡

– Proof ¡that ¡the ¡system ¡works ¡as ¡adver@sed. ¡

slide-4
SLIDE 4

Reference ¡Monitor ¡

  • Regulates ¡access ¡of ¡subjects ¡to ¡objects ¡

– Access ¡policy ¡in ¡Security ¡Kernel ¡Database ¡

  • Must ¡provide: ¡

– Complete ¡media@on ¡ – Isola@on ¡– ¡no ¡unauthorized ¡modifica@on ¡ – Verifiability ¡– ¡prove ¡correctness ¡of ¡ implementa@on ¡

slide-5
SLIDE 5

Reference ¡Monitor ¡

Reference ¡ Monitor ¡ Security ¡kernel ¡db ¡ Subject: ¡security ¡ clearance ¡ Object: ¡security ¡ classifica@on ¡ Audit ¡ File ¡ Subject ¡ Subject ¡ Subject ¡ Object ¡ Object ¡ Object ¡

slide-6
SLIDE 6

Trusted ¡Compu@ng ¡Base ¡(TCB) ¡

  • TCB ¡contains ¡elements ¡of ¡hardware ¡and ¡

soGware ¡that ¡enforce ¡security ¡

– Reference ¡Monitor ¡ – SoGware/hardware ¡primi@ves ¡that ¡reference ¡ monitor ¡relies ¡on ¡

  • TCB ¡must ¡be ¡tamperproof ¡
  • TCB ¡cannot ¡be ¡circumvented ¡
slide-7
SLIDE 7

Trojan ¡Horse ¡example ¡

  • Thompson ¡Turing ¡award ¡lecture ¡

compile(source) ¡{ ¡ ¡if ¡(match(source, ¡“check_password”)) ¡{ ¡ ¡ ¡ ¡insert(source, ¡A) ¡ ¡ ¡ ¡} ¡ ¡if ¡(match(source, ¡“compile”)) ¡{ ¡ ¡ ¡ ¡insert(source, ¡B); ¡ ¡} ¡ ¡ ¡ ¡... ¡ } ¡

slide-8
SLIDE 8

Memory ¡Protec@on ¡Rings ¡

  • Originally ¡in ¡

Mul@cs ¡

  • In ¡Intel ¡arch ¡

since ¡x386 ¡

slide-9
SLIDE 9

Privilege ¡Levels ¡

  • CPU ¡enforces ¡constraints ¡on ¡memory ¡access ¡and ¡

changes ¡of ¡control ¡between ¡different ¡privilege ¡levels ¡

  • Similar ¡in ¡spirit ¡to ¡Bell-­‑LaPadula ¡access ¡control ¡

restric@ons ¡

  • Hardware ¡enforcement ¡of ¡division ¡between ¡user ¡

mode ¡and ¡kernel ¡mode ¡in ¡opera@ng ¡systems ¡

– Simple ¡malicious ¡code ¡cannot ¡jump ¡into ¡kernel ¡space ¡

slide-10
SLIDE 10

Data ¡Access ¡Rules ¡

  • Access ¡allowed ¡if ¡

– CPL ¡<= ¡DPL ¡and ¡RPL ¡<= ¡DPL ¡

slide-11
SLIDE 11

Data ¡Access ¡Rules ¡

  • Three ¡players ¡

– Code ¡segment ¡has ¡a ¡current ¡privilege ¡level ¡CPL ¡ – Operand ¡segment ¡selector ¡has ¡a ¡requested ¡privilege ¡level ¡ RPL ¡ – Data ¡Segment ¡Descriptor ¡for ¡each ¡memory ¡includes ¡a ¡data ¡ privilege ¡level ¡DPL ¡

  • Segment ¡is ¡loaded ¡if ¡CPL ¡<= ¡DPL ¡and ¡RPL ¡<= ¡DPL ¡ ¡

– i.e. ¡both ¡CPL ¡and ¡RPL ¡are ¡from ¡more ¡privileged ¡rings ¡

slide-12
SLIDE 12

Data ¡Access ¡Examples ¡

slide-13
SLIDE 13

Calling ¡Through ¡Gates ¡

DLP

slide-14
SLIDE 14

Call ¡Gate ¡Access ¡Rules ¡

  • For ¡Call ¡

– CPL ¡<= ¡CG ¡DPL ¡ – RPL ¡<= ¡CG ¡DPL ¡ – Dst ¡CS ¡DPL ¡<= ¡CPL ¡

  • Same ¡for ¡JMP ¡but ¡

– Dst ¡CS ¡DPL ¡== ¡CPL ¡

slide-15
SLIDE 15

Call ¡Gate ¡Examples ¡

slide-16
SLIDE 16

Stack ¡Switching ¡

  • Automa@cally ¡performed ¡when ¡calling ¡more ¡

privileged ¡code ¡

– Prevents ¡less ¡privileged ¡code ¡from ¡passing ¡in ¡short ¡ stack ¡and ¡crashing ¡more ¡privileged ¡code ¡ – Each ¡task ¡has ¡a ¡stack ¡defined ¡for ¡each ¡privilege ¡ level ¡

slide-17
SLIDE 17

Hardware ¡Rings ¡

  • Only ¡most ¡basic ¡features ¡generally ¡used ¡

– 2 ¡rings ¡ – Installed ¡base ¡

  • Time ¡to ¡adop@on ¡

– Must ¡wait ¡for ¡widespread ¡system ¡code, ¡e.g. ¡ Windows ¡NT ¡

slide-18
SLIDE 18

Limi@ng ¡Memory ¡Access ¡Type ¡

  • The ¡Pen@um ¡architecture ¡supports ¡making ¡pages ¡

read/only ¡versus ¡read/write ¡

  • A ¡more ¡recent ¡development ¡is ¡the ¡Execute ¡Disable ¡

Bit ¡(XD-­‑bit) ¡

– Added ¡in ¡2001 ¡ – Supported ¡by ¡Windows ¡XP ¡SP2 ¡

  • Similar ¡func@onality ¡in ¡AMD ¡Altheon ¡64 ¡

– Called ¡No ¡Execute ¡bit ¡(NX-­‑bit) ¡

slide-19
SLIDE 19

Trusted ¡Compu@ng ¡Group ¡

  • Consor@um ¡developing ¡standards ¡for ¡computer ¡

architectures ¡using ¡secure ¡co-­‑processors ¡

– Called ¡the ¡Trusted ¡Plarorm ¡Module ¡(TPM) ¡ – hKp://trustedcompu@nggroup.org ¡

  • Numerous ¡computers ¡(par@cularly ¡laptops) ¡already ¡

ship ¡with ¡TPM’s ¡

– Windows ¡7 ¡uses ¡TPM ¡for ¡bitlocker. ¡ ¡Secure ¡boo@ng? ¡ – Many ¡vendors ¡targe@ng ¡specific ¡enterprises ¡like ¡Health ¡ Care ¡that ¡are ¡par@cularly ¡concerned ¡with ¡privacy ¡(due ¡to ¡ HIPAA) ¡

slide-20
SLIDE 20

TPM ¡Basics ¡

  • TPM ¡stores ¡a ¡number ¡of ¡key ¡pairs ¡

– Private ¡Endorsement ¡Key ¡(EK) ¡encoded ¡at ¡@me ¡of ¡ manufacturing ¡ – Manufacturer ¡signs ¡Endorsement ¡cer@ficate. ¡

  • TPM ¡has ¡some ¡protected ¡storage ¡

– Plarorm ¡Configura@on ¡Registers ¡(PCRs) ¡

  • TPM ¡can ¡be ¡used ¡to ¡boot ¡strap ¡security ¡locally ¡
  • TPM ¡can ¡respond ¡to ¡remote ¡requests ¡for ¡system ¡

data ¡

– E.g. ¡what ¡version ¡of ¡libraries ¡is ¡the ¡system ¡running ¡

slide-21
SLIDE 21

TPM ¡Layout ¡

slide-22
SLIDE 22

Root ¡of ¡Trust ¡for ¡Storage ¡(RTS) ¡

slide-23
SLIDE 23

TPM ¡Protected ¡Message ¡Exchanges ¡

  • Binding ¡– ¡Encryp@ng ¡using ¡public ¡key ¡

– If ¡using ¡non-­‑migratable ¡key ¡value ¡is ¡bound ¡to ¡TPM ¡

  • Signing ¡– ¡Using ¡the ¡private ¡key ¡

– Some ¡keys ¡are ¡indicated ¡as ¡signing ¡only ¡keys ¡

  • Sealing ¡– ¡Binding ¡a ¡message ¡with ¡set ¡of ¡plarorm ¡

metrics ¡(expressed ¡in ¡PCRs) ¡

– So ¡can ¡only ¡unseal ¡values ¡when ¡the ¡plarorm ¡metrics ¡ match ¡

  • Sealed-­‑signing ¡– ¡Have ¡a ¡signature ¡also ¡be ¡con@ngent ¡
  • n ¡PCR ¡values ¡

¡

slide-24
SLIDE 24

TPM ¡Supported ¡Disk ¡Encryp@on ¡

  • Used ¡by ¡Bitlocker ¡in ¡Windows ¡7 ¡

– hKp://windows.microsoG.com/en-­‑US/windows-­‑vista/ BitLocker-­‑Drive-­‑Encryp@on-­‑Overview ¡

  • TPM ¡creates ¡a ¡symmetric ¡key ¡

– Seals ¡key ¡ – Will ¡only ¡unseal ¡key ¡if ¡the ¡specified ¡system ¡ components ¡match ¡the ¡values ¡sealed ¡with ¡the ¡key ¡

  • Moving ¡disk ¡to ¡another ¡system ¡will ¡fail ¡

– Key ¡can ¡only ¡be ¡decrypted ¡by ¡TPM ¡on ¡original ¡system ¡

slide-25
SLIDE 25

TPM ¡Architecture ¡Overview ¡

slide-26
SLIDE 26

AKesta@on ¡in ¡Boo@ng ¡

  • TPM ¡leverages ¡trusted ¡building ¡blocks ¡(as ¡

shown ¡in ¡bold ¡in ¡previous ¡diagram) ¡

– CRTM ¡== ¡Core ¡root ¡of ¡trust ¡for ¡measurement ¡

  • TPM ¡signs ¡system ¡state ¡using ¡an ¡AKesta@on ¡

Iden@ty ¡Key ¡(AIK) ¡

  • CRTM ¡verifies ¡integrity ¡of ¡next ¡level ¡boot ¡code ¡

before ¡proceeding ¡

– Induc@vely ¡each ¡level ¡verifies ¡the ¡next ¡higher ¡level ¡

slide-27
SLIDE 27

Transi@ve ¡Trust ¡

slide-28
SLIDE 28

Cer@fica@on ¡Services ¡

  • Measurement ¡values ¡

– Representa@on ¡of ¡data ¡or ¡program ¡code ¡ – Can ¡be ¡stored ¡anywhere ¡

  • Measurement ¡digests ¡

– Hash ¡of ¡the ¡measurement ¡values ¡ – Stored ¡in ¡the ¡TPM ¡ – Fixed ¡number ¡of ¡Plarorm ¡Configura@on ¡Registers ¡(PCRs) ¡

slide-29
SLIDE 29

Integrity ¡Repor@ng ¡

  • Two ¡purposes ¡

– Expose ¡shielded ¡loca@ons ¡for ¡storage ¡of ¡integrity ¡ measurements ¡

  • Means ¡to ¡manipulate ¡PCR’s ¡

– AKest ¡to ¡the ¡authen@city ¡of ¡stored ¡values ¡based ¡

  • n ¡trusted ¡plarorm ¡iden@@es ¡
  • Integrity ¡reports ¡signed ¡by ¡AKesta@on ¡Iden@ty ¡Keys ¡

(AIK) ¡

  • AIK ¡is ¡associated ¡with ¡par@cular ¡TPM ¡
slide-30
SLIDE 30

Example ¡Repor@ng ¡Protocol ¡

slide-31
SLIDE 31

Usage ¡Scenarios ¡

  • Store ¡root ¡secrets ¡in ¡secure ¡co-­‑processor ¡
  • In ¡an ¡enterprise, ¡IT ¡group ¡is ¡responsible ¡for ¡machine ¡

admin ¡

– They ¡set ¡up ¡the ¡TPM ¡ – End ¡user ¡cannot ¡muck ¡with ¡TPM ¡even ¡if ¡they ¡are ¡root ¡on ¡ the ¡machine ¡

  • Ensure ¡plarorm ¡is ¡in ¡par@cular ¡configura@on ¡

– Verify ¡the ¡digest ¡values ¡of ¡SML ¡of ¡configura@ons ¡of ¡ interest ¡ ¡

slide-32
SLIDE 32

Digital ¡Rights ¡Management ¡(DRM) ¡

  • One ¡scenario ¡concerns ¡protec@ng ¡data ¡from ¡the ¡user ¡

for ¡the ¡vendor ¡

– Alice ¡buys ¡a ¡song ¡from ¡Recording ¡Company ¡ – License ¡agreement ¡says ¡that ¡Alice ¡buys ¡song ¡for ¡personal ¡ use ¡ – Trivial ¡for ¡Alice ¡to ¡share ¡song ¡with ¡10,000 ¡of ¡her ¡closest ¡ friends ¡ – Hard ¡for ¡Recording ¡Company ¡to ¡track ¡

  • Want ¡to ¡protect ¡their ¡assets ¡
  • Can ¡use ¡specialized ¡players, ¡as ¡in ¡Sony’s ¡recent ¡rootkit ¡problems ¡
slide-33
SLIDE 33

Using ¡TPM ¡for ¡DRM ¡

  • Alice ¡registers ¡with ¡Record ¡Company ¡for ¡the ¡ability ¡to ¡play ¡

their ¡songs ¡

– Record ¡Company ¡sends ¡her ¡cer@ficate ¡to ¡store ¡on ¡in ¡her ¡TPM ¡and ¡a ¡ player ¡to ¡install ¡ – On ¡boot, ¡TPM ¡verifies ¡that ¡player ¡has ¡not ¡been ¡changed ¡

  • Alice ¡buys ¡a ¡song ¡from ¡Record ¡Company ¡

– Song ¡is ¡sealed ¡to ¡the ¡“correct” ¡player ¡configura@on ¡on ¡Alice’s ¡ computer ¡

  • To ¡play ¡song ¡

– Player ¡passes ¡sealed ¡blob ¡to ¡TPM ¡ – TPM ¡detects ¡that ¡it ¡is ¡invoked ¡from ¡legal ¡player ¡ – TPM ¡decrypts ¡if ¡sealed ¡PCR ¡values ¡match ¡ – Player ¡plays ¡it ¡ – No ¡unauthorized ¡program ¡can ¡decrypt ¡song ¡

slide-34
SLIDE 34

Limita@ons ¡of ¡TPM ¡for ¡DRM ¡

  • Even ¡if ¡no ¡other ¡program ¡can ¡spoof ¡player ¡in ¡TPM ¡

interac@ons ¡

– Root ¡user ¡can ¡use ¡program ¡debugger ¡to ¡access ¡decrypted ¡ program ¡in ¡memory ¡ – Then ¡may ¡copy ¡unencrypted ¡copy ¡for ¡use ¡outside ¡player ¡

  • Could ¡use ¡more ¡stringent ¡OS ¡mechanisms ¡

– May ¡s@ll ¡be ¡circumvented, ¡esp. ¡with ¡physical ¡access ¡

slide-35
SLIDE 35

Summary ¡

  • Trusted ¡System ¡a ¡kind ¡of ¡fuzzy ¡concept ¡

– Some ¡common ¡mechanisms ¡ – High ¡assurance ¡

  • Reference ¡Monitor ¡
  • Mul@level ¡System ¡
  • Hardware ¡support ¡

– Memory ¡protec@on ¡rings ¡ – TPM ¡