Skip to main content
QUICK REVIEW

[Paper Review] CacheShield: Protecting Legacy Processes Against Cache Attacks

Samira Briongos, Gorka Irazoqui|arXiv (Cornell University)|Sep 6, 2017
Security and Verification in ComputingComputer Science40 references12 citations
TL;DR

CacheShield is a lightweight, user-level tool that detects cache attacks on legacy cryptographic processes by monitoring hardware performance counters—specifically L3 cache misses—using change point detection. It enables real-time attack detection with minimal overhead and high accuracy, even under noisy conditions, without requiring OS or hypervisor modifications.

ABSTRACT

Cache attacks pose a threat to any code whose execution flow or memory accesses depend on sensitive information. Especially in public clouds, where caches are shared across several tenants, cache attacks remain an unsolved problem. Cache attacks rely on evictions by the spy process, which alter the execution behavior of the victim process. We show that hardware performance events of cryptographic routines reveal the presence of cache attacks. Based on this observation, we propose CacheShield, a tool to protect legacy code by monitoring its execution and detecting the presence of cache attacks, thus providing the opportunity to take preventative measures. CacheShield can be run by users and does not require alteration of the OS or hypervisor, while previously proposed software-based countermeasures require cooperation from the hypervisor. Unlike methods that try to detect malicious processes, our approach is lean, as only a fraction of the system needs to be monitored. It also integrates well into today's cloud infrastructure, as concerned users can opt to use CacheShield without support from the cloud service provider. Our results show that CacheShield detects cache attacks fast, with high reliability, and with few false positives, even in the presence of strong noise.

Motivation & Objective

  • Address the lack of practical, user-level defenses against cache attacks in shared cloud environments.
  • Provide a solution that does not require cooperation from cloud providers or modifications to the OS/hypervisor.
  • Enable detection of all known cache attack variants (e.g., Prime+Probe, Flush+Reload, Flush+Flush) on legacy code.
  • Minimize performance overhead by monitoring only the victim process during execution, not all system processes.
  • Offer a deployable, opt-in defense mechanism compatible with existing cloud infrastructure and hardware.

Proposed method

  • Monitor L3 cache miss events using hardware performance counters exposed to the guest VM.
  • Apply change point detection algorithms to identify abrupt increases in cache miss rates, signaling potential attacks.
  • Use only the victim process’s performance counter data, avoiding system-wide monitoring.
  • Enable the tool on-demand within the VM, reducing persistent overhead.
  • Integrate with existing virtualization stacks that support transparent access to hardware performance counters.
  • Trigger mitigation actions (e.g., key purge, noise injection, dummy operations) upon detection of anomalous cache miss patterns.

Experimental results

Research questions

  • RQ1Can hardware performance counters in modern processors reliably detect cache attacks on legacy cryptographic applications?
  • RQ2Can change point detection algorithms effectively identify attack onset in real time with minimal false positives?
  • RQ3Is it feasible to detect all known cache attack variants using only the victim process’s cache miss behavior?
  • RQ4Can such detection be achieved with low performance overhead and without hypervisor or OS modifications?
  • RQ5How well does the detection mechanism perform under realistic system noise levels common in cloud environments?

Key findings

  • CacheShield detects all known cache attack variants—including Prime+Probe, Flush+Reload, and Flush+Flush—by monitoring L3 cache misses in the victim process.
  • The tool achieves high detection accuracy with very few false positives, even under high system noise typical in cloud environments.
  • Change point detection on the L3 cache miss counter alone is sufficient for reliable attack detection, without needing additional performance events.
  • Detection is effective even for unknown or novel attacks, as all such attacks induce measurable cache misses in the victim.
  • The solution imposes minimal performance overhead, as monitoring is limited to the victim process and activated only during execution.
  • CacheShield is compatible with existing cloud infrastructure, as it only requires hypervisor-level access to performance counters, which is already supported by major virtualization platforms.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.