# Auth Passkey Review

> Use when reviewing passkey and WebAuthn implementations on an authorized engagement. Covers relying party and origin binding, resident key handling, user verification flags, sign count and clone detection, synced passkey risk, cross device flows, and fallback downgrade mapped to OWASP guidance and testable with Burp Suite. Use when an app offers passkeys, when passwordless login ships, or when recovery can bypass the passkey.

- Skill: `mizazhaider-ceh/auth-passkey-review` (Agent Skill)
- Install (CLI): `npx get-skill add mizazhaider-ceh/auth-passkey-review`
- Raw SKILL.md: https://api.skillmd.com/api/skills/mizazhaider-ceh/auth-passkey-review/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: mizazhaider-ceh (https://skillmd.com/u/mizazhaider-ceh)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/mizazhaider-ceh/auth-passkey-review

---


Passkeys are WebAuthn credentials that replace passwords with a
device bound key pair, and their phishing resistance comes from
origin binding: the key only signs challenges for the exact relying
party it was created for. This sub-skill lives under
auth-sso-integration-review because passkeys increasingly serve as
the passwordless factor inside SSO logins, and the review questions
are the same trust questions: who issued the credential, for which
origin, and what session follows. It is a review deep dive, not a
repeat of webauthn-security: that skill covers WebAuthn in general,
while this one reviews passkey product decisions, synced keys,
cross device flows, and fallback paths. Test with test accounts and
test authenticators only.

## Quick Workflow

1. Map the passkey surface: registration, authentication, cross
   device sign in, credential management, and every fallback.
2. Capture a registration and an authentication ceremony in Burp
   Suite, and record the options the server sends.
3. Verify the server side checks: challenge, origin, relying party
   ID, signature, and user verification flags.
4. Test resident keys and discoverable credentials: usernameless
   flow, credential selection, and account confusion.
5. Test sign count and clone detection: replay, counter behaviour,
   and what the server does on a counter anomaly.
6. Test synced versus device bound keys: provider sync, sharing,
   export, and revocation for each type.
7. Test cross device flows: QR code, hybrid transport, and the
   Bluetooth proximity assumption behind it.
8. Test the fallback: if the passkey is lost, is the recovery path
   weaker than the passkey it replaces?
9. Report each gap with the ceremony step that failed to check it.

## 1. Capture and inspect the ceremonies

Record the server options before testing enforcement, because the
options reveal the policy: what the server asks for is usually
what it intends to check.

```bash
# Capture the registration options response for a test account in
# Burp Suite. Record every field, and compare it with what the
# server actually enforces in section 2:
# - rp.id and rp.name: the relying party the key will be bound to.
# - user.id: stable, random, and not an email or username in clear.
# - challenge: fresh, random, and single use per ceremony.
# - pubKeyCredParams: which algorithms are accepted.
# - authenticatorSelection: residentKey, userVerification, and
#   authenticatorAttachment values.
# - attestation: none, indirect, direct, or enterprise.
# - timeout and excludeCredentials: is an existing key excluded.
curl -s -X POST 'https://target.example/passkey/register/options' \
  -H 'Cookie: session=TESTSESSION' | head -c 1500
echo
```

```bash
# Capture the authentication options response the same way:
# - challenge: fresh and single use.
# - rpId: must match the registration rpId exactly.
# - allowCredentials: which credential IDs are offered, and whether
#   an empty list means a discoverable credential flow.
# - userVerification: required, preferred, or discouraged.
# - timeout: how long the ceremony may take.
curl -s -X POST 'https://target.example/passkey/login/options' \
  -d 'username=test-user' | head -c 1500
echo
```

## 2. Server side verification checks

The authenticator does the cryptography, but the server must
verify it. Test each check by tampering one value in a captured
ceremony and replaying it through the normal endpoint.

```python
# Inspect an authenticator response locally before replaying a
# tampered copy. This shows which fields the server must verify,
# and gives you the values to tamper one at a time.
import base64, json, hashlib

def b64d(s):
    return base64.urlsafe_b64decode(s + '=' * (-len(s) % 4))

# Example: a captured authentication response, stored as JSON.
resp = json.load(open('/tmp/passkey-auth-response.json'))
client_data = json.loads(b64d(resp['response']['clientDataJSON']))
auth_data = b64d(resp['response']['authenticatorData'])
print('Challenge seen by client:', client_data.get('challenge'))
print('Origin seen by client:', client_data.get('origin'))
print('Type seen by client:', client_data.get('type'))
rp_id_hash = auth_data[:32]
print('rpIdHash:', rp_id_hash.hex())
print('Expected rpIdHash for target.example:',
      hashlib.sha256(b'target.example').hexdigest())
flags = auth_data[32]
print('Flags byte:', bin(flags))
print('User present bit:', bool(flags & 0x01))
print('User verified bit:', bool(flags & 0x04))
print('Attested credential data bit:', bool(flags & 0x40))
sign_count = int.from_bytes(auth_data[33:37], 'big')
print('Sign count:', sign_count)
```

```bash
# Verification probes, one tampered replay each, on test accounts:
# 1. Challenge: replay a ceremony response with a stale challenge,
#    and replay the same response twice. Both must fail.
# 2. Origin: change clientDataJSON origin to another host and
#    re-encode, keeping the signature. A correct server rejects it,
#    because origin is part of the signed client data.
# 3. rpId: register on one subdomain and authenticate on another,
#    and check whether the server enforces the exact rpId.
# 4. Type: change the clientDataJSON type from get to create, or
#    vice versa, and see whether the server checks it.
# 5. Signature: tamper the signature bytes and replay. Acceptance
#    means signature verification is missing or broken.
# 6. User verification: authenticate with a key that did not
#    verify the user, when userVerification was required, and see
#    whether the server checks the UV flag or ignores it.
echo "Each accepted tamper is a finding at that exact check"
```

## 3. Resident keys and discoverable credentials

Discoverable credentials, also called resident keys, let a user
sign in without typing a username first. That convenience creates
account confusion tests.

```bash
# Discoverable credential probes on test accounts:
# 1. Register a resident key for test account A, then start a
#    usernameless login and see which account the server selects
#    when several resident keys exist on the test authenticator.
# 2. Register the same authenticator for test accounts A and B,
#    then check whether the server ever mixes up which account a
#    credential belongs to, especially when user.id values collide.
# 3. Delete a credential in the app UI, then try to authenticate
#    with it: the server must reject a revoked credential even if
#    the authenticator still holds it.
# 4. Register a key, then change the account username or email,
#    and check whether the credential still maps to the right account.
curl -s -X POST 'https://target.example/passkey/login/options' \
  -d '{}' | head -c 800
echo
```

Check user.id handling closely: a user.id that is just the email
or username leaks identity across services and can collide when
an account is renamed. A random, stable, opaque user.id is the
expected pattern, and a change of user.id on re-registration is
worth reporting.

## 4. Sign count and clone detection

The sign count is the clone detector: a credential used on two
devices, or copied, will show a counter that goes backwards or
repeats, and the server should notice.

```python
# Sign count behaviour test, using a test authenticator:
# 1. Authenticate twice in a row and record the sign count each
#    time. It must increase, or stay at zero only when the
#    authenticator documents a zero counter policy.
# 2. Replay an old authentication response with an old sign count.
#    The server must reject a count lower than the stored count.
# 3. Replay a response with the same sign count twice. The server
#    must reject the duplicate, or at minimum flag it.
# 4. Check the server response to a counter anomaly: does it revoke
#    the credential, warn the user, or silently accept the login?
#    Silent acceptance defeats the whole mechanism.
print('Counter policy to record: increase, zero, reject, or warn')
print('Test with a hardware key and a platform authenticator,')
print('since counter behaviour differs between authenticator types.')
```

## 5. Synced passkeys, sharing, and cross device flows

Synced passkeys travel through a provider cloud, which changes
the threat model from device theft to provider account takeover.

```bash
# Synced passkey probes:
# 1. Register a synced passkey for a test account, then check the
#    app UI: does it distinguish synced from device bound keys,
#    and can the user see where a key is synced?
# 2. Share a passkey with a second test account through the
#    provider, if sharing is offered, and check whether the app
#    treats the shared key as a new credential or as the same one.
# 3. Revoke a synced key in the app, then try to use a copy that
#    still exists on another test device: revocation must be
#    server side, not just a UI deletion.
# 4. Cross device sign in: start login on a desktop, scan the QR
#    code with a test phone, and check the proximity assumption:
#    does the flow require Bluetooth proximity, and what happens
#    when the phone is remote?
echo "Synced keys inherit the provider account security: note it"
echo "in the report alongside the app findings, not instead of them"
```

## 6. Fallback downgrade

The fallback decides the real security level: a passkey protected
account with a weak recovery path is only as strong as that path.

```bash
# Fallback probes on test accounts:
# 1. Lose the passkey path: use the recovery flow and record every
#    factor it asks for. A single emailed link that resets the
#    account with no second factor is a downgrade finding.
# 2. Add a new passkey through recovery: does adding a key require
#    a fresh passkey challenge, or does recovery alone suffice?
# 3. Check whether a password still exists alongside the passkey,
#    and whether password login bypasses the passkey entirely.
# 4. Check support assisted recovery for passkey accounts, where it
#    is in scope, against the same standard as the automated flow.
curl -s -X POST 'https://target.example/recover' \
  -d 'email=passkey-test@example.com' | head -c 500
echo
```

## Edge cases

- Multiple relying party IDs: an app with several subdomains
  must choose one rpId carefully. A key registered for the parent
  domain works across subdomains, which is convenient and also
  widens the phishing surface to the weakest subdomain.
- Attestation privacy: direct attestation can identify the exact
  authenticator model, which leaks device detail. Check whether
  the server requests more attestation than it needs.
- Enterprise attestation: powerful for managed fleets, but it
  uniquely identifies devices. Confirm it is only requested where
  the deployment actually manages devices.
- Conditional mediation and autofill: passkey autofill in the
  username field is convenient, but test whether autofill can be
  triggered on a lookalike page or in a cross origin iframe.
- Authenticator attachment: a platform authenticator and a
  roaming authenticator have different theft models. Record which
  types the server accepts, and whether it restricts them.
- Backup eligibility and backup state flags: these flags tell the
  server a key may be restored from a backup. A server that ignores
  them cannot distinguish a device bound key from a synced one.
- Credential backup after account deletion: does deleting the
  account revoke server side credentials, and does the provider
  copy linger in a way that could re-register the same account?

## Key references

- OWASP WebAuthn and passkey guidance: https://cheatsheetseries.owasp.org/cheatsheets/WebAuthn_Cheat_Sheet.html
- WebAuthn Level 3 specification: https://www.w3.org/TR/webauthn-3/
- FIDO Alliance passkey guidance: https://fidoalliance.org/passkeys/
- OWASP Authentication Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html
- Apple, Google, and Microsoft passkey developer documentation for platform behaviour

