Web webauthn software authenticator

From NoorQureshi/security-skills · View interactive version

Web webauthn software authenticator is an AI agent skill from the GitHub repository NoorQureshi/security-skills. Register and authenticate against a WebAuthn/FIDO2 relying party using a self-built SOFTWARE authenticator (no hardware key) when the RP requests attestation "none" (or otherwise doesn't verify attestation trust). Load when: a login is "WebAuthn/passkey/ FIDO2", endpoints like /webauthn/register|aut

How to use this skill

Skill file

Forge a software WebAuthn authenticator (attestation: none)

When it applies

navigator.credentials.create/get, client bundles calling

/register/begin,/register/finish,/auth/begin,/auth/finish).

never validates the attestation certificate chain). None-attestation means the server

does NOT check that a real hardware authenticator vouched for the key — so a key you

generate in software is accepted.

invite/enrollment token** (see tech-mongo-agg-facet-bypass and NoSQL-injection notes).

Why it works

WebAuthn security rests on the authenticator signing a server challenge with a private

key. With attestation:none, the server trusts whatever public key the client submits at

register/finish (no proof it came from a certified device). You therefore generate your

own keypair, register its public key, then at auth/finish sign the server's challenge

with the matching private key — a completely valid assertion, because it is your key.

Method (Python: `cryptography` + `cbor2`, one cookie session)

  1. POST /register/begin {invite_token} → options (challenge, rp.id, user.id,

pubKeyCredParams incl. -7 = ES256, attestation:"none").

  1. Build the authenticator:

(kty EC2, alg ES256, crv P-256, x, y — each coord 32 bytes big-endian).

where flags = 0x45 (UP|UV|AT) and `attestedCredentialData = aaguid(16×00) +

credIdLen(2B) + credId(random) + coseKey`.

"origin":"http(s)://<rp host:port>","crossOrigin":false}`.

  1. POST /register/finish with

`{id:b64u(credId), rawId:b64u(credId), type:"public-key",

response:{clientDataJSON:b64u, attestationObject:b64u}}` → credential created.

  1. POST /auth/begin → new challenge.

(cryptography emits DER — exactly what ES256 assertions use).

  1. POST /auth/finish with those fields → authenticated session cookie. Use it to hit

the app (dashboard/account) and grab the flag.

Tools

python3 with cryptography and cbor2 (both common). fido2 (python-fido2) has a

built-in software authenticator if you prefer a library. All base64 is **base64url,

no padding**. A ready reference implementation: aegis/exploit-dev/pwn.py.

Gotchas

(http://host:3000), and rp.id is the host WITHOUT the port. sha256(rp.id) uses the

host only.

just re-encoding the same bytes) — don't double-decode/re-pad it.

send the correct userHandle at auth/finish.

this won't work — you'd need a genuine chain. none (or a lenient verifier) is the tell.

Verify success

register/finish returns 200/created and auth/finish returns 200 and sets an

authenticated session cookie that unlocks previously-redirected pages (e.g. /dashboard

stops 302-ing to /login).

Learned on

AEGIS lab, 2026-08 — leaked invite token via Mongo aggregation injection, then

registered a software P-256 authenticator (attestation "none") as operator op-2026-0042.

Full worked example in aegis/notes.md (§6) and aegis/exploit-dev/pwn.py.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.