CTRAPS: CTAP Client Impersonation and API Confusion on FIDO2
This talk demonstrates two novel classes of attacks, Client Impersonation (CI) and API Confusion (AC), against the FIDO2/CTAP2 authentication protocol. These attacks exploit design vulnerabilities in the CTAP protocol to perform unauthorized actions such as factory resetting authenticators, tracking users, and bypassing user presence checks. The researchers provide a comprehensive analysis of these vulnerabilities across multiple popular authenticators and relying parties, and release an open-source toolkit for testing and reproducing these attacks. The presentation concludes with eight proposed design fixes to improve the security of the CTAP protocol.
FIDO2 Isn't Bulletproof: How CTAP Client Impersonation and API Confusion Bypass Hardware Security
TLDR: Researchers at DEF CON 33 demonstrated that the FIDO2/CTAP2 protocol is vulnerable to two novel attack classes: Client Impersonation and API Confusion. These flaws allow an attacker to perform unauthorized actions like factory resetting authenticators, tracking users via unique credential IDs, and bypassing user presence checks without physical interaction. The team released an open-source CTRAPS toolkit that enables researchers to reproduce these attacks against popular hardware authenticators and relying parties.
Hardware-backed authentication is often treated as the final boss of security. If you have a YubiKey or a platform authenticator, the assumption is that your private keys are locked away in a secure element, unreachable by any remote attacker. That assumption just took a massive hit. The research presented on CTAP (Client to Authenticator Protocol) design flaws proves that even if the hardware itself is secure, the protocol governing how that hardware talks to your machine is riddled with logic gaps.
The Mechanics of Client Impersonation
Client Impersonation (CI) attacks exploit the fact that the CTAP protocol does not require the authenticator to verify the identity of the client requesting an action. When a client sends a command to an authenticator, the device assumes the request is legitimate. By acting as a malicious client, an attacker can issue commands that the authenticator blindly executes.
One of the most dangerous CI techniques involves triggering a factory reset. In a standard flow, a factory reset is a destructive action that wipes all credentials. Because the protocol lacks proper authorization checks, an attacker can send a reset command over NFC or USB. If the device is in range, it will wipe itself, effectively performing a denial-of-service attack on the user’s ability to authenticate. This is not a theoretical bug; it is a fundamental design oversight in how CTAP handles administrative commands.
API Confusion: The Logic Bypass
API Confusion (AC) is even more insidious. This technique relies on a man-in-the-middle position between the authenticator and the client. The attacker intercepts a legitimate request from the client to the authenticator and swaps it with a different, unauthorized command.
The core of this attack is the manipulation of the PIN/UV (User Verification) protocol. When a client performs a sensitive operation, it often requires a user to enter a PIN or provide biometric verification. The authenticator generates a user verification token that is valid for a specific session. If the attacker can force the authenticator to generate a token that is overly permissive, they can reuse that token to execute subsequent, unauthorized API calls.
For example, an attacker can intercept a request that requires user presence, perform the verification, and then swap the intended command for a CredMgmt (Credential Management) call. The authenticator, seeing a valid session token, executes the management command without further user interaction. This allows an attacker to enumerate credentials or delete them entirely, all while the user believes they are performing a routine login.
Reproducing the Attack
The researchers released the CTRAPS toolkit to help the community audit their own hardware. The toolkit includes a virtual CTAP testbed, which is invaluable for testing without bricking physical devices. For those working with physical hardware, the toolkit provides attack clients that run on Android or via USB using the node-hid library.
If you are testing this in an engagement, focus on the GetAssertion and CredMgmt APIs. These are the most common targets for user tracking and credential manipulation. You can use the following logic to identify if a device is vulnerable to credential enumeration:
# Conceptual flow for credential enumeration
# 1. Establish a session with the authenticator
# 2. Issue a GetAssertion request with CredProtect=off
# 3. Enumerate the returned credential IDs
# 4. Map IDs to specific Relying Parties
The impact of these vulnerabilities is significant. By tracking unique credential IDs, an attacker can build a profile of a user’s online activity across different services. This falls directly under OWASP A07:2021-Identification and Authentication Failures, as it allows for the manipulation of authentication state and the leakage of sensitive identifiers.
Defensive Realities
Defending against these attacks is difficult because the issues are baked into the protocol design. The researchers proposed eight design fixes, including mandatory user presence feedback (like LED indicators) and stricter authorization for destructive APIs. However, patching this requires firmware updates for existing authenticators, which is not always possible for older devices.
One specific implementation flaw was identified in Yubico devices, tracked as CVE-2024-35311. This vulnerability highlights the danger of improper credential management. If you are a security engineer, your immediate priority should be auditing your organization's reliance on "discoverable" credentials. If a service does not strictly require them, disable them. For high-security environments, ensure that your authenticators are running the latest firmware versions provided by the vendor.
The era of trusting FIDO2 blindly is over. As pentesters, we need to start treating the CTAP interface as a high-value attack surface. If you have a device that supports NFC or USB-based authentication, it is time to start testing its resilience against these protocol-level manipulations. The tools are available, and the attack surface is wide open.
CVEs
Vulnerability Classes
Tools Used
Attack Techniques
OWASP Categories
All Tags
Up Next From This Conference

DisguiseDelimit: Exploiting Synology NAS with Delimiters and Novel Tricks

Browser Extension Clickjacking: One Click and Your Credit Card Is Stolen

Can't Stop the ROP: Automating Universal ASLR Bypasses for Windows
Similar Talks

Hacking Apple's USB-C Port Controller

Inshittification: The Economics of Digital Platforms

