Intel’s SGX
1
Innovative Instructions and Software Model for Isolated Execution, HASP 2013 (F. McKeen et. al.)
Reduced Attack Surface with SGX
2
Malware that can subvert any one of
app, OS, VMM, or hardware
can steal secrets
App
App
App
OS
VMM
Hardware
Attack Surface
Normally
Small attack surface (App + Hardware)
Malware cannot steel secrets inspite �of subverting OS, BIOS, VMM, most
parts of the App, etc.
With SGX enabled
App
App
App
OS
VMM
Hardware
Enclaves�(reverse sandbox)
3
Provides confidentiality and integrity
With controlled entry points
(SGX supports multi-threading;� one TCS for each thread supported)
Entry Table
Enclave Heap
Enclave Stack
Enclave Code
TCS
Enclave Properties
4
Physical Memory
5
RAM
PRM
EPC
EPCM
SGX Enclaves and PRM
6
RAM
Virtual Memory
Virtual Memory
Process 1
Process 2
Virtual address to physical address mapping. Done by OS and MMU
Physical Memory
7
RAM
PRM
EPC
EPCM
Physical Memory
8
RAM
PRM
EPC
SECS
EPC Encryption
9
Memory �Access
10
x
Application Execution Flow
App built with trusted and untrusted part
11
Enclave Life Cycle�(creation)
ECREATE Instruction
12
Process
Enclave Life Cycle�(adding pages)
EADD Instruction
13
Process
Enclave Life Cycle�(measuring pages)
EEXTEND
14
Process
Enclave Life Cycle�(initializing pages)
EINIT
15
Process
Enclave Life Cycle�(enter/exit)
16
Process invokes the enclave through
pre-defined entry points using EENTER
instruction
EENTER
Entry into the Enclave
17
Exit from Enclave
18
Asynchronous Exit (AEX)
19
Instruction set Extensions for SGX
20
Attestation
21
Innovative Technology for CPU Based Attestation and Sealing, HASP 2015, Ittai Anati et al
Intra-Platform Enclave Attestation
22
Enclave B
Enclave A
1
1
Intra-Platform Enclave Attestation
23
Enclave B
Enclave A
1
2
Inter-Platform Enclave Attestation
24
Quoting
Enclave
Enclave A
1
2
External
Challenger