Microarchitecture Vulnerabilities: Past, Present, and Future
Unknown
Black Hat USA 2024 · Day 1 · Briefing
Overview
In this insightful talk at Black Hat USA, renowned security researchers Daniel Gruss and Anders Fogh take the audience on a journey through the evolution of microarchitecture vulnerabilities, tracing their origins from early side channels to modern exploitation techniques. The presentation, structured into "Past, Present, and Future," provides a comprehensive historical overview, highlighting pivotal moments and key attacks that have shaped the field. Gruss and Fogh, who previously presented together at Black Hat in 2016, bring a unique dynamic to the stage, often playfully disagreeing while collectively illuminating the complex landscape of microarchitectural security.

Key moments
- 0:00 Introduction of speakers and talk structure
- 1:20 Side channels predating computers: Tempest attacks and covert channels
- 2:40 Paul Kocher's work: Leaking cryptographic keys via side channels
- 3:50 Shift from cryptographic to general system security targets
- 4:10 Rowhammer attack: Changing memory without direct access
- 4:40 Prefetch side channels breaking KSLR: Software exploitation technique
Microarchitecture Vulnerabilities: Past, Present, and Future
Speakers: Daniel Gruss, Anders Fogh
Conference: Black Hat USA
YouTube: https://www.youtube.com/watch?v=LIYZemVCgiM
Overview
In this insightful talk at Black Hat USA, renowned security researchers Daniel Gruss and Anders Fogh take the audience on a journey through the evolution of microarchitecture vulnerabilities, tracing their origins from early side channels to modern exploitation techniques. The presentation, structured into "Past, Present, and Future," provides a comprehensive historical overview, highlighting pivotal moments and key attacks that have shaped the field. Gruss and Fogh, who previously presented together at Black Hat in 2016, bring a unique dynamic to the stage, often playfully disagreeing while collectively illuminating the complex landscape of microarchitectural security.
The core of their discussion emphasizes a critical shift: microarchitecture attacks have evolved from niche cryptographic concerns to mainstream threats impacting system security and software exploitation. This evolution underscores the increasing importance for security professionals to understand the intricate workings of modern processors beyond their abstract architectural specifications. The talk serves as a crucial reminder that "provably secure" systems can still harbor significant vulnerabilities when the subtle, yet exploitable, behaviors of underlying hardware are overlooked.
The implications of this historical trajectory are profound. What began as theoretical concepts like covert channels has matured into practical attacks capable of leaking sensitive cryptographic keys, manipulating memory, and bypassing fundamental operating system defenses like Address Space Layout Randomization (ASLR). For anyone involved in designing, implementing, or defending computer systems, understanding this journey is essential for anticipating and mitigating future threats that leverage the often-hidden complexities of microarchitectural design.
Background
▶ Watch: Introduction of speakers and talk structure (0:00)
The concept of extracting secret information or creating hidden communication channels through unintended side effects of a system's operation, known as side channels, significantly predates modern computers. The speakers trace the scientific study of side channels back to the 1940s with the Tempest attacks. These early investigations focused on electronic typewriters, where electromagnetic emanations could be observed and analyzed to reconstruct typed text, demonstrating that even non-digital systems could inadvertently leak sensitive information. This marked an early recognition that physical properties and operational characteristics of devices could be exploited for unintended information disclosure.
In 1973, the theoretical foundation for covert channels was formally established with the "Note on the confinement problem." This seminal work defined covert channels as communication paths that use system resources not intended for data transfer, often operating between processes with different security levels. While distinct from side channels (which are unintentional leakages), covert channels share the principle of leveraging system characteristics in an unforeseen manner. Ironically, during an era focused on developing "provably secure operating systems," side channels emerged as a persistent and unresolved challenge. Despite efforts to formally verify system security, the subtle, timing-dependent nature of side channels proved difficult to model and eliminate. The prevailing stance, as noted in the Orange Book (the U.S. Department of Defense Trusted Computer System Evaluation Criteria), was that a low leakage rate was deemed acceptable, a perspective that would later be dramatically challenged.
A pivotal moment arrived in 1996 with Paul Kocher's groundbreaking work, which demonstrated that side channels could be used to leak cryptographic keys. This shifted the threat model significantly. No longer were side channels merely a theoretical curiosity or a means for covert communication; they became a direct threat to the confidentiality of highly sensitive data. For instance, leaking just a few bits of a 128-bit cryptographic key could potentially compromise the entire key, granting an attacker full access to encrypted communications or data. This discovery spurred a significant amount of research in cryptography, as the practical implications of microarchitectural side channels on secure implementations became undeniable. Anders Fogh specifically highlights Colin Percival's cache side channel attack on RSA as a notable example, marking a point where researchers began to deeply investigate the actual workings of the microarchitecture rather than just observing timing differences.
The field experienced another major shift around 2014-2015, moving beyond purely cryptographic targets to general system security. This era saw the emergence of attacks that leveraged microarchitectural quirks to achieve broader system compromise. One such prominent attack was Rowhammer, presented at Black Hat in 2015. Rowhammer demonstrated the ability to change data in memory without direct access to that data, by exploiting physical properties of DRAM modules. This attack fundamentally altered perceptions of memory isolation and integrity. Concurrently, cache template attacks expanded the scope of side channel targets from cryptographic operations to general-purpose computations, such as inferring keystrokes or other user inputs. Furthermore, the speakers' own work on prefetch side channel attacks contributed to this evolution by demonstrating how microarchitectural features could be used to break KASLR (Kernel Address Space Layout Randomization). This development solidified the role of side channels as a potent technique for software exploitation, allowing attackers to bypass critical operating system defenses.
Key Findings
▶ Watch: Paul Kocher's work: Leaking cryptographic keys via side channels (2:40)
The talk's overarching key finding is the dramatic and ongoing evolution of microarchitecture vulnerabilities, transforming them from obscure theoretical concepts into powerful, practical exploitation primitives. This evolution can be categorized into several distinct phases, each building upon the previous one and expanding the scope and impact of these attacks.
Firstly, the early phase established the foundational understanding of information leakage, moving from the tangible physical emanations observed in Tempest attacks to the formal definition of covert channels in the 1970s. While these early works highlighted the potential for unintended information flow, they largely remained within theoretical or specialized contexts. The "provably secure operating systems" era notably failed to adequately address these concerns, often dismissing low-rate leakage as inconsequential.
Secondly, the late 20th century marked a critical turning point with Paul Kocher's 1996 demonstration of leaking cryptographic keys via side channels. This discovery was transformative because it introduced a clear and practical threat model, making side channels highly relevant to real-world security. The ability to extract sensitive secrets like 128-bit encryption keys from supposedly secure cryptographic implementations proved that microarchitectural behaviors could directly undermine strong security assurances, driving extensive research into secure cryptographic engineering. The subsequent development of sophisticated cache side channel attacks, such as those against RSA, further refined the techniques for exploiting CPU cache timing differences to infer secret data.
Thirdly, a significant expansion occurred around 2014-2015, where microarchitecture vulnerabilities transcended the cryptographic domain to impact broader system security and software exploitation. This era saw the emergence of attacks like Rowhammer, which demonstrated that physical properties of DRAM could be leveraged to induce bit flips, effectively allowing an attacker to modify arbitrary memory locations without explicit write permissions. This represented a shift from information leakage to information manipulation, posing a direct threat to memory integrity and system isolation. Simultaneously, the application of side channels to bypass fundamental operating system defenses, such as KASLR, through techniques like prefetch side channel attacks, illustrated their power as software exploitation techniques. This showcased how attackers could leverage subtle hardware behaviors to overcome memory randomization and facilitate further exploitation, solidifying microarchitecture vulnerabilities as a critical component in the modern exploit chain.
Technical Deep Dive
▶ Watch: Shift from cryptographic to general system security targets (3:50)
The technical foundation of microarchitecture vulnerabilities lies in the fact that modern processors, for performance reasons, often execute operations in ways that leave observable "side effects" or state changes. These effects, though not part of the intended functional output, can be measured and interpreted by an attacker to infer secret information or manipulate system state.
Side Channels fundamentally operate by observing these indirect effects. Instead of directly accessing a secret, an attacker observes a measurable property of the system that is influenced by the secret's processing. For example, the time it takes for an operation to complete, the power consumed by the CPU, or the state of a hardware cache can all serve as side channels. The earliest forms, like Tempest attacks, illustrate this principle by observing electromagnetic radiation. The radiation emitted by electronic components processing data varies based on the data itself, allowing for reconstruction of secret information from afar.
The formal concept of covert channels, while distinct, highlights the intentional creation of such hidden communication paths. In the "confinement problem," the concern was how to prevent a malicious program from exfiltrating data through channels not designed for communication. This laid the groundwork for understanding how resource contention or timing differences could be deliberately exploited. For instance, a program could modulate its CPU usage or memory access patterns to encode bits, which another program could then observe.
Cache Side Channels are a prominent example of microarchitectural attacks that leverage the CPU's hierarchical memory system. Modern CPUs use multiple levels of caches (L1, L2, L3) to store frequently accessed data close to the processor, significantly reducing memory access times. When a program accesses data, it is loaded into the cache. Subsequent accesses to the same data are fast (a "cache hit"), while accesses to data not in the cache are slow (a "cache miss"). An attacker can exploit this timing difference. Techniques like Prime+Probe or Flush+Reload allow an attacker to first "prime" the cache by filling it with their own data, then allow a victim process to execute, and finally "probe" the cache to see which of their own data has been evicted (indicating the victim accessed data that mapped to the same cache lines). By observing these patterns, an attacker can infer the victim's memory access patterns and, by extension, deduce secret information like cryptographic keys (as demonstrated by Paul Kocher's work and Colin Percival's RSA attack). The key insight from Percival's work, as noted by Anders Fogh, was the deep engagement with how the microarchitecture actually functions, moving beyond simple timing to understand cache line eviction policies and memory mapping.
Rowhammer represents a different class of microarchitecture vulnerability, exploiting the physical characteristics of modern DRAM. DRAM cells store bits as electrical charges in capacitors. To save power and increase density, DRAM rows are placed very close together. Repeatedly accessing (or "hammering") a row of memory can cause electrical interference that subtly degrades the charge in adjacent rows. If this "hammering" occurs frequently enough, it can cause a bit to spontaneously "flip" from a 0 to a 1, or vice versa, in a neighboring, un-accessed row. This is a physical, analog effect that bypasses all architectural security boundaries. An attacker can exploit this to achieve privilege escalation by strategically hammering memory rows to flip bits in critical data structures (e.g., page table entries or privilege flags), thereby gaining unauthorized access or control over the system. The significance of Rowhammer was its ability to change data without having any logical access to it, a direct violation of memory integrity.
Finally, Prefetch Side Channels exploit hardware prefetchers, which are speculative mechanisms in modern CPUs designed to improve performance by fetching data into the cache before it is explicitly requested. Prefetchers analyze memory access patterns and anticipate future data needs. An attacker can observe the behavior of these prefetchers to gain information. For instance, by causing a victim process to access certain memory patterns, the attacker can observe how the prefetcher reacts, potentially revealing information about the victim's memory layout. This was crucially applied to break KASLR (Kernel Address Space Layout Randomization). KASLR is a security feature that randomizes the memory locations of kernel code and data, making it harder for attackers to predict addresses needed for exploitation. By using prefetch side channels, attackers can leak information about the randomized kernel addresses, effectively bypassing KASLR and facilitating further exploits that rely on knowing specific memory locations. This demonstrated how side channels moved firmly into the realm of software exploitation, leveraging speculative execution units to undermine memory safety.
Demo / Proof of Concept
▶ Watch: Rowhammer attack: Changing memory without direct access (4:10)
The provided transcript primarily focuses on a historical overview and theoretical explanation of microarchitecture vulnerabilities, tracing their evolution through various attacks. While the speakers reference significant past demonstrations and research, such as the Rowhammer attack being presented at Black Hat in 2015, the talk transcript itself does not detail a live demonstration or a new proof-of-concept specific to this presentation. The discussion centers on the principles and impact of these historical attacks rather than showcasing a novel exploit in action during the session.
Defensive Implications
▶ Watch: Prefetch side channels breaking KSLR: Software exploitation technique (4:40)
Understanding the historical progression and technical underpinnings of microarchitecture vulnerabilities is crucial for developing robust defensive strategies. The evolution of these attacks highlights that security must extend beyond abstract architectural models to encompass the concrete, often subtle, behaviors of the underlying hardware.
For cryptographic implementations, the primary defense against side channels, particularly timing attacks, is constant-time programming. This involves writing cryptographic code such that its execution time and memory access patterns do not depend on the secret values being processed. By ensuring that all operations, regardless of input, take the same amount of time and follow identical data access paths, timing side channels are effectively eliminated. This principle has become a cornerstone of secure cryptographic library development since Paul Kocher's seminal work.
To mitigate Rowhammer-style attacks, hardware-level solutions have been implemented. DRAM manufacturers have introduced features like Target Row Refresh (TRR), where the DRAM controller proactively refreshes rows adjacent to frequently accessed ones to prevent bit flips. Additionally, the use of Error-Correcting Code (ECC) memory can detect and correct single-bit errors, providing a layer of resilience against both accidental and maliciously induced bit flips. However, as new Rowhammer variants emerge, the effectiveness of existing mitigations continues to be a subject of ongoing research and development.
Defending against side channels used for software exploitation, such as those bypassing KASLR, requires a multi-pronged approach. Stronger Address Space Layout Randomization (ASLR) implementations with higher entropy and more diversified memory layouts can make it harder for attackers to infer addresses even with partial information leakage. Future defenses may involve hardware-assisted isolation mechanisms that prevent unauthorized observation of microarchitectural state or introduce noise to make side channel measurements unreliable. Operating system developers also need to be vigilant in identifying and patching information leakage vulnerabilities that could be leveraged by these advanced side channel techniques.
More broadly, the history of microarchitecture vulnerabilities underscores the need for holistic security engineering. Designers and developers must consider the security implications of performance optimizations at the microarchitectural level. This includes careful review of speculative execution features, cache policies, and memory management units. Furthermore, the security community must continue to foster collaboration between hardware manufacturers, operating system developers, and security researchers to proactively identify and mitigate new microarchitectural threats as processor designs become increasingly complex.
Key Takeaways
- Microarchitecture vulnerabilities have a long and evolving history, tracing back to pre-computer physical side channels like Tempest attacks in the 1940s.
- The formal definition of covert channels in 1973 highlighted the potential for hidden communication paths, which "provably secure operating systems" failed to adequately address due to their focus on abstract rather than microarchitectural properties.
- Paul Kocher's 1996 work on leaking cryptographic keys via side channels was a pivotal moment, transforming these vulnerabilities into a realistic and critical threat to data confidentiality.
- Around 2014-2015, the scope of microarchitecture attacks expanded significantly from purely cryptographic targets to system security (e.g., Rowhammer inducing bit flips in memory) and software exploitation (e.g., prefetch side channels bypassing KASLR).
- Side channels are now firmly established as a powerful exploitation technique, capable of undermining fundamental security mechanisms like memory isolation and address space randomization.
- Defenses must evolve to consider microarchitectural effects, including constant-time programming for crypto, hardware mitigations for DRAM integrity, and robust software-level randomization and isolation techniques.
About the Speaker(s)
Daniel Gruss is a prominent security researcher known for his work on microarchitecture vulnerabilities. He is a professor, as hinted by the audience's jest about "homework." Gruss has a history of presenting at Black Hat, including a previous appearance in 2016 alongside Anders Fogh. His research focuses on uncovering and understanding the intricate security implications of modern CPU designs.
Anders Fogh is another distinguished security researcher in the field of microarchitecture vulnerabilities, frequently collaborating with Daniel Gruss. Like Gruss, he has previously presented at Black Hat, notably in 2016. Fogh is recognized for his deep insights into how microarchitectural features, such as CPU caches, can be exploited. Despite their occasional disagreements, their collaborative presentations are characterized by a shared passion for exploring the cutting edge of hardware-level security.