Skip to content

A Claude Code skill bundle for bug hunting and external red-team work - 82 skills, 15 slash commands, 681 disclosed-report patterns curated across 24 core vulnerability classes, plus enterprise identity + infrastructure attack matrices.

Phase 3.5: Burp Suite Pro integration in cbh CLI — three first-class modes

Sachin Sharmacd561f9c2460
diff --git a/INSTALL.md b/INSTALL.md
index a14158e..67dd023 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -5,10 +5,25 @@ Step-by-step setup for the Claude-BugHunter skill bundle.
## Prerequisites
- **Claude Code** — install from https://claude.ai/download
-- **Burp Suite** Professional or Community — https://portswigger.net/burp
- **macOS or Linux** — most steps are macOS-flavored; Linux users adjust paths
-- **Java** (for Burp MCP) — usually included with Burp Suite Pro
-- **Python 3.10+** (only if you want to regenerate skills via `public-skills-builder`)
+- **Python 3.9+** — for the `cbh` CLI runner
+
+### Optional (recommended but not required)
+
+- **Burp Suite** Professional or Community — https://portswigger.net/burp. `cbh --burp` routes traffic through Burp's proxy. Without Burp, the CLI runs in curl-only mode and everything still works.
+- **Burp MCP Server** (BApp Store extension) — adds conversational hunting via Claude Code. Optional layer on top of Burp Pro. Skip if you don't have Burp.
+- **`subfinder`** (ProjectDiscovery) — improves passive subdomain enum. Without it, `cbh recon` falls back to crt.sh alone.
+- **Java** — required for Burp MCP if you install it.
+
+### Choose your operating mode
+
+| Mode | What you need | Best for |
+|---|---|---|
+| **Curl-only** | Just Python 3.9+ | Quick hunts, scripted automation, no GUI |
+| **Burp proxy** (`cbh --burp`) | Add Burp Suite Pro/Community | All `cbh` traffic logged in Burp; one click to Repeater |
+| **Burp MCP** (conversational) | Burp Pro + MCP extension + Claude Code MCP setup | Maximum LLM-driven workflow inside Claude Code |
+
+All three modes are first-class supported. The skills + CLI work identically across them — you pick based on what you have installed and how you like to work.
## Step 1 — Clone this repo
@@ -33,7 +48,9 @@ This copies:
Existing skills with the same name are backed up (e.g. `bugcrowd-reporting.backup-20260505-153000`) so re-runs are non-destructive.
-## Step 3 — Set up Burp MCP
+## Step 3 — (Optional) Set up Burp MCP
+
+**Skip this step if you don't have Burp Suite Pro.** The bundle works fine in curl-only mode (`cbh recon target.com` etc.). Set this up later when/if you adopt Burp.
In Burp Suite:
1. Go to **Extensions** → **BApp Store** → search for "MCP Server" → Install
diff --git a/docs/cbh-cli.md b/docs/cbh-cli.md
index e2bad06..d77cd80 100644
--- a/docs/cbh-cli.md
+++ b/docs/cbh-cli.md
@@ -3,6 +3,10 @@
> Native runner that bridges the skill content into a real engagement loop.
> Four subcommands compose intake → reconnaissance → triage → submission.
> Stdlib + optional `subfinder` for richer recon. No build step.
+>
+> **Two operating modes** — pick what fits your setup:
+> 1. **Curl-only (default)** — stdlib HTTP, no Burp dependency. Works on any laptop with Python 3.9+.
+> 2. **Burp Suite integration** — `--burp` flag routes everything through Burp's proxy (default `127.0.0.1:8080`). Requests + responses land in Proxy → HTTP history; you can send any of them to Repeater/Intruder/Scanner/Collaborator. Pairs with the **Burp MCP server** (port 9876) for Claude-Code-conversational hunting.
## Install
@@ -21,6 +25,66 @@ Or run inline from a repo checkout:
scripts/cbh.py --help
```
+## Operating modes
+
+### Mode 1 — Curl-only (default)
+
+Works out of the box. All HTTP goes via Python `urllib`. No Burp required.
+
+```bash
+cbh recon hackerone.com
+cbh classify "https://api.target.com/v1/users/42?next=..."
+```
+
+### Mode 2 — Burp Suite Pro integration
+
+Two integration points:
+
+**A. `--burp` flag — proxy routing.** Routes every HTTP request `cbh` makes through Burp's proxy. Every request + response shows up in Burp Proxy → HTTP history with full reqs/resps captured for replay.
+
+```bash
+# Start Burp Suite Pro, ensure Proxy listener is on 127.0.0.1:8080
+cbh recon hackerone.com --burp
+cbh classify "https://target.com/api/users/42" --burp
+
+# Or use a custom proxy URL (Burp on a different port, mitmproxy, ZAP, etc.)
+cbh recon hackerone.com --proxy http://127.0.0.1:8081
+
+# Or set the env var once
+export CBH_BURP_PROXY=http://127.0.0.1:8080
+cbh recon target.com # auto-detected
+```
+
+What happens after: every host `cbh recon` probes appears in Burp's Target → Site map. Each title-extracted live host is one click from Repeater. You drive the actual attacks from Burp; `cbh` did the bulk discovery + classification.
+
+**B. Burp MCP — conversational hunting via Claude Code.** If you've installed the Burp MCP server BApp extension (typical port `127.0.0.1:9876`) and registered it with Claude Code via `claude mcp add burp -s user -- java -jar ~/.BurpSuite/mcp-proxy/mcp-proxy-all.jar`, you can do the hunt loop entirely in a Claude conversation:
+
+```
+You: cbh classified /api/users/42 as IDOR-prone. Send it to Burp Repeater
+ with X-User-Id: 99 swapped in.
+LLM: [uses Burp MCP tool calls: get last response, send to Repeater with
+ header swap, returns the new response]
+You: Looks like cross-tenant read. Apply triage-validation 7-Question Gate.
+LLM: [reads hunt-idor + triage-validation skills, runs 7Q against the
+ captured req/resp pair, returns PASS/DOWNGRADE/KILL]
+```
+
+This mode is the most ergonomic — the LLM drives Burp via MCP while consulting the skill content. `cbh` and Burp MCP are complementary: `cbh` is fast at bulk classification + structured triage; Burp MCP is fast at deep individual-request analysis.
+
+### When to use which mode
+
+| Phase | Curl-only | Burp proxy | Burp MCP |
+|---|---|---|---|
+| Recon (bulk subdomain + HTTP probe of 50+ hosts) | ✓ fastest | ✓ + audit trail | overkill |
+| Single-URL classification | ✓ | ✓ + traffic captured | ✓ (conversational) |
+| Detailed request manipulation (header swap, body fuzz, Intruder) | painful | ✓ (Repeater/Intruder) | ✓ (LLM-driven) |
+| Triage + report drafting | ✓ | ✓ | ✓ |
+| Discipline-rule enforcement (OOB gate, marker discipline, body-diff) | manual | manual | ✓ (LLM can apply the rules) |
+
+**Operator default:** `--burp` mode if Burp Suite Pro is open; curl-only mode otherwise. Burp MCP mode for engagements where you want maximum LLM-driven workflow inside Claude Code.
+
+---
+
## The four subcommands
### `cbh recon <target>` — passive recon + live-host probe
@@ -132,3 +196,5 @@ Every other bug-bounty toolchain is either (a) a payload list with no methodolog
For senior pentesters: a productivity multiplier that does the boring orchestration so you stay in the interesting parts.
For junior researchers: a guardrail that prevents the top three N/A-submission classes (no real HTTP test, no concrete impact, finding on never-submit list).
+
+**Choice not dogma:** operators with no Burp run curl-only; operators with Burp Pro route via `--burp`; operators with Burp + MCP drive everything from a Claude Code conversation. All three are first-class supported.
diff --git a/scripts/cbh.py b/scripts/cbh.py
index 0350a77..e1f59ab 100755
--- a/scripts/cbh.py
+++ b/scripts/cbh.py
@@ -81,11 +81,61 @@ def run_cmd(cmd: list[str], timeout: int = 30) -> tuple[int, str, str]:
return 127, "", "not found"
+_HTTP_OPENER: urllib.request.OpenerDirector | None = None
+
+
+def configure_http_proxy(proxy_url: str | None = None) -> tuple[bool, str]:
+ """Configure urllib to route through a proxy (typically Burp Suite at
+ 127.0.0.1:8080). Returns (configured, message) — message describes the mode.
+
+ Resolution order:
+ 1. explicit proxy_url argument
+ 2. CBH_BURP_PROXY env var
+ 3. HTTPS_PROXY / HTTP_PROXY env vars
+ 4. fallback: auto-detect default Burp on http://127.0.0.1:8080 (only if --burp flag)
+ """
+ global _HTTP_OPENER
+ if not proxy_url:
+ proxy_url = os.environ.get("CBH_BURP_PROXY") or os.environ.get("HTTPS_PROXY") or os.environ.get("HTTP_PROXY")
+ if not proxy_url:
+ _HTTP_OPENER = None
+ return False, "direct (no proxy)"
+
+ # Disable TLS verification when going through Burp (its CA isn't typically trusted)
+ import ssl
+ ctx = ssl.create_default_context()
+ ctx.check_hostname = False
+ ctx.verify_mode = ssl.CERT_NONE
+
+ proxy_handler = urllib.request.ProxyHandler({"http": proxy_url, "https": proxy_url})
+ https_handler = urllib.request.HTTPSHandler(context=ctx)
+ _HTTP_OPENER = urllib.request.build_opener(proxy_handler, https_handler)
+ return True, f"via proxy {proxy_url}"
+
+
+def detect_burp() -> str | None:
+ """Return Burp proxy URL if responsive on default port, else None."""
+ try:
+ with urllib.request.urlopen("http://127.0.0.1:8080/", timeout=1) as r:
+ # Burp's proxy returns a help page; just confirming it's listening
+ if r.status == 200:
+ return "http://127.0.0.1:8080"
+ except Exception:
+ pass
+ return None
+
+
def http_get(url: str, timeout: int = 5, headers: dict | None = None) -> tuple[int, dict, str]:
- """Stdlib HTTP GET returning (status_code, headers_dict, body_str). Returns
- (0, {}, error_msg) on failure."""
+ """Stdlib HTTP GET returning (status_code, headers_dict, body_str). Routes
+ through the configured proxy (e.g. Burp) if `configure_http_proxy()` was
+ called. Returns (0, {}, error_msg) on failure."""
req = urllib.request.Request(url, headers=headers or {})
+ opener = _HTTP_OPENER if _HTTP_OPENER is not None else urllib.request
try:
+ if _HTTP_OPENER is not None:
+ with _HTTP_OPENER.open(req, timeout=timeout) as r:
+ body = r.read().decode("utf-8", errors="replace")
+ return r.status, dict(r.headers), body
with urllib.request.urlopen(req, timeout=timeout) as r:
body = r.read().decode("utf-8", errors="replace")
return r.status, dict(r.headers), body
@@ -162,12 +212,27 @@ def recon_http_probe(host: str) -> dict | None:
return None
+def configure_proxy_from_args(args: argparse.Namespace) -> None:
+ """If --burp or --proxy was passed, set up the urllib opener accordingly.
+ Print the mode banner so the operator knows where traffic is going."""
+ proxy_url = None
+ if getattr(args, "proxy", None):
+ proxy_url = args.proxy
+ elif getattr(args, "burp", False):
+ proxy_url = detect_burp() or "http://127.0.0.1:8080"
+ configured, mode = configure_http_proxy(proxy_url)
+ if configured:
+ say(color(f" HTTP routing: {mode}", "yellow"))
+ say(color(f" Tip: requests will appear in Burp Proxy → HTTP history.", "dim"))
+
+
def cmd_recon(args: argparse.Namespace) -> int:
target = args.target
out_dir = REPO_ROOT / "recon" / target
out_dir.mkdir(parents=True, exist_ok=True)
section(f"recon — {target}")
+ configure_proxy_from_args(args)
# Step 1 — passive subdomain enumeration
say(color("[1/4] passive subdomain enumeration", "cyan"))
@@ -359,6 +424,10 @@ def classify_url(url: str) -> dict:
def cmd_classify(args: argparse.Namespace) -> int:
result = classify_url(args.url)
section(f"classify — {args.url}")
+ if getattr(args, "burp", False) or getattr(args, "proxy", None):
+ proxy_url = args.proxy if getattr(args, "proxy", None) else (detect_burp() or "http://127.0.0.1:8080")
+ say(color(f" Burp proxy ready at {proxy_url} — pipe candidate requests through it.", "yellow"))
+ say()
if not result["matches"]:
say(" No high-confidence matches. Try:")
say(f" {color('cbh recon <target>', 'bold')} to map attack surface first.")
@@ -625,12 +694,19 @@ def main() -> int:
)
sub = parser.add_subparsers(dest="command", required=True)
+ def _add_proxy_args(p):
+ p.add_argument("--burp", action="store_true",
+ help="Route HTTP through Burp Suite proxy (auto-detects 127.0.0.1:8080)")
+ p.add_argument("--proxy", help="Explicit proxy URL (overrides --burp)")
+
p_recon = sub.add_parser("recon", help="passive recon + live-host probe + summary")
p_recon.add_argument("target", help="root domain, e.g. hackerone.com")
+ _add_proxy_args(p_recon)
p_recon.set_defaults(func=cmd_recon)
p_class = sub.add_parser("classify", help="pattern-match URL to hunt-* skills")
p_class.add_argument("url", help="single URL to classify")
+ _add_proxy_args(p_class)
p_class.set_defaults(func=cmd_classify)
p_triage = sub.add_parser("triage", help="run 7-Question Gate on a finding")