6.888 Secure Hardware Design
Mengjia Yan Fall 2020
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:
Mengjia Yan Fall 2020
6.888 - L1 Introduction 2
http://csg.csail.mit.edu/6.888Yan/
reports
6.888 - L1 Introduction 5
6.888 - L1 Introduction 6
6.888 - L1 Logistics 7
6.888 - L1 Logistics 8
questions that only the authors can answer)
6.888 - L1 Logistics 9
6.888 - L1 Introduction 10
1) Dead drop: Build a communication channel via hardware resource contention 2) Capture the flag: Steal a secret via hardware resource contention
6.888 - L1 Logistics 11
6.888 - L1 Logistics 12
6.888 - L1 Logistics 12
Cache #ways #sets
6.888 - L1 Logistics 12
Cache #ways #sets Sender Receiver
6.888 - L1 Logistics 12
Cache #ways #sets Sender Receiver if (send “1”): fill the cache else: idle
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”
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”
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”
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”
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”
6.888 - L1 Logistics 13
Cache #ways #sets Victim Attacker
6.888 - L1 Logistics 13
Cache #ways #sets Victim Attacker secret in {0,….,127} Fill a cache set whose set index = secret
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
6.888 - L1 Logistics 14
vulnerabilities
6.888 - L1 Introduction 15
vulnerabilities
abstraction
6.888 - L1 Introduction 15
6.888 - L1 Introduction 16
whether from classmates or from sources you have read.
6.888 - L1 Introduction 17
their prior permission.
6.888 - L1 Introduction 18
http://csg.csail.mit.edu/6.888Yan/schedule.html
security)
6.888 - L1 Logistics 19
6.888 - L1 Introduction 21
User application Host operating system/Hypervisor Hardware
Computing Systems
6.888 - L1 Introduction 21
User application Host operating system/Hypervisor Hardware
Computing Systems
Trusted Computing Base (TCB)
between SW and HW?
6.888 - L1 Introduction 21
User application Host operating system/Hypervisor Hardware
Computing Systems
Trusted Computing Base (TCB)
6.888 - L1 Introduction 22
User application Host operating system/Hypervisor Hardware
Computing Systems
E.g, after Spectre and Meltdown
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
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
1) Micro-architecture Side Channel 2) Enclaves 3) Opensource Hardware and Verification 4) Physical Side Channels 5) Memory Safety
6.888 - L1 Introduction 23
6.888 - L1 Introduction 24
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
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]
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]
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]
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]
6.888 - L1 Introduction 25
A Channel (a micro-architecture structure)
Victim Attacker
{Transient, Non-transient} {Cache, DRAM, TLB, NoC, etc.}
secret-dependent execution
[*] Kiriansky et al. DAWG: a defense against cache timing attacks in speculative execution processors. MICRO’18
Access cache set [secret]
26
Spectre/ Meltdown
26
Transient + Cache e.g, Foreshadow Spectre/ Meltdown
Transient + Any structure e.g., RamBleed, RIDDLE
26
Transient + Cache e.g, Foreshadow Spectre/ Meltdown
Micro-architecture Side Channels
Transient + Any structure e.g., RamBleed, RIDDLE
26
Transient + Cache e.g, Foreshadow Spectre/ Meltdown Non-transient + Any structure
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:
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:
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]
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:
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:
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:
Process Isolation
6.888 - L1 Introduction 30
App1 OS Memory App2
Process Isolation
6.888 - L1 Introduction 30
App1 OS Memory App2
Enclave2
Enclave Isolation App1 OS Memory App2
Enclave1
an enclave setup?
6.888 - L1 Introduction 31
Enclave2
App1 OS Hardware App2
Enclave1
an enclave setup?
attackers?
6.888 - L1 Introduction 31
Enclave2
App1 OS Hardware App2
Enclave1
an enclave setup?
attackers?
applications?
6.888 - L1 Introduction 31
Enclave2
App1 OS Hardware App2
Enclave1
everything from scratch?
6.888 - L1 Introduction 32
Enclave2
App1 OS Hardware App2
Enclave1
everything from scratch?
6.888 - L1 Introduction 32
Enclave2
App1 OS Hardware App2
Enclave1
everything from scratch?
6.888 - L1 Introduction 32
Enclave2
App1 OS Hardware App2
Enclave1
everything from scratch?
6.888 - L1 Introduction 32
Enclave2
App1 OS Hardware App2
Enclave1
6.888 - L1 Introduction 33
EM side channels to steal bitcoin signing keys
6.888 - L1 Introduction 34
6.888 - L1 Introduction 34
6.888 - L1 Introduction 34
6.888 - L1 Introduction 35
6.888 - L1 Introduction 35
good abstraction?
6.888 - L1 Introduction 35
Software Hardware