TL;DR
BootKeeper is a static analysis tool designed to verify that boot firmware correctly implements the "measured boot" process. By analyzing firmware binaries, it ensures that all reachable code is measured and that the cryptographic fingerprints sent to the Trusted Platform Module (TPM) haven't been tampered with, effectively closing a critical gap in the hardware-software chain of trust.
What Problem Does This Paper Address?
When you turn on a computer, the boot firmware (like UEFI or BIOS) is the first code to run. To ensure this code hasn't been tampered with, modern systems use a "measured boot" process. This relies on a Root of Trust: a small piece of code called the Static Core Root of Trust for Measurement (SCRTM) hashes the firmware and sends that "fingerprint" to a secure hardware chip called the TPM.
The problem? If the SCRTM itself is buggy or malicious, the entire chain of trust collapses. Previous research has shown that attackers can use tiny "tick" malware (just 51 bytes!) to patch the SCRTM, forcing it to report a "golden" measurement to the TPM even if the rest of the firmware is infected. Furthermore, vendors often fail to measure the entire firmware, leaving "dark corners" where rootkits can hide undetected. BootKeeper aims to validate these firmware images before they are deployed.
Methods
BootKeeper uses a pipeline of advanced binary analysis techniques, primarily built on the angr framework, to evaluate firmware without needing access to the original source code. Its approach follows four main steps:
- TPM Write Detection: It uses symbolic execution to find instructions that interact with the TPM’s memory-mapped I/O (specifically the standard address
0xFED40000). This identifies exactly where the firmware "reports" its integrity. - Hash Function Identification: Once a TPM write is found, the tool uses backward slicing to trace the data back to its source. It looks for the cryptographic functions (like SHA-1) used to generate the measurement.
- Authenticity Verification: To ensure an attacker hasn't substituted a fake hash function, BootKeeper uses Data Flow Graph (DFG) isomorphism. It compares the structure of the firmware's hash function against a database of known-good implementations (like OpenSSL).
- Completeness & Atomicity Checks:
- Completeness: It builds a Control-Flow Graph (CFG) of the firmware to ensure that every reachable byte of code is actually included in the measurement.
- Atomicity: It verifies that the measurement isn't modified between the time it is calculated and the time it is written to the TPM (preventing "man-in-the-middle" attacks within the code itself).
Datasets
The authors evaluated BootKeeper on three types of firmware:
- SeaBIOS: An open-source implementation of a 16-bit x86 BIOS.
- EDK II (TianoCore): The industry-standard modern UEFI implementation used by major vendors like Intel and ARM.
- Custom Malicious Firmware: The authors crafted specific images to reproduce known attacks, such as the "tick" and "flea" attacks, which attempt to forge measurements or hide code in unmeasured regions.
Key Insights and Ideas
- The Binary is the Source of Truth: You don't need the vendor's source code to verify security properties. By looking at the raw binary, BootKeeper can catch compiler-introduced bugs or post-compilation tampering.
- Atomicity Matters: A common "aha" moment in the paper is the realization that simply having a hash function isn't enough. If an attacker can change the pointer to the hash result just before it's sent to the TPM, the security is bypassed. BootKeeper’s symbolic execution specifically checks for this "time-of-check to time-of-use" style vulnerability.
- Bridging Static and Dynamic: While BootKeeper is a static analysis tool, it uses symbolic execution (a "heavyweight" technique) to resolve complex, computed memory addresses that traditional static analysis would miss.
Key Results
- Detection Accuracy: BootKeeper successfully identified TPM write operations in 80% of the tested cases. The failures were primarily in unoptimized code where "path explosion" (too many possible execution branches) timed out the analysis.
- Attack Detection: It successfully detected all variants of the "tick" attack, flagging images where the hash function was tampered with or where malicious code was hidden in unmeasured memory blocks.
- Performance: The analysis is practical for a security audit or a CI/CD pipeline, taking an average of 1 minute and 48 seconds and using roughly 522 MB of RAM to validate a firmware image.
Limitations and Future Work
- Path Explosion: Like all tools relying on symbolic execution, BootKeeper struggles with highly complex, unoptimized code that creates a massive number of execution paths.
- Indirect Jumps: If the firmware uses very complex logic to determine where to jump next (indirect branches), the static CFG recovery might miss some code paths, leading to potential false negatives.
- Obfuscation: While the tool can handle standard compiler optimizations, intentional code obfuscation (used by some malware or DRM) could potentially hide malicious behavior from the analyzer.
- Future Work: The authors suggest integrating dynamic analysis (emulation) to help resolve the "dark paths" that static analysis can't reach.
Summary updated