Last-Level Cache Side-Channel Attacks are

Published  . 0 views
↓ Download
Last-Level Cache Side-Channel Attacks are
1 / 1
Last-Level Cache Side-Channel Attacks are - slide 1 of 22 Last-Level Cache Side-Channel Attacks are - slide 2 of 22 Last-Level Cache Side-Channel Attacks are - slide 3 of 22 Last-Level Cache Side-Channel Attacks are - slide 4 of 22 Last-Level Cache Side-Channel Attacks are - slide 5 of 22 Last-Level Cache Side-Channel Attacks are - slide 6 of 22 Last-Level Cache Side-Channel Attacks are - slide 7 of 22 Last-Level Cache Side-Channel Attacks are - slide 8 of 22 Last-Level Cache Side-Channel Attacks are - slide 9 of 22 Last-Level Cache Side-Channel Attacks are - slide 10 of 22 Last-Level Cache Side-Channel Attacks are - slide 11 of 22 Last-Level Cache Side-Channel Attacks are - slide 12 of 22 Last-Level Cache Side-Channel Attacks are - slide 13 of 22 Last-Level Cache Side-Channel Attacks are - slide 14 of 22 Last-Level Cache Side-Channel Attacks are - slide 15 of 22 Last-Level Cache Side-Channel Attacks are - slide 16 of 22 Last-Level Cache Side-Channel Attacks are - slide 17 of 22 Last-Level Cache Side-Channel Attacks are - slide 18 of 22 Last-Level Cache Side-Channel Attacks are - slide 19 of 22 Last-Level Cache Side-Channel Attacks are - slide 20 of 22 Last-Level Cache Side-Channel Attacks are - slide 21 of 22 Last-Level Cache Side-Channel Attacks are - slide 22 of 22
Description: Last-Level Cache Side-Channel Attacks are Practical Fangfei Liu, Yuval Yarom, Qian Ge, Gernot Heiser, Ruby B. Lee Appeared in SP15 Presented by Baltasar Dinis and Rem Yang Side-channel attacks are hard to deploy The L1i, L1d (and L2)

Related Topics

Download Presentation

"Last-Level Cache Side-Channel Attacks are" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

slide1. Last-Level Cache Side-Channel Attacks are Practical Fangfei Liu, Yuval Yarom, Qian Ge, Gernot Heiser, Ruby B. Lee Appeared in S&P'15 Presented by Baltasar Dinis and Rem Yang<br>
slide2. Side-channel attacks are hard to deploy The L1i, L1d (and L2) caches are:
Fast and small → high timing resolution → easier to attack
Core-private, thus unlikely to be shared among cloud clients
Cloud providers disable page sharing between VMs
This thwarts both FLUSH+RELOAD and EVICT+RELOAD attacks 2 LLC L1 L1 DRAM<br>
slide3. Prime + Probe 3 Sets Ways Attacker Victim<br>
slide4. Prime + Probe Prime a cache set 4 Sets Ways Attacker Victim<br>
slide5. Prime + Probe Prime a cache set
Wait for some time 5 Sets Ways Attacker Victim<br>
slide6. Prime + Probe Prime a cache set
Wait for some time
Probe cache set 6 Sets Ways Attacker Victim<br>
slide7. Prime + Probe Victim did not access cache set
Attacker probe is fast 7 Sets Ways Attacker Victim<br>
slide8. Prime + Probe Victim did access cache set
Attacker probe is slow 8 Sets Ways Attacker Victim Evict<br>
slide9. Solving the "easy" challenges Q: If the secret data is in the L1, how can we observe data accesses in the LLC?
A: Leverage the fact that the LLC is inclusive → evicting data in the LLC forces an eviction in the victim L1

Q: How to target specific cache sets in the LLC if it is physically indexed?
A: By using huge pages in the attacker code, all the set index bits are in the page offset (constant under address translation) 9 LLC DRAM L1 L1<br>
slide10. Prerequisite for PRIME+PROBE Attacker needs to know which memory accesses map to the same cache set (the eviction set) 10 LLC L1 L1 DRAM Sets Ways<br>
slide11. The LLC is sliced, and that's complicated Each core is connected to a local slice of the LLC, use a ring bus to handle remote accesses
Slice ID is computed from a hash of the address
The access latency varies with which slice we are targeting → we need to PRIME+PROBE within the same slice to get consistent time readings 11 L1 L1 LLC0 DRAM LLC1<br>
slide12. PRIME+PROBE on the sliced LLC is hard Attacker needs to know which memory accesses map to the same cache set and cache slice 12 Slice 1 Slice 0 Slice 2<br>
slide13. Constructing the Eviction Set Goal: partition lines (in the same set) into per-slice eviction sets
For illustration, assume LLC has 2 ways and 2 slices 13 lines eviction_set_0 eviction_set_1<br>
slide14. Constructing the Eviction Set Construct the minimal group of lines that span the entire set across all slices
For each candidate in lines:
If not conflicts with conflict_group:
Move to conflict_group 14 lines conflict_group eviction_set_0 eviction_set_1<br>
slide15. Constructing the Eviction Set 15 lines conflict_group Partition the conflict_group by slice
For each candidate left in  lines:
Use it to distinguish members of the conflict_group; if they conflict, they belong to the same slice eviction_set_0 eviction_set_1<br>
slide16. Attacking Square + Multiply Exponentiation // compute b^e % mod
// e is secret
func sq_mul(b, mod, e):
  r = 1
  for i in len(e):
    r = square(r) % mod
    // secret dependent
    if e_i == 1:  
      r = r * b % mod     
  return r Repeatedly PRIME+PROBE the LLC
Observe intervals between cache accesses made by the square operation
Temporal pattern differs due to secret-dependent memory accesses
Corresponds to bits in exponent 16 Used in both RSA and ElGamal decryptions<br>
slide17. 17 0<br>
slide18. 18 00<br>
slide19. 19 001<br>
slide20. 20 0011....<br>
slide21. The Good, The Bad... The attack is practical, even with:
Non-collocated cores
No knowledge of any page table mappings (victim and attacker)
No page-sharing between victim and attacker
No need to reverse the sliced cache hash function
Higher bandwidth than prior work (1.2Mb/s vs 190Kb/s) In a real system, it is non-trivial to figure out what cache set maps to a particular part of the code
Requires information about the software artifact the victim is using
Experiments were run in isolation: real cloud will be noisier and harder to figure out 21<br>
slide22. ... and The Future (work) 22 With such an automatic side-channel detection build an automated tool for exploiting collocated clients
Identify web services by measuring latency from inside the datacenter
Extract keys from TLS negotiation
(scare everyone in the process?) Automatic detection of secret-dependent accesses
Sample from a lot of known crypto libraries
Train a model
Attach a model to the attacker code, PRIME+PROBE the collocated clients continuously Explore how the attack could extend to NUMA architectures
Sounds hard: how to prime remote memory?<br>