+ All Categories
Home > Documents > NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement...

NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement...

Date post: 19-Jul-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
255
NetSpectre A Truly Remote Spectre Variant Martin Schwarzl @marv0x90 Michael Schwarz @misc0110
Transcript
Page 1: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

NetSpectreA Truly Remote Spectre Variant

Martin Schwarzl @marv0x90

Michael Schwarz @misc0110

Page 2: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Who am I?

Michael SchwarzPhD candidate @ Graz University of Technology @misc0110 [email protected]

1 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 3: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Who am I?

Martin SchwarzlMaster student @ Graz University of Technology @marv0x90 [email protected]

2 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 4: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Side-Channel Attacks

• Bug-free software does not mean safe execution

• Information leaks due to underlying hardware• Exploit leakage through side-effects

Powerconsumption

Executiontime CPU caches

3 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 5: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Side-Channel Attacks

• Bug-free software does not mean safe execution• Information leaks due to underlying hardware

• Exploit leakage through side-effects

Powerconsumption

Executiontime CPU caches

3 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 6: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Side-Channel Attacks

• Bug-free software does not mean safe execution• Information leaks due to underlying hardware• Exploit leakage through side-effects

Powerconsumption

Executiontime CPU caches

3 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 7: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Side-Channel Attacks

• Bug-free software does not mean safe execution• Information leaks due to underlying hardware• Exploit leakage through side-effects

Powerconsumption

Executiontime CPU caches

3 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 8: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Architecture and Microarchitecture

• Instruction Set Architecture (ISA) is an abstract model of acomputer (x86, ARMv8, SPARC, …)

• Interface between hardware and software• Microarchitecture is an ISA implementation

4 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 9: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Architecture and Microarchitecture

• Instruction Set Architecture (ISA) is an abstract model of acomputer (x86, ARMv8, SPARC, …)

• Interface between hardware and software

• Microarchitecture is an ISA implementation

4 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 10: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Architecture and Microarchitecture

• Instruction Set Architecture (ISA) is an abstract model of acomputer (x86, ARMv8, SPARC, …)

• Interface between hardware and software• Microarchitecture is an ISA implementation

4 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 11: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Architecture and Microarchitecture

• Instruction Set Architecture (ISA) is an abstract model of acomputer (x86, ARMv8, SPARC, …)

• Interface between hardware and software• Microarchitecture is an ISA implementation

4 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 12: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Microarchitectural Components

• Modern CPUs contain multiple microarchitectural elements

Caches and buffers Predictors

• Transparent for the programmer• Timing optimizations→ side-channel leakage

5 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 13: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Microarchitectural Components

• Modern CPUs contain multiple microarchitectural elements

Caches and buffers Predictors

• Transparent for the programmer• Timing optimizations→ side-channel leakage

5 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 14: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Microarchitectural Components

• Modern CPUs contain multiple microarchitectural elements

Caches and buffers Predictors

• Transparent for the programmer

• Timing optimizations→ side-channel leakage

5 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 15: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Microarchitectural Components

• Modern CPUs contain multiple microarchitectural elements

Caches and buffers Predictors

• Transparent for the programmer• Timing optimizations→ side-channel leakage

5 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 16: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Let’s have a deeper look at the cache

Page 17: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

CPU Cache

printf("%d", i);

printf("%d", i);

6 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 18: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

CPU Cache

printf("%d", i);

printf("%d", i);

Cache miss

6 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 19: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

CPU Cache

printf("%d", i);

printf("%d", i);

Cache miss Reques

t

6 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 20: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

CPU Cache

printf("%d", i);

printf("%d", i);

Cache miss Reques

t

Response

6 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 21: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

CPU Cache

i

printf("%d", i);

printf("%d", i);

Cache miss Reques

t

Response

6 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 22: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

CPU Cache

i

printf("%d", i);

printf("%d", i);

Cache miss

Cache hit

Reques

t

Response

6 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 23: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

CPU Cache

i

printf("%d", i);

printf("%d", i);

Cache miss

Cache hit

Reques

t

Response

DRAM access,slow

6 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 24: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

CPU Cache

i

printf("%d", i);

printf("%d", i);

Cache miss

Cache hit

Reques

t

Response

DRAM access,slow

No DRAM access,much faster

6 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 25: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Caching speeds up Memory Accesses

80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400100

102

104

106

Access time [CPU cycles]

Numberofaccesses

Cache Hits

7 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 26: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Caching speeds up Memory Accesses

80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400100

102

104

106

Access time [CPU cycles]

Numberofaccesses

Cache Hits Cache Misses

7 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 27: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Evict+Reload

Attacker Victim

Shared Memory

evictaccess

access

8 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 28: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Evict+Reload

Attacker Victim

Shared Memory

evictaccess

accessShared Memory

cached

cached

8 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 29: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Evict+Reload

Attacker Victim

Shared Memory

evictevictaccess

accessShared Memory

8 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 30: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Evict+Reload

Attacker Victim

Shared Memory

evictevictaccess

accessAttacker Data

8 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 31: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Evict+Reload

Attacker Victim

Shared Memory

evictaccess

accessaccessAttacker Data

8 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 32: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Evict+Reload

Attacker Victim

Shared Memory

evictaccess

accessaccessShared Memory

8 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 33: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Evict+Reload

Attacker Victim

Shared Memory

evictaccessaccess

accessShared Memory

8 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 34: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Evict+Reload

Attacker Victim

Shared Memory

evictaccessaccess

accessShared Memory

vs

Victim accessed(fast)

Victim did not access(slow)

8 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 35: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Speculative execution

Page 36: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Speculative Execution

• CPU tries to predict the future (branch predictor), …• …based on events learned in the past

• Speculative execution of instructions• If the prediction was correct, …

• …very fast• otherwise: Discard results

• Measurable side-effects

9 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 37: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached
Page 38: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Prosciutto

Page 39: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Funghi

Page 40: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Diavolo

Page 41: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Diavolo

Page 42: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Diavolo

Page 43: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Diavolo

Page 44: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

»A table for 6 please«

Page 45: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached
Page 46: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Speculative Cooking

Page 47: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

»A table for 6 please«

Page 48: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached
Page 49: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached
Page 50: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached
Page 51: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached
Page 52: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached
Page 53: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre Requirements

• On Intel and AMD CPUs

• Some ARMs (Cortex R and Cortex A) are also affected• Common cause: speculative execution of branches• Speculative execution leaves microarchitectural traceswhich leak secret

11 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 54: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre Requirements

• On Intel and AMD CPUs• Some ARMs (Cortex R and Cortex A) are also affected

• Common cause: speculative execution of branches• Speculative execution leaves microarchitectural traceswhich leak secret

11 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 55: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre Requirements

• On Intel and AMD CPUs• Some ARMs (Cortex R and Cortex A) are also affected• Common cause: speculative execution of branches

• Speculative execution leaves microarchitectural traceswhich leak secret

11 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 56: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre Requirements

• On Intel and AMD CPUs• Some ARMs (Cortex R and Cortex A) are also affected• Common cause: speculative execution of branches• Speculative execution leaves microarchitectural traceswhich leak secret

11 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 57: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 0;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 58: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 0;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 59: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Speculate

index = 0;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 60: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’t’

Execute

index = 0;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 61: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 1;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 62: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 1;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 63: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’e’ Speculate

index = 1;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 64: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’e’

index = 1;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 65: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 2;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 66: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 2;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 67: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’x’

Speculate

index = 2;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 68: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’x’

index = 2;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 69: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 3;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 70: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 3;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 71: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’t’

Speculate

index = 3;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 72: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’t’

index = 3;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 73: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 4;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 74: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 4;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 75: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’K’

Speculate

index = 4;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 76: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’K’

Execute

index = 4;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 77: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 5;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 78: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 5;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 79: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’E’

Speculate

index = 5;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 80: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’E’

Execute

index = 5;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 81: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 6;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 82: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT index = 6;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 83: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’Y’

Speculate

index = 6;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 84: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre-PHT (aka Spectre Variant 1)

LUT

Index ’Y’

Execute

index = 6;

if (index < 4)

char* data = "textKEY";

LUT[data[index] * 4096] 0

then else

Prediction

12 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 85: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

NetSpectre: A Remote Spectre Variant

Page 86: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

The goal

We want to build a Spectre attack which...

• is capable of leaking secrets from a remote system• has neither physical access nor code execution on system• does not rely on software vulnerabilities

13 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 87: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

The goal

We want to build a Spectre attack which...• is capable of leaking secrets from a remote system

• has neither physical access nor code execution on system• does not rely on software vulnerabilities

13 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 88: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

The goal

We want to build a Spectre attack which...• is capable of leaking secrets from a remote system• has neither physical access nor code execution on system

• does not rely on software vulnerabilities

13 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 89: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

The goal

We want to build a Spectre attack which...• is capable of leaking secrets from a remote system• has neither physical access nor code execution on system• does not rely on software vulnerabilities

13 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 90: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Wait a minute...

CVSS v3 for CVE-2017-5753 (Spectre)Attack Vector

Network Adjacent Network Local Physical

14 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 91: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Wait a minute...

CVSS v3 for CVE-2017-5753 (Spectre)Attack Vector

Network Adjacent Network Local Physical

Attack Complexity

Low High

14 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 92: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Wait a minute...

CVSS v3 for CVE-2017-5753 (Spectre)Attack Vector

Network Adjacent Network Local Physical

Attack Complexity

Low High

Privilege Required

None Low High

14 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 93: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Wait a minute...

CVSS v3 for CVE-2017-5753 (Spectre)Attack Vector

Network Adjacent Network Local Physical

Attack Complexity

Low High

Privilege Required

None Low High

User Interaction

None Required

14 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 94: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Problems

Spectre without code execution is complicated

• Which branch can be exploited• Cannot observe the cache state• Spectre gadgets will be different• No timing measurement on the attacked system• How to select the data to leak

15 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 95: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Problems

Spectre without code execution is complicated• Which branch can be exploited

• Cannot observe the cache state• Spectre gadgets will be different• No timing measurement on the attacked system• How to select the data to leak

15 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 96: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Problems

Spectre without code execution is complicated• Which branch can be exploited• Cannot observe the cache state

• Spectre gadgets will be different• No timing measurement on the attacked system• How to select the data to leak

15 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 97: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Problems

Spectre without code execution is complicated• Which branch can be exploited• Cannot observe the cache state• Spectre gadgets will be different

• No timing measurement on the attacked system• How to select the data to leak

15 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 98: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Problems

Spectre without code execution is complicated• Which branch can be exploited• Cannot observe the cache state• Spectre gadgets will be different• No timing measurement on the attacked system

• How to select the data to leak

15 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 99: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Problems

Spectre without code execution is complicated• Which branch can be exploited• Cannot observe the cache state• Spectre gadgets will be different• No timing measurement on the attacked system• How to select the data to leak

15 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 100: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Exploiting Branches

• No code can be injected

• Public interface (API) accessing data• Branches in API can be mistrained remotely• Attacker only calls the API via network requests

16 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 101: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Exploiting Branches

• No code can be injected• Public interface (API) accessing data

• Branches in API can be mistrained remotely• Attacker only calls the API via network requests

16 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 102: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Exploiting Branches

• No code can be injected• Public interface (API) accessing data• Branches in API can be mistrained remotely

• Attacker only calls the API via network requests

16 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 103: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Exploiting Branches

• No code can be injected• Public interface (API) accessing data• Branches in API can be mistrained remotely• Attacker only calls the API via network requests

16 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 104: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

API Example

17 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 105: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

API Example

Bounds check

17 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 106: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

API Example

Bounds checkSpeculativeout-of-boundsread

17 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 107: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

API Example

• If bit in array was set→ admin is cached• If bit was not set→ admin is not cached• Observe cache state via function execution time

18 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 108: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

API Example

• If bit in array was set→ admin is cached• If bit was not set→ admin is not cached• Observe cache state via function execution time

18 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 109: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

API Example

• If bit in array was set→ admin is cached

• If bit was not set→ admin is not cached• Observe cache state via function execution time

18 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 110: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

API Example

• If bit in array was set→ admin is cached• If bit was not set→ admin is not cached

• Observe cache state via function execution time

18 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 111: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

API Example

• If bit in array was set→ admin is cached• If bit was not set→ admin is not cached• Observe cache state via function execution time

18 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 112: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Timing Measurement

• Cannot measure time directly on the attacked system

• Network latency depends on API execution time→ Measure the network roundtrip time• Reveals whether the variable is cached

19 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 113: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Timing Measurement

• Cannot measure time directly on the attacked system• Network latency depends on API execution time

→ Measure the network roundtrip time• Reveals whether the variable is cached

19 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 114: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Timing Measurement

• Cannot measure time directly on the attacked system• Network latency depends on API execution time

→ Measure the network roundtrip time

• Reveals whether the variable is cached

19 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 115: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Timing Measurement

• Cannot measure time directly on the attacked system• Network latency depends on API execution time

→ Measure the network roundtrip time• Reveals whether the variable is cached

19 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 116: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Network Measurement

16,000 16,500 17,000 17,500 18,000 18,500 19,000 19,500 20,000 20,500 21,000 21,500

0

5,000

10,000

Latency [cycles]

Cases

CachedUncached

20 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 117: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Resetting Cache State

• After measuring variable is always cached

• How do we evict the variable?• Constantly evict the cache via a file download• Thrash+Reload→ crude form of Evict+Reload

21 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 118: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Resetting Cache State

• After measuring variable is always cached• How do we evict the variable?

• Constantly evict the cache via a file download• Thrash+Reload→ crude form of Evict+Reload

21 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 119: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Resetting Cache State

• After measuring variable is always cached• How do we evict the variable?• Constantly evict the cache via a file download

• Thrash+Reload→ crude form of Evict+Reload

21 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 120: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Resetting Cache State

• After measuring variable is always cached• How do we evict the variable?• Constantly evict the cache via a file download• Thrash+Reload→ crude form of Evict+Reload

21 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 121: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

NetSpectre - The Big Picture

Victim

Network interface

22 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 122: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

NetSpectre - The Big Picture

Leak GadgetVictim

Network interface

if (x < bitstream_length)if(bitstream[x])

flag = true

22 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 123: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

NetSpectre - The Big Picture

0 1 0 1bitstream

Leak GadgetVictim

Network interface

if (x < bitstream_length)if(bitstream[x])

flag = true

22 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 124: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

NetSpectre - The Big Picture

0 1 0 1bitstream

Leak Gadget

index

Victim

Network interfacebit index

if (x < bitstream_length)if(bitstream[x])

flag = true

22 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 125: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

NetSpectre - The Big Picture

0 1 0 1 0 0 0bitstream (out of bounds)

Leak Gadget

leak

index

Victim

Network interfacebit index

if (x < bitstream_length)if(bitstream[x])

flag = true

22 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 126: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

NetSpectre - The Big Picture

0 1 0 1 0 0 0bitstream (out of bounds)

Leak Gadget

µ-arch.Element

leak encode

index

Victim

Network interfacebit index

if (x < bitstream_length)if(bitstream[x])

flag = true

22 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 127: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

NetSpectre - The Big Picture

0 1 0 1 0 0 0bitstream (out of bounds)

Leak Gadget

µ-arch.Element

Transmit Gadget

leak encode

index

Victim

Network interfacebit index

if (x < bitstream_length)if(bitstream[x])

flag = truesend(flag)

22 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 128: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

NetSpectre - The Big Picture

0 1 0 1 0 0 0bitstream (out of bounds)

Leak Gadget

µ-arch.Element

Transmit Gadget

leak encode

index

Victim

Network interface∆ = leaked bitbit index

if (x < bitstream_length)if(bitstream[x])

flag = truesend(flag)

22 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 129: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Gadgets

KernelSpace

User Space

Memory (physical)

Network interface

23 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 130: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Gadgets

KernelSpace

User Space

Memory (physical)

KernelGadget

Network interface

23 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 131: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Gadgets

KernelSpace

User Space

Memory (physical)

KernelGadget

Network interface

leak (all)system memory

23 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 132: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Gadgets

KernelSpace

User Space

Memory (physical)

KernelGadget

Network interfaceApp

leak (all)system memory

23 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 133: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Gadgets

KernelSpace

User Space

Memory (physical)

KernelGadget

Network interface

UserGadget Ap

p

leak (all)system memory

23 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 134: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Gadgets

KernelSpace

User Space

Memory (physical)

KernelGadget

Network interface

UserGadget Ap

p

leak applicationmemory

leak (all)system memory

23 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 135: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Combining Everything

• Mistrain branch predictor with in-bounds requests

• Evict everything from cache via file download• Leak a bit: do nothing (‘0’) or cache a memory location (‘1’)• Measure function latency which uses the memory location

24 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 136: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Combining Everything

• Mistrain branch predictor with in-bounds requests• Evict everything from cache via file download

• Leak a bit: do nothing (‘0’) or cache a memory location (‘1’)• Measure function latency which uses the memory location

24 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 137: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Combining Everything

• Mistrain branch predictor with in-bounds requests• Evict everything from cache via file download• Leak a bit: do nothing (‘0’) or cache a memory location (‘1’)

• Measure function latency which uses the memory location

24 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 138: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Combining Everything

• Mistrain branch predictor with in-bounds requests• Evict everything from cache via file download• Leak a bit: do nothing (‘0’) or cache a memory location (‘1’)• Measure function latency which uses the memory location

24 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 139: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Leaking

‘0’

‘1’

‘1’ ‘0’

‘0’ ‘1’

‘0’ ‘0’

Leaking byte ’d’ (0

1100100

)

25 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 140: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Leaking

‘0’ ‘1’

‘1’ ‘0’

‘0’ ‘1’

‘0’ ‘0’

Leaking byte ’d’ (01

100100

)

25 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 141: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Leaking

‘0’ ‘1’

‘1’

‘0’

‘0’ ‘1’

‘0’ ‘0’

Leaking byte ’d’ (011

00100

)

25 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 142: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Leaking

‘0’ ‘1’

‘1’ ‘0’

‘0’ ‘1’

‘0’ ‘0’

Leaking byte ’d’ (0110

0100

)

25 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 143: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Leaking

‘0’ ‘1’

‘1’ ‘0’

‘0’

‘1’

‘0’ ‘0’

Leaking byte ’d’ (01100

100

)

25 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 144: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Leaking

‘0’ ‘1’

‘1’ ‘0’

‘0’ ‘1’

‘0’ ‘0’

Leaking byte ’d’ (011001

00

)

25 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 145: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Leaking

‘0’ ‘1’

‘1’ ‘0’

‘0’ ‘1’

‘0’

‘0’

Leaking byte ’d’ (0110010

0

)

25 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 146: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Leaking

‘0’ ‘1’

‘1’ ‘0’

‘0’ ‘1’

‘0’ ‘0’

Leaking byte ’d’ (01100100)

25 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 147: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

What can we exploit with them?

Page 148: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Attack Targets

• Several possible attack targets

• Different impacts depending on target

Web/FTP Servers(user gadget)

SSH Daemons(user gadget)

Network Drivers(kernel gadget)

26 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 149: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Attack Targets

• Several possible attack targets• Different impacts depending on target

Web/FTP Servers(user gadget)

SSH Daemons(user gadget)

Network Drivers(kernel gadget)

26 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 150: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Attack Targets

• Several possible attack targets• Different impacts depending on target

Web/FTP Servers(user gadget)

SSH Daemons(user gadget)

Network Drivers(kernel gadget)

26 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 151: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Attack Targets

• Several possible attack targets• Different impacts depending on target

Web/FTP Servers(user gadget)

SSH Daemons(user gadget)

Network Drivers(kernel gadget)

26 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 152: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Attack Targets

• Several possible attack targets• Different impacts depending on target

Web/FTP Servers(user gadget)

SSH Daemons(user gadget)

Network Drivers(kernel gadget)

26 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 153: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Live Demo

27 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 154: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

That’s nice but how do we find the gadgets?

Page 155: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

How to Find a Gadget

• Finding Spectre gadgets is still an open problem

• Out of all papers, only 4 show real-world gadgets• Among them, only 2 Spectre-PHT (v1) gadgets• Still no fully automated approach

28 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 156: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

How to Find a Gadget

• Finding Spectre gadgets is still an open problem• Out of all papers, only 4 show real-world gadgets

• Among them, only 2 Spectre-PHT (v1) gadgets• Still no fully automated approach

28 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 157: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

How to Find a Gadget

• Finding Spectre gadgets is still an open problem• Out of all papers, only 4 show real-world gadgets• Among them, only 2 Spectre-PHT (v1) gadgets

• Still no fully automated approach

28 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 158: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

How to Find a Gadget

• Finding Spectre gadgets is still an open problem• Out of all papers, only 4 show real-world gadgets• Among them, only 2 Spectre-PHT (v1) gadgets• Still no fully automated approach

28 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 159: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Automated Gadget Detection

• Linux kernel uses static code analysis

• High false positive rate→ Out of 736 reports only 15 real gadgets• Ongoing effort, > 100 patches applied to Linux kernel• > 930 Spectre patches in open-source projects

29 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 160: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Automated Gadget Detection

• Linux kernel uses static code analysis• High false positive rate

→ Out of 736 reports only 15 real gadgets• Ongoing effort, > 100 patches applied to Linux kernel• > 930 Spectre patches in open-source projects

29 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 161: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Automated Gadget Detection

• Linux kernel uses static code analysis• High false positive rate

→ Out of 736 reports only 15 real gadgets

• Ongoing effort, > 100 patches applied to Linux kernel• > 930 Spectre patches in open-source projects

29 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 162: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Automated Gadget Detection

• Linux kernel uses static code analysis• High false positive rate

→ Out of 736 reports only 15 real gadgets• Ongoing effort, > 100 patches applied to Linux kernel

• > 930 Spectre patches in open-source projects

29 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 163: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Automated Gadget Detection

• Linux kernel uses static code analysis• High false positive rate

→ Out of 736 reports only 15 real gadgets• Ongoing effort, > 100 patches applied to Linux kernel• > 930 Spectre patches in open-source projects

29 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 164: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Automated Gadget Detection

• Built 21 toy examples, 18 containing Spectre gadgets

• We created two static approaches on detecting(Net)Spectre gadgets• Coccinelle (Matching the code pattern)• Python Capstone (Matching the binary pattern)

• All Gadgets were detected, only 3 false positives• Adapted oo7 approach to masscan open-source software

30 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 165: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Automated Gadget Detection

• Built 21 toy examples, 18 containing Spectre gadgets• We created two static approaches on detecting(Net)Spectre gadgets

• Coccinelle (Matching the code pattern)• Python Capstone (Matching the binary pattern)

• All Gadgets were detected, only 3 false positives• Adapted oo7 approach to masscan open-source software

30 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 166: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Automated Gadget Detection

• Built 21 toy examples, 18 containing Spectre gadgets• We created two static approaches on detecting(Net)Spectre gadgets• Coccinelle (Matching the code pattern)

• Python Capstone (Matching the binary pattern)

• All Gadgets were detected, only 3 false positives• Adapted oo7 approach to masscan open-source software

30 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 167: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Automated Gadget Detection

• Built 21 toy examples, 18 containing Spectre gadgets• We created two static approaches on detecting(Net)Spectre gadgets• Coccinelle (Matching the code pattern)• Python Capstone (Matching the binary pattern)

• All Gadgets were detected, only 3 false positives• Adapted oo7 approach to masscan open-source software

30 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 168: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Automated Gadget Detection

• Built 21 toy examples, 18 containing Spectre gadgets• We created two static approaches on detecting(Net)Spectre gadgets• Coccinelle (Matching the code pattern)• Python Capstone (Matching the binary pattern)

• All Gadgets were detected, only 3 false positives

• Adapted oo7 approach to masscan open-source software

30 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 169: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Automated Gadget Detection

• Built 21 toy examples, 18 containing Spectre gadgets• We created two static approaches on detecting(Net)Spectre gadgets• Coccinelle (Matching the code pattern)• Python Capstone (Matching the binary pattern)

• All Gadgets were detected, only 3 false positives• Adapted oo7 approach to masscan open-source software

30 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 170: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

oo7

• Taint Tracking↔ mark all input as evil

• If input x flows into branch x < size, the branch is markedas tainted

• ∃ a memory access relative within an array in a timewindow, report it as susceptible

31 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Policy forward propagates untrusted input i.e. in load instructions Speculative window is considered
Page 171: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

oo7

• Taint Tracking↔ mark all input as evil• If input x flows into branch x < size, the branch is markedas tainted

• ∃ a memory access relative within an array in a timewindow, report it as susceptible

31 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Policy forward propagates untrusted input i.e. in load instructions Speculative window is considered
Page 172: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

oo7

• Taint Tracking↔ mark all input as evil• If input x flows into branch x < size, the branch is markedas tainted

• ∃ a memory access relative within an array in a timewindow, report it as susceptible

31 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Policy forward propagates untrusted input i.e. in load instructions Speculative window is considered
Page 173: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Challenges in Identifying Gadgets

• Not clear how a Spectre gadget can look like

• Potentially many different forms• Can be scattered over many instructions• Similar to finding ROP chains• While searching, discovered novel type of gadget

32 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 174: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Challenges in Identifying Gadgets

• Not clear how a Spectre gadget can look like• Potentially many different forms

• Can be scattered over many instructions• Similar to finding ROP chains• While searching, discovered novel type of gadget

32 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 175: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Challenges in Identifying Gadgets

• Not clear how a Spectre gadget can look like• Potentially many different forms• Can be scattered over many instructions

• Similar to finding ROP chains• While searching, discovered novel type of gadget

32 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 176: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Challenges in Identifying Gadgets

• Not clear how a Spectre gadget can look like• Potentially many different forms• Can be scattered over many instructions• Similar to finding ROP chains

• While searching, discovered novel type of gadget

32 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 177: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Challenges in Identifying Gadgets

• Not clear how a Spectre gadget can look like• Potentially many different forms• Can be scattered over many instructions• Similar to finding ROP chains• While searching, discovered novel type of gadget

32 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 178: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Previously Ignored Spectre Gadgets

• No indirection, simple array access

33 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 179: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Previously Ignored Spectre Gadgets

• No indirection, simple array access

33 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 180: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Weaker Gadgets

• What to do with weaker gadgets?

→ Break ASLR• Not relevant for local Spectre attacks• Valuable in a remote scenario

34 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 181: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Weaker Gadgets

• What to do with weaker gadgets?→ Break ASLR

• Not relevant for local Spectre attacks• Valuable in a remote scenario

34 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 182: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Weaker Gadgets

• What to do with weaker gadgets?→ Break ASLR• Not relevant for local Spectre attacks

• Valuable in a remote scenario

34 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 183: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Weaker Gadgets

• What to do with weaker gadgets?→ Break ASLR• Not relevant for local Spectre attacks• Valuable in a remote scenario

34 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 184: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Break ASLR

ffffffffff000000-ffffffffffffffff

ffffffffff000000-ffffffffff7fffff

ffffffffff000000-ffffffffff3fffff ffffffffff400000-ffffffffff7fffff

ffffffffff400000-ffffffffff3fffff ffffffffff440000-ffffffffff7fffff

...

ffffffffff600000

ffffffffff800000-ffffffffffffffff

35 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 185: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Break ASLR

ffffffffff000000-ffffffffffffffff

ffffffffff000000-ffffffffff7fffff

ffffffffff000000-ffffffffff3fffff ffffffffff400000-ffffffffff7fffff

ffffffffff400000-ffffffffff3fffff ffffffffff440000-ffffffffff7fffff

...

ffffffffff600000

ffffffffff800000-ffffffffffffffff

35 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 186: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Break ASLR

ffffffffff000000-ffffffffffffffff

ffffffffff000000-ffffffffff7fffff

ffffffffff000000-ffffffffff3fffff ffffffffff400000-ffffffffff7fffff

ffffffffff400000-ffffffffff3fffff ffffffffff440000-ffffffffff7fffff

...

ffffffffff600000

ffffffffff800000-ffffffffffffffff

35 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 187: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Break ASLR

ffffffffff000000-ffffffffffffffff

ffffffffff000000-ffffffffff7fffff

ffffffffff000000-ffffffffff3fffff ffffffffff400000-ffffffffff7fffff

ffffffffff400000-ffffffffff3fffff ffffffffff440000-ffffffffff7fffff

...

ffffffffff600000

ffffffffff800000-ffffffffffffffff

35 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 188: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Break ASLR

ffffffffff000000-ffffffffffffffff

ffffffffff000000-ffffffffff7fffff

ffffffffff000000-ffffffffff3fffff ffffffffff400000-ffffffffff7fffff

ffffffffff400000-ffffffffff3fffff ffffffffff440000-ffffffffff7fffff

...

ffffffffff600000

ffffffffff800000-ffffffffffffffff

35 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 189: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Break ASLR

ffffffffff000000-ffffffffffffffff

ffffffffff000000-ffffffffff7fffff

ffffffffff000000-ffffffffff3fffff ffffffffff400000-ffffffffff7fffff

ffffffffff400000-ffffffffff3fffff ffffffffff440000-ffffffffff7fffff

...

ffffffffff600000

ffffffffff800000-ffffffffffffffff

35 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 190: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Break ASLR

ffffffffff000000-ffffffffffffffff

ffffffffff000000-ffffffffff7fffff

ffffffffff000000-ffffffffff3fffff ffffffffff400000-ffffffffff7fffff

ffffffffff400000-ffffffffff3fffff ffffffffff440000-ffffffffff7fffff

...

ffffffffff600000

ffffffffff800000-ffffffffffffffff

35 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 191: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Is cache the only channel to exploit SpectreRemotely?

Page 192: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre and the Cache

• All Spectre variants so far use the cache

• Is this a requirement?• Can we encode the data somewhere else?

36 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 193: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre and the Cache

• All Spectre variants so far use the cache• Is this a requirement?

• Can we encode the data somewhere else?

36 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 194: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre and the Cache

• All Spectre variants so far use the cache• Is this a requirement?• Can we encode the data somewhere else?

36 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 195: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Advanced Vector Instructions (AVX)

• Allow performing an operation in parallel on multiple data

• Commonly used in gaming and cryptography

X7 X6 X5 X4 X3 X2 X1 X0__mm256

Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0__mm256

X7+Y7 X6+Y6 X5+Y5 X4+Y4 X3+Y3 X2+Y2 X1+Y1 X0+Y0__mm256

37 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 196: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Advanced Vector Instructions (AVX)

• Allow performing an operation in parallel on multiple data• Commonly used in gaming and cryptography

X7 X6 X5 X4 X3 X2 X1 X0__mm256

Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0__mm256

X7+Y7 X6+Y6 X5+Y5 X4+Y4 X3+Y3 X2+Y2 X1+Y1 X0+Y0__mm256

37 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 197: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Advanced Vector Instructions (AVX)

• Allow performing an operation in parallel on multiple data• Commonly used in gaming and cryptography

X7 X6 X5 X4 X3 X2 X1 X0__mm256

Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0__mm256

X7+Y7 X6+Y6 X5+Y5 X4+Y4 X3+Y3 X2+Y2 X1+Y1 X0+Y0__mm256

37 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 198: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Advanced Vector Instructions (AVX)

• Allow performing an operation in parallel on multiple data• Commonly used in gaming and cryptography

X7 X6 X5 X4 X3 X2 X1 X0__mm256

Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0__mm256

X7+Y7 X6+Y6 X5+Y5 X4+Y4 X3+Y3 X2+Y2 X1+Y1 X0+Y0__mm256

37 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 199: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Advanced Vector Instructions (AVX)

• Allow performing an operation in parallel on multiple data• Commonly used in gaming and cryptography

X7 X6 X5 X4 X3 X2 X1 X0__mm256

Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0__mm256

X7+Y7 X6+Y6 X5+Y5 X4+Y4 X3+Y3 X2+Y2 X1+Y1 X0+Y0__mm256

37 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 200: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX

• 256-bit instructions need a lot of power

→ On Intel, disabled by default, enabled on first use

• Requires some time to power up• Measure execution time of AVX instruction

→ Leak timing information

38 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 201: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX

• 256-bit instructions need a lot of power→ On Intel, disabled by default, enabled on first use

• Requires some time to power up• Measure execution time of AVX instruction

→ Leak timing information

38 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 202: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX

• 256-bit instructions need a lot of power→ On Intel, disabled by default, enabled on first use

• Requires some time to power up

• Measure execution time of AVX instruction→ Leak timing information

38 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 203: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX

• 256-bit instructions need a lot of power→ On Intel, disabled by default, enabled on first use

• Requires some time to power up• Measure execution time of AVX instruction

→ Leak timing information

38 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 204: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX

• 256-bit instructions need a lot of power→ On Intel, disabled by default, enabled on first use

• Requires some time to power up• Measure execution time of AVX instruction

→ Leak timing information

38 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 205: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX Latency

150 200 250 300 350 400 450 500 550 600 6500

10,000

20,000

30,000

Latency [cycles]

Cases

Powered downWarmed up

39 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 206: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX Leak Gadget

40 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 207: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Resetting Microarchitectural State

• We had to thrash cache to reset state

• Wait ≈1ms→ AVX unit powers off• More efficient and stealthier than constantly downloadinga file

• → higher performance than cache covert channel

41 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 208: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Resetting Microarchitectural State

• We had to thrash cache to reset state• Wait ≈1ms→ AVX unit powers off

• More efficient and stealthier than constantly downloadinga file

• → higher performance than cache covert channel

41 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 209: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Resetting Microarchitectural State

• We had to thrash cache to reset state• Wait ≈1ms→ AVX unit powers off• More efficient and stealthier than constantly downloadinga file

• → higher performance than cache covert channel

41 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 210: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Resetting Microarchitectural State

• We had to thrash cache to reset state• Wait ≈1ms→ AVX unit powers off• More efficient and stealthier than constantly downloadinga file

• → higher performance than cache covert channel

41 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 211: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX Cooldown

0 500 1,000 1,500 2,000 2,500 3,000 3,500 4,000 4,500 5,000 5,500

200

300

400

Wait time [µs]

Latency

42 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 212: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX-based NetSpectre

1. Mistrain branch predictor with in-bounds requests

2. Wait for AVX unit to power off (1ms)3. Leak a bit: do nothing (‘0’) or power AVX unit (‘1’)4. Measure function latency which uses AVX instruction

43 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 213: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX-based NetSpectre

1. Mistrain branch predictor with in-bounds requests2. Wait for AVX unit to power off (1ms)

3. Leak a bit: do nothing (‘0’) or power AVX unit (‘1’)4. Measure function latency which uses AVX instruction

43 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 214: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX-based NetSpectre

1. Mistrain branch predictor with in-bounds requests2. Wait for AVX unit to power off (1ms)3. Leak a bit: do nothing (‘0’) or power AVX unit (‘1’)

4. Measure function latency which uses AVX instruction

43 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 215: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX-based NetSpectre

1. Mistrain branch predictor with in-bounds requests2. Wait for AVX unit to power off (1ms)3. Leak a bit: do nothing (‘0’) or power AVX unit (‘1’)4. Measure function latency which uses AVX instruction

43 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 216: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX Network

0.75 0.8 0.85 0.9 0.95 1 1.05 1.1 1.15 1.2

·104

0

1

2·104

Response time [CPU cycles]

Latency

Powered down unitWarmed up unit

44 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 217: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Results

Page 218: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Test Environments

• NetSpectre tested in various environments

i5-6200U, i7-8550U i7-6700K, i7-8700K Skylake Xeon ARM Cortex A75

45 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 219: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Test Environments

• NetSpectre tested in various environments

i5-6200U, i7-8550U

i7-6700K, i7-8700K Skylake Xeon ARM Cortex A75

45 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 220: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Test Environments

• NetSpectre tested in various environments

i5-6200U, i7-8550U i7-6700K, i7-8700K

Skylake Xeon ARM Cortex A75

45 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 221: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Test Environments

• NetSpectre tested in various environments

i5-6200U, i7-8550U i7-6700K, i7-8700K Skylake Xeon

ARM Cortex A75

45 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 222: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Test Environments

• NetSpectre tested in various environments

i5-6200U, i7-8550U i7-6700K, i7-8700K Skylake Xeon ARM Cortex A75

45 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 223: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Attack Results

• Local Network (1 000 000 measurements/bit)

30 min/byte 8 min/byte

• Cloud (20 000 000 measurements/bit)

1 h/bit

46 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 224: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Attack Results

• Local Network (1 000 000 measurements/bit)

30 min/byte

8 min/byte

• Cloud (20 000 000 measurements/bit)

1 h/bit

46 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 225: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Attack Results

• Local Network (1 000 000 measurements/bit)

30 min/byte 8 min/byte

• Cloud (20 000 000 measurements/bit)

1 h/bit

46 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 226: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Attack Results

• Local Network (1 000 000 measurements/bit)

30 min/byte 8 min/byte

• Cloud (20 000 000 measurements/bit)

1 h/bit

46 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 227: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Attack Results

• Local Network (1 000 000 measurements/bit)

30 min/byte 8 min/byte

• Cloud (20 000 000 measurements/bit)

1 h/bit

46 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 228: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

How to prevent NetSpectre

Page 229: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Network Countermeasures

• Mitigating NetSpectre

Network side Fix Spectre

47 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 230: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Network Countermeasures

• Mitigating NetSpectre

Network side

Fix Spectre

47 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 231: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Network Countermeasures

• Mitigating NetSpectre

Network side Fix Spectre

47 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 232: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Network Countermeasures

• Prevent NetSpectre on the network side

Firewalls and DDoSprotections

Add random noise topackets

Networksegmentation

48 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 233: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Network Countermeasures

• Prevent NetSpectre on the network side

Firewalls and DDoSprotections

Add random noise topackets

Networksegmentation

48 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 234: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Network Countermeasures

• Prevent NetSpectre on the network side

Firewalls and DDoSprotections

Add random noise topackets

Networksegmentation

48 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 235: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Network Countermeasures

• Prevent NetSpectre on the network side

Firewalls and DDoSprotections

Add random noise topackets

Networksegmentation

48 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 236: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre Countermeasures

• Prevent (Net)Spectre on the system side

Hardware Fixes Software Changes

49 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 237: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre Countermeasures

• Prevent (Net)Spectre on the system side

Hardware Fixes

Software Changes

49 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 238: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Spectre Countermeasures

• Prevent (Net)Spectre on the system side

Hardware Fixes Software Changes

49 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 239: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

AVX vs single lfence

300 400 500 600 700 800 900 1,000 1,100 1,200 1,300 1,400

0

200

400

600

800

Response time [CPU cycles]

Amount

Powered upPowered down

Powered after lfence

50 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 240: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Limitations

• NetSpectre requires a fast and stable network connection

• Local networks• Data centers (VM to VM attack)

• Internet speeds improve (e.g., fiber, 5G)→ possible in the near future?• Attack speeds can be drastically improved

• Better signal processing/filtering• Dedicated measuring hardware

51 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 241: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Limitations

• NetSpectre requires a fast and stable network connection• Local networks

• Data centers (VM to VM attack)

• Internet speeds improve (e.g., fiber, 5G)→ possible in the near future?• Attack speeds can be drastically improved

• Better signal processing/filtering• Dedicated measuring hardware

51 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 242: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Limitations

• NetSpectre requires a fast and stable network connection• Local networks• Data centers (VM to VM attack)

• Internet speeds improve (e.g., fiber, 5G)→ possible in the near future?• Attack speeds can be drastically improved

• Better signal processing/filtering• Dedicated measuring hardware

51 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 243: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Limitations

• NetSpectre requires a fast and stable network connection• Local networks• Data centers (VM to VM attack)

• Internet speeds improve (e.g., fiber, 5G)

→ possible in the near future?• Attack speeds can be drastically improved

• Better signal processing/filtering• Dedicated measuring hardware

51 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 244: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Limitations

• NetSpectre requires a fast and stable network connection• Local networks• Data centers (VM to VM attack)

• Internet speeds improve (e.g., fiber, 5G)→ possible in the near future?

• Attack speeds can be drastically improved• Better signal processing/filtering• Dedicated measuring hardware

51 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 245: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Limitations

• NetSpectre requires a fast and stable network connection• Local networks• Data centers (VM to VM attack)

• Internet speeds improve (e.g., fiber, 5G)→ possible in the near future?• Attack speeds can be drastically improved

• Better signal processing/filtering• Dedicated measuring hardware

51 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 246: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Limitations

• NetSpectre requires a fast and stable network connection• Local networks• Data centers (VM to VM attack)

• Internet speeds improve (e.g., fiber, 5G)→ possible in the near future?• Attack speeds can be drastically improved

• Better signal processing/filtering

• Dedicated measuring hardware

51 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 247: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Limitations

• NetSpectre requires a fast and stable network connection• Local networks• Data centers (VM to VM attack)

• Internet speeds improve (e.g., fiber, 5G)→ possible in the near future?• Attack speeds can be drastically improved

• Better signal processing/filtering• Dedicated measuring hardware

51 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 248: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

What do we learn from it?

• Gadgets are more versatile than expected

• Finding gadgets is even harder than expected• Proposed security mechanisms are incomplete

• focus only on the cache• often assume (local) code execution

• Root problem has to be solved→ more research required

52 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 249: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

What do we learn from it?

• Gadgets are more versatile than expected• Finding gadgets is even harder than expected

• Proposed security mechanisms are incomplete• focus only on the cache• often assume (local) code execution

• Root problem has to be solved→ more research required

52 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 250: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

What do we learn from it?

• Gadgets are more versatile than expected• Finding gadgets is even harder than expected• Proposed security mechanisms are incomplete

• focus only on the cache• often assume (local) code execution

• Root problem has to be solved→ more research required

52 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 251: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

What do we learn from it?

• Gadgets are more versatile than expected• Finding gadgets is even harder than expected• Proposed security mechanisms are incomplete

• focus only on the cache

• often assume (local) code execution

• Root problem has to be solved→ more research required

52 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 252: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

What do we learn from it?

• Gadgets are more versatile than expected• Finding gadgets is even harder than expected• Proposed security mechanisms are incomplete

• focus only on the cache• often assume (local) code execution

• Root problem has to be solved→ more research required

52 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 253: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

What do we learn from it?

• Gadgets are more versatile than expected• Finding gadgets is even harder than expected• Proposed security mechanisms are incomplete

• focus only on the cache• often assume (local) code execution

• Root problem has to be solved→ more research required

52 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 254: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

Take Aways

• Speculative execution leaks secrets without exploiting bugs• Spectre attacks are not limited to local attackers• Spectre attacks have a larger impact than assumed

53 Michael Schwarz, Martin Schwarzl | IAIK – Graz University of Technology

Page 255: NetSpectre: A Truly Remote Spectre Variant€¦ · NetworkMeasurement 16,00016,50017,00017,50018,00018,50019,00019,50020,00020,50021,00021,500 0 5,000 10,000 Latency[cycles] ses Cached

NetSpectreA Truly Remote Spectre Variant

Martin Schwarzl @marv0x90

Michael Schwarz @misc0110


Recommended