Prompt, Patch, Prove

Tim de Waal (Member of Technical Staff · OpenAI)

[un]prompted II 2026 — The AI Security Practitioner Conference · Day 1 · Stage 1

Overview

In his talk, "Prompt, Patch, Prove," Tim de Waal, a security researcher and Member of Technical Staff at OpenAI, unveiled a groundbreaking methodology for leveraging advanced AI models to dissect, exploit, and even patch proprietary firmware. De Waal’s presentation at [un]prompted II highlighted how increasingly capable AI systems are dismantling the traditional barriers of "security through obscurity," offering unprecedented transparency into the software running on our devices, from home appliances to critical infrastructure. The core message is an empowerment of individuals: the ability to identify vulnerabilities, develop exploits, and proactively deploy custom patches on their own hardware, often before vendors can respond.

Watch on YouTube

Visual summary for Prompt, Patch, Prove by Tim de Waal
Visual summary for Prompt, Patch, Prove by Tim de Waal

Key moments

  1. 0:00 Introduction: AI's capability in firmware analysis
  2. 4:30 Experiment setup: GPT-6 Soul, cost, and N-days
  3. 8:00 Pre-patch demo: Achieving root shell and SQL injection
  4. 12:30 Elegant SQL injection patch using trampoline stubs
  5. 16:00 Future work: Expanding vulnerability search to other devices
  6. 18:30 Q&A: QEMU emulation limitations for exploit development
  7. 20:00 Q&A: Using personal ChatGPT and object dump for analysis

Prompt, Patch, Prove

Speakers: Tim de Waal, Member of Technical Staff, OpenAI

Conference: [un]prompted II

YouTube: https://www.youtube.com/watch?v=ViiU9y9chnk

Overview

In his talk, "Prompt, Patch, Prove," Tim de Waal, a security researcher and Member of Technical Staff at OpenAI, unveiled a groundbreaking methodology for leveraging advanced AI models to dissect, exploit, and even patch proprietary firmware. De Waal’s presentation at [un]prompted II highlighted how increasingly capable AI systems are dismantling the traditional barriers of "security through obscurity," offering unprecedented transparency into the software running on our devices, from home appliances to critical infrastructure. The core message is an empowerment of individuals: the ability to identify vulnerabilities, develop exploits, and proactively deploy custom patches on their own hardware, often before vendors can respond.

The talk demonstrated a practical, cost-effective approach to firmware analysis that previously required extensive human expertise and resources. By utilizing a high-capability large language model (LLM), de Waal showcased how complex tasks like reverse engineering compiled binaries, generating proof-of-concept exploits for known vulnerabilities (N-days), and even implementing sophisticated binary patches without access to source code, are now within reach for a broader audience. This shift fundamentally alters the landscape of device security, placing powerful defensive (and offensive) capabilities directly into the hands of security researchers and even advanced users.

De Waal's work is particularly significant because it addresses the critical lag in vendor patch cycles, which often leave devices vulnerable for extended periods. By illustrating how individuals can "take that power back" and deploy their own fixes, the presentation not only exposed the accelerating pace of vulnerability exploitation but also offered a tangible path toward enhanced device security and user autonomy in an increasingly firmware-dependent world.

Background

▶ Watch: Introduction: AI's capability in firmware analysis (0:00)

The concept of firmware is broad, encompassing everything from a simple main loop on a microprocessor to a complex real-time operating system (RTOS) or a full system-on-a-chip (SoC) running a Linux kernel, modules, and user-space libraries. Modern SoCs often contain multiple firmware components, including first-party binaries that load and interact with third-party firmware on peripherals like Wi-Fi processors. This intricate layering creates an enormous and often opaque attack surface. When evaluating the security of these binaries, it's not just the compiled code that matters, but also the compilation process itself: are standard mitigations like Address Space Layout Randomization (ASLR), Kernel ASLR (KSLR), and Mandatory Access Control (MAC) enabled? Are services running with excessive privileges, such as root? These factors significantly influence the difficulty of exploitation.

Historically, the security of many embedded devices has relied on security through obscurity. The sheer effort required to reverse engineer compiled binaries without source code meant that only well-resourced attackers or dedicated security teams could uncover and weaponize vulnerabilities. However, this paradigm has dramatically shifted. As de Waal noted, the "zero-day clock" – the time from a vulnerability's public disclosure (CVE) to its active exploitation – has "pretty much gone to zero." The advent of highly capable AI models, particularly frontier models, has accelerated this trend, making it easier and faster to find and exploit vulnerabilities.

For vendors, the process of addressing vulnerabilities is arduous and slow. It involves finding, triaging, root-causing, testing across potentially multiple devices, quality assurance (QA), releasing a patch, and then hoping users actually upgrade. This lengthy cycle leaves a significant window of vulnerability for devices ubiquitous in homes and corporate networks—firewalls, VPN endpoints, routers, and switches—all running firmware whose source code is rarely seen by the end-user.

De Waal's experiment was designed to demonstrate how readily available AI models can disrupt this status quo. He used his personal ChatGPT Pro account with Daybreak Blue (trusted access to Cyber capabilities) and the GPT-6 Soul model configured for extra high reasoning. The cost for this intensive analysis was approximately 7% of his weekly allowance, or about $50 – a remarkably low barrier to entry for such advanced security work. He emphasized that the efficacy of the approach is less about intricate prompt engineering and more about the raw capabilities of the underlying model, which are rapidly advancing.

Key Findings

▶ Watch: Pre-patch demo: Achieving root shell and SQL injection (8:00)

The talk "Prompt, Patch, Prove" revealed several pivotal findings that underscore the transformative impact of AI on firmware security:

  • Democratized Firmware Analysis: Large Language Models (LLMs) can effectively perform complex reverse engineering on compiled binaries without access to source code. This capability, once reserved for elite specialists, is now accessible and affordable, enabling a broader range of individuals to scrutinize the firmware running on their devices.
  • Automated Vulnerability Identification and Exploitation: Given information about known vulnerabilities (N-days), LLMs can generate functional proof-of-concept (PoC) exploits. Furthermore, their ability to analyze binaries suggests they can also assist in discovering new vulnerabilities, though the talk focused on known issues for demonstration purposes.
  • LLM-Driven Binary Patching: The most striking finding was the LLM's capacity to generate and apply patches directly to compiled binaries. This includes complex string manipulation for command injection fixes and sophisticated techniques like creating trampoline functions and new code sections for SQL injection sanitization, effectively repairing vulnerabilities without human intervention in the patching logic.
  • Persistent Firmware Updates: The LLM was able to iterate on patches, test them on a physical device, and ultimately create a modified firmware file that could be flashed, ensuring the patches were persistent across reboots. This capability allows users to secure their devices independently.
  • Cost-Effectiveness and Accessibility: The entire process, including significant computational resources from a frontier AI model, cost only about $50. This low cost makes advanced security research and patching capabilities accessible to individuals and small teams, profoundly shifting the economics of firmware security.
  • Cross-Device Vulnerability Discovery: LLMs can aid in identifying common chipsets used across various devices, often by analyzing public information like FCC documents. A vulnerability found in a specific Wi-Fi chipset in one consumer device could therefore lead to the discovery of vulnerabilities in numerous other devices utilizing the same component, amplifying the impact of individual research efforts.
  • Empowerment of Defenders: By enabling individuals to analyze and patch their own devices, the methodology empowers users to take proactive steps to secure their infrastructure, mitigating the risks posed by slow vendor response times and unpatched N-day vulnerabilities.

Technical Deep Dive

▶ Watch: Elegant SQL injection patch using trampoline stubs (12:30)

De Waal's experiment focused on a consumer access point, deliberately choosing two older, post-authentication N-day vulnerabilities involving string manipulation: a command injection and a SQL injection. These were selected because patching them in raw assembly would require intricate string checks, providing a robust test for the LLM's capabilities. Crucially, the target system was running its services as root, an egregious security misconfiguration common in embedded devices, which made successful exploitation trivial once the vulnerability was triggered.

For the command injection vulnerability, the original code exhibited a textbook anti-pattern: it took user input, formatted it directly into a ping command using sprintf, and then executed it via system(). The LLM's initial task was to fix this. Its proposed solution involved blocking problematic characters such as double quotes, dollar signs, backslashes, backticks, and line feed characters. While this effectively prevented the specific injection vector, de Waal highlighted a critical oversight during a side-by-side comparison of the assembly: the original compiled function included stack canaries for buffer overflow protection, but the LLM-patched version omitted them. Although deemed "probably fine" for this specific vulnerability in this context, it served as a crucial reminder that automated patching might miss higher-level security features or compiler-specific mitigations.

The SQL injection vulnerability was also straightforward, involving client-supplied user input being directly incorporated into two locations within a SQL statement. The goal was to ensure user input was always treated as data, not executable code. The LLM's initial patch was an incomplete fix, merely attempting to filter out double quotes. This was bypassed by a simple mac=mac payload, which still returned all rows from the database. This necessitated a re-prompt, demonstrating the iterative nature of working with LLMs for complex tasks.

The LLM's refined solution for the SQL injection was significantly more sophisticated and elegant:

  1. Trampoline S File: The model generated a small assembly file (.s) containing multiple trampoline stubs. These stubs act as intermediaries, redirecting execution flow.
  2. C File Implementation: It then implemented a C file containing 8 to 10 functions designed to take user input, perform a series of tests, and sanitize it robustly. This allowed the sanitization logic to be developed and tested independently in a standard C environment.
  3. Compilation and Linking: The C file was compiled and linked, creating a new executable component.
  4. Dynamic Library Modification: This newly compiled code was added as a new section to the dynamically linked library where the vulnerability resided (within the HTTPD process).
  5. Branch and Link Hooking: The LLM located the original call to sprintf that was responsible for constructing the vulnerable SQL query. It then modified the binary at this location, changing the existing branch and link instruction to point to one of the newly inserted trampoline stubs.
  6. Sanitized Query Return: This trampoline then called the block insert function (from the new C code) which performed the sanitization. The sanitized input was then used to construct a safe SQL query, and control was returned to the original execution flow.

This approach was praised for its elegance, allowing the LLM to create and test a robust fix in a modular way before minimally patching the existing binary. It contrasts with a previous, less effective attempt by the LLM which involved finding a code cave and jumping to it. De Waal emphasized that the LLM accomplished this without relying on specialized reverse engineering tools like Ghidra or Binary Ninja, instead preferring simpler utilities like object dump for binary analysis.

Demo / Proof of Concept

▶ Watch: Q&A: QEMU emulation limitations for exploit development (18:30)

The talk included a pre-recorded demonstration that vividly illustrated both the initial vulnerabilities and the effectiveness of the LLM-generated patches.

The first part of the demo showcased the successful exploitation of the command injection vulnerability. Since the target device lacked an id command, de Waal demonstrated root access by listing all files (ls -al /) and processes (ps aux). This provided clear visual evidence that the command injection allowed arbitrary code execution with the highest privileges on the system.

Following this, the demo shifted to the SQL injection vulnerability. Here, the proof-of-concept script successfully bypassed authentication and dumped all rows from a specific database table, confirming the exploitability of the second N-day.

The most compelling part of the demonstration came after the LLM had applied its patches and the modified firmware had been flashed onto the device. Running the exact same exploit scripts that had previously yielded root shells and data dumps now resulted in failure. The command injection attempts were blocked, and the SQL injection bypasses no longer worked, producing expected error messages or no unauthorized access. This "before and after" comparison provided concrete, undeniable proof of the LLM's ability to not only identify and exploit vulnerabilities but also to effectively patch them at the binary level, rendering the device secure against the demonstrated attacks. The demo served as a powerful validation of the "Patch, Prove" aspect of the talk's title.

Defensive Implications

▶ Watch: Q&A: Using personal ChatGPT and object dump for analysis (20:00)

The capabilities demonstrated by Tim de Waal have profound implications for both vendors and security defenders. For vendors, the era of "security through obscurity" is definitively over. The low cost and high capability of LLMs mean that proprietary firmware can be quickly and effectively scrutinized for vulnerabilities by a much wider audience. Vendors must internalize that their compiled binaries are now transparent. This necessitates a renewed focus on fundamental security practices:

  • Proactive Mitigation Adoption: Ensure that all standard compiler and operating system mitigations—such as ASLR, KSLR, stack canaries, and robust Mandatory Access Control (MAC) policies—are enabled by default and rigorously tested.
  • Principle of Least Privilege: Services should never run as root unless absolutely necessary, and even then, their attack surface should be minimized.
  • Accelerated Patch Cycles: The decreasing time from CVE disclosure to exploitation means vendors must significantly shorten their vulnerability response and patch deployment timelines.
  • Secure Coding Practices: With AI capable of analyzing and even generating complex patching code, the onus is on vendors to adopt secure coding practices from the outset to prevent these vulnerabilities.

For defenders and technically inclined users, de Waal's work presents a powerful new set of tools and strategies:

  • Personal Device Security: Individuals can now leverage LLMs to analyze the firmware on their own devices, identify potential vulnerabilities, and, as demonstrated, even apply custom patches before official vendor updates are available. This grants unprecedented control over personal device security.
  • Supply Chain Security: The ability to analyze common chipsets across various devices (e.g., Wi-Fi chips) means that a vulnerability discovered in one cheap consumer device could expose a flaw impacting numerous other, potentially more expensive, products. Defenders can use LLMs to identify these shared components, cross-reference them with public documentation like FCC documents, and proactively test for known weaknesses.
  • Test Environment Bootstrapping: LLMs can assist in setting up debug environments, even suggesting purchasing cheaper, similar hardware from platforms like Amazon to facilitate easier root access and testing.
  • Understanding AI as an Adversary/Ally: Defenders must understand the capabilities of AI in both offensive and defensive contexts. While LLMs can help patch, they can also generate sophisticated exploits, necessitating a proactive stance in hardening systems against AI-driven attacks.
  • Manual Verification Remains Key: Despite the LLM's impressive capabilities, de Waal emphasized the importance of manual verification. As seen with the missed stack canaries and the initial incomplete SQL injection fix, LLMs can make mistakes or require re-prompting. Human oversight is crucial to ensure the completeness and correctness of AI-generated patches and exploit analyses.
  • Limitations of Emulation: While tools like QEMU can speed up iteration times for certain tasks, de Waal cautioned that emulation environments might not perfectly replicate real-world hardware interactions, such as cache coherency, multi-core interactions, or complex Inter-Process Communication (IPC) mechanisms. For full exploit development and robust patch validation, testing on physical hardware often remains indispensable.

In essence, the talk signals a new era where powerful AI shifts the balance, empowering defenders to proactively secure their digital environments, while simultaneously pressuring vendors to elevate their security standards significantly.

Key Takeaways

  • AI Democratizes Firmware Security: Large Language Models (LLMs) make complex firmware reverse engineering, vulnerability discovery, and binary patching accessible and affordable for individuals, removing traditional barriers of expertise and cost.
  • Empowering Proactive User Patching: Users can now leverage AI to analyze their own devices, find vulnerabilities, and deploy custom, persistent patches directly onto firmware, often bypassing slow vendor patch cycles and reclaiming control over their device security.
  • LLMs Excel at Binary Modification: Advanced AI models can generate sophisticated binary patches for complex issues like command injection and SQL injection, including creating new code sections and using trampoline functions, all without access to original source code.
  • Vulnerability Amplification in Shared Components: AI can help identify common chipsets across diverse devices, meaning a single vulnerability discovered in one component can have widespread implications across multiple product lines, emphasizing the need for robust supply chain security.
  • Vendor Accountability is Paramount: The increased transparency provided by AI capabilities means vendors can no longer rely on security through obscurity. They must prioritize implementing fundamental security mitigations (ASLR, MAC, stack canaries) and drastically accelerate their vulnerability response and patch delivery processes.
  • Human Oversight Remains Essential: While AI is highly capable, human verification and iterative prompting are crucial to ensure the completeness, correctness, and robustness of AI-generated exploits and patches, as LLMs can miss details or provide incomplete solutions.

About the Speaker(s)

Tim de Waal, known by his handle Caesarus, is a distinguished security researcher and a Member of Technical Staff at OpenAI. With a public presence on platforms like GitHub, de Waal focuses on exploring advanced security challenges and leveraging cutting-edge technologies, such as large language models, to address them. His work, as showcased in "Prompt, Patch, Prove," highlights his expertise in firmware analysis, reverse engineering, and the practical application of AI in cybersecurity.

Reviews

  • Dr. Zero (Offensive Security Researcher) — MUST SEE ★★★★★
  • Heather Calloway (CISO) — MUST SEE ★★★★★

→ Top-rated talks at [un]prompted II 2026 — The AI Security Practitioner Conference

All talks from [un]prompted II 2026 — The AI Security Practitioner Conference