sickn33/agentic-awesome-skills/hunt-jwt-crypto
Claude Code and agent skill by sickn33/agentic-awesome-skills
- community
Checking that the SKILL.md file is still in the repository.
Hunt JWT cryptographic failures
Install
npx vskill@latest install sickn33/agentic-awesome-skills/hunt-jwt-cryptoSKILL.md
⚠️ AUTHORIZED USE ONLYThis skill is for educational purposes or authorized security assessments only.You must have explicit, written permission from the system owner before using this tool.Misuse of this tool is illegal and strictly prohibited.
Mandatory confirmation gateBefore running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:1. Ask the user to state the exact target URL, IP, account, or resource.2. Ask the user to confirm written authorization and the permitted scope.3. Show the exact command(s) and explain their expected effect.4. Wait for explicit confirmation in the current conversation.Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
HUNT-JWT-CRYPTO — Forgeable JSON Web Tokens (A04 Cryptographic Failures)
What actually pays
A JWT is header.payload.signature, each base64url. The signature is the only thing stopping you from editing the payload (your identity/role) and replaying it. It pays High/Critical when the verifier can be tricked into accepting a token you forged — so you become another user or an admin without their secret.
Two classic, generic verifier flaws:
- `alg:none` — the verifier trusts the token's own
algheader. Set
alg:"none", drop the signature, edit the payload (e.g. role:"admin", another user's id/email). A broken verifier skips signature checking.
- RS256 → HS256 key confusion — the token is signed RS256 (asymmetric). The
RSA public key is, by definition, public. If the verifier lets you choose HS256, it will use that public key as the HMAC secret — which you also know. Sign an edited payload with HS256 using the public key and it validates.
Recon — is this app JWT-based?
Decode the header (base64url the first segment). "alg":"RS256" → try key confusion. Any alg → always try alg:none first; it's free.
Forging the token (never hand-encode base64 — use a JWT tool)
Use a purpose-built tool so encoding/signing is correct: jwt_tool (jwt_tool <token> -T to tamper interactively, -X a for alg:none, -X k -pk public.pem for key confusion), Burp's JWT Editor extension, or a few lines of PyJWT. Each forge below is the concept plus the claim to edit.
alg:none — become admin / another user
Some verifiers reject lowercase none but accept None/NONE/nOnE — try case variants.
RS256 → HS256 key confusion — once you have the RSA public key
kid header injection — verifier loads the HMAC key from a FILE named by `kid`
Traverse out of the keys directory first. kid can also carry SQLi / command injection / SSRF if the key lookup hits a DB / shell / URL — same idea: kid is attacker-controlled and reaches a dangerous sink.
jku / x5u header injection (RS256) — verifier fetches the public key from a URL in the token
jwk header self-signed key injection (RS256) — embed an attacker-controlled public key in the token
Some verifiers incorrectly trust a jwk (JSON Web Key) claim in the header and use it to validate the signature. Generate your own RSA keypair, embed the public key in the token header, sign with your private key, and send. Works when the verifier does not verify the key's provenance or allowlist.
Expiry / time-based claim manipulation
Combined with any forging technique above (alg:none, key confusion, jwk injection), this bypasses time-based validation when the verifier does not enforce strict expiry rules.
Cross-tenant claim injection — escalate to another tenant's data via claim swaps
Changing claims invalidates a properly verified signature. This is an authorization test only after establishing how the modified token can be accepted or obtaining an authorized test issuer; trusting authenticated issuer-bound tenant claims is not itself IDOR. Works especially well combined with alg:none or weak-secret attacks.
Match the payload shape to a REAL token from the app (decode one first) — keep its claim names, only change identity/role. A payload the app can't parse fails for the wrong reason and wastes the attempt.
Offline attacks — weak HMAC secret cracking
If the token is HS256 (HMAC-based) and the secret is weak or reused from a known password list:
Once the secret is cracked, forge any token using HS256 with that secret (via jwt_tool or PyJWT).
Automated attack automation
Use purpose-built JWT attack suites to run all known forgery modes in parallel:
Run these early in JWT recon; they often find the vulnerability faster than manual chaining of individual techniques.
Demonstrate impact with minimal authorized proof
Stop after the least invasive proof allowed by the written scope. Use two controlled test identities/tenants and a read-only canary resource; distinguish a successful signature forgery from actual authorization bypass. Do not delete users, change roles, enumerate unrelated accounts or expose real emails merely to increase severity. If destructive verification is explicitly required, use a disposable lab with approved test data and recovery.
Proof of impact
Record the intended role/resource boundary, a redacted original and modified claim description, and the canary response showing the boundary violation. A generic HTTP 200 alone is insufficient. Redact bearer tokens, secrets and personal data from reports; never publish a reusable forged token. Stop on unexpected access to real users' data and report within the engagement channel.
Validation discipline
- Decode and confirm the token you sent actually carries the edited claims.
- The win is cross-identity data access, not merely a 200. Use a controlled canary identifier, not real foreign-user data, in the response evidence.
alg:nonerejected (401) just means that flaw is patched — try key confusion
before concluding the app is safe.
When to Use
- You have explicit, written authorization to assess the target in scope, and the task matches this skill's vulnerability class or technique within a bug-bounty or penetration-test engagement.
- You need the recon, exploitation, or validation workflow described below — executed strictly inside the approved scope.
Limitations
- Authorized scope only: the confirmation gate above is mandatory before any probing, exploitation, or credential-access command.
- Docs-only import: upstream helper scripts, commands, engine, and research assets are not bundled; reinstall tooling from the source repo when needed.
- Validate every finding (see
triage-validation) before reporting; report viareport-writing. Prefer a sandbox, disposable VM, or controlled lab.
Example
Adapted from elementalsouls/Claude-BugHunter (MIT); frontmatter, When to Use/Limitations, and safety boundaries added for upstream compliance. Docs-only import: executable helpers, commands, engine, and research assets not bundled.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/hunt-jwt-crypto/SKILL.md
Popularity
- Repository stars
- 47,054
- Repository forks
- 6,853
- 7-day trend score
- 54
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/sickn33/agentic-awesome-skills/hunt-jwt-crypto)