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に貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このJWTを分析して、どのように検証され、どのような権限が与えられるのかを教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールは、トークンの検証プロセスを、情報の読み取り(ヘッダーとクレーム)、正しい鍵の特定、トークンに記載された権限がシステムで受け入れられるかの確認、という段階に分けて分析します。認可に至るまでの正確な経路を示すために、すべてを記録します。
技術的な内容(元の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のヘッダーとクレームとは何ですか?
ヘッダーは署名アルゴリズムなど、トークンに関するメタデータを含みます。クレームは利用者(ユーザー)に関する情報や追加の権限を表します。
「トークンとアイデンティティの混同」とは何を意味しますか?
システムがトークンを誤って解釈し、誤った身元の特定や、意図しない権限の付与につながるセキュリティ上の脆弱性のことです。
詳細
作者による元の説明
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エージェントが、Webサイトがブラウザ内に情報を保存する仕組みを分析する手助けをします。Cookieなどのデータを調べ、セッションの仕組みを理解します。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。