tanmaymish/Bug-Hunt-

GitHub: tanmaymish/Bug-Hunt-

一份以 OAuth 和 GraphQL 身份验证绕过为核心主题的漏洞赏金实战案例库与可复现方法论教学仓库。

Stars: 0 | Forks: 0

# 🕵️ Bug Bounty 实战笔记 ### OAuth 与 GraphQL 身份验证绕过狩猎大师课 *主流平台身份验证层中的三个真实的、已负责任披露的漏洞 —— 作为案例进行讲解,包含攻击流程图和可复现的方法论。*
![Focus](https://img.shields.io/badge/focus-web%20security-1f6feb?style=for-the-badge) ![Topics](https://img.shields.io/badge/OAuth%20·%20GraphQL-auth%20bypass-8957e5?style=for-the-badge) ![Disclosure](https://img.shields.io/badge/disclosure-responsible-2ea043?style=for-the-badge) ![License](https://img.shields.io/badge/license-MIT-yellow?style=for-the-badge) ![Pipeline](https://img.shields.io/badge/pipeline-AI--orchestrated%20·%20100%2B%20tools-8957e5?style=flat-square) ![Case studies](https://img.shields.io/badge/case%20studies-3-1f6feb?style=flat-square) ![PRs welcome](https://img.shields.io/badge/PRs-welcome-2ea043?style=flat-square) [![Stars](https://img.shields.io/github/stars/tanmaymish/Bug-Hunt-?style=social)](https://github.com/tanmaymish/Bug-Hunt-/stargazers) [![Forks](https://img.shields.io/github/forks/tanmaymish/Bug-Hunt-?style=social)](https://github.com/tanmaymish/Bug-Hunt-/network/members)
**[核心理念](#-the-through-line) · [The Pipeline](#️-the-pipeline) · [案例研究](#-case-studies) · [方法论](methodology/) · [披露伦理](#-on-secrets-and-disclosure) · [作者](#-author)**
### 你将学到什么 - 🚪 **寻找被遗忘的门** —— *相同*的高权限能力是如何通过另一条未加固的路径暴露出来的。 - 🔬 **比对差异,拒绝盲猜** —— 使用对照请求和错误溯源字段,来证明某个校验是被*跳过*了,而不仅仅是请求失败。 - ⚖️ **合理评估严重性** —— 诚实地证明实际影响,而不是夸大其词地将一个参数反射硬说成是“账户接管”。 - 📦 **专业地撰写报告** —— 使用一键运行的 PoC 和分析报告,让你的提交被优先分类处理。 ## 🎯 核心主线 这里的每个案例都源自同一个核心理念: - **Atlassian** —— 一个 GraphQL 网关强制执行了 step-up MFA;而另一个网关却将*完全相同*的 mutation 直接转发给了后端。 - **Shopify** —— `authorization_code` 流程通过员工 SSO 路由高权限 scope;而 *device* 流程却只为它提供了一个普通的激活链接。 - **Dropbox** —— 生产环境的 OAuth `client_secret` 被分发给了每一个浏览器,而其中最有意思的部分在于证明它*究竟*能达到什么程度——以及不能达到什么程度。 ``` flowchart LR A(["😈 Attacker wants
a privileged capability"]):::neutral A --> D1["🔒 Door 1
the hardened path
(MFA / SSO / PKCE)"]:::good A --> D2["🚪 Door 2
the forgotten path
(device flow / 2nd gateway / leaked secret)"]:::bad D1 -->|"checks RUN"| G[["🎯 Same backend capability"]]:::neutral D2 -->|"checks SKIPPED"| G classDef good fill:#0b3d1a,stroke:#2ecc71,stroke-width:2px,color:#eafff0; classDef bad fill:#4d0b0b,stroke:#e74c3c,stroke-width:2px,color:#ffecec; classDef neutral fill:#16233f,stroke:#5dade2,stroke-width:1px,color:#eaf2ff; ``` 请先阅读 **[`methodology/`](methodology/)** 以了解这三个案例背后可复现的流程。 ## ⚙️ Pipeline 这些发现并非来自简单的点点按按——它们脱胎于一条 **AI 编排的 攻击性 pipeline**:一个语言模型 Agent 通过单一的 [MCP](https://modelcontextprotocol.io) 服务器([HexStrike AI](https://github.com/0x4m4/hexstrike-ai))驱动着 **100+ 种安全工具**, 并由人类负责进行验证和诚实的严重性判定。 ``` flowchart LR T(["🎯 Target"]):::t --> O["🧠 AI agent
+ MCP · 100+ tools"]:::a O --> R["🛰️ Recon
subfinder · httpx · katana · gau"]:::r R --> D["🔬 Detect
nuclei · graphql-scanner · jwt-analyzer"]:::s D --> V{{"🧪 Human verify
controls · honest severity"}}:::v V -->|"confirmed"| P["📦 Report + PoC"]:::rep V -.->|"most candidates"| X["🗑️ dropped"]:::x classDef t fill:#16233f,stroke:#5dade2,color:#eaf2ff; classDef a fill:#33265c,stroke:#8957e5,stroke-width:2px,color:#f3ecff; classDef r fill:#0b3d3a,stroke:#2ec4b6,color:#eafffb; classDef s fill:#3d340b,stroke:#f1c40f,color:#fffbe6; classDef v fill:#4d0b0b,stroke:#e74c3c,stroke-width:2px,color:#ffecec; classDef rep fill:#0b3d1a,stroke:#2ecc71,stroke-width:2px,color:#eafff0; classDef x fill:#2b2b2b,stroke:#777,color:#ddd; ``` **→ 完整的架构、分阶段的拆解分析,以及它在每个目标上发挥关键作用的环节:[`pipeline/`](pipeline/)** ## 📚 案例研究 | # | 目标 | 漏洞类别 | 严重性 | 经验教训 | |---|--------|--------------------|----------|------------| | [**01**](01-atlassian-graphql-gateway-bypass/) | 🟦 **Atlassian** | GraphQL 网关之间不一致的 authN/MFA 校验 | `P1` | 阅读错误*来源*,而不仅仅是状态码 | | [**02**](02-shopify-oauth-device-scope-bypass/) | 🟩 **Shopify** | OAuth device 流程绕过员工 SSO 门槛 | `High · CVSS 8.7` | 相同的 scope 可以有两条代码路径——必须测试*所有*路径 | | [**03**](03-dropbox-oauth-secret-in-public-js/) | 🟦 **Dropbox** | 公开 JS bundle 中包含生产环境生效的 `client_secret` | `Medium` | 诚实地证明影响;一个泄露的密钥的价值,仅等同于它实际能解锁的内容 | 每个文件夹包含: - **`README.md`** —— 带有插图的案例研究(建议从这里开始阅读) - **`original-report.md`** —— 提交给该漏洞项目的实际报告原文 - **`poc/`**、**`evidence/`** —— 复现脚本以及捕获的请求/响应对 ## 🔒 关于密钥与披露 本仓库中每一个真实的凭证、token、私钥和 API key 都已 **被移除或替换为了 `REDACTED_*` 占位符**。这里没有任何可用的真实密钥。 所有研究均是针对明确在其项目范围内的资产进行的,并且 在发布前每一项发现都已报告给供应商。**处于协调披露期内的发现被刻意排除了** —— 负责任披露本身就是这门技术的一部分,而不是事后补充的。 ## 👤 作者 **tanmaymish** —— 独立安全研究员(OAuth · GraphQL · Web 应用安全)。 - 🔗 LinkedIn: `` - 🐙 GitHub: [@tanmaymish](https://github.com/tanmaymish)
*仅用于教育目的。切勿将此技术用于未获得明确授权进行测试的系统。* 采用 [MIT License](LICENSE) 授权。
标签:CISA项目, GraphQL, Modbus, OAuth, Web安全, 安全案例研究, 漏洞披露, 蓝队分析, 身份验证绕过, 防御加固