Black Hat's All Your Secrets Belong to Us: Leveraging Firmware Bugs to Break TEEs: skim's analysis identifies 9 key moments. Security researcher Tom Dohrmann details two critical vulnerabilities in AMD SEV-SNP Platform Security Processor firmware that allow a malicious hypervisor to bypass Reverse Map Table integrity checks.
Category: Tech. Format: Educational. YouTube video analyzed by skim.
skim AI Analysis
Credibility assessment: Empirical Vulnerability Proofs. Tom Dohrmann backs every architectural claim with concrete firmware table inspection and working proof-of-concept exploits tested on an AMD EPYC Milan processor. He provides exact hex values, probability calculations, and execution timings while making his exploit code publicly available.
Bias assessment: Offensive Security & Open-Code. The presentation maintains an objective, technical engineering focus throughout. The only notable perspective is a strong professional advocacy for open-source firmware and full-stack transparency from hardware vendors and cloud providers.
Originality: 95% — Primary Vulnerability Research. This talk presents original vulnerability discoveries in AMD SEV-SNP firmware alongside two novel, reusable exploitation techniques that bypass ciphertext unpredictability by targeting firmware-owned guest context pages rather than guest memory directly.
Depth: 94% — Deep Architectural & Exploit. Dohrmann dissects the exact interaction between x86 instructions, the Platform Security Processor, the Reverse Map Table, and Unified Memory Controllers, walking step-by-step through why naive memory corruption fails and how cryptographic key derivation can be subverted.
Key Points (9)
1. Dohrmann explains TEE threat models and AMD SEV-SNP
Timestamp: 00:01:01 to 00:03:27
Trusted Execution Environments isolate applications from a compromised kernel or hypervisor, making secret leakage the worst-case failure because stolen secrets allow impersonating the TEE outside protected hardware. AMD SEV-SNP protects virtual machines by encrypting guest memory, enforcing integrity, and measuring boot contents for remote attestation.
Significance (Medium): Frames confidentiality loss as the ultimate failure mode for confidential computing, establishing why memory corruption alone is insufficient without a way to extract plaintext secrets.
Sources in support: Tom Dohrmann (Security Researcher)
2. How the PSP and Reverse Map Table guard memory
Timestamp: 00:03:30 to 00:08:33
AMD's highly privileged Platform Security Processor manages virtual machine lifecycles and cryptographic attestation, and AMD published large parts of its firmware for the first time in August 2023. Meanwhile, the Reverse Map Table tracks ownership of every 4-kilobyte memory chunk in regular memory, relying on automatic CPU checks and software-enforced PSP checks to prevent unauthorized writes.
Significance (High): Reveals the architectural asymmetry at the heart of the bugs: while the x86 CPU enforces Reverse Map Table ownership in hardware, the highly privileged PSP relies on fallible software checks.
Sources in support: Tom Dohrmann (Security Researcher)
3. How hypervisor command dispatch optimizes writes
Timestamp: 00:08:36 to 00:12:01
Standard hypervisor requests require donating a memory page to the firmware state in the Reverse Map Table so the firmware can safely write back a response before the page is reclaimed. Because commands without responses never write to memory, the firmware skips four of the nine dispatch steps and uses a command lookup table to decide whether Reverse Map Table write checks are required.
Significance (Medium): Shows how a performance optimization that skips page donation for read-only commands creates a single point of failure inside the firmware's command dispatch table.
Sources in support: Tom Dohrmann (Security Researcher)
4. Attestation command bug enables fixed-value writes
Timestamp: 00:12:01 to 00:14:41
According to Tom Dohrmann, the firmware's command dispatch table erroneously sets Reverse Map Table write checks to false for the attestation command even though that command writes back the report size. A malicious hypervisor can point the attestation request buffer at protected memory, tricking the firmware into overwriting arbitrary locations with the fixed report size value of hex 4D0.
Significance (High): Exposes a concrete integrity bypass in AMD SEV-SNP where a single boolean flag lets an untrusted hypervisor use the PSP as a confused deputy to corrupt protected memory.
Sources in support: Tom Dohrmann (Security Researcher)
5. Why corrupting guest memory fails to leak secrets
Timestamp: 00:14:44 to 00:17:32
Directly corrupting guest virtual machine memory is impractical because guest memory is encrypted with AES, leaving the attacker blind to both the memory layout and the resulting plaintext after overwriting ciphertext. Instead, Dohrmann shifts the attack surface to firmware-owned guest context pages, which store critical virtual machine metadata and cryptographic material under a dedicated firmware encryption key.
Significance (High): Establishes the talk's central strategic breakthrough: bypassing AES diffusion and guest OS differences by attacking the firmware's own metadata pages rather than the guest VM.
Sources in support: Tom Dohrmann (Security Researcher)
6. Corrupting UMC key seeds forces identical VM keys
Timestamp: 00:17:35 to 00:23:37
The first field of every guest context page is the Unified Memory Controller key seed, which the firmware populates randomly so memory controllers can deterministically derive the guest's encryption key. By shifting the malicious attestation buffer byte by byte across this field at the exact same physical memory address after shutting down a victim VM, an attacker forces a debug-enabled VM to derive the exact same encryption key and decrypt the victim's Secrets page on an EPYC Milan CPU.
Significance (High): Demonstrates a complete loss of SEV-SNP confidentiality: deterministic key derivation plus location-dependent encryption lets fixed ciphertext writes produce identical guest encryption keys.
Sources in support: Tom Dohrmann (Security Researcher)
7. Certificate storage reclaim bug corrupts three pages
Timestamp: 00:23:41 to 00:28:31
Dohrmann details a second bug in the extended initialization command that lets the hypervisor store firmware certificates in regular memory instead of slow SPI flash, checking Reverse Map Table permissions only once at initialization. Because the page reclaim command forgets to verify whether a page holds certificate storage, the hypervisor can reclaim that memory, reassign it to a guest or guest context page, and trigger certificate refreshes that overwrite roughly three pages with random encrypted data.
Significance (High): Uncovers a state-tracking flaw where one-time initialization checks collide with an incomplete page-reclaim check, giving attackers a three-page random overwrite primitive.
Sources in support: Tom Dohrmann (Security Researcher)
8. Brute-forcing ASID and policy flags leaks VM memory
Timestamp: 00:28:34 to 00:33:52
Because certificate refreshes write random encrypted data rather than a fixed value, an attacker cannot match UMC key seeds and must instead corrupt the guest context page's 32-bit Address Space Identifier and policy debug flag. Using an SEV-SNP command that decrypts these non-sensitive fields, Dohrmann hammers the firmware 300 times per second against 1-in-12-million odds, hitting a valid ASID of 31 and enabled debug policy after 1.4 million attempts in 1 day and 19 hours to decrypt a victim's Secrets page.
Significance (High): Proves that even uncoordinated random ciphertext overwrites can break TEE confidentiality when paired with an architectural info-disclosure command and pre-launch brute forcing.
Sources in support: Tom Dohrmann (Security Researcher)
9. Reusable exploit patterns and demand for transparency
Timestamp: 00:33:53 to 00:37:10
Dohrmann argues that targeting guest context pages provides a workload-independent exploitation template for both fixed and random Reverse Map Table memory corruption bugs, noting he already used the exact first strategy to exploit a third null-pointer dereference bug. Because a hypervisor controls system setup enough to turn simple firmware bugs into total compromises, users must audit TEE support firmware and demand full code transparency across hardware and guest software.
Significance (Medium): Elevates the two exploits into a generalizable class of TEE attacks, demonstrating that even a normally benign null-pointer dereference becomes critical under hypervisor control.
Sources in support: Tom Dohrmann (Security Researcher)
This analysis was generated by skim (skim.plus), an AI-powered content analysis platform by Credible AI. Scores and classifications represent the platform's AI-generated assessment and should be considered alongside other sources.