This repository contains the CTRAPS toolkit. We release three modules.
Client Impersonation for Android (Module 1), using a malicious CTAP library to deploy our CI attacks over NFC.
API Confusion for Electron (Module 2), using the Electron app to simulate a MitM position between a FIDO2 client and an authenticator. It performs our AC attacks over USB.
The improved Wireshark protocol dissector (Module 3) to dissect FIDO2 USB and NFC traffic.
We demonstrate how to delete discoverable credentials, enforce an authenticator factory reset, track the user, and DoS the authenticator.
We use an Electron app to deploy AC1 on a YubiKey 5 connected over USB. First, the user wants to call an API that utilizes User Verification, so he inputs the authenticator PIN (1111). Second, the user confirms the call and our malicious Electron library performs CTAP API Confusion. All discoverable credentials have now been deleted. The logs show how our malicious library performs UV, detects discoverable credentials, and deletes them one by one. We also show the CTAP traffic in Wireshark to demonstrate that we are communicating with the real FIDO authenticator.
We use an Android app to deploy CI2 on a YubiKey 5 over NFC. First, the user puts the authenticator in the pockets of his winter jacket. Second, the attacker opens the malicious app and stands close to the victim's jacket. She can do this in the elevator, on public transportation, or in crowded places. Third, the attacker connects to the authenticator over NFC for under a second. All discoverable and non-discoverable credentials, as well as other settings and data, have now been deleted. We show this by scanning the authenticator and not finding any discoverable credential.
We use an Android app to deploy AC3 on a YubiKey 5 over NFC. First, the user puts the authenticator in the pockets of his jeans. Second, the attacker opens the malicious app and stands close to the victim's jeans. She can do this in the elevator, on public transportation, or in crowded places. Third, the attacker connects to the authenticator over NFC for under a second. The attacker has now extracted two Microsoft discoverable credentials (CredId and UserId) from the authenticator.
We use an Electron app to deploy AC6 on a YubiKey 5 connected over USB. First, the malicious library issues an unwanted call to the Selection API. Second, the authenticator is stuck waiting for a User Presence check. Third, the user tries to call the ClientPin API. We show the CTAP traffic in Wireshark to demonstrate that the FIDO authenticator is waiting for UP and the call to ClientPin was ignored by the authenticator.
We also showcase an implementation bug found in YubiKeys, allowing to leak all (except one) relying parties that registered discoverable credential on the YubiKey. For more information, visit Yubico Security Advisories (https://www.yubico.com/support/security-advisories/ysa-2024-02/) and CVE-2024-35311 (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-35311).
We use an Android app to deploy A3 on a YubiKey 5 over NFC. First, the attacker opens the malicious app and connects to a FIDO authenticator. Second, she exploits the GetAssertion API not for authentication but for data exfiltration. Third, she collects all relying parties (minus one) that the user has registered a discoverable credential with, regardless of a credential protection policy. The app shows the three extracted relying parties.




