[Paper Review] The Spy in the Sandbox -- Practical Cache Attacks in Javascript
This paper presents the first practical browser-based microarchitectural side-channel attack exploiting JavaScript to perform cache attacks without local code execution. By leveraging high-resolution timers and memory access patterns in JavaScript, the attack tracks last-level cache (LLC) accesses to infer user behavior across processes, users, and virtual machines, demonstrating feasibility in real-world web environments with minimal attacker prerequisites.
We present the first micro-architectural side-channel attack which runs entirely in the browser. In contrast to other works in this genre, this attack does not require the attacker to install any software on the victim's machine -- to facilitate the attack, the victim needs only to browse to an untrusted webpage with attacker-controlled content. This makes the attack model highly scalable and extremely relevant and practical to today's web, especially since most desktop browsers currently accessing the Internet are vulnerable to this attack. Our attack, which is an extension of the last-level cache attacks of Yarom et al., allows a remote adversary recover information belonging to other processes, other users and even other virtual machines running on the same physical host as the victim web browser. We describe the fundamentals behind our attack, evaluate its performance using a high bandwidth covert channel and finally use it to construct a system-wide mouse/network activity logger. Defending against this attack is possible, but the required countermeasures can exact an impractical cost on other benign uses of the web browser and of the computer.
Motivation & Objective
- To demonstrate that microarchitectural side-channel attacks can be launched entirely within a web browser without requiring local code execution.
- To show that such attacks are practical and scalable, targeting millions of users via untrusted web pages.
- To explore the feasibility of using JavaScript to monitor last-level cache (LLC) access patterns for behavioral tracking on modern Intel CPUs.
- To evaluate the performance and limitations of the attack under real-world browser constraints, including timing resolution differences.
- To assess the practicality of defending against such attacks without degrading legitimate web application performance.
Proposed method
- Exploits the inclusive cache hierarchy of modern Intel CPUs, where L1 and L2 caches are subsets of the L3 (last-level) cache.
- Uses JavaScript to perform high-speed memory access patterns that trigger cache hits and misses, monitored via high-resolution timers.
- Maps physical memory addresses to cache sets using the lower 12 bits of the address, enabling precise cache set tracking.
- Employs a covert channel based on cache access timing to amplify detectable differences between cache hits and misses.
- Adapts the attack for systems with coarse-grained timing resolution by repeating memory access cycles and leveraging multiple cache set misses.
- Detects profiling-like behavior in JavaScript execution to identify and potentially block attack patterns through runtime heuristics.
Experimental results
Research questions
- RQ1Can a microarchitectural side-channel attack be effectively launched from within a web browser using only JavaScript?
- RQ2What are the practical limitations of such an attack in terms of timing resolution and browser compatibility?
- RQ3To what extent can this attack be used to track user behavior across processes, users, or virtual machines?
- RQ4How does the attack perform across different browsers and operating systems with varying timer resolutions?
- RQ5What are the viable countermeasures, and what trade-offs do they impose on legitimate web application performance?
Key findings
- The attack successfully executes entirely in the browser using only JavaScript, requiring no client-side software installation.
- The attack is effective on modern Intel CPUs with inclusive cache hierarchies, enabling remote monitoring of cache access patterns.
- Performance evaluation shows that the attack can achieve reliable detection of cache access patterns even with microsecond-level timer resolution.
- The attack is scalable and can be deployed via untrusted web content such as advertisements, targeting millions of users.
- The attack enables system-wide tracking of user activity, including mouse movements and network activity, by observing cache access patterns.
- Countermeasures such as reducing timer resolution or introducing jitter are possible but may degrade performance for legitimate web applications.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.