attacking-jwt

attacking-jwt is a skill for Claude Code from trilwu/secskills. It costs 0 tokens per session (3,267 once invoked), scanned A, original, MIT.

A security-testing guide for JSON Web Tokens, or JWTs, which are signed text tokens that applications use to identify users and their permissions. It focuses on cases where a server accepts a token without correctly checking its signature.

In plain words
What is it for?
Use it to test tokens in headers, cookies, browser storage, or URLs; check signature enforcement, algorithm confusion, weak secrets, header-based key selection, and claim tampering.
Why use it?
It helps find authentication and authorization failures caused by trusting token-supplied settings, weak signing secrets, or unsafe token headers. These mistakes can let someone alter roles or other claims.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is {"alg":"HS256","kid":"../../../../../../dev/null"}.

Part of the secskills-offense plugin — 40 skills shipped together

Good fit Use it to test tokens in headers, cookies, browser storage, or URLs; check signature enforcement, algorithm confusion, weak secrets, header-based key selection, and claim tampering.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/trilwu/secskills
agentmods
npx agentmods add skills/trilwu/secskills/attacking-jwt

Made for: Claude Code.

Or install secskills-offense, the plugin that ships this one along with the rest of its 40 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for attacking-jwt

README.md
[![agentmods](https://agentmods.dev/badge/skills/trilwu/secskills/attacking-jwt/github.svg)](https://agentmods.dev/skills/trilwu/secskills/attacking-jwt)
Your own site
<a href="https://agentmods.dev/skills/trilwu/secskills/attacking-jwt"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/attacking-jwt/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for attacking-jwt

Your own site · 80×15
<a href="https://agentmods.dev/skills/trilwu/secskills/attacking-jwt"><img src="https://agentmods.dev/badge/skills/trilwu/secskills/attacking-jwt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,267 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 38
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high YARA Match · line 124
    YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
    Fix: Remove offensive tool references and exploit code. Legitimate agent skills should not contain penetration testing tools, exploit frameworks, or reconnaissance utilities.
  • high Prompt Injection · line 265
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.03267
Opus 5.5 $0.00000 $0.01307
Sonnet 5.5 $0.00000 $0.00653
Haiku 4.5 $0.00000 $0.00327

Measured 2mo ago against content hash 79461dfc6968, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

attacking-jwt scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://target/.well-known/jwks.json
secskills-offense/skills/attacking-jwt/SKILL.md · 289 lines

How it starts

The opening of the file, as written. The whole thing — 289 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Attacking JWT

A JWT is not a credential you are meant to read — it is a signature-verification decision the server makes on bytes you control. Every field, including the alg header that tells the server how to check the signature, is attacker-supplied. The classic failures all come from the server trusting the token's own header to decide how to verify it, or from a secret weak enough to recover offline.

Only against systems you are authorized to test.

When to Use

  • A request carries a token in three base64url parts joined by dots, typically starting with eyJ (the encoded {" of the header)
  • An Authorization: Bearer <token> header is present
  • A session, access_token, id_token, or remember-me value lives in a cookie, localStorage, sessionStorage, or a query parameter
  • The application authenticates or authorizes based on a signed token rather than a server-side session
  • You control any claim (sub, role, admin, aud, iss) and want to see whether the signature is actually enforced

When NOT to Use

  • The wider web-application methodology — use testing-web-applications
  • API authentication and authorization generally — use testing-apis
  • The cryptographic primitives themselves (HMAC, RSA, ECDSA design) — use reviewing-cryptography
  • The OAuth/OIDC flow that issues the token, redirect_uri and PKCE abuse — use attacking-oauth-oidc
  • Cloud IAM tokens (AWS STS, GCP, Azure AD access tokens) as an access primitive — use exploiting-cloud-platforms

Decode and Inspect First

A JWT is header.payload.signature, each part base64url (no padding, - and _ instead of + and /). The first two parts are plaintext; only the signature is protected.

# jwt_tool: the fastest way to read a token and see every claim
python3 jwt_tool.py <token>

# By hand, no tools, no network
echo '<header>'  | tr '_-' '/+' | base64 -d 2>/dev/null; echo
echo '<payload>' | tr '_-' '/+' | base64 -d 2>/dev/null; echo

Read the full file on GitHub · 289 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 289 lines · 0 tokens per session scan A 79461dfc6968

Subscribe to this mod's changes

attacking-jwt is a skill published in the GitHub repository trilwu/secskills (211 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,267 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

attacking-jwt compared with skills from other repositories

attacking-jwt next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
attacking-jwttrilwu/secskillsSkill2112mo agoMITA0Claude Code
build-mcp-serveranthropics/claude-plugins-officialSkill49kyesterdayApache-2.0A111Claude Code
data-manager-api-troubleshootinggoogle/skillsSkill25ktodayApache-2.0A179Claude Code, Codex
data-manager-api-setupgoogle/skillsSkill25ktodayApache-2.0A118Claude Code, Codex
vss-manage-video-io-storageNVIDIA-AI-Blueprints/video-search-and-summarizationSkill2.0kyesterdayApache-2.0A143Claude Code, Codex
workers-best-practicescloudflare/skillsSkill3.5k4d agoApache-2.0A25Claude Code
vss-search-archiveNVIDIA-AI-Blueprints/video-search-and-summarizationSkill2.0kyesterdayApache-2.0A67Claude Code, Codex