6.888 Secure Hardware Design Mengjia Yan Fall 2020 Todays Agenda - - PowerPoint PPT Presentation

6 888 secure hardware design
SMART_READER_LITE
LIVE PREVIEW

6.888 Secure Hardware Design Mengjia Yan Fall 2020 Todays Agenda - - PowerPoint PPT Presentation

6.888 Secure Hardware Design Mengjia Yan Fall 2020 Todays Agenda Introduce yourself Logistics Course Overview 6.888 - L1 Introduction 2 Introduce Yourself Course Logistics Basic Administrivia Website: Instructor:


slide-1
SLIDE 1

6.888 Secure Hardware Design

Mengjia Yan Fall 2020

slide-2
SLIDE 2

Today’s Agenda

  • Introduce yourself
  • Logistics
  • Course Overview

6.888 - L1 Introduction 2

slide-3
SLIDE 3

Introduce Yourself

slide-4
SLIDE 4

Course Logistics

slide-5
SLIDE 5

Basic Administrivia

  • Instructor:
  • Mengjia Yan <mengjia@csail.mit.edu>
  • TA:
  • Miles Dai <milesdai@mit.edu>
  • Mailing List:
  • 6888-fa20-staff@csail.mit.edu
  • Website:

http://csg.csail.mit.edu/6.888Yan/

  • Paper readings
  • Syllabus
  • Assignments
  • Piazza:
  • Announcements
  • Discussions
  • HotCRP: Submit paper reviews
  • Canvas: Submit project proposals &

reports

6.888 - L1 Introduction 5

slide-6
SLIDE 6

Course Website

6.888 - L1 Introduction 6

slide-7
SLIDE 7

Pre-requisites and Recommendation

  • Pre-requisite:
  • Basic computation structure course (6.004)
  • Recommended but not required
  • System security and software security courses (6.858, 6.857)
  • Advanced computer architecture course (6.823)
  • Basic applied cryptography (6.875)

6.888 - L1 Logistics 7

slide-8
SLIDE 8

Assignments and Grading

  • Paper reviews (2 papers/week) - 25%
  • 500 word summary + 1-2 discussion questions
  • Seminars - 15%
  • Discussion lead for 1-2 papers - 10%
  • Participation - 5%
  • Lab assignments - 15%
  • Research project - 50%
  • Proposal – 10%
  • Weekly report + Checkpoint – 10%
  • Final report – 15%
  • Final presentation – 15%

6.888 - L1 Logistics 8

slide-9
SLIDE 9

Seminar Format

  • Every student will write a review for each paper
  • 500 word summary, comments on pros and cons, and key takeaways
  • 1-2 discussion questions
  • Due @midnight before each class
  • Submit via HotCRP (visible after the due time)
  • Each paper will have one student as the lead presenter
  • ~45 min presentation: A good opportunity to practice presentation skills
  • Send slides to me 24 hours before the lecture
  • Design a poll question
  • I may invite the authors of the paper to attend the presentation (opportunities to ask

questions that only the authors can answer)

6.888 - L1 Logistics 9

slide-10
SLIDE 10

Presentation Format

  • Background and Motivation
  • Threat Model
  • Key technical ideas (insights), main contributions
  • Strengths/Weaknesses
  • Directions for future work
  • Several questions for discussion

6.888 - L1 Introduction 10

slide-11
SLIDE 11

Lab Assignments (3.5 weeks)

  • Team of 2 persons

1) Dead drop: Build a communication channel via hardware resource contention 2) Capture the flag: Steal a secret via hardware resource contention

  • Opportunities to turn into final projects

6.888 - L1 Logistics 11

slide-12
SLIDE 12

Dead Drop

  • Communicate via hardware resource contention

6.888 - L1 Logistics 12

slide-13
SLIDE 13

Dead Drop

  • Communicate via hardware resource contention

6.888 - L1 Logistics 12

Cache #ways #sets

slide-14
SLIDE 14

Dead Drop

  • Communicate via hardware resource contention

6.888 - L1 Logistics 12

Cache #ways #sets Sender Receiver

slide-15
SLIDE 15

Dead Drop

  • Communicate via hardware resource contention

6.888 - L1 Logistics 12

Cache #ways #sets Sender Receiver if (send “1”): fill the cache else: idle

slide-16
SLIDE 16

Dead Drop

  • Communicate via hardware resource contention

6.888 - L1 Logistics 12

Cache #ways #sets Sender Receiver if (send “1”): fill the cache else: idle T = time(access cache) if (T > Threshold): receive “1” else: receive “0”

slide-17
SLIDE 17

Dead Drop

  • Communicate via hardware resource contention

6.888 - L1 Logistics 12

Cache #ways #sets Sender Receiver if (send “1”): fill the cache else: idle T = time(access cache) if (T > Threshold): receive “1” else: receive “0”

slide-18
SLIDE 18

Dead Drop

  • Communicate via hardware resource contention

6.888 - L1 Logistics 12

Cache #ways #sets Sender Receiver if (send “1”): fill the cache else: idle T = time(access cache) if (T > Threshold): receive “1” else: receive “0”

slide-19
SLIDE 19

Dead Drop

  • Communicate via hardware resource contention

6.888 - L1 Logistics 12

Cache #ways #sets Sender Receiver if (send “1”): fill the cache else: idle T = time(access cache) if (T > Threshold): receive “1” else: receive “0”

slide-20
SLIDE 20

Dead Drop

  • Communicate via hardware resource contention

6.888 - L1 Logistics 12

Cache #ways #sets Sender Receiver if (send “1”): fill the cache else: idle T = time(access cache) if (T > Threshold): receive “1” else: receive “0”

slide-21
SLIDE 21

Capture the Flag

  • Steal secrets via hardware resource contention

6.888 - L1 Logistics 13

Cache #ways #sets Victim Attacker

slide-22
SLIDE 22

Capture the Flag

  • Steal secrets via hardware resource contention

6.888 - L1 Logistics 13

Cache #ways #sets Victim Attacker secret in {0,….,127} Fill a cache set whose set index = secret

slide-23
SLIDE 23

Capture the Flag

  • Steal secrets via hardware resource contention

6.888 - L1 Logistics 13

Cache #ways #sets Victim Attacker secret in {0,….,127} Fill a cache set whose set index = secret T = time(access cache set x) if (T > Threshold): secret = x else: check a different set

slide-24
SLIDE 24

Final Project (8 weeks)

  • Original research project
  • Solo or 2 person groups
  • Deliverables
  • Proposal (schedule pre-proposal meetings with me)
  • Weekly report (short and informal) + Checkpoint (5 min presentation)
  • Final report + Final presentation
  • Open-ended topics
  • Must have some hardware security angle

6.888 - L1 Logistics 14

slide-25
SLIDE 25

Hardware Security: The Evil and The Good

  • Attack modern processors
  • To thoroughly understand HW

vulnerabilities

6.888 - L1 Introduction 15

slide-26
SLIDE 26

Hardware Security: The Evil and The Good

  • Attack modern processors
  • To thoroughly understand HW

vulnerabilities

  • Secure computation on HW
  • e.g., data oblivious abstraction, enclave

abstraction

6.888 - L1 Introduction 15

slide-27
SLIDE 27

Course Project Examples

{Attacks, Defenses} x {Theory, Practice}

  • Attack + Practice
  • Discover an exploit in existing processors or existing applications
  • Attack + Theory
  • What architectural principles fundamentally leak what degree of privacy
  • Defense + Practice
  • Mitigate an existing threat using SW/HW
  • Defense + Theory
  • Mitigate broad classes of present+future threats

6.888 - L1 Introduction 16

slide-28
SLIDE 28

Collaboration Policy and Warning

  • Discussions are always encouraged.
  • You should carefully acknowledge all contributions of ideas by others,

whether from classmates or from sources you have read.

  • MIT academic integrity guidelines

6.888 - L1 Introduction 17

slide-29
SLIDE 29

Warning

  • Please don’t attack other people’s computers or information without

their prior permission.

  • MIT network rules

6.888 - L1 Introduction 18

slide-30
SLIDE 30

TODO Today

  • Check the paper list on

http://csg.csail.mit.edu/6.888Yan/schedule.html

  • Fill the google form https://forms.gle/G6gh6sEYJ4UY24ePA
  • your background/interests (e.g., microarchitecture, theoretical crypto, system

security)

  • Top 5 papers that you would like to present

6.888 - L1 Logistics 19

slide-31
SLIDE 31

Course Overview

slide-32
SLIDE 32

Why Hardware Security?

6.888 - L1 Introduction 21

User application Host operating system/Hypervisor Hardware

Computing Systems

slide-33
SLIDE 33

Why Hardware Security?

6.888 - L1 Introduction 21

User application Host operating system/Hypervisor Hardware

Computing Systems

Trusted Computing Base (TCB)

slide-34
SLIDE 34

Why Hardware Security?

  • What is the interface

between SW and HW?

6.888 - L1 Introduction 21

User application Host operating system/Hypervisor Hardware

Computing Systems

Trusted Computing Base (TCB)

slide-35
SLIDE 35

Why Hardware Security TODAY?

6.888 - L1 Introduction 22

User application Host operating system/Hypervisor Hardware

Computing Systems

E.g, after Spectre and Meltdown

slide-36
SLIDE 36

Why Hardware Security TODAY?

6.888 - L1 Introduction 22

User application Host operating system/Hypervisor Hardware

Computing Systems

E.g, after Spectre and Meltdown Open the Pandora’s box

slide-37
SLIDE 37

Why Hardware Security TODAY?

6.888 - L1 Introduction 22

User application Host operating system/Hypervisor Hardware

Computing Systems

E.g, after Spectre and Meltdown Insufficient ISA Open the Pandora’s box

slide-38
SLIDE 38

Preview of Modules/Topics

  • Introduction

1) Micro-architecture Side Channel 2) Enclaves 3) Opensource Hardware and Verification 4) Physical Side Channels 5) Memory Safety

6.888 - L1 Introduction 23

slide-39
SLIDE 39

Introduction

  • Commercial processor architectures that include security features:
  • LPAR in IBM mainframes (1970s)
  • IBM 4758 (2000s)
  • ARM TrustZone (2000s)
  • Intel TXT & TPM module (2000s)
  • Intel SGX (mid 2010s)
  • AMD SEV (late 2010s)

6.888 - L1 Introduction 24

slide-40
SLIDE 40

Micro-architecture Side Channels

6.888 - L1 Introduction 25

A Channel (a micro-architecture structure)

Victim Attacker

[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18

slide-41
SLIDE 41

Micro-architecture Side Channels

6.888 - L1 Introduction 25

A Channel (a micro-architecture structure)

Victim Attacker

[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18

Access cache set [secret]

slide-42
SLIDE 42

Micro-architecture Side Channels

6.888 - L1 Introduction 25

A Channel (a micro-architecture structure)

Victim Attacker secret-dependent execution

[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18

Access cache set [secret]

slide-43
SLIDE 43

Micro-architecture Side Channels

6.888 - L1 Introduction 25

A Channel (a micro-architecture structure)

Victim Attacker secret-dependent execution

[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18

Access cache set [secret]

slide-44
SLIDE 44

Micro-architecture Side Channels

6.888 - L1 Introduction 25

A Channel (a micro-architecture structure)

Victim Attacker secret-dependent execution

[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18

Access cache set [secret]

slide-45
SLIDE 45

Micro-architecture Side Channels

6.888 - L1 Introduction 25

A Channel (a micro-architecture structure)

Victim Attacker

{Transient, Non-transient} {Cache, DRAM, TLB, NoC, etc.}

X

secret-dependent execution

[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18

Access cache set [secret]

slide-46
SLIDE 46

Micro-architecture Side Channel

26

Spectre/ Meltdown

slide-47
SLIDE 47

Micro-architecture Side Channel

26

Transient + Cache e.g, Foreshadow Spectre/ Meltdown

slide-48
SLIDE 48

Transient + Any structure e.g., RamBleed, RIDDLE

Micro-architecture Side Channel

26

Transient + Cache e.g, Foreshadow Spectre/ Meltdown

slide-49
SLIDE 49

Micro-architecture Side Channels

Transient + Any structure e.g., RamBleed, RIDDLE

Micro-architecture Side Channel

26

Transient + Cache e.g, Foreshadow Spectre/ Meltdown Non-transient + Any structure

slide-50
SLIDE 50

Micro-architecture Side Channels

6.888 - L1 Introduction 27

A Channel (a micro-architecture structure)

Victim Attacker secret-dependent execution

[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18

Defenses:

slide-51
SLIDE 51

Micro-architecture Side Channels

6.888 - L1 Introduction 27

A Channel (a micro-architecture structure)

Victim Attacker secret-dependent execution

[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18

Block creation of signals: Oblivious execution, speculative execution defenses, etc.

Defenses:

slide-52
SLIDE 52

Oblivious Programming

6.888 - L1 Introduction 28

secret in {0,….,127} Access cache set [secret] Victim secret in {0,….,127} For I from 0 to 127: access cache set [i]

slide-53
SLIDE 53

Micro-architecture Side Channels

6.888 - L1 Introduction 29

A Channel (a micro-architecture structure)

Victim Attacker secret-dependent execution

[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18

Block creation of signals: Oblivious execution, speculative execution defenses, etc.

Defenses:

slide-54
SLIDE 54

Micro-architecture Side Channels

6.888 - L1 Introduction 29

A Channel (a micro-architecture structure)

Victim Attacker secret-dependent execution

[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18

Block creation of signals: Oblivious execution, speculative execution defenses, etc. Close the channel: Isolation, etc.

Defenses:

slide-55
SLIDE 55

Micro-architecture Side Channels

6.888 - L1 Introduction 29

A Channel (a micro-architecture structure)

Victim Attacker secret-dependent execution

[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18

Block creation of signals: Oblivious execution, speculative execution defenses, etc. Close the channel: Isolation, etc. Block detection of signals: Randomization, etc.

Defenses:

slide-56
SLIDE 56

Enclaves

Process Isolation

6.888 - L1 Introduction 30

App1 OS Memory App2

slide-57
SLIDE 57

Enclaves

Process Isolation

6.888 - L1 Introduction 30

App1 OS Memory App2

Enclave2

Enclave Isolation App1 OS Memory App2

Enclave1

slide-58
SLIDE 58

Enclaves

  • Side-channel vulnerabilities in

an enclave setup?

6.888 - L1 Introduction 31

Enclave2

App1 OS Hardware App2

Enclave1

slide-59
SLIDE 59

Enclaves

  • Side-channel vulnerabilities in

an enclave setup?

  • Defend against privileged

attackers?

6.888 - L1 Introduction 31

Enclave2

App1 OS Hardware App2

Enclave1

slide-60
SLIDE 60

Enclaves

  • Side-channel vulnerabilities in

an enclave setup?

  • Defend against privileged

attackers?

  • How to write efficient enclave

applications?

6.888 - L1 Introduction 31

Enclave2

App1 OS Hardware App2

Enclave1

slide-61
SLIDE 61

Opensource Hardware and Verification

  • Modern hardware is a mess for security. What if you can design

everything from scratch?

6.888 - L1 Introduction 32

Enclave2

App1 OS Hardware App2

Enclave1

slide-62
SLIDE 62

Opensource Hardware and Verification

  • Modern hardware is a mess for security. What if you can design

everything from scratch?

6.888 - L1 Introduction 32

Enclave2

App1 OS Hardware App2

Enclave1

slide-63
SLIDE 63

Opensource Hardware and Verification

  • Modern hardware is a mess for security. What if you can design

everything from scratch?

6.888 - L1 Introduction 32

Enclave2

App1 OS Hardware App2

Enclave1

  • Many design choices:
  • HW v.s. SW implementations?
  • New abstraction of HW?
slide-64
SLIDE 64

Opensource Hardware and Verification

  • Modern hardware is a mess for security. What if you can design

everything from scratch?

6.888 - L1 Introduction 32

Enclave2

App1 OS Hardware App2

Enclave1

  • Many design choices:
  • HW v.s. SW implementations?
  • New abstraction of HW?
  • How to verify the security of HW
  • r multiple layers of a system
slide-65
SLIDE 65

Physical Attacks

6.888 - L1 Introduction 33

EM side channels to steal bitcoin signing keys

slide-66
SLIDE 66

Physical Attacks

  • Modern physical side channels can be done remotely

6.888 - L1 Introduction 34

slide-67
SLIDE 67

Physical Attacks

  • Modern physical side channels can be done remotely

6.888 - L1 Introduction 34

slide-68
SLIDE 68

Physical Attacks

  • Modern physical side channels can be done remotely

6.888 - L1 Introduction 34

slide-69
SLIDE 69

Memory Safety

  • Classical memory safety issues
  • E.g., buffer overflow

6.888 - L1 Introduction 35

slide-70
SLIDE 70

Memory Safety

  • Classical memory safety issues
  • E.g., buffer overflow
  • HW: accelerators for security checks

6.888 - L1 Introduction 35

slide-71
SLIDE 71

Memory Safety

  • Classical memory safety issues
  • E.g., buffer overflow
  • HW: accelerators for security checks
  • A more interesting question: what is a

good abstraction?

6.888 - L1 Introduction 35

Software Hardware

slide-72
SLIDE 72

Next: Secure Processors in Industry