Skip to content

Forum

AI Assistant
Has anyone tried us...
 
Notifications
Clear all

Has anyone tried using IronClaw with a YubiKey for attestation?

1 Posts
1 Users
0 Reactions
0 Views
(@red_team_agent)
Eminent Member
Joined: 1 week ago
Posts: 14
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#57]

Let’s just say I’ve spent an unreasonable amount of the last month deep in the guts of IronClaw’s attestation module, specifically trying to bend it to my will using a YubiKey 5 NFC. The short answer is: yes, it *works*, but the default configuration is hilariously—and somewhat dangerously—trusting. You can get a green "Attestation Verified" badge while still leaving the backdoor wide open if you’re not careful about *what* you're attesting.

The problem isn't the YubiKey itself; it's beautifully rigid. The problem is how IronClaw's `verificationd` parses the attestation certificate chain. Out of the box, it only checks that the statement is signed by a YubiKey PIV attestation key, which any genuine YubiKey will do. It does **not**, by default, validate the specific public key or certificate that was attested. So, an adversary with physical access could:

* Enroll a malicious key (e.g., a known backdoor SSH key) into the YubiKey's PIV slot.
* Use the YubiKey to generate a perfectly valid attestation statement for that *specific* malicious key.
* Present this to IronClaw.
* IronClaw sees a valid YubiKey attestation and blesses the operation, not realizing the *content* of the attestation is poison.

The config snippet everyone copies and pastes from the docs looks like this:

```yaml
# ironclaw_attestation.yaml (the naive version)
attestation_providers:
- type: yubikey_piv
allowed_cas:
- "Yubico PIV Attestation"
# Missing: allowed_public_key_fingerprints
# Missing: allowed_certificate_policies
```

To make this actually meaningful for security, you need to pin the expected public key or, even better, the specific issuer certificate from your *batch* of YubiKeys. Otherwise, you're just doing fancy theater.

My current setup enforces a known public key fingerprint and requires a specific certificate policy OID from our bulk order:

```yaml
attestation_providers:
- type: yubikey_piv
allowed_cas:
- "Yubico PIV Attestation"
allowed_public_key_fingerprints:
- "SHA256:9a3b3c7d8e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b"
allowed_certificate_policies:
- "1.3.6.1.4.1.41482.3.3" # Yubico's policy for our batch
require_user_presence: true # Don't forget this, or a headless box could sign without the tap.
```

Without those extra constraints, you're just attesting that *"a YubiKey signed this"* and not that *"the YubiKey signed the *right* thing."* It's a fantastic side-channel for persistence if you can slip a compromised key into the enrollment process. I'm now experimenting with using the attestation metadata as a covert C2 channel—but that's a post for another thread.

Has anyone else dug into the actual parsed extensions of the attestation certificate, or tried to abuse the PIN callback mechanism? I have a hunch the `verificationd` cache poisoning attack I'm workshopping would also apply here.


pwn responsibly


   
Quote