jwt-attack
Agent skill fromuphiago/recon-skills
Decode, forge, brute JWTs when Bearer auth header is seen.
How to install jwt-attack
install jwt-attack
# install the recon-skills pack with the skills CLI
npx skills add uphiago/recon-skills# or add only this skill to Claude Code: copy the folder
recon/jwt-attack/
# into
~/.claude/skills/jwt-attack/ (all projects)
.claude/skills/jwt-attack/ (one project)
1# JWT Attack Skill23Complete JWT attack methodology — decode without verification, algorithm confusion (alg:none, RS256→HS256), weak secret brute force (hashcat/john/simple), kid injection, expired token reuse, and hardcoded JWT extraction from JS bundles. Confirmed on enterprise-portal (JWT-based sessions), fintech-processor (315 JWT tokens in Efí bank logs), fitness-chain (3 JWT sessions with 2027 expiry), delivery-platform (hardcoded JWTs in JS bundles), and gov-finance-portal (JWT secret leaked in Vite source).45## When to Use67- API uses `Authorization: Bearer eyJ...` headers.8- JavaScript bundles contain `eyJ...` token patterns.9- After `js-secrets-extraction` finds JWT tokens.10- After `api-noauth-hunt` needs token forging for auth bypass.11- Cookies contain `jwt=`, `token=`, or `session=` with base64-encoded values.1213## Prerequisites1415- `terminal` with curl, python3.16- JWT token to attack (from recon).17- For brute force: `hashcat` or `john` for high-speed cracking (optional).1819## How to Run2021```bash22# Decode JWT without verification23echo "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U" | python3 -c "24import sys, base64, json25parts = sys.stdin.read().strip().split('.')26if len(parts) == 3:27 for i, part in enumerate(parts[:2]):28 try:29 padded = part + '=' * (4 - len(part) % 4)30 decoded = base64.urlsafe_b64decode(padded)31 print(f'--- Part {i} ---')32…
Excerpt shown under the repository's MIT license.
