CaSA End-to-end Quantitative Security Analysis of Randomly Mapped - - PowerPoint PPT Presentation

casa
SMART_READER_LITE
LIVE PREVIEW

CaSA End-to-end Quantitative Security Analysis of Randomly Mapped - - PowerPoint PPT Presentation

CaSA End-to-end Quantitative Security Analysis of Randomly Mapped Caches Thomas Bourgeat, Jules Drean, Yuheng Yang, Lillian Tsai, Joel Emer, Mengjia Yan Presented by Peter Deutsch MIT 6.888 - Secure Hardware Design Motivation It is well known


slide-1
SLIDE 1

CaSA

End-to-end Quantitative Security Analysis of Randomly Mapped Caches

Thomas Bourgeat, Jules Drean, Yuheng Yang, Lillian Tsai, Joel Emer, Mengjia Yan Presented by Peter Deutsch MIT 6.888 - Secure Hardware Design

slide-2
SLIDE 2

Motivation

It is well known that caches can be used to exfiltrate secrets through timing side channels such as Prime + Probe. Micro-architects have attempted to mitigate side-channel leakage through the use

  • f randomly mapped caches, which aim to increase the difficulty of an attack.

Many of these mitigation schemes make bold (and ultimately quite fragile) security claims based on varying attack strategies. It is apparent that a unified framework is required to thoroughly evaluate cache security across proposed designs!

2

slide-3
SLIDE 3

Threat Model

CaSA assumes that an attacker can:

  • Observe the latency of its own memory accesses
  • Reside in a user-level process or secure enclave
  • Use more than one thread to control multiple cores
  • Leverage speculative execution to provoke the victim

CaSA does not reason about:

  • Attacks mounted in an SMT context
  • Flush and occupancy based cache attacks

3

slide-4
SLIDE 4

Overview - Primary Contributions

CaSA (Cache Security Analyzer) provides the following contributions: 1. Demonstrates a three-step, end-to-end communication paradigm which better evaluates the security properties of caches beyond eviction set generation 2. Formulates the security analysis of randomized caches into a statistical problem, allowing quantitative analysis through a novel framework 3. Evaluates existing randomly mapped caches and provides new insights regarding noise and communicating across cache epochs

4

slide-5
SLIDE 5

Any Initial Thoughts? Strengths? Weaknesses?

5

slide-6
SLIDE 6

6

My Thoughts

Strengths

  • Provides the first framework which allows for a fair comparison of the security of

contemporary secure/randomized caches

  • Is very flexible, and can analyze a wide variety of potential cache configurations,

allowing for design space exploration

  • Clearly expresses and justifies surprising results (such as the impact of noise)

Weaknesses

  • Doesn’t provide a tool to determine upper bounds for side-channel bandwidth
  • Fails to formulate statistical representations for multi-way caches
  • Doesn’t consider communications schemes which use multi-bit symbols
slide-7
SLIDE 7

Background - Cache-Based Side Channel Attacks

In cache-based side channel attacks, the cache is used as a communication channel, where each line can be viewed as a sub-channel.

7

Prime Pre-Condition Wait Modulate Probe Detect 1. 2. 3.

Set 0 Set 1

A B

Set 0 Set 1

A B X

Set 0 Set 1

A X B

EVICT INSERT Delay?

Takeaway: We would like a cache where it is difficult to concretely know which channels are pre-conditioned by an attacker, and which channels are modulated by a victim.

slide-8
SLIDE 8

Background - Randomly Mapped Caches

8

Set 0 Set 1

By introducing randomness into mapping functions, we can significantly increase the difficulty for an attacker to create an eviction set.

A Single Hash Group - Static Mapping (ex. Standard Set-Associative Cache)

Way 0 Way 1

A Multiple Hash Groups - Dynamic Mapping (ex. Skewed CEASAR1)

Hash Group 1 Hash Group 2

1 New Attacks and Defense for Encrypted-Address Cache - Qureshi et al.

Set 2 Set 0 Set 1 Set 2

Q: Do randomized caches protect against Flush + Reload attacks? Why or why not?

slide-9
SLIDE 9

Background - Hard and Soft Conflicts

9

In prior work, signalling is accomplished through abusing set conflicts with the victim

Hard Conflict Eviction

Hash Group 1 Hash Group 2 ‘Attacker’ Address (Receiver) ‘Victim’ Address (Transmitter)

Soft Conflict Eviction

Hash Group 1 Hash Group 2 ‘Attacker’ Address (Receiver) ‘Victim’ Address (Transmitter)

Receiver maps to same set as transmitter in every hash group Receiver maps to same set as transmitter in at least one hash group

slide-10
SLIDE 10

Motivation - Limitations of Prior Work

Prior work makes differing assumptions on attacker strategies! Skewed-CEASAR1 assumes the attacker uses hard-conflict receivers ScatterCache2 assumes the attacker uses a large number of soft-conflict receivers Which of these assumptions are valid? What is the optimal attacker strategy?

10

1 New Attacks and Defense for Encrypted-Address Cache - Qureshi et al. 2ScatterCache: Thwarting Cache Attacks via Cache Set Randomization - Werner et al.

slide-11
SLIDE 11

Analysis - Proposed Communication Scheme

11

Calibration

(Eviction Set Construction)

Signalling

(Prime + Probe)

Decode

There exists a tradeoff between communications steps. An attacker can either:

  • Spend more time on calibration, obtaining a large eviction set which can be

used to detect modulations with a higher probability

  • Spend more time on signalling, taking more measurements in order to better

filter out noise and obtain a higher success rate Q: How does this tradeoff relate to the epoch length of a randomized cache?

slide-12
SLIDE 12

Analysis - Calibration Module

12

The Calibration Module attempts to establish a relationship between transmitter/receiver addresses and the subchannels to which they map to

Cache Emulator Cache Parameters (# of ways, hash groups, etc) Transmitter Parameters (# of transmitter addresses) Calibration Parameters (# of calibration rounds)

Q: How do we know how many transmitter addresses there are?

Hash Group 1 Hash Group 2

Receiver Transmitter

Sub-channel Mapping Graphs

(analogous to a receiver set!)

slide-13
SLIDE 13

Analysis - Signalling Module

13

The Signalling Module attempts to model the distribution of the number of modulations observed by the receiver for each possible value of the secret

Hash Group 1 Hash Group 2

Receiver Transmitter

Sub-channel Mapping Graphs Mathematical Model

Probability of Monitoring Probability of Modulating

*

Q: Where is noise considered?

Signal PDFs

slide-14
SLIDE 14

Analysis - Decode Module

14

The Decode Module computes the number of signal transfer rounds required to achieve a 99% success rate, then determines the total communication cost

Signal PDFs Statistical Analysis Signalling Cost Calibration Cost + Total Communication Cost

slide-15
SLIDE 15

Key Insights

CaSA makes the following novel observations: 1. Spending the maximum amount of time in the calibration phase is not always the best strategy. 2. Noise can actually reduce our signalling cost in some cases! 3. Information can be leaked and accumulated across epochs, even when the mapping functions are changed.

15

slide-16
SLIDE 16

Evaluation - Signalling Cost + Noise

16

Q: Can noise be beneficial when there is only one way per hash group? A: No.

slide-17
SLIDE 17

Evaluation - Communications Costs

17

Q: Why is spending 20% of epoch units on calibration so much more productive in the “1 Way per Hash Group” case?

slide-18
SLIDE 18

Discussion Questions

18

slide-19
SLIDE 19

Discussion Questions - Cache Hardening

  • Can hash mechanisms be devised to minimize collisions between programs

and provide better results than random mapping?

  • It's important during the calibration step to only choose addresses from the

candidate set that are useful - how does this factor into the calibration efficiency?

  • How can the attacker determine when a new epoch has started? Is

intermittently randomizing the epoch length a viable option to improve security?

  • This is a side channel and not a covert channel - what's the guarantee that the

transmitter will access the same specific address as many times as you need?

19

slide-20
SLIDE 20

Discussion Questions - Future Work

  • What can be done in the future to avoid making the same mistakes as the

previous security analyses and making incorrect security guarantees?

  • Can an analysis framework similar to CaSA be applied to other structures

within the CPU? Could it be applied to multi-level caches in an SMT context?

  • How would CaSA need to be adapted in order to consider multi-bit symbol

transmissions?

  • Is it feasible (or worth attempting) to determine lower bounds for

communications costs?

  • Are we “doomed” to a future where caches must have tunable parameters

(such as epoch lengths and hash groups) to remain secure?

20