Bb methodology

From 26zl/cybersec-toolkit · View interactive version

Bb methodology is an AI agent skill from the GitHub repository 26zl/cybersec-toolkit. Use at the START of any bug bounty hunting session, when switching targets, or when feeling lost about what to do next. Master orchestrator that combines the 5-phase non-linear hunting workflow with the critical thinking framework (developer psychology, anomaly detection, What-If experiments). Route

How to use this skill

Skill file

Vendored note (this repo). Adapted from the standalone Agentic-Bug-Hunter project (formerly shuvonsec/claude-bug-bounty). The upstream executable scaffolding — helper scripts (bughunter/tools/*.py, bughunter/tools/*.sh; tools/… in older upstream text), the standalone wordlists/ pipeline, and slash-commands (/recon, /hunt, /validate, /report, …) — is not bundled here: run tooling through the MCP server (run_tool / run_pipeline / run_script) and install via the project installer/registry. Any static deep-dive files this skill needs are vendored into its own references/ folder, and cross-skill references resolve by skill name (e.g. the bb-methodology skill). Some named tools may not be in tools_config.json yet — propose them through the approval-gated add-tool flow. Do not fetch or run the upstream project's helper scripts.

Upstream helpers this text names, and what to use here. None of them is in this repository.

| Upstream helper | Here |

| --- | --- |

| bypass_403.sh | run_tool("nomore403", …); judge the response body as well as the status, since a soft block answers 200 |

| waf_encoder.py | No script. Fingerprint with run_tool("wafw00f", …), then take the encoding variants from the offensive-waf-bypass and security-payloads skills |

| waf_response_analyzer.py | No script. Compare status, body length, block-page text and the WAF's request-ID header across run_tool("curl", …) responses |

| multipart_mutator.py | No script. The multipart variants are in the offensive-file-upload skill; send them with run_tool("curl", …) |

| param_discovery.sh | run_tool with arjun, paramspider or x8 |

| graphql_audit.sh | run_tool with graphw00f and clairvoyance, following the offensive-graphql skill |

| cicd_scanner.sh | No registry tool. Review workflows with the securing-github-actions-workflows skill; gitleaks and trufflehog cover committed secrets |

| takeover_scanner.sh | run_tool with subzy, or the takeover templates of nuclei |

| cloud_recon.sh | run_tool with cloud_enum, s3scanner or cloudbrute |

| secrets_hunter.sh | run_tool with trufflehog (verified results only) or gitleaks |

| eol_check.py | No script. Fingerprint with whatweb or webanalyze, then check each version against the vendor's support lifecycle; get_cve_info maps a known CVE to tools |

| lead_board.py | No script. Keep leads in the engagement's shared-state file (docs/ORCHESTRATION.md) or in the writeup, one line per lead with its status |

| hunt.py | guided_assessment, or suggest_for_bounty when the target type is known |

Bug Bounty Methodology: Workflow + Mindset

Master orchestrator for hunting sessions. Combines the 5-phase non-linear workflow with the critical thinking framework that separates top 1% hunters from the rest.


PART 1: MINDSET (How to Think)

Core Principle

Hunting is not "find a bug" -- it is "prove an attack scenario." Think like an attacker with a specific goal, not a scanner looking for patterns.

Daily Discipline: Define, Select, Execute

Before touching any tool:

  1. Define: "Today I target [feature/domain] to achieve [CIA impact]"
  2. Select: Choose 1-2 vuln classes (IDOR, Race Condition, etc.)
  3. Execute: Focus ONLY on selected techniques. No wandering.

5 Ultimate Goals (Pick One Per Session)

  1. Confidentiality -- steal data the attacker shouldn't see
  2. Integrity -- modify data the attacker shouldn't change
  3. Availability -- disrupt service (app-level DoS only)
  4. Account Takeover -- control another user's account
  5. RCE -- execute commands on the server

4 Thinking Domains

1. Critical Thinking (deep analysis)

Question trust boundaries:

Reverse-engineer developer psychology:

What-If experiments:

2. Multi-Perspective (multiple angles)

| Perspective | What to check |

|------------|---------------|

| Horizontal (same role) | User A's token + User B's ID -> IDOR |

| Vertical (different role) | Regular user -> /admin/deleteUser |

| Data flow (proxy view) | Hidden params in JSON: debug=false, discount_rate |

| Time/State | Race conditions, post-delete session reuse |

| Client environment | Mobile UA -> legacy API with weaker auth |

| Business impact | "What's the $ damage if this breaks?" |

3. Tactical Thinking (pattern detection)
4. Strategic Thinking (big picture)
5. AI-Assisted Thinking (model as a second analyst)

Use AI to expand hypotheses, not to declare verdicts. The model is a fast adversarial planner; the browser, proxy, and live requests are the proof layer.

High-signal prompts:

Amateur vs Pro: 7-Phase Comparison

| Phase | Amateur | Pro |

|-------|---------|-----|

| Recon | Main domain only | Shadow IT, dev environments, all assets |

| Discovery | Look for errors | Look for design contradictions, business logic flaws |

| Exploit | Give up when blocked | Build filter-bypass payloads |

| Escalation | Report the phenomenon only | Chain to real harm (session steal, ATO) |

| Feasibility | Include unrealistic conditions | Minimize attack prerequisites |

| Reporting | State facts only | Quantify business risk |

| Retest | Check if old PoC fails | Analyze fix method, find incomplete patches |

Two Approach Routes

Anti-Patterns (Stop Doing These)


PART 2: WORKFLOW (What to Do)

The 5-Phase Non-Linear Flow

+-------------------------------------------------+
|                                                 |
|  +----------+    +----------+    +----------+   |
|  | 1. RECON |---+| 2. MAP   |---+| 3. FIND  |  |
|  +----------+    +-----+----+    +-----+-----+  |
|       ^                |               |         |
|       |                v               v         |
|       |          +----------+    +----------+    |
|       +----------| 4. PROVE |---+| 5. REPORT|   |
|                  +----------+    +----------+    |
|                                                  |
|  Non-linear: stuck at any phase -> go back       |
|  New API found at phase 3 -> return to phase 2   |
|  WAF blocks at phase 4 -> origin IP from phase 1 |
+-------------------------------------------------+

THIS IS NOT LINEAR. Move freely between phases. When stuck, return to a previous phase.

Phase 0: SESSION START (Every Time)

Before touching any tool, answer these:

  1. Define: "Today I target [feature/domain] to achieve [C/I/A/ATO/RCE]"
  2. Select: Choose 1-2 vuln classes (IDOR, XSS, SSRF, etc.)
  3. Execute: Focus ONLY on selected techniques
  4. Identity: Anonymous or authenticated? If the bugs you're hunting need a

session (IDOR, BOLA, privilege escalation, auth bypass, mass-assignment),

pass the target's auth header (-H 'Cookie: …' / -H 'Authorization: Bearer …')

to each MCP run_tool call (httpx, katana, ffuf, nuclei, dalfox, PoC verifiers).

The MCP audit log redacts credential-shaped strings before writing.

Route selection -- Wide or Deep?

| Signal | Wide (recon sweep) | Deep (focused testing) |

|--------|-------------------|----------------------|

| New program, first day | X | |

| Wildcard scope *.target.com | X | |

| Main webapp, been here >3 days | | X |

| Scope update (new domain added) | X | |

| Found interesting subdomain | | X |

| Hunting IDOR / BOLA / auth bugs | | X (auth-aware) |

Phase 1: RECON

Goal: Maximize attack surface. Find what others missed.

Wide approach (initial sweep):

Subdomain enum -> DNS resolution -> HTTP probing -> Port scan -> Tech detect

Deep approach (targeted):

Google Dorks -> JS file download -> Hidden param discovery -> API mapping

| What you find | Next action |

|--------------|-------------|

| Live subdomains with tech stack | Phase 2 (Mapping) |

| Known software (WordPress, Jira) | Check CVEs + defaults immediately |

| Cloud resources (S3, Firebase) | Test permissions (read/write/list) |

| 403 or 200 + block page on endpoint | bughunter/tools/bypass_403.sh <url> auto-detects soft blocks (200+block-body). Verdict: bypassed/needs_review/blocked. If all blocked after 5 min, skip |

| Nothing after 5 min on a host | Skip, try next host (5-minute rule) |

Recon: run the web2-recon skill against target.com (subfinder/httpx/katana/nuclei via MCP run_tool).

After every recon (mandatory):

python3 bughunter/tools/lead_board.py ingest target.com
python3 bughunter/tools/lead_board.py show target.com
python3 bughunter/tools/lead_board.py next target.com
# Route in plain language: "GraphQL endpoint → skills/graphql-audit"
# touch status when you start / kill / report a lead

(hunt.py runs ingest + EOL automatically unless --skip-leads.)

Phase 2: MAPPING & ANALYSIS

Goal: Understand the app like its developer does.

Checklist:

| What you find | Next action |

|--------------|-------------|

| JS files with interesting code | Taint analysis (Sink -> Source) |

| OAuth/SAML authentication | OAuth/SAML checklist |

| API with ID parameters | Phase 3, target IDOR |

| Complex business logic (payment, coupon) | Phase 3, target BizLogic |

| postMessage listeners | DOM analysis, postMessage-tracker |

Phase 3: VULNERABILITY DISCOVERY

Goal: Find the bug. Use Error-based first, then Blind-based.

Decision flow based on what you're testing:

What input are you testing?
+-- ID parameter (user_id, order_id)
|   -> IDOR checklist
+-- Search/filter/sort field
|   -> SQLi, NoSQLi probing
+-- URL input / webhook / PDF gen
|   -> SSRF checklist
+-- Text field reflected in page
|   -> XSS (DOM or reflected)
+-- File upload
|   -> SVG XSS, web shell, path traversal
+-- Price/quantity/coupon
|   -> Business logic, race conditions
+-- Login / 2FA / password reset
|   -> Auth bypass
+-- Profile update API
|   -> Mass Assignment
+-- Template / wiki editor
|   -> SSTI
+-- Nothing obvious
    -> Fuzz with ffuf, try Error-based probing

Error vs Blind decision:

  1. Try Error-based first (send ', ", {{7*7}}, ${7*7}) -- watch for 500 errors, stack traces
  2. No error? Time-based (SLEEP(10), ; sleep 10;) -- watch response time
  3. No time diff? OOB (curl attacker.com, interactsh) -- watch for DNS callback
  4. Still nothing? Boolean (AND 1=1 vs AND 1=0) -- watch content-length diff

| What you find | Next action |

|--------------|-------------|

| Low-impact behavior (redirect, self-XSS, cookie injection) | Chain it -- find a connector gadget |

| Confirmed vuln (XSS, IDOR, SQLi) | Phase 4 (Prove and Escalate) |

| Blocked by WAF/CSP/403 or soft-block 200 | /bypass-403 <url> → check verdict (not just status) → bughunter/tools/waf_encoder.py "<payload>" → if upload: bughunter/tools/multipart_mutator.py → 5 min, kill |

| Known software vuln (CVE) | 1-day speed workflow |

| Nothing after 20 min on this endpoint | Rotate (20-minute rule) |

Phase 4: PROVE & ESCALATE

Goal: Prove maximum business impact. Turn Low into Critical.

Escalation decision:

What did you find?
+-- XSS
|   +-- Can steal cookie/token? -> Session hijack -> ATO
|   +-- Cookie is HttpOnly? -> Force email change via XHR -> ATO
|   +-- Self-XSS only? -> Find CSRF to trigger it
+-- IDOR
|   +-- Can read PII? -> Automate scraping, show scale
|   +-- Can change password/email? -> Direct ATO
|   +-- UUID only? -> Find UUID leak source, then retry
+-- SSRF
|   +-- DNS only? -> DON'T REPORT. Try cloud metadata
|   +-- Can reach 169.254.169.254? -> Extract keys -> RCE
|   +-- Internal port scan? -> Find Redis/K8s -> RCE
+-- SQLi
|   +-- Error-based? -> Extract data (passwords, tokens)
|   +-- Can INTO OUTFILE? -> Web shell -> RCE
|   +-- Blind? -> Boolean/Time extraction
+-- Open Redirect
|   +-- OAuth flow? -> Token theft -> ATO
|   +-- javascript: scheme? -> XSS
+-- Blocked by defense
|   -> Bypass (WAF/CSP/proxy/sanitizer/2FA)
+-- Low-impact, can't escalate alone
    -> Find connector gadget for chain

After proving impact, check:

Phase 5: VALIDATE & REPORT

Goal: Get paid. Make triager's job easy.

Pre-report gate:

Run the triage-validation skill (7-Question Gate)
+-- All 7 pass? -> Write report
+-- Any fail? -> KILL the finding. Don't waste time.
+-- Borderline? -> Run the finding-triage coordinator for quick go/no-go

Report:

Run the report-writing skill
+-- Platform-specific format (H1/Bugcrowd/Intigriti/Immunefi)
+-- Title: [Bug Class] in [Endpoint] allows [role] to [impact]
+-- Impact-first summary (sentence 1 = what attacker CAN do)
+-- Exact HTTP requests in Steps to Reproduce
+-- Under 600 words
+-- CVSS 3.1 score that MATCHES actual impact

After submission:


PART 3: NAVIGATION & TIMING

Non-Linear Navigation Quick Reference

| I'm stuck because... | Go to... |

|----------------------|----------|

| Can't find any subdomains | Phase 1: Try different recon sources, Google Dorks |

| Found subdomain but don't know what to test | Phase 2: Map the app, download JS, understand auth |

| Testing but nothing works | Phase 3: Switch vuln class (20-min rotation rule) |

| Found a bug but impact is low | Phase 4: Escalation paths or gadget chaining |

| WAF/CSP/403 blocking my payload | /bypass-403 → fingerprint WAF → waf_encoder.py variants → kill if 5 min spent (403 even after /bypass-403 + WAF fingerprint + waf_encoder.py variants) |

| Been stuck for 45 min on one param | STOP. Rabbit hole. Move to next endpoint. |

| New API endpoint discovered during testing | Return to Phase 2: map it before attacking |

| Found one bug | A->B signal: same dev made more mistakes. Hunt 20 min for siblings. |

20-Minute Rotation Clock

Every 20 minutes ask yourself: "Am I making progress?"

Tool Routing by Phase

| Phase | Tools | Why this order |

|-------|-------|----------------|

| Recon: Subdomains | subfinder -> amass -> puredns -> httpx | Passive first (no detection) -> resolve DNS -> probe HTTP + tech stack |

| Recon: URLs | gau + waymore -> katana -> uro | Archive (forgotten endpoints) -> active crawl (JS-rendered) -> deduplicate |

| Recon: JS | jsluice + mantra + trufflehog --only-verified | Extract URLs/secrets -> find API keys -> verify keys actually work |

| Recon: Ports | naabu (wide) -> rustscan (deep) | Fast top-1000 sweep -> full 65535 on interesting targets |

| Recon: Scan | nuclei -tags cve -> nuclei -tags takeover | Known CVEs first -> then takeover (act immediately) |

| After recon (ALWAYS) | python3 bughunter/tools/lead_board.py ingest <target> → show → next | Route every signal to a hunt-* skill; never lose a lead. touch when you start/kill/report |

| After recon: EOL | python3 bughunter/tools/eol_check.py --tech "php=7.4,nginx=1.18" | Flag EOL products from technologies.txt fingerprints |

| Mapping: Params | arjun + paramspider + ParamMiner / bughunter/tools/param_discovery.sh | Brute-force hidden params + mine archives + cache headers |

| Mapping: GraphQL | bash bughunter/tools/graphql_audit.sh <url> | Introspection → fingerprint → batching → IDOR → injection |

| Mapping: CI/CD | bash bughunter/tools/cicd_scanner.sh owner/repo | Workflow injection / secret exfil / runner poisoning |

| Mapping: JS code | Download -> jsluice -> VS Code/Cursor grep | Extract -> static analysis -> AI-assisted taint analysis |

| Mapping: Dorks | Manual Google Dorks | Custom per-target queries find what automation misses |

| Discovery: Fuzz | ffuf -ac + cewl custom wordlist | Auto-calibrate filtering + target-specific words beat generic lists |

| Discovery: XSS | kxss -> dalfox | Filter (which params reflect?) -> scan (only reflective params) |

| Discovery: SQLi | ghauri | Modern blind SQLi on ID-like parameters |

| Discovery: SSRF | interactsh-client | Self-hosted OOB listener for blind SSRF/XXE/RCE |

| Discovery: WAF | wafw00f → bughunter/tools/bypass_403.sh → bughunter/tools/waf_encoder.py → waf_response_analyzer.py | Fingerprint → soft-block aware bypass → encoded variants → score response |

| Exploit: 403 | bughunter/tools/bypass_403.sh / byp4xx | Soft-block (200+block body) aware; verdict: bypassed/needs_review/blocked |

| Exploit: Upload | bughunter/tools/multipart_mutator.py --file shell --field f | Parser-confusion multipart variants |

| Exploit: Takeover | bughunter/tools/takeover_scanner.sh / subzy | CNAME against vulnerable services |

| Exploit: Cloud | bughunter/tools/cloud_recon.sh + aws CLI | Scan bucket permissions -> extract metadata credentials |

| Exploit: Secrets | bughunter/tools/secrets_hunter.sh / trufflehog --only-verified | Only verified working keys (no false positives) |

| Orchestrate | python3 bughunter/tools/hunt.py --target T | Recon → lead ingest → EOL → scan (add --graphql / --cve-hunt as needed) |

Session End Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.