competition-jwt-claim-confusion
它能做什么
这个工具可以帮助你理解系统是如何验证安全令牌(JWT)的。它重点关注令牌中的信息,以及验证其密钥所用的方法,这些因素共同决定你能否获得访问权限。
适用场景
- ✓想查看某个 JWT 的详细内容时。
- ✓需要了解系统如何选择密钥来验证令牌时。
- ✓怀疑某个令牌可能授予了不当访问权限时。
技能链接
https://github.com/zhaoxuya520/reverse-skill/blob/main/CTF-Sandbox-Orchestrator/competition-jwt-claim-confusion/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“分析这个 JWT,告诉我它是如何被验证的,以及它授予了哪些权限。”
每周 5 个新技能,1 分钟读完。
工作原理
该工具把令牌的验证过程拆分成几个步骤:读取信息(header 和 claims)、找到正确的密钥,然后检查令牌中描述的权限是否被系统接受。它会记录每一步,以展示通向授权的完整路径。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Competition JWT Claim Confusion
Use this skill only as a downstream specialization after $ctf-sandbox-orchestrator is already active and has established sandbox assumptions, node ownership, and evidence priorities. If that has not happened yet, return to $ctf-sandbox-orchestrator first.
Use this skill when the decisive bug is not just "there is a JWT," but how headers, claims, and key selection turn into accepted identity.
Reply in Simplified Chinese unless the user explicitly requests English.
Quick Start
- Split the token path into parse, key lookup, signature or decryption, claim validation, and final acceptance.
- Record header fields, claims, key source, issuer, audience, and role mapping before mutating anything.
- Separate possession of a token from the exact service that accepts it.
- Keep parser behavior, trust policy, and resulting app session or privilege in one chain.
- Reproduce the smallest token-to-acceptance flow that proves the decisive confusion.
Workflow
1. Map Header And Key Selection
- Record header fields such as
alg,kid,typ,cty,jku, or embedded key material when present. - Note where keys come from: static config, JWKS, local file, cache, or dynamic lookup.
- Keep token parser, key selection path, and validation mode tied together.
2. Prove Claim-To-Privilege Acceptance
- Show how subject, audience, issuer, tenant, scope, role, or custom claims become app session, route access, or backend privilege.
- Record expiration, not-before, clock skew, issuer matching, audience matching, and claim normalization behavior.
- Distinguish token parse success from actual authorization success.
3. Reduce To The Decisive JWT Path
- Compress the result to the smallest sequence: token supplied -> parser or key path taken -> claim accepted -> resulting capability.
- Keep one canonical accepted token path and one mutated token path if confusion or bypass depends on a delta.
- If the task broadens into a larger OAuth redirect chain, hand back to the tighter OAuth skill.
Read This Reference
- Load
references/jwt-claim-confusion.mdfor the header checklist, claim checklist, and evidence packaging.
What To Preserve
- Raw headers, claims, key source, JWKS or local key path, and the accepting service
- The exact validation or normalization step that turns the token into accepted identity
- One minimal replayable token-to-acceptance sequence
常见问题
什么是 JWT?
JWT 全称 JSON Web Token,是一种用于创建访问令牌的标准,可以在各方之间安全地传递信息。
JWT 中的 header 和 claims 是什么?
header(头部)包含令牌的元数据,比如签名算法。claims(声明)则是关于实体(用户)的信息以及额外的权限。
“token-to-identity confusion”是什么意思?
这是一种安全漏洞,指系统对令牌的理解出现偏差,导致错误识别身份,或授予了不该有的权限。
详情
作者的原始描述
Internal downstream skill for ctf-sandbox-orchestrator. CTF-sandbox workflow for JWT, JWS, and JWE validation paths, header parsing, key selection, claim acceptance, audience and issuer checks, role derivation, and token-to-identity confusion bugs. Use when the user asks to inspect JWT headers or claims, key lookup, `kid` handling, `alg` confusion, audience or issuer validation, role claims, or ex
热度
- GitHub 星标
- 42k
- 排名
- #6433
- 许可证
- MIT
- 更新时间
- 2026/9/22
评论
- …
同一仓库的更多技能
competition-ad-certificate-abuse
42k帮你的智能体分析针对数字证书系统的攻击。它会研究证书可能如何被滥用来获取访问权限。
competition-agent-cloud
42k帮你的智能体分析 AI 和云系统中的安全问题。它会研究提示词、工具和云端可能如何被利用。
competition-android-hooking
42k帮你的智能体研究 Android 应用。它会分析应用的内部运行方式,以及可能如何被修改或利用。
competition-browser-persistence
42k帮你的智能体分析网站如何在浏览器中存储信息。它会研究 Cookie 等数据,以理解会话是如何运作的。