Connecting the dots: Privacy leakage via write-access patterns to the main memory

Tara Merin John, Syed Kamran Haider, Hamza Omar, Marten van Dijk

Abstract

Modern secure processor architectures aim to protect data confidentiality, yet they often remain susceptible to side-channel attacks. This paper demonstrates a novel attack vector: monitoring write-access patterns to main memory. By utilizing a compromised Direct Memory Access (DMA) device to take frequent memory snapshots, researchers successfully reconstructed a 512-bit secret key from the Montgomery power ladder algorithm—an algorithm specifically designed to be side-channel resistant—in approximately 3.5 minutes.

Introduction: The Vulnerability of Write Patterns

While previous research has shown that observing both read and write requests can leak sensitive information, this study investigates a more realistic, "weaker" adversarial model where only writes are visible. In cloud or remote environments, an attacker might lack the high-speed hardware required to sniff the entire memory bus but could use a compromised peripheral, such as a network card or GPU, to snapshot memory over time. This paper addresses whether privacy is still at risk under these constraints.

Methodology: Executing the DMA-Based Attack

The authors propose a three-step attack using a compromised DMA device (a PCI-to-USB adapter) to observe memory modifications.

The attack setup involves an attacker system using a DMA-capable peripheral to snapshot the victim system's memory.
  1. Address Space Identification: The attacker scans the victim's RAM (e.g., 16GB) to locate the specific 4KB page where the target application is active. This is done by identifying memory regions with a specific "footprint" of updates.
  2. Variable Mapping: Within the identified page, a histogram of writes helps pinpoint the memory locations of key variables, such as $R_0$ and $R_1$ in the Montgomery Ladder algorithm.
  3. Key Inference: The Montgomery Ladder performs a constant number of operations to thwart timing analysis. However, the sequence in which it updates $R_0$ and $R_1$ depends on the secret bit. By analyzing the timing of these updates through rapid snapshots, the attacker can infer the secret key.
By taking differential snapshots, the attacker identifies which variable ($R_0$ or $R_1$) was updated, revealing the secret bit $k_j$.

Key Insights

  • The "Write-Only" Threat: Hiding read patterns is insufficient. The sequence of writes alone can serve as a "smoking gun" for secret data.
  • Vulnerability of "Secure" Algorithms: Montgomery’s ladder, designed to prevent timing and power analysis, inadvertently creates predictable write-access patterns that are exploitable.
  • Cache Contention Leakage: Even with "write-back" caches, "strided" access patterns can cause cache evictions that force data into main memory, thereby leaking the access pattern.
  • DMA as a Stealthy Observer: DMA-capable peripherals represent a significant security risk as they can bypass CPU-based protections to access system memory directly.

Results and Performance

The attack proved highly efficient:

  • Identification Speed: Locating the target 4KB page in 16GB of RAM took about 3 minutes and 30 seconds.
  • Extraction Accuracy: Once located, the key extraction itself took only 3.6 seconds.
  • Total Attack Time: A 512-bit secret key was recovered in an average of 3 minutes and 34 seconds.

Limitations and Countermeasures

The primary experiments utilized "write-through" caching. While the authors argue that "write-back" caches are also vulnerable due to strided patterns, a full 512-bit recovery under those conditions was not demonstrated. Additionally, the attack's success depends on the DMA device's snapshot frequency relative to the CPU's execution speed.

To mitigate this threat, the authors suggest Write-Only ORAM (Oblivious RAM). Unlike full ORAM, which is computationally expensive because it hides both reads and writes, Write-Only ORAM specifically obfuscates write patterns, providing a more efficient defense for this particular side channel.

Summary updated

BibTeX
@inproceedings{john2017connecting,
  author = {Tara Merin John and Syed Kamran Haider and Hamza Omar and Marten van Dijk},
  title = {{Connecting the dots: Privacy leakage via write-access patterns to the main memory}},
  booktitle = {HOST},
  year = {2017},
  doi = {10.1109/hst.2017.7951834},
}
Figure