TL;DR
This paper introduces a novel side-channel attack that exploits the operating system's page cache, a fundamental component for managing memory. The authors demonstrate that this hardware-agnostic attack can reveal sensitive information about other processes, enabling covert channels, UI redress attacks, and even password recovery, with performance comparable to existing hardware-based attacks.
What Problem Does This Paper Address?
Modern computer systems heavily rely on caches to speed up memory access. While hardware caches have been extensively studied for side-channel vulnerabilities, this paper focuses on the operating system's page cache. The page cache stores all disk-backed pages (like program binaries and libraries) in RAM, shared across processes. This shared nature, while beneficial for performance, presents an opportunity for attackers. Existing side-channel attacks often require specific hardware knowledge or shared memory, limiting their applicability. This paper addresses the gap by demonstrating a versatile side-channel attack that targets the page cache, a software-based cache present in all major operating systems, and works across cores and CPUs without requiring specific hardware knowledge.
Methods
The core of the attack revolves around two main steps: determining the page cache state and performing page cache eviction.
- Determining Page Cache State: The authors leverage operating system APIs to check if a page is present in the page cache. On Linux, they use the
mincoresystem call, and on Windows, they useQueryWorkingSetEx. These calls are non-destructive, allowing for repeated measurements. - Page Cache Eviction: To manipulate the page cache state, the authors developed efficient eviction strategies.
- Linux: They employ a "working set-based eviction strategy" that involves accessing a carefully crafted set of pages already in the cache and pages not yet in the cache to force the target page out.
- Windows: Due to Windows' per-process working sets, they focus on evicting pages from the victim process's working set using
VirtualUnlock, which is significantly faster than full page cache eviction.
These techniques enable the authors to build various attacks, including:
- High-speed covert channel: Transmitting data by selectively accessing pages in a shared file.
- UI Redress Attack: Detecting the opening of sensitive windows (like authentication prompts) to overlay them with fake windows.
- Keystroke Timing Attack: Inferring typed passwords by observing the timing of page accesses when keys are pressed.
- Password Recovery: Exploiting timing differences in vulnerable PHP functions to reconstruct passwords.
- Remote Attack: A covert channel that exploits timing differences between network access to cached and uncached pages.
Datasets
Not discussed in the paper. The attacks are demonstrated on typical desktop and server systems running Linux and Windows, using system binaries, shared libraries, and common files as targets.
Key Insights and Ideas
- Page Cache as a Rich Side-Channel: The page cache, often overlooked compared to hardware caches, is a surprisingly rich source of information for side-channel attacks due to its role in managing shared memory.
- Hardware-Agnostic Attacks: The ability to perform these attacks without relying on specific CPU microarchitectures or hardware features significantly broadens their applicability.
- Efficient Eviction is Key: The authors' novel eviction strategies are crucial for achieving practical attack frequencies, overcoming limitations of previous methods that were too slow for real-time side-channel analysis.
- Windows Working Set Exploitation: The unique per-process working set mechanism in Windows allows for a faster and more targeted eviction strategy compared to Linux.
- Timing-Free Local Attacks: The use of OS system calls for detecting page cache presence makes the local attacks timing-free, reducing reliance on precise timing measurements and making them more robust.
Key Results
- Temporal Resolution: The attack achieves a temporal resolution of 2 µs on Linux and 466 ns on Windows, comparable to state-of-the-art hardware cache attacks.
- Eviction Frequency: The page cache eviction on Linux achieves a rate of 6.7 measurements per second, and on Windows, it's 223 measurements per second.
- Covert Channel Performance:
- Linux: Achieved transmission rates of up to 9.69 kB/s with a bit-error rate below 0.00003%.
- Windows: Achieved transmission rates of up to 152.57 kB/s with a bit-error rate below 0.000006%. These rates significantly outperform previous software-based covert channels.
- UI Redress and Keystroke Timing: The low latency of the attack (2.04 µs on Linux, 465.91 ns on Windows) makes it effective for UI redress and keystroke timing attacks, where precise timing is critical.
- PHP Password Generation: The attack can reconstruct passwords generated by vulnerable PHP scripts with a high success rate (85% of test runs).
- Mitigation Acknowledgment: Microsoft and the Linux security team acknowledged the vulnerabilities and plan to release security patches.
Limitations and Future Work
- Linux Accessibility: On Linux, the attack requires the target page to be accessible to the attacker (e.g., file-backed memory), similar to Flush+Reload attacks. This is not a limitation on Windows.
- Noise: Like other cache attacks, the side channel can be affected by noise if the target location is accessed by multiple events. The authors propose adding surrounding pages to the eviction set to mitigate this.
- Scheduling: The attacker process's scheduling can introduce false negatives, a limitation shared with hardware cache attacks.
- Permissions (Windows): Some Windows attack variants require specific permissions (e.g.,
PROCESS_QUERY_LIMITED_INFORMATIONforQueryWorkingSetEx,PROCESS SET QUOTAforSetProcessWorkingSetSize), which might not be available in highly restricted environments. - Remote Eviction Difficulty: Remotely evicting the page cache is challenging and can be conspicuous, limiting the practicality of remote eviction-based attacks.
Future work could explore more sophisticated remote attack techniques and further investigate the implications of these attacks on various isolation mechanisms like sandboxes and containerization platforms.
Summary updated