NetCAT : Practical Cache Attacks from the Network Michael Kurth , - - PowerPoint PPT Presentation

netcat practical cache attacks from the network
SMART_READER_LITE
LIVE PREVIEW

NetCAT : Practical Cache Attacks from the Network Michael Kurth , - - PowerPoint PPT Presentation

NetCAT : Practical Cache Attacks from the Network Michael Kurth , Ben Gras, Dennis Andriesse, Cristiano Giuffrida, Herbert Bos, Kaveh Razavi Cache Attack from the Network Client Server Remote Cache Attack SSH 2 Network Cache Attack 3


slide-1
SLIDE 1

NetCAT: Practical Cache Attacks from the Network

Michael Kurth, Ben Gras, Dennis Andriesse, Cristiano Giuffrida, Herbert Bos, Kaveh Razavi

slide-2
SLIDE 2

Cache Attack from the Network

2

SSH Server Client Remote Cache Attack

slide-3
SLIDE 3

Network Cache Attack

3

slide-4
SLIDE 4

Outline

  • Background
  • Cache Attacks
  • DDIO
  • RDMA
  • NetCAT - CVE-2019-11184
  • Reverse Engineering DDIO
  • End-to-End Attack
  • Demo
  • Conclusion

4

slide-5
SLIDE 5

Cache Attacks (prev.)

5

Cloud Java Script

VM 1 VM 2 Shared Hardware (CPU / Cache) Other Process Browser Shared Hardware (CPU / Cache)

slide-6
SLIDE 6

The Memory Wall - Caches

6

Fast Slow

Core 0 Core 1

Regs

L1 d-cache L1 i-cache

L2 cache LLC cache (shared by all cores) Main Memory

Regs

L1 d-cache L1 i-cache

L2 cache

Small Large

slide-7
SLIDE 7

PRIME+PROBE

7

Prime Cache Lines Probe Victim Access

slide-8
SLIDE 8

Cache Hits & Misses

8

slide-9
SLIDE 9

Cache Attacks

With Cache Hits & Misses we can

  • Leak Crypto Keys (e.g. AES)
  • Guess visited Websites
  • Leak Memory Contents

9

slide-10
SLIDE 10

DDIO

  • Data Direct I/O Technology
  • Enabled on all Intel server-grade processors since 2012
  • Transparent for drivers and OS

10

slide-11
SLIDE 11

DDIO

11

DMA DDIO

CP ...

Mai Mem Iegaed Mem Clle PCIe R Cmle La Leel Cache Wa 20 Wa 4 Wa 3 Wa 2 Wa 1 Wa 19 Wa 17 PCIe Deice (NIC, GPU, Sage)

CP ...

Mai Mem Iegaed Mem Clle PCIe R Cmle La Leel Cache Wa 20 Wa 4 Wa 3 Wa 2 Wa 1 Wa 19 Wa 17 PCIe Deice (NIC, GPU, Sage)

slide-12
SLIDE 12

Why is DDIO important?

12

From: Intel Data Direct I/O Technology Overview

slide-13
SLIDE 13

Network Cache Attack – Main Challenges

  • Inner workings of DDIO
  • Remote PRIME+PROBE
  • End-to-end attack

13

slide-14
SLIDE 14

RDMA

14

TCP RDMA

Target NIC

HW Kernel User Space TCP IP Interfaces Application

Buffer

Target NIC

HW Kernel User Space TCP IP Interfaces Application

Buffer Buffer Buffer Buffer

slide-15
SLIDE 15

RDMA

  • Available on Public Clouds
  • SMBDirect / NFS over RDMA
  • Applications:
  • High Performance Computing (HPC)
  • Data Centers / Cloud
  • Storage

15

slide-16
SLIDE 16

Network Cache Attack

  • DDIO + RDMA

Ø RDMA operations have accesses not only to the pinned memory region but also to parts of the LLC. Ø Foundation for our attack

16

slide-17
SLIDE 17

Reverse Engineering DDIO

  • How does DDIO interact with the LLC?
  • Which portion of the cache can we access?

18

slide-18
SLIDE 18

Reads served from memory vs LLC

19

t1 = timed_rdma_read(offsetX); rdma_write (offsetX); t2 = timed_rdma_read(offsetX);

slide-19
SLIDE 19

DDIO Allocation Limitation

20

CP ...

Mai Mem Iegaed Mem Clle PCIe R Cmle La Leel Cache Wa 20 Wa 4 Wa 3 Wa 2 Wa 1 Wa 19 Wa 17 PCIe Deice (NIC, GPU, Sage)

slide-20
SLIDE 20

End-to-End Attack

22

slide-21
SLIDE 21

Cache Attack from the Network

23

SSH Server Client Remote Cache Attack

slide-22
SLIDE 22

NIC’s ring buffer

24

NIC CP 1 2 3 4

Pace 4 Pace 3 Pace 2 Pace 1

Ring Bffe

5 6 7 8

Pace

Cache Acii

Cache Le

1 2 3 4

  • Te

Cache Acii

Cache Le

1 2 3 4

  • Te

Cache Acii

Cache Le

1 2 3 4

  • Te

Cache Acii

Cache Le

1 2 3 4

  • Te

Cache Acii

Cache Le

1 2 3 4

  • Te
slide-23
SLIDE 23

Detecting the NIC’s ring buffer in LLC

25

slide-24
SLIDE 24

Tracking the Ring Buffer

26

Online Tracker Offline Extractor

slide-25
SLIDE 25

Map inter-packet arrival times to Words

27

“because”

slide-26
SLIDE 26

Map inter-packet arrival times to Words

  • 20 subjects typing free and transcribed text
  • Total of 4’574 unique words, on average 228.7 unique

words per subject

  • Each word is represented as a point in multidimensional

Space

  • k-nearest neighbors' algorithm (k-NN) to classify measured

word

28

slide-27
SLIDE 27

Evaluation

29

slide-28
SLIDE 28

CVE-2019-11184 - Demo

30

slide-29
SLIDE 29
slide-30
SLIDE 30

Mitigation

  • Turn off DDIO or do not use RDMA
  • Intel: “limit direct access from untrusted networks when

DDIO & RDMA are enabled”

32

slide-31
SLIDE 31

The name of our paper

  • It was a pun - NetCAT stands for Network Cache ATtack.

33

slide-32
SLIDE 32

Conclusion

  • LLC now directly on the I/O path
  • CVE-2019-11184 is the first DDIO side channel vulnerability
  • Intel acknowledged findings
  • Public disclosure was on September 10, 2019
  • Bug Bounty payment
  • First security analysis on DDIO - future attacks likely

34

@mik__ @vu5ec