Breaking Encrypted USB Drives with Time-Travel Debugging
Xusheng Li (Software Engineer · Vector 35)
RE//verse 2026 · Day 2 · Coral Ballroom A
Overview
In an illuminating talk at RE//verse, Xusheng Li, a Software Engineer at Vector 35, unveiled critical vulnerabilities in several commercially available "encrypted" USB drives and software, challenging the widespread assumption of their security. Titled "Breaking Encrypted USB Drives with Time-Travel Debugging," Li's presentation serves as both a stark warning about blindly trusting vendor claims and a compelling demonstration of Time-Travel Debugging (TTD) as a game-changing tool for reverse engineers. The talk meticulously details how TTD can be leveraged to uncover hidden flaws, from non-existent encryption to hardcoded keys and plaintext password leaks, in devices marketed for their robust data protection.

Key moments
- 0:00 Introduction and key takeaways
- 5:58 First vulnerability: SD card in 'encrypted' USB drive
- 10:10 Introducing Time Travel Debugging (TTD) as a game-changer
- 22:00 TTD demonstration: Rewinding execution for buffer analysis
- 29:30 Second vulnerability: Discovery of hardcoded AES key
- 31:30 Third vulnerability: Password leaked from device to computer
- 41:30 Future TTD use: Reconstructing all strings from RAM
- 46:30 Q&A: When TTD might not be the best tool
Breaking Encrypted USB Drives with Time-Travel Debugging
Speakers: Xusheng Li, Software Engineer, Vector 35
Conference: RE//verse
YouTube: https://www.youtube.com/watch?v=Rv6jdnQ4YhY
Overview
In an illuminating talk at RE//verse, Xusheng Li, a Software Engineer at Vector 35, unveiled critical vulnerabilities in several commercially available "encrypted" USB drives and software, challenging the widespread assumption of their security. Titled "Breaking Encrypted USB Drives with Time-Travel Debugging," Li's presentation serves as both a stark warning about blindly trusting vendor claims and a compelling demonstration of Time-Travel Debugging (TTD) as a game-changing tool for reverse engineers. The talk meticulously details how TTD can be leveraged to uncover hidden flaws, from non-existent encryption to hardcoded keys and plaintext password leaks, in devices marketed for their robust data protection.
Li's research highlights a pervasive problem in the cybersecurity landscape: the significant gap between advertised security features and their actual implementation. By dissecting three distinct cases—a physically compromised hardware drive, a flawed software encryption utility, and a vulnerable hardware SSD—he systematically exposes how these products fail to deliver on their promise of secure data storage. Beyond merely identifying vulnerabilities, the talk champions the adoption of TTD, a powerful debugging paradigm that allows for deterministic replay and retrospective analysis of program execution, significantly accelerating the discovery and understanding of complex security flaws.
This article delves into the technical specifics of Li's findings, exploring the methodologies employed and the profound implications for both users and developers of encrypted storage solutions. It underscores the necessity for rigorous independent verification of security claims and advocates for the integration of advanced tools like TTD into standard reverse engineering workflows, transforming how security researchers approach complex binary analysis.
Background
▶ Watch: Introduction and key takeaways (0:00)
The genesis of this research stemmed from a simple observation: the availability of encrypted USB drives unlockable solely by fingerprint or password, often without an initial, mandatory password entry for biometric setup. This immediately raised a red flag for Li, drawing a parallel to full-disk encryption systems like those on iPhones, which always require a password for the initial unlock before biometrics can be used. This suspicion laid the groundwork for a deep dive into the security claims of various "hardware encrypted" devices.
The problem Li addresses is a fundamental one: the inherent trust users place in security products, often without the means or expertise to verify vendor claims. When a device is marketed with features like "AES 256 encryption" and "fingerprint unlock," consumers naturally assume their data is safe. However, as the talk demonstrates, the reality can be far from this expectation, with implementations ranging from comically insecure to subtly flawed. The vulnerabilities Li uncovered were not due to sophisticated zero-day exploits but rather fundamental design and implementation errors that undermine the entire security premise of these devices.
To tackle these challenges, Li introduces Time-Travel Debugging (TTD) as a crucial enabler. Traditional debugging, while powerful, often involves a linear, forward-only progression, making it easy to miss critical ephemeral states or requiring tedious re-execution to reach a specific point. TTD, also known as "record and replay," overcomes these limitations by recording the entire program execution history into a trace file. This allows a reverse engineer to step forward, step backward, and query the execution history at will, providing an unprecedented level of control and insight into program behavior. Li's talk positions TTD not just as a niche tool but as an essential component for modern reverse engineering, especially when dealing with complex binaries, malware, or opaque cryptographic implementations.
Key Findings
▶ Watch: Introducing Time Travel Debugging (TTD) as a game-changer (10:10)
Xusheng Li's research uncovered three distinct, yet equally critical, classes of vulnerabilities across different "encrypted" storage solutions:
- Non-Existent Encryption (Lenovo Think F100): The Lenovo Think F100, marketed as a "hardware encrypted USB drive" with AES 256 encryption and biometric unlock, was found to contain no encryption whatsoever. Upon physical disassembly using only a pair of pliers, the device revealed a standard SD card internally. When inserted into an SD card adapter and plugged into a computer, the contents were immediately accessible in plaintext. The fingerprint scanner merely gated the USB connection, preventing enumeration as a drive unless authenticated, but providing no data encryption. Lenovo's initial "fix" involved an epoxy cover over the SD card, which offered no real security and could be easily removed. A proper fix eventually followed, but the initial response highlighted a severe lack of understanding regarding fundamental data security.
- Partial Encryption and Hardcoded Keys (Lock File Software): The Lock File software, designed for encrypting files with a user password, exhibited two major flaws. Firstly, it only encrypted approximately 1/3 of the file's content. Li demonstrated this by comparing the "encrypted" file with the original in a hex editor and 010 editor, showing that large portions, including the PDF header, remained readable. Secondly, and more critically, the encryption that was performed used a hardcoded AES key embedded directly within the binary. This means the user's password had no bearing on the actual encryption key, rendering all encrypted files trivially decryptable by anyone with access to the software binary. Despite reporting, the vendor did not respond, leading to public disclosure.
- Password Leakage and Weak Encryption (Lenovo ThinkPad F SD303): The Lenovo ThinkPad F SD303, an encrypted solid-state hard drive, initially appeared to implement proper data encryption. However, Li discovered a critical flaw in its accompanying utility software. Using Wireshark, he observed the user's password being transmitted in plaintext from the device to the computer during the unlock process. After reporting this, Lenovo provided a fix where a "binary blob" was sent instead. While initially suspected to be a hash (e.g., SHA-256), further Time-Travel Debugging revealed this blob was actually the password encrypted with SM4 decryption, and the key for this encryption was easily recoverable from the software itself. This meant the "fix" was incomplete, still allowing for offline password recovery. A proper fix was eventually implemented, where the password was sent to the device for verification, indicating a more secure challenge-response mechanism.
In total, Xusheng Li secured three CVEs for his research, with two of them directly related to the vulnerabilities discussed in this talk. The disclosure timeline for these issues spanned from August to December, culminating in proper fixes from Lenovo. However, Li noted the significant challenge of distributing hardware fixes to existing users, contrasting it with the relative ease of software updates.
Technical Deep Dive
▶ Watch: Second vulnerability: Discovery of hardcoded AES key (29:30)
The core of Xusheng Li's methodology for uncovering the Lock File and Lenovo ThinkPad F SD303 vulnerabilities revolved around the innovative application of Time-Travel Debugging (TTD). TTD, also known as record and replay debugging, fundamentally alters the reverse engineering workflow by capturing a complete, deterministic trace of a program's execution. This trace can then be replayed, allowing a researcher to move backward and forward through time, inspect any memory or register state, and analyze events that would be ephemeral in traditional debugging.
Li primarily utilized WinDbg's TTD capabilities on Windows, noting its robust implementation. He emphasized that TTD's philosophy moves away from traditional breakpoint-and-resume debugging. Instead, the focus shifts to running queries against the execution history. For example, one can directly query for all instances an address was written to, all calls to a specific function, or the state of a register at any given moment. This programmatic access to the entire execution history is a significant advantage.
A "killer feature" highlighted by Li is backtracking. This allows a reverse engineer to trace the origin and formation of a buffer—whether it's an encryption key or decrypted data—by querying the execution history for all writes to that memory region. This is exceptionally difficult, if not impossible, with traditional debuggers.
Li demonstrated TTD's power through the analysis of the Lock File software. The objective was to determine if the partially encrypted 1/3 of the file was genuinely secure.
- Recording the Trace: Li first obtained a TTD recording of the file encryption operation. To keep the trace size manageable (e.g., 400 MB for this operation, which is considered small given the detailed information it contains), he attached the debugger to the program after it had stabilized, thus avoiding recording the initial setup and focusing solely on the encryption process.
- Identifying Write Operations: The first step was to identify where the encrypted data was being written to the output file. Li ran a query to find all calls to
kernel32!WriteFile, the Windows API function responsible for writing data to files. This query yielded 236 call events, each with a precise timestamp. - Examining Buffers: By inspecting the parameters of the
WriteFilecalls, specifically the buffer being written (the second parameter in a 32-bit PE file), Li could observe the data being flushed to disk. He noted that the initialWriteFilecall confirmed the "1/3 encrypted" observation, as the buffer content matched the partially plaintext file header. - Navigating the Call Stack and Rewinding: Li then stepped out of the
kernel32!WriteFilefunction, returning to the user-mode code. He encountered calls tofwritefrom the C runtime library. A crucial aspect of TTD was demonstrated here: after returning fromfwrite, a traditional debugger would have lost the state before the call. However, with TTD, Li could use reverse step over to rewind the execution precisely to the moment beforefwritewas called. This allowed him to inspect the buffer as it was passed tofwrite. - Understanding Caching and Data Flow: During this inspection, Li observed that the buffer passed to
fwritesometimes contained different data than what was ultimately written byWriteFile. This led to the discovery that approximately 256fwritecalls would trigger a singlekernel32!WriteFilecall, indicating an internal caching mechanism in the C runtime. This low-level detail, normally hidden, was laid bare by TTD. - Backtracking to the Cryptography Function: Focusing on the
fwritecalls that produced the encrypted portion of the file, Li selected a specific address within that buffer and initiated a backtracking query. This query revealed the instruction responsible for writing that particular byte. Following this, he identified a function containing operations characteristic of AES, specifically the S-box lookup tables. - Key Recovery and Hardcoded Key Discovery: To recover the AES key, Li utilized the SideKick plugin, a tool that assists in cryptographic analysis by explaining concepts like round key expansion. The plugin guided him to identify the expanded round keys, from which the original 16-byte AES key could be extracted. The recovered key, however, did not look random. Further backtracking of this key buffer led him to a specific location within the binary's .rdata section (read-only data). This definitively proved that the AES key was hardcoded in the binary and had existed since the PE file was loaded, rendering the user password irrelevant.
For the Lenovo ThinkPad F SD303 vulnerability, TTD was similarly crucial. After observing a "binary blob" being sent from the device post-fix, Li used TTD to analyze the VS Get Password function in the accompanying software. By backtracking the password (which was foobar in his test case) appearing on the stack, he traced its origin to an SM4 decryption function. This confirmed that the "binary blob" was not a hash but an encrypted password, and the decryption key was recoverable from the software.
Li also briefly mentioned the integration of TTD into Binary Ninja, a reverse engineering platform, providing native support with a full UI, API, and widgets for a seamless experience. This integration further empowers reverse engineers to incorporate TTD into their daily workflows.
Demo / Proof of Concept
▶ Watch: Third vulnerability: Password leaked from device to computer (31:30)
The talk effectively served as a series of demonstrations and proofs of concept for each vulnerability, meticulously walking through the steps taken to uncover them. While not a live "demo" in the traditional sense, Li's detailed explanations and screenshots provided a clear, actionable guide to reproducing his findings.
For the Lenovo Think F100, the proof of concept was startlingly simple and low-tech:
- Physical Disassembly: Li used a pair of pliers to open the device's casing.
- Direct Storage Access: Inside, a standard SD card was found.
- Data Retrieval: The SD card was removed, inserted into a generic SD card adapter, and plugged into a computer. The data on the card was immediately accessible in plaintext, demonstrating a complete lack of encryption despite vendor claims. This showed that the fingerprint mechanism only gated the USB connection, not the data itself.
The Lock File software vulnerability was demonstrated through a combination of file analysis and Time-Travel Debugging:
- File Analysis: Li first created an encrypted file using Lock File. Opening this file in a hex editor immediately showed that only approximately 1/3 of the file's content was actually altered, with headers and other sections remaining in plaintext.
- TTD-Assisted Key Recovery: The core demonstration involved using TTD to reverse engineer the encryption process. This included:
- Recording a TTD trace of the file encryption.
- Querying for
kernel32!WriteFilecalls to identify data being written. - Backtracking the encrypted portions of the buffer to identify the underlying AES S-box implementation.
- Employing the SideKick plugin to derive the AES key.
- Further backtracking the key itself to reveal it was hardcoded within the software's binary in the .rdata section, proving the encryption was completely independent of the user's password.
Finally, the Lenovo ThinkPad F SD303 vulnerability and its incomplete fix were demonstrated:
- Initial Plaintext Leak: Li used Wireshark to capture network traffic during the device unlock process, clearly showing the user's password being transmitted in plaintext from the device to the computer.
- Post-Fix Analysis with TTD: After Lenovo's initial fix, Wireshark showed a "binary blob" instead of plaintext. The demonstration then shifted to TTD:
- Li debugged the accompanying software, specifically the
VS Get Passwordfunction. - Using TTD's backtracking feature, he traced the password (
foobarin his example) found on the stack back to an SM4 decryption routine. - This proved that the "binary blob" was simply an encrypted version of the password, and the key for this SM4 encryption was also recoverable from the software, rendering the "fix" ineffective.
These demonstrations collectively underscored that without deep technical analysis, often enabled by tools like TTD, users and even vendors can remain unaware of critical security deficiencies.
Defensive Implications
▶ Watch: Q&A: When TTD might not be the best tool (46:30)
The findings presented by Xusheng Li carry significant defensive implications for both end-users and product vendors in the realm of encrypted storage.
For Users:
- Do Not Blindly Trust Vendor Claims: The most critical takeaway is to approach "hardware encrypted" or "secure" storage solutions with extreme skepticism. Marketing claims like "AES 256 encryption" do not guarantee actual security. Users should seek independent security audits or verifiable proof of robust implementation.
- Verify Biometric Implementations: Be particularly wary of devices that rely solely on biometrics (like fingerprints) without an initial, strong password setup. As demonstrated, biometrics might only gate access to the device's interface, leaving the underlying data completely unprotected. A truly secure biometric system should be backed by a TPM (Trusted Platform Module) or security enclave that stores and processes cryptographic keys securely, not just unlock a connection.
- Understand Software vs. Hardware Encryption: Be aware of the difference between software-based and true hardware-based encryption. Software solutions are inherently susceptible to analysis and compromise if the underlying code is flawed (e.g., hardcoded keys). Even hardware devices can be compromised if their accompanying software is weak.
- Physical Security Matters: For devices like the Lenovo Think F100, physical access immediately bypassed all "security." Users should consider the physical security of their devices, especially for highly sensitive data.
For Vendors and Developers:
- Implement Full, Robust Encryption: Ensure that if encryption is advertised, it is applied to the entire data store, not just a portion. Partial encryption is no encryption.
- Never Use Hardcoded Keys: Embedding cryptographic keys directly into binaries is a catastrophic security flaw. Keys must be dynamically generated, derived from strong user passwords (with proper salting and key derivation functions), or securely stored in hardware (e.g., TPM).
- Secure Password Handling: Passwords should never be transmitted in plaintext or easily recoverable encrypted forms. Implement secure password challenge-response mechanisms where the password itself never leaves the user's device. If hashes are used, they must be properly salted and iterated to resist offline brute-forcing.
- Independent Security Audits: Regular, thorough security audits by independent experts are crucial to identify design and implementation flaws. Relying solely on internal testing is insufficient.
- Consider the Full Threat Model: Design security features with a comprehensive threat model that includes physical access, software reverse engineering, and network interception.
- Address Hardware Fixes: Vendors selling hardware devices must have a robust and user-friendly process for delivering security updates and fixes to existing devices. The complexity of hardware updates compared to software updates is a significant challenge that needs to be proactively addressed.
For Reverse Engineers and Security Researchers:
- Embrace Time-Travel Debugging: Li's talk is a powerful endorsement for integrating Time-Travel Debugging (TTD) into the reverse engineering workflow. Its ability to deterministically replay execution, backtrack buffer origins, and query execution history offers an unparalleled advantage in analyzing complex binaries and uncovering subtle vulnerabilities.
- Explore TTD's Full Potential: The talk only "scratched the surface" of TTD's capabilities. Researchers should explore its advanced features, such as reconstructing all strings that ever existed in RAM, which could automatically reveal sensitive data like C2 information or ephemeral keys in malware analysis. This can significantly reduce manual effort and uncover hard-to-find artifacts.
Key Takeaways
- Skepticism is Prudent: Users should approach "encrypted" USB drives and storage solutions with extreme skepticism, as vendor claims often do not align with actual security implementations.
- Fundamental Flaws are Common: Many "secure" devices suffer from basic security design flaws, including non-existent encryption, partial encryption, hardcoded keys, and insecure password handling.
- Time-Travel Debugging (TTD) is a Game Changer: TTD is an incredibly powerful, yet underutilized, reverse engineering tool that enables deterministic replay, retrospective analysis, and efficient backtracking of data origins.
- TTD Empowers Deep Analysis: TTD allows researchers to trace buffer formation, identify cryptographic functions, recover keys, and uncover hardcoded secrets that would be difficult or impossible to find with traditional debugging methods.
- Secure Implementations Require Diligence: True data security demands full encryption, strong key management (no hardcoded keys), secure password verification, and a comprehensive understanding of threat models by vendors.
- Hardware Fixes Present Unique Challenges: Unlike software, delivering security fixes for hardware devices can be complex and may require users to physically service their devices, highlighting the importance of secure-by-design principles from the outset.
About the Speaker(s)
Xusheng Li is a Software Engineer at Vector 35, where he plays a pivotal role in the development of their debugger, including the integration of Time-Travel Debugging (TTD) capabilities. His expertise extends to binary analysis and reverse engineering. Beyond his work at Vector 35, Li is an active member of the security community, serving as a reviewer for Page Stock Magazine and an administrator and reviewer for Crackmesource One. He is also a dedicated CTF player with Shellphish and has successfully completed Flare-On four times. With this research and talk, Xusheng Li has solidified his reputation as a skilled security researcher, demonstrating a keen ability to uncover critical vulnerabilities and effectively communicate complex technical findings.
Reviews
Dr. Zero (Offensive Security Researcher) — STRONG ACCEPT
Xusheng Li just publicly executed Lenovo's product security team and taught a masterclass on Time-Travel Debugging while doing it. The vulnerabilities themselves are classic vendor incompetence, but the methodology of using WinDbg TTD to backtrack kernel32!WriteFile buffers straight to hardcoded AES keys in the .rdata section is required viewing for reverse engineers. It's a perfect blend of roasting snake-oil and teaching actionable binary analysis.
Heather Calloway (CISO) — MUST SEE
This is why we don't trust vendor marketing sheets for hardware encryption. The researcher proves that commercially available 'secure' USB drives—including enterprise Lenovo gear—use hardcoded keys or simply lack encryption entirely.