Community编程与开发github.com

yaklang/jwt-oauth-token-attacks

JWT 和 OAuth 令牌攻击手册。在验证令牌信任、签名算法、密钥处理、声明滥用、Bearer 流以及 OAuth 账户绑定弱点时使用。

jwt-oauth-token-attacks 是什么?

这是一个专注于 JWT 和 OAuth 令牌安全的攻击手册技能,适用于需要深入测试和验证令牌相关安全缺陷的场景。该技能覆盖了多种攻击面,包括签名算法混淆、密钥处理不当、声明伪造、Bearer 令牌滥用以及 OAuth 账户绑定逻辑漏洞。它支持在 AI 代理(如 Claude Code、Cursor、Codex)中直接调用,通过预定义的攻击模板和检查清单,帮助开发者和安全人员高效识别令牌验证机制中的弱点。使用该技能时,用户可以自动执行常见攻击向量,如将签名算法切换为 'none'、尝试暴力破解弱密钥、测试过期令牌的重复使用等。其 WORKFLOW 基于标准的 OWASP JWT 测试指南,确保测试的全面性和准确性。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/yaklang/hack-skills/tree/main/skills/jwt-oauth-token-attacks

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

jwt-oauth-token-attacks 是做什么的?

JWT 和 OAuth 令牌攻击手册。在验证令牌信任、签名算法、密钥处理、声明滥用、Bearer 流以及 OAuth 账户绑定弱点时使用。

概述

该技能提供了一套系统化的 JWT 和 OAuth 令牌攻击测试流程,旨在发现与令牌签名、密钥管理、声明验证和授权流程相关的安全漏洞。

支持平台

  • Claude Code
  • Cursor
  • Codex
  • 其他兼容 AI 代理

攻击向量

  1. 签名算法混淆:尝试将 alg 头部切换为 none、HS256(当仅支持 RS256 时)等。
  2. 密钥处理不当:测试弱密钥(如弱口令、公开密钥)、密钥泄露或密钥硬编码。
  3. 声明滥用:修改 sub、aud、exp、iat、nbf 等声明,绕过授权检查。
  4. Bearer 令牌滥用:重放攻击、令牌劫持、会话固定。
  5. OAuth 账户绑定弱点:测试绑定机制中的漏洞,如账户接管、绑定绕过。

使用方法

# 示例命令(根据具体代理调整)
yak run jwt-oauth-token-attacks

工作流程

  1. 解析目标令牌(JWT / OAuth Bearer Token)
  2. 提取头部和载荷
  3. 执行攻击向量列表
  4. 报告发现的问题和可能的影响

注意事项

  • 仅在授权环境中使用
  • 测试前确保已获得明确许可
  • 所有测试结果应保密处理

参考

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

yaklang/401-403-bypass-techniques

401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP method tampering, header injection, protocol downgrade, and automated bypass tools.

yaklang/active-directory-acl-abuse

Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS reading, GPO abuse, and BloodHound-guided attack paths.

yaklang/active-directory-certificate-services

AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to enrollment, CA officer abuse, and certificate-based persistence.

yaklang/active-directory-kerberos-attacks

Kerberos attack playbook for Active Directory. Use when targeting AD authentication via AS-REP roasting, Kerberoasting, golden/silver/diamond tickets, delegation abuse, or pass-the-ticket attacks.

yaklang/ai-ml-security

AI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples, model poisoning, model stealing, data privacy attacks (membership inference, model inversion), and autonomous agent security risks.

yaklang/android-pentesting-tricks

Android pentesting playbook. Use when testing Android applications for SSL pinning bypass, exported component abuse, WebView vulnerabilities, intent redirection, root detection bypass, tapjacking, and backup extraction during authorized mobile security assessments.

yaklang/anti-debugging-techniques

Anti-debugging detection and bypass playbook. Use when reversing protected binaries that detect debuggers via ptrace, PEB flags, timing checks, or signal/exception handlers on Linux and Windows.

yaklang/api-auth-and-jwt-abuse

API authentication and JWT abuse playbook. Use when testing bearer tokens, API keys, claim trust, header spoofing, rate limits, and API auth boundary weaknesses.

yaklang/api-authorization-and-bola

API authorization and BOLA testing playbook. Use when APIs expose object identifiers, nested resources, hidden writable fields, or weak function-level authorization.

yaklang/api-recon-and-docs

API reconnaissance and documentation review playbook. Use when discovering endpoints, schemas, versions, OpenAPI specs, hidden docs, and surface area for API testing.

yaklang/api-sec

Entry P1 category router for API security. Use when choosing between API recon, authorization, token abuse, and hidden-parameter workflows before any deeper API topic skill.

yaklang/arbitrary-write-to-rce

Arbitrary write to RCE playbook. Use when you have an arbitrary write primitive (from heap exploitation, format string, or OOB write) and need to convert it into code execution by targeting GOT, hooks, _IO_FILE vtable, exit_funcs, TLS_dtor_list, modprobe_path, .fini_array, or C++ vtables.

yaklang/authbypass-authentication-flaws

Authentication bypass testing playbook. Use when assessing login flows, password reset logic, account recovery, MFA bypass, token predictability, brute-force resistance, and session boundary flaws.

yaklang/auth-sec

Entry P1 category router for authentication and authorization. Use when testing login flows, sessions, object authorization, JWT, OAuth, CORS, CSRF, and enterprise SSO weaknesses before any deeper auth topic skill.

yaklang/binary-protection-bypass

Binary protection bypass playbook. Use when identifying and bypassing ASLR, PIE, NX/DEP, stack canary, RELRO, FORTIFY_SOURCE, CET, and MTE protections in ELF binaries to enable exploitation.

yaklang/browser-exploitation-v8

Browser and V8 exploitation playbook. Use when exploiting JavaScript engine vulnerabilities including JIT type confusion, incorrect bounds elimination, and V8 sandbox bypass to achieve renderer RCE and sandbox escape in Chrome/Chromium.

yaklang/business-logic-vuln

Entry P1 category router for business logic testing. Use when workflow abuse, race conditions, pricing flaws, or multi-step state attacks matter more than parser-level input injection.

yaklang/business-logic-vulnerabilities

Business logic vulnerability playbook. Use when reasoning about workflows, race conditions, price manipulation, coupon abuse, state machines, and multi-step authorization gaps.

yaklang/classical-cipher-analysis

Classical cipher analysis playbook. Use when encountering substitution ciphers, Vigenere, transposition, XOR, or encoded text in CTF challenges that requires frequency analysis, Kasiski examination, or known-plaintext cryptanalysis.

yaklang/clickjacking

Clickjacking playbook. Use when testing whether target pages can be framed, whether X-Frame-Options or CSP frame-ancestors are properly configured, and whether UI redress attacks can trigger sensitive actions.

相关技能