Skip to main content
QUICK REVIEW

[Paper Review] CacheZoom: How SGX Amplifies The Power of Cache Attacks

Daniel Moghimi, Gorka Irazoqui|arXiv (Cornell University)|Mar 20, 2017
Security and Verification in ComputingComputer Science9 references27 citations
TL;DR

CacheZoom is a novel side-channel attack that exploits Intel SGX's reliance on hardware isolation to perform high-resolution cache-based monitoring of enclave memory accesses using L1 cache Prime+Probe attacks. By leveraging OS-level control and frequent task switching, it recovers AES keys from T-table implementations with as few as 10 measurements—demonstrating that SGX does not protect against fine-grained cache side channels, even when countermeasures like prefetching are used.

ABSTRACT

In modern computing environments, hardware resources are commonly shared, and parallel computation is widely used. Parallel tasks can cause privacy and security problems if proper isolation is not enforced. Intel proposed SGX to create a trusted execution environment within the processor. SGX relies on the hardware, and claims runtime protection even if the OS and other software components are malicious. However, SGX disregards side-channel attacks. We introduce a powerful cache side-channel attack that provides system adversaries a high resolution channel. Our attack tool named CacheZoom is able to virtually track all memory accesses of SGX enclaves with high spatial and temporal precision. As proof of concept, we demonstrate AES key recovery attacks on commonly used implementations including those that were believed to be resistant in previous scenarios. Our results show that SGX cannot protect critical data sensitive computations, and efficient AES key recovery is possible in a practical environment. In contrast to previous works which require hundreds of measurements, this is the first cache side-channel attack on a real system that can recover AES keys with a minimal number of measurements. We can successfully recover AES keys from T-Table based implementations with as few as ten measurements.

Motivation & Objective

  • To investigate whether Intel SGX, despite its hardware-based isolation, remains vulnerable to cache side-channel attacks.
  • To develop a practical side-channel attack that achieves high temporal and spatial resolution in monitoring enclave memory accesses.
  • To evaluate the effectiveness of common countermeasures—such as prefetching and S-box optimizations—against cache-based key recovery in SGX enclaves.
  • To demonstrate that even optimized AES implementations, previously considered resistant, remain vulnerable under SGX's threat model.
  • To show that OS-level access and task scheduling in SGX enable unprecedented precision in side-channel leakage collection.

Proposed method

  • CacheZoom uses a modified OS scheduler to interrupt the victim enclave at precise intervals, enabling high-resolution timing control over memory access monitoring.
  • It applies a Prime+Probe attack on the L1 cache to detect every memory access made by the enclave, exploiting the fact that both attacker and victim can be scheduled on the same core.
  • The attack leverages the OS's ability to control task scheduling and access unencrypted binary code, enabling precise correlation of cache access patterns with cryptographic operations.
  • By analyzing the timing and frequency of cache hits and misses, CacheZoom reconstructs the sequence of S-box lookups in AES encryption routines.
  • The tool uses a leakage model that accounts for out-of-order execution and ROB (reorder buffer) effects, adjusting for incomplete retirements that cause repeated access observations.
  • It combines statistical analysis with knowledge of AES algorithm structure to infer key bytes from observed cache access patterns.

Experimental results

Research questions

  • RQ1Can a side-channel attack achieve high temporal and spatial resolution in monitoring memory accesses within Intel SGX enclaves?
  • RQ2To what extent do common countermeasures like prefetching and small memory footprint implementations protect against cache-based key recovery in SGX?
  • RQ3Is it possible to recover AES keys from T-table and S-box-based implementations using fewer than 100 measurements in a real SGX environment?
  • RQ4How does out-of-order execution and ROB behavior affect the reliability and accuracy of cache side-channel leakage models in SGX?
  • RQ5Can OS-level control and task switching be exploited to enhance the precision of cache side-channel attacks on SGX enclaves?

Key findings

  • CacheZoom successfully recovers AES keys from T-table-based implementations with as few as 10 measurements, significantly fewer than previous attacks.
  • Even S-box-based AES implementations, which were previously considered resistant, can be attacked with hundreds of observations, enabling full key recovery.
  • Prefetching, a countermeasure intended to prevent cache side-channel attacks, actually benefits the attacker by making round boundaries more distinguishable in the cache trace.
  • The attack remains effective even when the enclave uses small memory footprints or optimized access patterns, as the OS can still schedule the attacker to monitor every access.
  • The study reveals that 12 out of 16 key bytes can be recovered with thousands of observations, and the remaining bytes are recoverable via brute force or second-last-round leakage.
  • A list of vulnerable cryptographic libraries—including OpenSSL, WolfCrypt, NSS, Nettle, Libtomcrypt, Libgcrypt, and MbedTLS—was identified, all containing T-table or S-box implementations susceptible to CacheZoom.

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.