Physical Attacks: : Example: [T [Taji jik et t al., l., CH CHES โ14 ] Upper path delay ๐ ๐ฃ Challenge ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ Response 0 Impulse 1 Switch Arbiter Lower path delay ๐ ๐ C 0x00 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 ๐ฟ ๐ ๐ฟ ๐
Physical Attacks: : Example: [T [Taji jik et t al., l., CH CHES โ14 ] Upper path delay ๐ ๐ฃ Challenge 0 0 0 0 0 0 0 0 Response 0 Impulse 1 Switch Arbiter Lower path delay ๐ ๐ C 0x00 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 ๐ ๐ ๐ฟ ๐ ๐ ๐ ๐ฟ ๐
Physical Attacks: : Example: [T [Taji jik et t al., l., CH CHES โ14 ] Upper path delay ๐ ๐ฃ Challenge 1 0 0 0 0 0 0 0 Response 0 Impulse 1 Switch Arbiter Lower path delay ๐ ๐ C 0x00 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 ๐ ๐ ๐ ๐ ๐ฟ ๐ ๐ ๐ ๐ ๐ ๐ฟ ๐
Physical Attacks: : Example: [T [Taji jik et t al., l., CH CHES โ14 ] Upper path delay ๐ ๐ฃ Challenge ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ Response 0 Impulse 1 Switch Arbiter Lower path delay ๐ ๐ C 0x00 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 ๐ ๐ ๐ ๐ ๐ฟ ๐ ๐ ๐ ๐ ๐ ๐ฟ ๐
Physical Attacks: : Example: [T [Taji jik et t al., l., CH CHES โ14 ] Characterize each switch box in the Arbiter PUF by calculating Upper path delay ๐ the delay differences for upper and lower paths ๐ฃ Challenge ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ Response 0 Impulse 1 Switch Arbiter Lower path delay ๐ ๐ C 0x00 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 ๐ ๐ ๐ ๐ ๐ฟ ๐ ๐ ๐ ๐ ๐ ๐ฟ ๐
Physical Attacks: : Example: [T [Taji jik et t al., l., CH CHES โ14 ] Characterize each switch box in the Arbiter PUF by calculating Upper path delay ๐ the delay differences for upper and lower paths ๐ฃ Challenge ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ Response 0 Impulse 1 Switch Arbiter Lower path delay ๐ ๐ C 0x00 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 ๐ ๐ ๐ ๐ ๐ฟ ๐ ๐ ๐ ๐ ๐ ๐ฟ ๐
Physical Attacks: : Example: [T [Taji jik et t al., l., CH CHES โ14 ] Characterize each switch box in the Arbiter PUF by calculating Upper path delay ๐ the delay differences for upper and lower paths ๐ฃ Challenge ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐๐ โ ๐ ๐ ๐๐ ๐ ๐ โ ๐ ๐ = ๐ ๐ Response 0 Impulse 1 Switch Arbiter Lower path delay ๐ ๐ C 0x00 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 ๐ ๐ ๐ ๐ ๐ฟ ๐ ๐ ๐ ๐ ๐ ๐ฟ ๐
Physical Attacks: : Example: [T [Taji jik et t al., l., CH CHES โ14 ] Characterize each switch box in the Arbiter PUF by calculating Upper path delay ๐ the delay differences for upper and lower paths ๐ฃ Challenge ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐๐ โ ๐ ๐ ๐๐ ๐ ๐ โ ๐ ๐ = ๐ ๐ Response 0 Impulse 1 ๐0 โ ๐ฅ 0 ๐0 ๐ ๐ โ ๐ ๐ = ๐ฅ 1 Switch Arbiter Lower path delay ๐ ๐ C 0x00 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 ๐ ๐ ๐ ๐ ๐ฟ ๐ ๐ ๐ ๐ ๐ ๐ฟ ๐
Beyond CMOS-based PUFs CMOS-based PUFs exhibit linear behavior => vulnerable to machine learning One Solution: Add components with non-linear behavior to complicate/escape machine learning attacks, e.g., Memristors
โ Memris istors โข A resistor that changes it resistance as voltage is applied โข Applications: โข Oscillators Current โข Learners (Neural Networks) โข Memories โข PUFs! โข The top (bottom) figure shows Current-Voltage charcteristics of a memristor (resistor) Voltage Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
CMOS-based APUF vs. . Memris istor-based APUF Challenge ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ Response 0 Impulse 1 Arbiter Challenge ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ โ โ โ โ โ โ โ โ Response 0 Impulse โ โ โ โ โ โ โ โ 1 Arbiter Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
CMOS-based APUF vs. . Memris istor-based APUF CMOS-based Arbiter PUF: Voltage at the upper path Memristor-based Arbiter PUF: Voltage at the upper path Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Conclu lusio ion โข Many PUF designs, no unified security model โข Several successful attacks โข Non-destructive physical attacks โข Modeling attacks โข Designing secure PUFs is challenging? โข What are the costs? โข PUFs based on advanced memory technologies โข E.g., Memristors
Our Current Work: Framework for Evaluation of f Memristor-based PUFs
Framework for Evaluation of f Memristor-based PUFs Memristor model Advanced Machine Spice PUF Secure/Insecure Challenge- Learning PUF Description circuit CRPs PUF PUF Circuit Response Generation Pairs Generation Analysis of PUF properties: Reproducibility, uniqueness, etc
In Integrated Securit ity Devic ices: The TPM Promise Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Tru rusted Computing โข Authenticated Boot and Attestation App 1 App 2 App 3 App 4 Software Stack Operating System Hardware Peripherals CPU Memory I/O TPM Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Tru rusted Computing โข Authenticated Boot and Attestation App 1 App 1 App 2 App 2 App 3 App 3 App 4 App 4 Software Stack Operating System Operating System Hardware Peripherals CPU Memory I/O TPM Example: IBM Integrity Measurement Architecture (IMA) Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Tru rusted Computing โข Authenticated Boot and Attestation App 1 App 2 App 3 App 4 Software Stack Operating System Runtime attacks (e.g., Code-reuse Attacks) Hardware Peripherals CPU Memory I/O TPM Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Summary ry: : TPM-based Tru rusted Computing TPM assumptions and shortcomings โข Binary hashes express trustworthiness of code โข Runtime attacks (e.g., code reuse) undermine this assumption โข Unforgeability of measurements โข TPM 1.2 uses deprecated SHA1 โข Protection against software attacks only โข Hardware attacks on TPM Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Our Current Work: Control-Flow Attestation Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Ongoing Work rk: : Towards Run-time Attestation โข Control Flow Attestation [Davi et al, CCS 2016 & DAC 2017] Prover Verifier Challenge Memory App A Online: Offline: Control-Flow Graph (CFG) Runtime Analysis & Path Measurement Validation Processor LP 1 Attestation Engine P* x P* 2 Controller Hash Measurement Database P 1 P 2 Resilient to memory attacks Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Trusted Executio ion Envir ironment (TEE) Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
ARM Tru rustZone Assumptions: โข Apps in Secure World are trustworthy โข Normal World cannot influence Secure World App 1 App 2 App 3 App 4 Software Stack Operating System Hardware Peripherals CPU Memory I/O IMEI: International Mobile Equipment Identifier Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
โข Subsidy Lock Android ARM Tru rustZone โข โข IMEI Protection Full-Disk Encryption (FDE) โข Samsung KNOX Assumptions: iOS โข Secure-I/O, Attestation โข Device Encryption โข โข Apps in Secure World are trustworthy Real-time Kernel โข Touch ID, Apple Pay Protection (TIMA) โข Normal World cannot influence Secure World Secure World DRM โข Netflix โข App 1 App 2 App 3 Trustlet Trustlet Trustlet Spotify โข Widevine 1 2 3 Software Stack Operating System Operating System Hardware Peripherals CPU Memory I/O IMEI: International Mobile Equipment Identifier Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
ARM Tru rustZone Assumptions: โข Apps in Secure World are trustworthy โข Normal World cannot influence Secure World Secure World App 1 App 2 App 3 Trustlet Trustlet Trustlet 1 2 3 Software Stack Operating System Operating System Hardware Peripherals CPU Memory I/O IMEI: International Mobile Equipment Identifier Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
ARM Tru rustZone Assumptions: โข Apps in Secure World are trustworthy โข Normal World cannot influence Secure World Secure World App 1 App 2 App 3 Trustlet Trustlet Trustlet Trustlet Trustlet Trustlet 1 1 2 2 3 3 Software Stack โข Reflections on trusting TrustZone Operating System Operating System Operating System [Dan Rosenberg, BlackHat US, 2014] โข Attacking your Trusted Core [Di Shen, BlackHat US, 2015] โข Hardware Peripherals CPU Memory I/O Breaking Android Full Disc Encryption [laginimaineb from Project Zero, 2016] IMEI: International Mobile Equipment Identifier Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Summary ry: : ARM Tru rustZone โข ARM TrustZone โ Outdated? โข Deployed for almost two decades โข Trusted computing for vendors and friends only โข No access for app developer โข Many attacks have been shown over the last years โข On the positive side โข Secure I/O Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Our Current Work: โArbitraryโ Number of TEEs in Normal World on ARM TZ Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Intel Software Guard Extensions (SGX) App 1 App 2 App 3 App 4 Enclave 1 Enclave 2 Enclave 3 Enclave 4 Software Stack Operating System Hardware Peripherals CPU Memory I/O Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Intel Software Guard Extensions (SGX) App 1 App 2 App 3 App 4 Enclave 1 Enclave 2 Enclave 3 Enclave 4 Software Stack Operating System Hardware Peripherals CPU Memory I/O Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
SGX (A (Adversary ry) Model Host Enclave Application N Application Attacker Operating System NIC CPU MMU DRAM Isolation NIC: Network Interface Controller Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 MMU: Memory Management Unit
SGX (A (Adversary ry) Model Host Host Enclave Application N Application Application Attacker Application N Operating System Operating System NIC NIC CPU MMU DRAM DRAM Isolation NIC: Network Interface Controller Summer School on real-world crypto and privacy, ล ibenik (Croatia), June 11 โ 15, 2018 MMU: Memory Management Unit
Run-time Attacks Inside the Enclave
SGX SDK and The Guardโs Dilemma App Enclave Source Function 0 Function 1 Function 2 Function 3 Compiler Trusted Runtime System (tRTS) Untrusted Runtime System (uRTS) App-to-Enclave SGX function call SDK (ECALL) App Code [Biondo et al., USENIX Sec. 2018] Summer School on real-world crypto and privacy, ล ibenik (Croatia), June 11 โ 15, 2018
SGX SDK and The Guardโs Dilemma App Enclave Function 0 Function 1 Function 2 Function 3 State Trusted Runtime System (tRTS) [Biondo et al., USENIX Sec. 2018] Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
SGX SDK and The Guardโs Dilemma App Enclave Function 0 Function 1 Function 2 Function 3 State Trusted Runtime System (tRTS) Restore State [Biondo et al., USENIX Sec. 2018] Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
SGX SDK and The Guardโs Dilemma App Enclave Function 0 Function 1 Function 2 Function 3 State Trusted Runtime System (tRTS) Restore State [Biondo et al., USENIX Sec. 2018] Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
SGX SDK and The Guardโs Dilemma App Enclave Function 0 Function 1 Function 2 Function 3 State Trusted Runtime System (tRTS) Counterfeit Restore State state [Biondo et al., USENIX Sec. 2018] Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
SGX SDK and The Guardโs Dilemma App Enclave Function 0 Function 1 Function 2 Function 3 State Trusted Runtime System (tRTS) Counterfeit Restore State state [Biondo et al., USENIX Sec. 2018] Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Leakage in Intelโs SGX Summer School on real-world crypto and privacy, ล ibenik (Croatia), June 11 โ 15, 2018
Page Fault lt Attacks on SGX Granularity: page 4K, good for big data structures Enclave 1 Enclave 2 App 1 App 2 App 3 OS CPU RAM EPC EPC: Enclave Page Cache PT: Page Tables Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 PF: Page-Fault
Page Fault lt Attacks on SGX Granularity: page 4K, good for big data structures Enclave 1 Enclave 2 App 1 App 2 App 3 OS PT PT CPU RAM EPC EPC: Enclave Page Cache PT: Page Tables Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 PF: Page-Fault
Page Fault lt Attacks on SGX Granularity: page 4K, good for big data structures Enclave 1 Enclave 2 App 1 App 2 App 3 OS PF Handler PT PT IRQ CPU RAM EPC EPC: Enclave Page Cache PT: Page Tables Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 PF: Page-Fault
Page Fault lt Attacks on SGX Granularity: page 4K, good for big data structures Original Recovered Enclave 1 Enclave 2 App 1 App 2 App 3 OS PF Handler PT PT IRQ CPU RAM EPC [Xu et al., IEEE S&Pโ15] EPC: Enclave Page Cache PT: Page Tables Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 PF: Page-Fault
Page Fault lt Attacks on SGX Granularity: page 4K, good for big data structures Original Recovered Enclave 1 Enclave 2 App 1 App 2 App 3 Single-trace RSA key recovery from RSA key generation OS PF Handler PT PT procedure of Intel SGX SSL via controlled-channel attack on the binary Euclidean algorithm (BEA) IRQ CPU [ Weiser et al., AsiaCCSโ18] RAM EPC [Xu et al., IEEE S&Pโ15] EPC: Enclave Page Cache PT: Page Tables Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 PF: Page-Fault
Cache Attacks on SGX: : Hack in in The Box Enclave 1 Enclave 2 App 1 App 2 App 3 CPU Cache RAM EPC Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 EPC: Enclave Page Cache
Cache Attacks on SGX: : Hack in in The Box Enclave 1 Enclave 2 App 1 App 2 App 3 CPU Cache RAM EPC Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 EPC: Enclave Page Cache
Cache Attacks on SGX: : Hack in in The Box Enclave 1 Enclave 2 App 1 App 2 App 3 observe uses CPU Cache RAM EPC Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 EPC: Enclave Page Cache
Sid ide-Channel l Attacks Basic ics: Prim ime + Probe Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Cache-based Sid ide-Channel l Attacks Prim ime + Probe Prime Victim Probe if (keybit[i] == 0) For each cline Z for each cline Z Code write(Z) read(X) read(Z) else measure_time(read) read(Y) cache line 0 cache line 0 cache line 0 cache line 0 cache line 1 cache line 1 cache line 1 cache line 1 Cache cache line 2 cache line 2 cache line 2 cache line 2 cache line 2 cache line 3 cache line 3 cache line 3 cache line 3 cache line 4 cache line 4 cache line 4 cache line 4 cache line 5 cache line 5 cache line 5 cache line 5 t 0 t 1 t 2 Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Cache-based Sid ide-Channel l Attacks Prim ime + Probe Prime Victim Probe if (keybit[i] == 0) For each cline Z for each cline Z Code write(Z) read(X) read(Z) else measure_time(read) read(Y) cache line 0 cache line 0 cache line 0 cache line 1 cache line 1 cache line 1 Cache cache line 2 cache line 2 cache line 2 cache line 2 cache line 3 cache line 3 cache line 3 cache line 4 cache line 4 cache line 4 cache line 5 cache line 5 cache line 5 t 0 t 1 t 2 Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Cache-based Sid ide-Channel l Attacks Prim ime + Probe Prime Victim Probe if (keybit[i] == 0) For each cline Z for each cline Z Code write(Z) read(X) read(Z) else measure_time(read) read(Y) cache line 0 cache line 0 cache line 0 cache line 1 cache line 1 cache line 1 Cache cache line 2 cache line 2 cache line 2 cache line 2 cache line 3 cache line 3 cache line 3 cache line 4 cache line 4 cache line 4 cache line 5 cache line 5 cache line 5 t 0 t 1 t 2 Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Cache-based Sid ide-Channel l Attacks Prim ime + Probe Prime Victim Probe if (keybit[i] == 0) For each cline Z for each cline Z Code write(Z) read(X) read(Z) else measure_time(read) read(Y) cache line 0 cache line 0 cache line 0 cache line 1 cache line 1 cache line 1 Cache cache line 2 cache line 2 cache line 2 cache line 2 cache line 3 cache line 3 cache line 3 cache line 4 cache line 4 cache line 4 cache line 5 cache line 5 cache line 5 t 0 t 1 t 2 Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Cache-based Sid ide-Channel l Attacks cache line 2 Prim ime + Probe was used by victim Prime Victim Probe if (keybit[i] == 0) For each cline Z for each cline Z Code write(Z) read(X) read(Z) else measure_time(read) read(Y) cache line 0 cache line 0 cache line 0 cache line 1 cache line 1 cache line 1 Cache cache line 2 cache line 2 cache line 2 cache line 3 cache line 3 cache line 3 cache line 4 cache line 4 cache line 4 cache line 5 cache line 5 cache line 5 t 0 t 1 t 2 Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Sid ide-Channel Attacker Challe lenge: Nois ise โข โClassicalโ scenario: unprivileged attacker โข OS* is not collaborating with the attacker โข OS can directly access process memory containing the victimโs secret โข System operates normally, impacting the caches (process scheduling, context switches, interrupts, etc.) Probe Prime Other Process Victim cl 0 cl 0 cl 0 cl 0 cl 0 cl 0 cl 1 cl 1 cl 1 cl 1 cl 1 cl 2 cl 2 cl 2 cl 2 cl 2 cl 2 t k t l t m t n *OS: Operating System and any other privileged system software Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Sid ide-Channel Attacker Challe lenge: Nois ise โข โClassicalโ scenario: unprivileged attacker โข OS* is not collaborating with the attacker โข OS can directly access process memory containing the victimโs secret โข System operates normally, impacting the caches (process scheduling, context switches, interrupts, etc.) Probe Prime Other Process Victim cl 0 cl 0 cl 0 cl 0 cl 0 cl 1 cl 1 cl 1 cl 1 cl 2 cl 2 cl 2 cl 2 cl 2 t k t l t m t n *OS: Operating System and any other privileged system software Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Sid ide-Channel Attacker Challe lenge: Nois ise โข โClassicalโ scenario: unprivileged attacker โข OS* is not collaborating with the attacker โข OS can directly access process memory containing the victimโs secret โข System operates normally, impacting the caches (process scheduling, context switches, interrupts, etc.) Probe Prime Other Process Victim cl 0 cl 0 cl 0 cl 0 cl 0 cl 0 cl 1 cl 1 cl 1 cl 1 cl 2 cl 2 cl 2 cl 2 cl 2 t k t l t m t n *OS: Operating System and any other privileged system software Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Sid ide-Channel Attacker Challe lenge: Nois ise โข โClassicalโ scenario: unprivileged attacker โข OS* is not collaborating with the attacker โข OS can directly access process memory containing the victimโs secret โข System operates normally, impacting the caches (process scheduling, context switches, interrupts, etc.) Probe Prime Other Process Victim cl 0 cl 0 cl 0 cl 0 cl 0 cl 0 cl 1 cl 1 cl 1 cl 1 cl 2 cl 2 cl 2 cl 2 cl 2 t k t l t m t n *OS: Operating System and any other privileged system software Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Sid ide-Channel Attacker Challe lenge: Nois ise โข โClassicalโ scenario: unprivileged attacker โข OS* is not collaborating with the attacker โข OS can directly access process memory containing the victimโs secret โข System operates normally, impacting the caches (process scheduling, context switches, interrupts, etc.) Probe Prime Other Process Victim cl 0 cl 0 cl 0 cl 0 cl 0 cl 1 cl 1 cl 1 cl 1 cl 2 cl 2 cl 2 cl 2 t k t l t m t n *OS: Operating System and any other privileged system software Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Sid ide-Channel Attacker Challe lenge: Nois ise โข โClassicalโ scenario: unprivileged attacker โข OS* is not collaborating with the attacker โข OS can directly access process memory containing the victimโs secret โข System operates normally, impacting the caches (process scheduling, context switches, interrupts, etc.) cl0 and cl2 were usedโฆ Probe Prime Other Process Victim โฆ by the cl 0 cl 0 cl 0 cl 0 cl 0 victim? cl 1 cl 1 cl 1 cl 1 cl 2 cl 2 cl 2 cl 2 t k t l t m t n *OS: Operating System and any other privileged system software Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Cache Attacks on SGX Enclave 1 Enclave 2 App 2 App 3 OS SMT SMT CPU Core Level 1 Branch Pred. Level 2 CPU Level 3 RAM EPC EPC: Enclave Page Cache Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 SMT: Simultaneous Multithreading
Cache Attacks on SGX Enclave 1 Enclave 2 App 2 App 3 OS SMT SMT CPU Core Level 1 Branch Pred. Level 2 CPU Level 3 RAM EPC EPC: Enclave Page Cache Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 SMT: Simultaneous Multithreading
Cache Attacks on SGX Enclave 1 Enclave 2 App 2 App 3 Use CPU internal caches to infer OS control flow SMT SMT [Lee et al., Usenix Secโ17] & CPU Core Level 1 Branch Pred. [arXiv:1611.06952] Level 2 CPU Level 3 RAM EPC EPC: Enclave Page Cache Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 SMT: Simultaneous Multithreading
Cache Attacks on SGX Enclave 1 Enclave 2 App 2 App 3 Use CPU internal caches to infer OS control flow SMT SMT [Lee et al., Usenix Secโ17] & CPU Core Level 1 Branch Pred. [arXiv:1611.06952] Level 2 CPU Level 3 Use standard prime + probe to detect key dependent memory Use prime + probe to extract key accesses, interrupt enclave from synchronized victim enclave RAM EPC [Moghimi et al., arXiv:1703.06986] [Gรถtzfried et al., EuroSecโ17] EPC: Enclave Page Cache Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 SMT: Simultaneous Multithreading
Cache Attacks on SGX A malicious enclave prime + probes another enclave, evading detection [Schwarz et al., DIMVAโ17 & arXiv:1702.08719] Enclave 1 Enclave 2 App 2 App 3 Use CPU internal caches to infer OS control flow SMT SMT [Lee et al., Usenix Secโ17] & CPU Core Level 1 Branch Pred. [arXiv:1611.06952] Level 2 CPU Level 3 Use standard prime + probe to detect key dependent memory Use prime + probe to extract key accesses, interrupt enclave from synchronized victim enclave RAM EPC [Moghimi et al., arXiv:1703.06986] [Gรถtzfried et al., EuroSecโ17] EPC: Enclave Page Cache Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 SMT: Simultaneous Multithreading
Cache Attacks on SGX A malicious enclave prime + probes another enclave, evading detection [Schwarz et al., DIMVAโ17 & arXiv:1702.08719] Enclave 1 Enclave 2 App 2 App 3 Use CPU internal caches to infer OS control flow SMT SMT [Lee et al., Usenix Secโ17] & CPU Core Level 1 Branch Pred. [arXiv:1611.06952] Our attack: prime + probe attack from Level 2 CPU malicious OS extracting genome data [Brasser et al., WOOTโ17] Level 3 Use standard prime + probe to detect key dependent memory Use prime + probe to extract key accesses, interrupt enclave from synchronized victim enclave RAM EPC [Moghimi et al., arXiv:1703.06986] [Gรถtzfried et al., EuroSecโ17] EPC: Enclave Page Cache Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018 SMT: Simultaneous Multithreading
SGX Sid ide-Channel Attacks Comparison Observed Interrupting Cache Eviction Attacker Attacked Attack Type Cache Victim Measurement Code Victim Branch Execution RSA & SVM Lee et al. BTB / LBR Yes OS Shadowing Timing classifier Prime + Moghimi et al. L1(D) Yes Access timing OS AES Probe Prime + Gรถtzfried et al. L1(D) No PCM OS AES Probe RSA & Prime + Our Attack L1(D) No PCM OS Genome Probe Sequencing Prime + Counting Schwarz et al. L3 No Enclave AES Probe Thread PCM: Performance Counter Monitor BTB: Branch Target Buffer LBR: Last Branch Record Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Our Attack [Brasser et al., WOOTโ17] Process Process Process Process Process Attacker Victim m+1 m 1 2 n APIC: Advanced Programmable Interrupt Controller OS PCM: Performance Counter Monitor SMT: Simultaneous Multithreading SMT SMT SMT SMT PCM L1 L1 Core 0 Core n Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Our Attack [Brasser et al., WOOTโ17] Process Process Process Process Process Attacker Victim m+1 m 1 2 n APIC: Advanced Programmable Interrupt Controller OS PCM: Performance Counter Monitor SMT: Simultaneous Multithreading SMT SMT SMT SMT PCM L1 L1 Core 0 Core n Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Our Attack [Brasser et al., WOOTโ17] Process Process Process Process Process Attacker Victim m+1 m 1 2 n APIC: Advanced Programmable Interrupt Controller OS PCM: Performance Counter Monitor SMT: Simultaneous Multithreading SMT SMT SMT SMT PCM L1 L1 Core 0 Core n Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Our Attack [Brasser et al., WOOTโ17] Modified Linux scheduler to exclude one core Process Process Process Process Process Attacker Victim (two threads) from assigning task m+1 m โข 1 2 n Attacker assigns victim enclave to first SMT thread APIC: Advanced Programmable Interrupt Controller โข Attacker assigns Prime+Probe code to second SMT thread OS PCM: Performance Counter Monitor SMT: Simultaneous Multithreading SMT SMT SMT SMT PCM L1 L1 Core 0 Core n Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Our Attack [Brasser et al., WOOTโ17] Process Process Process Process Process Attacker Victim m+1 m 1 2 n APIC: Advanced Programmable Interrupt Controller OS Handler Handler Handler Handler PCM: Performance Counter Monitor SMT: Simultaneous Multithreading SMT SMT SMT SMT APIC PCM L1 L1 Core 0 Core n Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Our Attack [Brasser et al., WOOTโ17] Process Process Process Process Process Attacker Victim m+1 m 1 2 n APIC: Advanced Programmable Interrupt Controller OS Handler Handler PCM: Performance Counter Monitor SMT: Simultaneous Multithreading SMT SMT SMT SMT APIC PCM L1 L1 Core 0 Core n Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Our Attack [Brasser et al., WOOTโ17] Process Process Process Process Process Attacker Victim m+1 m 1 2 n APIC: Advanced Programmable Interrupt Controller Use kernel sysfs interface to assign interrupts to other cores โข Timer interrupt (per thread) cannot be reassigned โข Lowered timer frequency to 100Hz (i.e., every 10ms) OS Handler Handler PCM: Performance Counter Monitor SMT: Simultaneous Multithreading SMT SMT SMT SMT APIC PCM L1 L1 Core 0 Core n Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Our Attack [Brasser et al., WOOTโ17] Process Process Process Process Process Attacker Victim m+1 m 1 2 n APIC: Advanced Programmable Interrupt Controller OS Handler Handler PCM: Performance Counter Monitor SMT: Simultaneous Multithreading Probe SMT SMT SMT SMT APIC PCM L1 L1 Core 0 Core n Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Our Attack [Brasser et al., WOOTโ17] Process Process Process Process Process Attacker Victim m+1 m 1 2 n APIC: Advanced Programmable Interrupt Controller OS Handler Handler PCM: Performance Counter Monitor Prime+Probe attack using L1 data cache SMT: Simultaneous Multithreading Probe โข Eviction detection using Performance Counter Monitor (L1D_REPLACEMENT) โข SMT SMT Anti Side-Channel Interference (ASCI) not effective, SMT SMT monitoring cache events of attacker possible APIC PCM L1 L1 Core 0 Core n Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Spatial vs. Temporal Resolution Victim Enclave Cache Attacker while ( i > 0) { prime() { PC PC prepare(); write_cache(); x = table[secret]; } wait(); Probe() { process(x); test_evic(); } } Summer School on real- world crypto and privacy, ล ibenik (Croatia), June 11โ 15, 2018
Recommend
More recommend