Inside the Machine: How Offensive Security is Defining the Way We Compute Data
Rodrigo Branco (Intel)
Overview
In his compelling OFFZONE talk, "Inside the Machine: How Offensive Security is Defining the Way We Compute Data," Rodrigo Branco of Intel delves into the critical but often misunderstood relationship between offensive and defensive security research. Branco challenges conventional wisdom in mitigation development, arguing that a profound understanding of offensive techniques is indispensable for creating effective defenses. He emphasizes that security research, at its core, is about deep understanding – learning how systems work to explore their full potential, including their vulnerabilities.

Key moments
- 0:00 Introduction: Hacking as art and understanding
- 4:00 Mitigation developers' fallacy: assuming attackers are stupid
- 7:30 Proposed rule: mitigations must prevent three real exploits
- 20:00 Debunking 'defense-in-depth' in computer security
- 32:00 Introducing 'non-obliviousness' as a new exploit primitive
- 36:00 Memory encryption attack using brute-force and non-obliviousness
- 51:00 Live demo of the encrypted memory attack and recap
Inside the Machine: How Offensive Security is Defining the Way We Compute Data
Speakers: Rodrigo Branco (Intel)
Conference: OFFZONE
YouTube: https://www.youtube.com/watch?v=X5g8HYKIckE
Overview
In his compelling OFFZONE talk, "Inside the Machine: How Offensive Security is Defining the Way We Compute Data," Rodrigo Branco of Intel delves into the critical but often misunderstood relationship between offensive and defensive security research. Branco challenges conventional wisdom in mitigation development, arguing that a profound understanding of offensive techniques is indispensable for creating effective defenses. He emphasizes that security research, at its core, is about deep understanding – learning how systems work to explore their full potential, including their vulnerabilities.
Branco critiques the prevailing mindsets in both offensive and defensive camps: the "god mode" invincibility felt by exploit writers versus the "attackers are idiots" complacency often seen in mitigation development. This imbalance, he contends, leads to a cycle of failing mitigations and a proliferation of security "noise" that lacks scientific rigor. His talk aims to provide a framework for rationalizing mitigation development, advocating for a more scientific, data-driven, and offense-informed approach to building secure systems. Ultimately, Branco argues that true progress in cybersecurity hinges on a symbiotic relationship where defensive strategies are directly guided and validated by the insights gleaned from offensive research.
Background
▶ Watch: Introduction: Hacking as art and understanding (0:00)
Branco sets the stage by highlighting a significant disparity within the security engineering discipline. While the engineering process for creating secure software, hardware, and systems is relatively mature and well-understood—with established references and methodologies—the process for engineering mitigations lacks similar maturity. He defines mitigations as defense mechanisms that prevent entire classes of vulnerabilities or unknown vulnerabilities from being exploitable, distinguishing them from individual fixes for specific vulnerability instances. This immaturity in mitigation engineering is a central problem he seeks to address.
To bridge this gap, Branco proposes three foundational principles for more effective mitigation development. First, he introduces a pragmatic "proof by induction" for engineers: if a mitigation claims to protect against a class of vulnerabilities, it must demonstrably prevent at least three real-world instances of exploits for that class. Without this empirical validation, he argues, a mitigation merely adds complexity without guaranteed effectiveness. Second, he stresses the critical importance of experiential knowledge for mitigation proposers. To truly understand a problem and design an effective defense, one must have "done it" – meaning, they must have written exploits for the very class of vulnerabilities they aim to mitigate, or closely collaborated with someone who has. He warns that mitigations proposed without this deep, offensive understanding are likely to be ineffective. Third, Branco emphasizes that investments in defense must be guided by investments in offense. Offensive research uncovers new attack possibilities, scenarios, and implications, and defensive strategies must directly benefit from this intelligence flow. He asserts that "details matter," as it is often the subtle implementation specifics that lead to mitigation bypasses, underscoring the need for comprehensive data sharing.
Branco also critiques several prevalent but flawed concepts in the security discourse. He dismisses the notion of "raising the bar" without clear metrics, arguing it often obfuscates a lack of tangible improvement. He similarly challenges the concept of defense-in-depth in computer security, contrasting it with its military origins. In computing, he argues, when core mitigations like ASLR, CFI, or Canary fail, they often fail "all together," not sequentially, making the layered defense concept less applicable. The speaker also touches upon the challenges of bug bounties, acknowledging their role in bringing new talent but questioning the quality and volume of meaningful submissions, as well as the maturity of triaging processes within companies. He advocates for greater formalization of offensive work, viewing it as essential for academia to scale and for practitioners to effectively teach and share knowledge, pushing back against the tendency for practitioners to avoid documentation and teaching.
Key Findings
▶ Watch: Proposed rule: mitigations must prevent three real exploits (7:30)
Branco's key findings revolve around a fundamental shift in how we approach security, particularly the design and validation of defensive measures. His primary contribution is the assertion that effective mitigation development is inextricably linked to a deep, practical understanding of offensive techniques. This leads to several specific findings:
- The "Three Cases" Rule for Mitigation Validation: A proposed mitigation for a class of vulnerabilities must demonstrably prevent the exploitation of at least three real-world instances of vulnerabilities within that class. This rule provides a concrete, empirical metric for evaluating the actual effectiveness of a defense, moving beyond vague claims of "raising the bar."
- The Necessity of Offensive Experience: Those proposing mitigations must have either personally written exploits for the class of vulnerabilities they intend to mitigate, or partnered with individuals who possess such expertise. Without this hands-on offensive perspective, mitigations are likely to be built on an incomplete understanding of the problem, leading to added complexity without real security gains.
- Introduction of the "No Obliviousness" Primitive: Branco identifies a novel exploit primitive, "no obliviousness," which describes scenarios where an attacker can observe memory being modified without being able to see or control its specific content. This primitive is particularly relevant to modern memory encryption technologies.
- Demonstrated Vulnerability in Memory Encryption Technologies: Using the "no obliviousness" primitive, Branco and a co-researcher demonstrated a practical brute-force attack against memory encryption, specifically targeting the Linux kernel's
task_structto elevate privileges by overwriting theeuid(effective user ID). This attack reveals that even advanced hardware-based memory encryption, while raising the bar, is not a panacea and can be bypassed under specific conditions, particularly when lacking integrity and replay protection across the entire memory space.
These findings collectively advocate for a paradigm where offensive research isn't just about finding bugs, but about informing and validating the very design of robust security mitigations.
Technical Deep Dive
▶ Watch: Debunking 'defense-in-depth' in computer security (20:00)
Branco's talk moves from philosophical arguments to concrete technical examples, underscoring the need for detailed analysis in security. He defines mitigations as mechanisms designed to prevent entire classes of vulnerabilities or unknown vulnerabilities, differentiating them from specific patches. His "three cases" rule for validating mitigations is a direct challenge to the often-vague claims of "raising the bar," demanding concrete proof of effectiveness against real-world exploits. He critically examines the concept of defense-in-depth, arguing that in modern computer systems, mitigations like ASLR, CFI, and Canary often fail simultaneously, rather than in layers, making the traditional military analogy misleading.
The speaker emphasizes the immense value of detailed Pwn2Own write-ups and post-conference presentations. These provide crucial data on real-life exploitation techniques, mitigation bypasses, and the state of the art in offensive capabilities. However, he laments the lack of accompanying data, such as the time spent on research or prior knowledge, which is vital for defenders to understand the true cost and complexity of an attack. He commends Microsoft for its exemplary practice of sharing the rationale and data behind its mitigation strategies, such as the number of exploits affecting specific vulnerability classes. In contrast, he points to Metasploit, a widely used exploit framework, as an example where even publicly available exploits often lack clear, verifiable data on which mitigations they bypass or whether they could bypass mitigations if enabled.
Branco strongly advocates for the formalization of offensive work, citing initiatives like the LangSec project and its "weird machine" concept, which models how data can drive code execution. He highlights how LangSec's insights often contradict traditional secure development advice, such as avoiding "shotgun parsing" (spreading input validation throughout the code) and recognizing that "security is not composable" (intrinsically secure functions don't guarantee system security when combined). He also references other significant work in formalizing exploits, including independent research on automatic heap exploit generation, mathematical models of heap manipulation, and a recent paper using Turing machines to define exploit primitives. This trend toward formalization is crucial for scaling security education and research within academia.
His own research, developed with colleagues, seeks to define exploit writing using set theory, combining exploit primitives (as initially defined by JIRA in the early 2000s) to achieve an exploit objective. They also proposed using Big O notation to measure exploit complexity and explored the distinction between probabilistic versus deterministic mitigations, particularly in the context of encryption.
The core technical contribution of the talk is the introduction and demonstration of the "no obliviousness" primitive. Branco explains this as a scenario where an attacker can observe memory being modified (e.g., through timing attacks or cache side channels) but cannot discern or control the specific content of that modification. He illustrates this with memory encryption technologies, such as those found in Xbox, Apple's Secure Enclave, Intel SGX, and AMD's secure memory solutions. In these systems, data in CPU caches is plaintext, but when moved to main memory, it's encrypted. An attacker with physical access or a privileged hypervisor might be able to modify the encrypted memory. While the attacker cannot control the decrypted value (as they lack the encryption key), they can cause random data to be written.
Branco details a 2016 attack he developed with a co-researcher that exploited this property. By identifying memory locations that changed in predictable patterns, they could target specific data within a 128-bit encrypted block. If the target operation involved a "not zero" comparison (e.g., checking if a flag was set), a random overwrite would often succeed in setting a non-zero value, leading to a win. While this specific instance could be mitigated by software (e.g., comparing against a specific 1 instead of not zero), it highlighted a fundamental hardware-level challenge.
He then presents a more advanced brute-force attack leveraging no obliviousness. Modern memory encryption typically operates on fixed-size blocks, often 128 bits (e.g., AES-128). If a single bit is flipped in an encrypted block, the entire decrypted block becomes random. However, if a block contains multiple variables of different sizes (e.g., an 8-bit, 16-bit, and 32-bit variable), an attacker could repeatedly overwrite the encrypted block. For a small target variable, say 32 bits, the chances of a random overwrite resulting in a desired value (e.g., 0) become statistically feasible. Branco calculates that brute-forcing a 32-bit value could take approximately 15 minutes.
The requirements for this specific brute-force attack are:
- No Obliviousness: The ability to observe memory changes without content visibility.
- Arbitrary Write to Main Memory: The ability to write to encrypted memory directly.
- Arbitrary Number of Writes: The ability to repeat the write operation many times for brute-forcing.
He provides a concrete example using the Linux kernel's task_struct, which manages process information. Within task_struct, the euid (effective user ID) is a 32-bit integer. An attacker could:
- Find the memory location of a
task_struct(e.g., by spawning multiple child processes and observing memory allocations). - Repeatedly overwrite the encrypted memory block containing the
euid. - Since the
euidis often not rigorously validated (i.e., the system doesn't crash if an invalid value is written), the process can continue executing until a0is randomly hit, granting root privileges.
This attack works because the 32-bit euid is within a 128-bit block, and the brute-force window (2^32 possibilities) is manageable. This principle applies not only to physical machine access but also to hypervisor-based memory encryption (e.g., isolating guest VMs), where an attacker within a compromised hypervisor could target guest memory. Branco concludes that while memory encryption does raise the bar against accidental leaks or uncontrolled overwrites, it is demonstrably vulnerable to targeted, controlled attacks leveraging the "no obliviousness" primitive and brute-force techniques.
Demo / Proof of Concept
▶ Watch: Memory encryption attack using brute-force and non-obliviousness (36:00)
Branco concluded his talk with a video demonstration of the no obliviousness brute-force attack against memory encryption. The demonstration involved two virtual machines: a victim VM and an attacker VM.
Inside the victim VM, an unprivileged process was running, specifically designed to spawn multiple child processes. This process acted as a target, allowing the attacker to observe memory allocations and identify the location in memory where the task_struct (containing the euid) resided.
The attacker VM was connected to a debugger stub running on the hypervisor. Critically, because memory encryption was active between the guest VMs and the hypervisor (using different encryption keys), any attempt by the hypervisor-level attacker to read or write directly to the guest's memory would encounter encrypted data. Reading would yield "encrypted garbage," and writing would result in a random, unpredictable value being decrypted by the guest CPU.
Despite these limitations, the demonstration showed the attacker successfully performing the brute-force attack. The attacker VM was able to:
- Locate the target
task_structin the victim VM's encrypted memory. - Continuously overwrite the 128-bit memory block containing the 32-bit
euidfield. - Observe the (random) values that the
euidwould take on after each overwrite, as the system processed them. - Eventually, after a period of brute-forcing (estimated at around 15 minutes for a 32-bit value), one of the random writes resulted in the
euidbecoming0. - Once the
euidwas0, the unprivileged process in the victim VM effectively gained root privileges, demonstrating the successful bypass of memory encryption through the "no obliviousness" primitive.
This visual proof of concept vividly illustrated that even with advanced memory encryption, the ability to observe changes and perform repeated, untargeted writes can lead to a deterministic privilege escalation under specific conditions.
Defensive Implications
▶ Watch: Live demo of the encrypted memory attack and recap (51:00)
The insights shared by Rodrigo Branco carry profound implications for defenders and security architects. The overarching message is that defensive strategies must be intimately informed by offensive realities.
- Validate Mitigations Empirically: Defenders should adopt Branco's "three cases" rule. Any proposed mitigation must be rigorously tested and proven to prevent at least three real-world exploit instances for the class of vulnerabilities it claims to address. This moves beyond theoretical claims and demands concrete evidence of efficacy.
- Cultivate Offensive Expertise: Security teams responsible for mitigation development should either possess hands-on exploit writing experience or actively partner with offensive researchers. A deep, practical understanding of how vulnerabilities are exploited is crucial for designing truly effective defenses, rather than merely adding layers of complexity that attackers can easily bypass.
- Scrutinize "Defense-in-Depth" Claims: Defenders must critically evaluate the applicability of "defense-in-depth" in specific computing contexts. Recognize that many core software mitigations can fail simultaneously, and a layered approach does not inherently guarantee resilience. Focus on the robustness of individual layers and their true impact.
- Embrace Formalization and Data Sharing: Encourage and contribute to efforts to formalize offensive security concepts. This provides a common language and framework for understanding attacks, which is essential for scaling knowledge and improving defensive strategies. Furthermore, demand and provide detailed data on exploit techniques, mitigation bypasses, and the effort involved in developing attacks (e.g., time, prior knowledge). This data is invaluable for prioritizing defensive investments.
- Understand New Primitives with New Technologies: New hardware and software technologies, while offering new protections, also introduce new attack primitives. Defenders must proactively research these new attack surfaces. For instance, while memory encryption (like Intel SGX or AMD's solutions) raises the bar against many attacks, it introduces the "no obliviousness" primitive, which can be exploited.
- Address Design-Level Flaws, Not Just Implementation Bugs: The memory encryption attack highlights that some vulnerabilities stem from fundamental design properties (like the interaction of encryption blocks with variable sizes) rather than just software bugs. Defenders need to push for architectural changes and design reviews that consider these deeper interactions. While software fixes (e.g., comparing against specific values instead of "not zero") are important, they may not address the underlying hardware-software co-design challenges.
- Invest in Research and Collaboration: The prolonged nature of Branco's memory encryption research (2015-2019) underscores that understanding complex systems and their vulnerabilities requires significant, sustained effort. Companies and organizations must invest in dedicated research, fostering an environment where offensive and defensive teams can collaborate to uncover and address systemic weaknesses.
By adopting these principles, defenders can move towards a more scientific, data-driven, and ultimately more effective approach to securing critical systems, ensuring that defensive investments are truly impactful against evolving threats.
Key Takeaways
- Mitigations must be rigorously validated by demonstrating their effectiveness against at least three real-world exploit instances for the class of vulnerabilities they target.
- Proposers of mitigations need a deep, practical understanding of offensive techniques, ideally gained through writing exploits or close collaboration with experienced exploit writers.
- New technologies, while offering security benefits, invariably introduce new attack primitives that require dedicated offensive research to fully understand and address.
- Investments in defense should be directly guided and informed by offensive research, necessitating greater data sharing and a move away from using offensive work solely for marketing.
- Implementation details are paramount; they often determine the success or failure of a mitigation and should not be overlooked in favor of high-level architectural discussions.
- Memory encryption, while raising the bar against many attacks, is not a panacea and can be vulnerable to specific techniques like "no obliviousness" brute-force attacks on sufficiently small, critical data fields.
About the Speaker(s)
Rodrigo Branco, who works at Intel, is a highly respected and passionate figure in the security research community. He shared that this was his third visit to Russia, expressing appreciation for the brilliant researchers and active community he encounters there. Branco frames hacking as an art form driven by a deep desire to understand how things work, believing that the more one understands, the more one can modify, explore, and repurpose. He emphasizes that his talk represents his personal opinions and ideas, which he strives to bring to Intel, but they don't necessarily reflect company-wide consensus. His dedication to pushing the boundaries of security research and fostering a more collaborative and scientifically rigorous approach to defense is evident throughout his presentation.
Reviews
Dr. Zero (Offensive Security Researcher) — STRONG ACCEPT
Branco delivers a genuinely useful framework for mitigation development that most security engineers need to hear, backed by a novel primitive ('no obliviousness') and a working brute-force attack against memory encryption. The philosophical scaffolding occasionally drifts into preaching-to-the-choir territory, but the technical payload lands.
Heather Calloway (CISO) — STRONG ACCEPT
Branco delivers a rare talk that bridges offensive research and security program governance. His 'three cases' validation rule and insistence on offensive expertise in mitigation design are immediately actionable for any CISO evaluating security investments or vendor claims. The memory encryption attack is technically interesting, but the real value is the framework for thinking about when mitigations actually work.