Skip to content
Back to search

elementalsouls

MarketplaceWorks with Claude CodeGitHub

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.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/elementalsouls/Claude-BugHunter with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/elementalsouls/Claude-BugHunter'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/elementalsouls-claude-bughunter/badge.svg)](/listings/elementalsouls-claude-bughunter)

HTML

<a href="/listings/elementalsouls-claude-bughunter"><img src="/api/listings/elementalsouls-claude-bughunter/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

**Option A — install as a Claude Code plugin (recommended).** From inside Claude Code:

/plugin marketplace add elementalsouls/Claude-BugHunter
/plugin install claude-bughunter@elementalsouls

All 83 skills + 15 commands load namespaced under `claude-bughunter:` and update when you bump the plugin version — no files copied into `~/.claude/`.

**Option B — copy install (no plugin system / pin to a clone):**

git clone https://github.com/elementalsouls/Claude-BugHunter.git
cd Claude-BugHunter
# macOS / Linux
bash scripts/install.sh

# Windows (PowerShell)
pwsh ./scripts/install.ps1

Both copy the skills + commands into `~/.claude/` (macOS/Linux) or `%USERPROFILE%\.claude\` (Windows) and wire the `hunt` engagement scaffolder.

**What each install path gives you:**

| Path | 83 skills + 15 slash commands | `cbh` CLI | `hunt` scaffolder | |---|---|---|---| | **A — plugin** | ✅ namespaced under `claude-bughunter:` | ➕ separate `pipx install` | ❌ clone-only | | **B — copy install** | ✅ copied into `~/.claude/` | ✅ from the clone | ✅ from the clone |

The plugin is the fastest path to the skills + slash commands. The terminal-native `cbh` runner installs standalone — `pipx install git+https://github.com/elementalsouls/Claude-BugHunter` — so plugin users can add it without a full clone (see [`cbh` CLI](docs/cbh-cli.md)). The `hunt` engagement scaffolder ships with the clone (Option B).

That's it. Open Claude Code and describe what you're testing in plain English — the right skill loads automatically, no invocation by name:

> Testing acme.com — an in-scope HackerOne target. Run recon and rank the surface.

  ⟳ loading skills: web2-recon, offensive-osint, bb-methodology …
    → subdomain enum (subfinder + crt.sh) … 47 hosts
    → live hosts (httpx) … 12 · tech fingerprint … 6 distinct stacks
    → ranked surface: api.acme.com (GraphQL, introspection ON)  ← start here
                      auth.acme.com (OAuth, SSO)               ← hunt-oauth

  Next: want me to probe the GraphQL introspection + OAuth redirect_uri?

→ Full [Installation guide](INSTALL.md) · [Usage guide](USAGE.md) · [searchable skill catalog](docs/skills.md).

> The block above is an illustrative transcript. To record a real demo of your own session: `asciinema rec demo.cast` → upload to [asciinema.org](https://asciinema.org) and drop the badge here.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 35 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "elementalsouls",
  3. "owner": {
  4. "name": "Sachin Sharma",
  5. "url": "https://github.com/elementalsouls"
  6. },
  7. "metadata": {
  8. "description": "Offensive-security skill bundles for Claude Code by ElementalSoul.",
  9. "version": "2.1.0"
  10. },
  11. "plugins": [
  12. {
  13. "name": "claude-bughunter",
  14. "source": "./",
  15. "description": "83-skill bug-hunting & external red-team bundle — 58 hunt-* web/vuln-class + framework skills, enterprise platform attack chains (M365/Entra, Okta, SharePoint, vCenter, SSL-VPN, APK/iOS), recon/OSINT, reporting & validation gates, Burp MCP integration. Skills auto-load by topic; 15 slash commands.",
  16. "version": "2.1.0",
  17. "author": {
  18. "name": "Sachin Sharma",
  19. "url": "https://github.com/elementalsouls"
  20. },
  21. "homepage": "https://elementalsouls.github.io/Claude-BugHunter",
  22. "category": "security",
  23. "tags": [
  24. "security",
  25. "offensive-security",
  26. "bug-bounty",
  27. "red-team",
  28. "pentest",
  29. "recon",
  30. "osint",
  31. "hunt"
  32. ]
  33. }
  34. ]
  35. }
README.md · README · 346 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. ![claude-bughunter banner](assets/banner-v2.svg)
  2. # claude-bughunter
  3. > A self-contained Claude skill bundle for bug hunting and external red-team work · **83 skills** · 15 slash commands · **681 disclosed-report patterns** (433 now individually cited & auditable) across 24 core vulnerability classes · enterprise identity + infrastructure attack matrices · engagement-folder scaffolding · Burp MCP integration · battle-tested across authorized red-team and bug-hunting engagements, plus public training platforms (DVWA, OWASP Juice Shop, Hacker101, testphp.vulnweb.com).
  4. Built by **[Sachin Sharma](https://www.linkedin.com/in/sachinsharma8080/)** — Bug Hunting & GenAI Security Research.
  5. <p align="center">
  6. <sub>SPONSORED BY</sub>
  7. <br/>
  8. <a href="https://www.apismart.ai/">
  9. <picture>
  10. <source media="(prefers-color-scheme: dark)" srcset="assets/sponsors/apismart-dark.png">
  11. <img alt="ApiSmart" src="assets/sponsors/apismart-light.png" height="30">
  12. </picture>
  13. </a>
  14. &nbsp;&nbsp;&nbsp;&nbsp;
  15. <a href="https://threatwatch360.com">
  16. <picture>
  17. <source media="(prefers-color-scheme: dark)" srcset="assets/sponsors/tw360-dark.svg">
  18. <img alt="ThreatWatch360" src="assets/sponsors/tw360-light.svg" height="30">
  19. </picture>
  20. </a>
  21. </p>
  22. ---
  23. ## What is this?
  24. `claude-bughunter` is a drop-in skill bundle for the [Claude Code skills system](https://docs.claude.com/en/docs/claude-code/skills). Install once and Claude Code stops being a chatbot and starts behaving like a senior bug-hunting researcher or red-team operator: it knows the techniques, the chain templates, the VRT mappings, the platform CVE chains, and the hygiene — and it stays in scope.
  25. Four layers stack:
  26. - **Think** — `bb-methodology` + `redteam-mindset`: the 5-phase non-linear workflow, critical-thinking framework, and red-team operator discipline.
  27. - **Hunt webapps** — 58 `hunt-*` skills curated from 681 disclosed HackerOne reports: per-class detection patterns, payloads, bypass tables, and chain templates.
  28. - **Hit the perimeter** — enterprise platform chains (M365/Entra, Okta, vCenter, SSL-VPN appliances, SharePoint, cloud IAM): current 2024–2026 CVE chains + post-credential escalation.
  29. - **Ship it** — `triage-validation` + reporting + `evidence-hygiene`: the 7-Question Gate, VRT-aware severity, OOS rebuttals, PII redaction, and red-team deliverables.
  30. All triggered automatically by topic — describe what you're testing in plain English and the relevant skill loads. No invocation by name.
  31. ---
  32. ## Quickstart
  33. **Option A — install as a Claude Code plugin (recommended).** From inside Claude Code:
  34. ```text
  35. /plugin marketplace add elementalsouls/Claude-BugHunter
  36. /plugin install claude-bughunter@elementalsouls
  37. ```
  38. All 83 skills + 15 commands load namespaced under `claude-bughunter:` and update when you bump the plugin version — no files copied into `~/.claude/`.
  39. **Option B — copy install (no plugin system / pin to a clone):**
  40. ```bash
  41. git clone https://github.com/elementalsouls/Claude-BugHunter.git
  42. cd Claude-BugHunter
  43. ```
  44. ```bash
  45. # macOS / Linux
  46. bash scripts/install.sh
  47. # Windows (PowerShell)
  48. pwsh ./scripts/install.ps1
  49. ```
  50. Both copy the skills + commands into `~/.claude/` (macOS/Linux) or `%USERPROFILE%\.claude\` (Windows) and wire the `hunt` engagement scaffolder.
  51. **What each install path gives you:**
  52. | Path | 83 skills + 15 slash commands | `cbh` CLI | `hunt` scaffolder |
  53. |---|---|---|---|
  54. | **A — plugin** | ✅ namespaced under `claude-bughunter:` | ➕ separate `pipx install` | ❌ clone-only |
  55. | **B — copy install** | ✅ copied into `~/.claude/` | ✅ from the clone | ✅ from the clone |
  56. The plugin is the fastest path to the skills + slash commands. The terminal-native
  57. `cbh` runner installs standalone — `pipx install git+https://github.com/elementalsouls/Claude-BugHunter`
  58. — so plugin users can add it without a full clone (see [`cbh` CLI](docs/cbh-cli.md)).
  59. The `hunt` engagement scaffolder ships with the clone (Option B).
  60. That's it. Open Claude Code and describe what you're testing in plain English — the right skill loads automatically, no invocation by name:
  61. ```text
  62. > Testing acme.com — an in-scope HackerOne target. Run recon and rank the surface.
  63. ⟳ loading skills: web2-recon, offensive-osint, bb-methodology …
  64. → subdomain enum (subfinder + crt.sh) … 47 hosts
  65. → live hosts (httpx) … 12 · tech fingerprint … 6 distinct stacks
  66. → ranked surface: api.acme.com (GraphQL, introspection ON) ← start here
  67. auth.acme.com (OAuth, SSO) ← hunt-oauth
  68. Next: want me to probe the GraphQL introspection + OAuth redirect_uri?
  69. ```
  70. → Full [Installation guide](INSTALL.md) · [Usage guide](USAGE.md) · [searchable skill catalog](docs/skills.md).
  71. > The block above is an illustrative transcript. To record a real demo of your own session: `asciinema rec demo.cast` → upload to [asciinema.org](https://asciinema.org) and drop the badge here.
  72. ---
  73. ## Runs on multiple agent harnesses
  74. ![One install, agent harnesses — Claude Code, OpenCode, Codex CLI, Hermes Agent, Google AntiGravity](assets/harness-routing.svg)
  75. The skills are plain [Agent Skills](https://docs.claude.com/en/docs/claude-code/skills) — the same `SKILL.md` format that **Claude Code · OpenCode · OpenAI Codex CLI · Hermes Agent · Google AntiGravity** all load. One command installs them everywhere:
  76. ```bash
  77. # macOS / Linux
  78. bash scripts/install.sh --all --burp-mcp
  79. # Windows (PowerShell)
  80. pwsh ./scripts/install.ps1 -All -BurpMcp
  81. ```
  82. | Harness | Target Skill Directory | Flag |
  83. |---|---|---|
  84. | **Claude Code** (baseline) | `~/.claude/skills/` | *(default)* |
  85. | **OpenCode** | reads `~/.claude/skills/` & `~/.agents/skills/` | *(default)* / `--agents` |
  86. | **OpenAI Codex CLI** | `~/.agents/skills/` | `--agents` |
  87. | **Hermes Agent** | `~/.hermes/skills/` | `--hermes` |
  88. | **Google AntiGravity** | `~/.gemini/config/skills/` | `--antigravity` |
  89. `--all` (`-All`) detects installed harnesses and copies skills to each harness's path (`~/.claude/skills`, `~/.agents/skills`, `~/.hermes/skills`, `~/.gemini/config/skills`); `--burp-mcp` (`-BurpMcp`) wires the Burp MCP server into each. The full *knowledge* layer ports to all five — the slash commands and `/hunt` engine stay Claude-Code-only by design.
  90. → [Multi-harness guide](docs/multi-harness.md)
  91. ---
  92. ## Star History
  93. <a href="https://github.com/elementalsouls/Claude-BugHunter/stargazers">
  94. <picture>
  95. <source media="(prefers-color-scheme: dark)" srcset="assets/star-history-dark.svg" />
  96. <source media="(prefers-color-scheme: light)" srcset="assets/star-history-light.svg" />
  97. <img alt="Star history chart for Claude-BugHunter" src="assets/star-history-light.svg" width="840" />
  98. </picture>
  99. </a>
  100. <sub>Chart is self-hosted — regenerate with `python3 scripts/gen_star_history.py` (needs `gh auth login`).
  101. Refreshes automatically each day via `.github/workflows/star-history.yml`.</sub>
  102. ---
  103. ## Scope — what this bundle is for, and what it isn't
  104. This bundle covers the **external attack surface** — anything reachable from the internet without first compromising an internal endpoint.
  105. ### In scope
  106. - **Bug bounty hunting** — web apps, APIs, SaaS, GraphQL, OAuth, JWT, file upload, IDOR, SSRF, RCE chains
  107. - **Web application pentesting** — full hunt-* coverage of OWASP-mapped bug classes + discipline rules
  108. - **External red-team engagements** — initial-access against internet-facing enterprise estate: M365 / Entra ID, Okta-as-IdP, SharePoint on-prem (ToolShell + legacy SOAP), VMware vCenter / Workspace ONE, SSL VPN appliances (Cisco / Fortinet / Citrix / Palo Alto / Pulse / SonicWall / F5), Android APK red-team, supply-chain recon
  109. - **Cloud misconfig + post-credential escalation** — public S3, IMDS chains, STS AssumeRole, cross-account confused-deputy
  110. - **Recon + OSINT** — subdomain enum, identity-fabric mapping, certificate transparency, JS analysis, secret scanning
  111. - **Reporting** — H1, Bugcrowd (VRT-aware), Intigriti, Immunefi, plus client-facing red-team deliverable format
  112. ### Out of scope (deliberate — not gaps, design decisions)
  113. - **Internal Active Directory attacks** — BloodHound, Kerberoasting, ASREProast, DCSync, Pass-the-Hash, AD CS abuse, ntlmrelayx, Responder, PetitPotam, etc. Different operational risk profile; needs different tooling and judgment. **Future bundle, not this one.**
  114. - **C2 frameworks** — Cobalt Strike, Sliver, Mythic, Havoc, BRC4 tradecraft. Out of scope for external-only engagement model.
  115. - **Post-exploit / persistence / lateral** — Mimikatz/comsvcs LSASS dumping, golden/silver tickets, named-pipe impersonation, persistence (registry, scheduled tasks, WMI events, COM hijacking), token theft. These start after the perimeter has already broken — different bundle territory.
  116. - **Evasion** — AMSI bypass, ETW patching, AV/EDR bypass. Tied to C2 tradecraft above.
  117. - **iOS pentesting / hardware / RF / ICS** — out of scope by design.
  118. - **Binary exploitation / kernel pwn / browser internals** — different skill universe.
  119. If you're running an internal red team that includes domain-takeover chains via Kerberos or lateral movement, **this bundle won't help you in those phases** — and we'd rather say that up front than have you find out mid-engagement. The external surface handoff to internal-RT tooling (Impacket, NetExec, CrackMapExec, Rubeus, Certify, BloodHound) is intentionally outside our scope. **Coverage for internal AD and post-exploit may come in a future update.**
  120. ---
  121. ## What's inside
  122. **83 skills**, auto-loaded by topic — no invocation by name. Coverage across the external attack surface:
  123. | Category | # | Examples |
  124. |---|---|---|
  125. | Hunt — web app vuln classes | 58 | XSS, SQLi, SSRF, IDOR, LFI, SSTI, XXE, CSRF, CORS, open-redirect, SharePoint, ASP.NET/NTLM |
  126. | Enterprise platform attack ★ | 10 | M365/Entra, Okta, cloud-IAM-deep, vCenter, enterprise VPN, APK/iOS red-team pipelines, supply-chain recon |
  127. | Reporting & validation | 6 | triage-validation, evidence-hygiene, report-writing, bugcrowd-reporting |
  128. | Recon & OSINT | 5 | web2-recon, offensive-osint, osint-methodology, recon-scope-triage |
  129. | Methodology & mindset | 4 | bb-methodology, bug-bounty, redteam-mindset, bb-local-toolkit |
  130. Full searchable catalog → **[docs/skills.md](docs/skills.md)**. Also ships **15 slash commands** (`/hunt`, `/recon`, `/report`, …) and a deterministic **engagement engine** (`engine/`) that maps a target's attack surface and routes each finding to the skill that handles it.
  131. ---
  132. ## How it works
  133. A 6-phase, non-linear workflow — **recon → map & rank → hunt → validate → report** — with scope enforced in code and a **7-Question Gate** before anything is submitted. Two ways to drive it:
  134. - **Plain English** — describe what you're testing and the relevant skill loads automatically.
  135. - **`/hunt` scaffold + `cbh` CLI** — engagement-folder structure, state, and orchestration.
  136. → [Usage guide & worked example](USAGE.md) · [6-phase architecture & skill-to-phase map](docs/architecture.md) · [`cbh` CLI](docs/cbh-cli.md)
  137. ---
  138. ## Authorization
  139. These skills are intended for assets you **own** or have **written authorization to assess** (bug-bounty in-scope assets, pentest engagement letters, CTF challenges, your own infrastructure).
  140. The skills include validation gates that auto-trigger when you point Claude at unverified third-party targets — `triage-validation`'s 7-Question Gate explicitly asks whether the asset is in scope (Q3) and on the program's accepted-impact list (Q2). The `bugcrowd-reporting` skill includes researcher-side hygiene (Bugcrowdninja alias, account-state restoration, friendly-tester posture) that signals legitimate authorized testing to the target's fraud team.
  141. The bundle explicitly **excludes**: weaponizing 0-days against unauthorized targets, post-exploitation tooling, malware development, mass-targeting infrastructure. See [`SECURITY.md`](SECURITY.md) for the full posture.
  142. > **Heads-up — Anthropic runtime cyber safeguards.** Anthropic's models apply real-time safeguards that **block "vulnerability exploitation or offensive security tooling development" by default** — so even *authorized, in-scope* work can hit a refusal that isn't this bundle's doing. If you do authorized offensive security (pentest / bug bounty / red team), enroll in Anthropic's **free, application-based [Cyber Verification Program (CVP)](https://claude.com/form/cyber-use-case)** to get safeguards adjusted for legitimate dual-use work. (Mass data exfiltration and ransomware development stay prohibited and are *not* adjustable.) Details: [Anthropic — real-time cyber safeguards](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude).
  143. ### Why your model switched mid-session
  144. Separate from refusals, and easy to miss. On **Opus 5**, a narrow set of higher-risk cyber requests —
  145. Anthropic names *exploit generation*, *binary-based vulnerability scanning* and *penetration testing* —
  146. **fall back to Opus 4.8** rather than being refused. You get a notice and the response is labelled with
  147. the model that answered, but in a long agentic run that is easy to scroll past, so it can look like
  148. Opus 5 quietly got worse. See [why Claude switched models](https://support.claude.com/en/articles/16049681-why-claude-switched-models-in-your-conversation-with-opus-5).
  149. What to do depends on what you are actually doing:
  150. | Situation | What helps |
  151. |---|---|
  152. | **Auditing your own code** — reviewing a repo you own for defects | Say so. "Defensive review of my own repo", "check this against the OWASP Top 10", "secure refactor to remediate" describe the work accurately and read as remediation. This is not a workaround; the work genuinely is defensive. |
  153. | **Authorized offensive work** — live engagement, PoC for a bounty submission | This is what the bundle is for, and the supported route is [CVP](https://claude.com/form/cyber-use-case). Do not reword an offensive engagement to look defensive to get past a classifier — enroll instead. |
  154. | **You just want the switching off** | Settings → Capabilities disables automatic model switching. |
  155. `/hunt` states the engagement frame (authorized, scope-bounded, remediable finding) on its first turn
  156. for exactly this reason — engagement context belongs in the session explicitly, not implied.
  157. ---
  158. ## Documentation
  159. | Doc | Contents |
  160. |---|---|
  161. | [`README.md`](README.md) | This file — overview, quickstart, scope, skill summary |
  162. | [`INSTALL.md`](INSTALL.md) | Full setup with Burp MCP integration and optional skill regenerator |
  163. | [`USAGE.md`](USAGE.md) | Workflow walkthrough · decision tree · worked engagement example |
  164. | [`docs/architecture.md`](docs/architecture.md) | 6-phase architecture · skill-to-phase mapping · engagement composition |
  165. | [`docs/cbh-cli.md`](docs/cbh-cli.md) | `cbh` CLI — native runner orchestrating recon + classify + triage + report |
  166. | [`docs/cve-coverage.md`](docs/cve-coverage.md) | CISA KEV coverage snapshot — refreshed weekly via the workflow template at `docs/automation/cve-refresh.yml.template` |
  167. | [`docs/credits.md`](docs/credits.md) | Full attribution: 43 original skills + 8 vendored from upstream |
  168. | [`CONTRIBUTING.md`](CONTRIBUTING.md) | PR guidelines · skill quality standards · scope |
  169. | [`SECURITY.md`](SECURITY.md) | Authorized-use posture · responsible disclosure · what's excluded |
  170. | [`LICENSE`](LICENSE) | MIT |
  171. | [`NOTICE`](NOTICE) | Upstream-skills attribution · no-redistribution note |
  172. | [`LICENSE-CONTENT`](LICENSE-CONTENT) | CC BY 4.0 (skill methodology, wordlists, docs) |
  173. ---
  174. ## Why this exists
  175. Most bug-hunting Claude setups are either too generic (one big "security" prompt) or too fragmented (you bookmark 30 disclosed reports and re-read them every engagement). Neither scales past the second target.
  176. This bundle was built and validated through authorized engagements that exposed different capability gaps:
  177. **Bug-bounty engagement** — surfaced four gaps a starter 3-skill stack could not close:
  178. 1. **No hypothesis discipline** — drafts written before validation → wasted hours, hurt validity ratio
  179. 2. **No per-program reporting tactics** — VRT defaults auto-downgraded P3-worthy findings to P4
  180. 3. **No engagement coordination** — findings, evidence, and submission IDs scattered across folders
  181. 4. **No evidence hygiene** — screenshots leaked cookies and victim PII
  182. **External red-team engagement** — exposed five additional gaps that bug-bounty defaults made worse:
  183. 1. **Conservative defaults retracted real findings** — WAPT mindset stopped tests early on defended targets where red-team continuation would have surfaced bypass chains → `redteam-mindset`
  184. 2. **No mid-engagement situational awareness** — client SOC patched confirmed SQLi within 30 min; external attacker locked 14 accounts during a live test session — both invisible without explicit detection methodology → `mid-engagement-ir-detection`
  185. 3. **No enterprise-platform attack chains** — M365 + Entra ID, on-prem SharePoint, Cisco SSL VPN, vCenter, and 7 Android APKs all needed current 2024-2026 CVE knowledge and platform-specific tradecraft → `m365-entra-attack`, `okta-attack`, `hunt-sharepoint`, `hunt-aspnet`, `hunt-ntlm-info`, `vmware-vcenter-attack`, `enterprise-vpn-attack`, `apk-redteam-pipeline`
  186. 4. **No client-facing deliverable format** — bug-bounty report templates don't fit enterprise red-team where output is a 50KB+ MD + DOCX with embedded screenshots → `redteam-report-template`
  187. 5. **No post-credential escalation model** — when recon yielded credentials (AWS keys, JWTs, GCP JSON), it was unclear what they granted or how to escalate → `cloud-iam-deep`
  188. The per-class `hunt-*` skills address gap-zero (*"what should I look for in webapps"*) — the original 24 codifying patterns from 681 disclosed HackerOne reports, with 20+ framework/surface skills added by the community v3 expansion — Claude knows the actual chain templates real triagers paid for, not abstract OWASP Top 10. The enterprise-platform and red-team-tradecraft layers address what bug-bounty alone cannot: external red-team engagements against monitored enterprise targets.
  189. ---
  190. ## Roadmap
  191. - [x] HackerOne MCP integration — [`mcp/hackerone/`](mcp/hackerone/README.md): disclosed-report duplicate search, program stats and scope; optional logged-in mode for private programs and your own reports
  192. - [ ] Per-engagement memory layer — pattern recall across targets
  193. - [x] Industry-specific hunt skills — `hunt-fintech-graphql` shipped; `hunt-healthcare-fhir`, `hunt-gov-compliance` still open
  194. - [ ] Program-rules-parser skill — auto-generate structured `scope.md` from program text
  195. - [ ] Refresh `hunt-*` skills with newer disclosed reports (re-run `public-skills-builder`)
  196. - [ ] Additional enterprise-platform skills — `citrix-netscaler-deep`, `f5-bigip-attack`, `ad-cs-attack` (AD Certificate Services)
  197. - [ ] Refresh enterprise-VPN CVE matrix quarterly to track 2026 advisories
  198. - [ ] Update architecture SVG to include the 7-skill enterprise-platform layer
  199. ---
  200. ## Sponsors
  201. <p align="center">
  202. <a href="https://www.apismart.ai/"><picture>
  203. <source media="(prefers-color-scheme: dark)" srcset="assets/sponsors/apismart-dark.png">
  204. <img alt="ApiSmart" src="assets/sponsors/apismart-light.png" width="210">
  205. </picture></a>
  206. </p>
  207. **[ApiSmart](https://www.apismart.ai/)** unifies leading LLM, image, and video models through one OpenAI-compatible API. Use one key to switch models, simplify billing, and improve reliability with automatic failover.
  208. <p align="center">
  209. <a href="https://threatwatch360.com"><picture>
  210. <source media="(prefers-color-scheme: dark)" srcset="assets/sponsors/tw360-dark.svg">
  211. <img alt="ThreatWatch360" src="assets/sponsors/tw360-light.svg" width="430">
  212. </picture></a>
  213. </p>
  214. **[ThreatWatch360](https://threatwatch360.com)** is an AI-powered offensive-security platform: continuous Attack Surface Management, AI-assisted penetration testing, brand protection, dark-web monitoring, and Cyber Threat Intelligence in one platform. Validated findings with proof-of-concept and business-impact prioritization — signal over alert fatigue.
  215. ---
  216. ## About
  217. Operational tradecraft accumulated across bug-bounty engagements and authorized pentests, codified into Claude skills. Platform-agnostic — slot into any engagement workflow you already use, or none.
  218. **Author:** [ElementalSoul](https://github.com/elementalsouls) · GenAI Security Research
  219. **Sister project:** [Claude-OSINT](https://github.com/elementalsouls/Claude-OSINT) — paired skills for the recon phase that this bundle picks up after. Its two recon skills (`offensive-osint`, `osint-methodology`) are **canonically maintained here** and re-exported there, so the two are byte-identical. **Installing both is safe:** each bundle's installer (`install.sh` on macOS/Linux, `install.ps1` on Windows) records a manifest, the script skips re-copying an identical skill, and `--uninstall` keeps any skill the other bundle still owns — uninstalling one never breaks the other.
  220. **Vendored foundation:** [shuvonsec/claude-bug-bounty](https://github.com/shuvonsec/claude-bug-bounty) — methodology, validation, reporting, payload library (8 of 83 skills + 15 slash commands)
  221. **Generator tool used (not vendored):** [shuvonsec/public-skills-builder](https://github.com/shuvonsec/public-skills-builder) — used to scaffold per-class skills from H1 disclosed reports
  222. **Inspirations:**
  223. - [archangel / douglasday](https://hackerone.com/) — top-10 H1 hunter; per-class skill pattern
  224. - [Trail of Bits — `trailofbits/skills`](https://github.com/trailofbits/skills) — skill-authoring discipline
  225. - [SecSkills — `trilwu/secskills`](https://github.com/trilwu/secskills) — subagent pattern
  226. **Tool inventory:**
  227. - [PortSwigger Burp Suite + MCP Server extension](https://portswigger.net/burp)
  228. - [ProjectDiscovery](https://github.com/projectdiscovery) — subfinder · dnsx · httpx · katana · nuclei
  229. - [SecLists](https://github.com/danielmiessler/SecLists) · [Assetnote Wordlists](https://wordlists.assetnote.io/)
  230. ## License
  231. This project is dual-licensed:
  232. - **Code** (Python helpers, shell scripts) — [MIT](LICENSE).
  233. - **Content** (skill methodology, wordlists, regex catalogs, severity rubrics, docs) — [Creative Commons Attribution 4.0 International](LICENSE-CONTENT) (CC BY 4.0).
  234. To be precise about the boundary: **`*.py`, `*.sh`, and other source files are MIT; `*.md` documentation, wordlists, regex catalogs, and rubrics are CC BY 4.0.**
  235. Reuse the content freely — including commercially — as long as you credit **Sachin Sharma / Claude-BugHunter** and link back to this repository. See [`NOTICE`](NOTICE) for upstream-skills attribution.
  236. ---
  237. > *"Give Claude the right skill and it stops being a chatbot. It becomes an operator."*
engine/scope.py · Bundled script · 192 lines · 1 finding marked
  1. #!/usr/bin/env python3
  2. """
  3. scope.py — deterministic scope safety for the engagement engine.
  4. The engine may run unattended, so scope is enforced in CODE, not by trusting an
  5. LLM. Every host/URL is checked here before any agent is allowed to touch it.
  6. Deny wins: an out-of-scope match excludes even if an in-scope pattern also matches.
  7. Default deny: anything not matching an in-scope pattern is out of scope.
  8. Pattern forms (matched against the URL's host):
  9. example.com -> the apex AND any subdomain (example.com, api.example.com)
  10. *.example.com -> any subdomain (NOT the bare apex)
  11. api.example.com -> that exact host
  12. 10.0.0.0/8 -> any IP in the CIDR (IPv4)
  13. re:^staging[0-9]+\\.example\\.com$ -> explicit regex (prefix re:)
  14. """
  15. import ipaddress
  16. import re
  17. from urllib.parse import urlparse
  18. def _host_of(target):
  19. t = target.strip()
  20. if "://" not in t:
  21. t = "//" + t
  22. try:
  23. parsed = urlparse(t)
  24. return (parsed.hostname or "").lower().rstrip(".")
  25. except ValueError:
  26. return ""
  27. def _match(pattern, host):
  28. p = pattern.strip()
  29. if not p or not host:
  30. return False
  31. if p[:3].lower() == "re:":
  32. try:
  33. return re.search(p[3:], host, re.IGNORECASE) is not None
  34. except re.error:
  35. return False
  36. p = p.lower()
  37. if "/" in p and p.replace(".", "").replace("/", "").isdigit(): # CIDR
  38. try:
  39. return ipaddress.ip_address(host) in ipaddress.ip_network(p, strict=False)
  40. except ValueError:
  41. return False
  42. if p.startswith("*."):
  43. base = p[2:]
  44. return host.endswith("." + base)
  45. # bare domain: apex or any subdomain; or exact host
  46. return host == p or host.endswith("." + p)
  47. class Scope:
  48. def __init__(self, in_scope, out_of_scope=None, seeds=None, name="engagement"):
  49. self.in_scope = [p for p in (in_scope or []) if p.strip()]
  50. self.out_of_scope = [p for p in (out_of_scope or []) if p.strip()]
  51. self.seeds = seeds or []
  52. self.name = name
  53. @classmethod
  54. def load(cls, path):
  55. import json
  56. d = json.load(open(path))
  57. return cls(d.get("in_scope", []), d.get("out_of_scope", []),
  58. d.get("seeds", []), d.get("name", "engagement"))
  59. def in_scope_host(self, target):
  60. host = _host_of(target)
  61. if not host:
  62. return False
  63. if any(_match(p, host) for p in self.out_of_scope):
  64. return False # deny wins
  65. return any(_match(p, host) for p in self.in_scope)
  66. def reject_reason(self, target):
  67. """Return None if in scope, else a human reason (for logging)."""
  68. host = _host_of(target)
  69. if not host:
  70. return "could not parse host"
  71. if any(_match(p, host) for p in self.out_of_scope):
  72. return f"{host} matches an out-of-scope rule"
  73. if not any(_match(p, host) for p in self.in_scope):
  74. return f"{host} matches no in-scope rule (default deny)"
  75. return None
  76. def _selftest():
  77. s = Scope(in_scope=["example.com", "*.test.example.com", "10.0.0.0/8",
  78. "re:^lab[0-9]+\\.acme\\.io$"],
  79. out_of_scope=["admin.example.com", "internal.example.com"])
  80. ok = lambda t: s.in_scope_host(t)
  81. assert ok("https://example.com/login") # apex
  82. assert ok("http://api.example.com/x") # subdomain of bare domain
  83. assert ok("https://a.test.example.com") # wildcard
  84. assert ok("https://10.1.2.3:8080/") # CIDR
  85. assert ok("https://lab42.acme.io") # regex
  86. assert not ok("https://admin.example.com") # out-of-scope (deny wins)
  87. assert not ok("https://internal.example.com/x") # out-of-scope
  88. assert ok("https://test.example.com") # in scope via bare example.com rule
  89. assert not ok("https://evil.com") # default deny
  90. assert not ok("https://notexample.com") # suffix-confusion guard
  91. assert not ok("https://example.com.evil.com") # suffix-confusion guard
  92. assert not ok("https://11.0.0.1") # outside CIDR
    • Dismissed after review: Talks to a raw IP address or throwaway host, where malware is often staged
    • Line 105 on GitHub
  93. assert s.reject_reason("https://evil.com")
  94. assert s.reject_reason("https://example.com") is None
  95. # wildcard depth: *.test.example.com needs a label deeper than test.example.com
  96. s2 = Scope(in_scope=["*.test.example.com"])
  97. assert s2.in_scope_host("a.test.example.com")
  98. assert not s2.in_scope_host("test.example.com")
  99. print("scope.py self-test: PASS")
  100. def _scope_from_md(path):
  101. """Build a Scope from a scaffolded scope.md (the `hunt` template).
  102. Collects bullet items under an '## In scope' / '## Out of scope' heading.
  103. Takes the first whitespace token of each bullet (so '- api.example.com — note'
  104. yields 'api.example.com'). Skips placeholder bullets like '(paste ... here)'.
  105. """
  106. in_scope, out_scope, section = [], [], None
  107. with open(path, encoding="utf-8") as fh:
  108. for line in fh:
  109. low = line.strip().lower()
  110. if low.startswith("#"):
  111. hashes = len(low) - len(low.lstrip("#"))
  112. if "out of scope" in low or "out-of-scope" in low:
  113. section = "out"
  114. elif "in scope" in low or "in-scope" in low:
  115. section = "in"
  116. elif hashes <= 2:
  117. section = None # a peer-level section (## Focus areas, etc.)
  118. # deeper sub-headings (### Web, #### APIs) keep the current section
  119. continue
  120. s = line.strip()
  121. if section and (s.startswith("- ") or s.startswith("* ")):
  122. tok = s[2:].strip().split()[0:1]
  123. if not tok:
  124. continue
  125. pat = tok[0]
  126. if pat.startswith("(") or pat.startswith("["):
  127. continue # placeholder text, not a real pattern
  128. (in_scope if section == "in" else out_scope).append(pat)
  129. return Scope(in_scope=in_scope, out_of_scope=out_scope, name=path)
  130. def _main(argv=None):
  131. import argparse
  132. ap = argparse.ArgumentParser(
  133. prog="scope.py",
  134. description="Deterministic in-scope check (deny wins, default deny).")
  135. ap.add_argument("targets", nargs="*", help="hosts/URLs to check")
  136. ap.add_argument("--md", help="path to a scaffolded scope.md")
  137. ap.add_argument("--scope-file", help="path to an engagement scope.json")
  138. ap.add_argument("--in-scope", action="append", default=[], metavar="PATTERN",
  139. help="in-scope pattern (repeatable)")
  140. ap.add_argument("--out-of-scope", action="append", default=[], metavar="PATTERN",
  141. help="out-of-scope pattern (repeatable)")
  142. ap.add_argument("--selftest", action="store_true", help="run the built-in self-test")
  143. args = ap.parse_args(argv)
  144. if args.selftest:
  145. _selftest()
  146. return 0
  147. if args.md:
  148. scope = _scope_from_md(args.md)
  149. elif args.scope_file:
  150. scope = Scope.load(args.scope_file)
  151. elif args.in_scope or args.out_of_scope:
  152. scope = Scope(in_scope=args.in_scope, out_of_scope=args.out_of_scope)
  153. else:
  154. ap.error("provide --md, --scope-file, or --in-scope/--out-of-scope patterns")
  155. if not args.targets:
  156. ap.error("no targets given")
  157. worst = 0
  158. for t in args.targets:
  159. reason = scope.reject_reason(t)
  160. if reason is None:
  161. print(f"IN-SCOPE {t}")
  162. else:
  163. print(f"OUT-OF-SCOPE {t} ({reason})")
  164. worst = 1
  165. return worst
  166. if __name__ == "__main__":
  167. import sys
  168. sys.exit(_main())
engine/skill_map.py · Bundled script · 246 lines · 1 finding marked
  1. #!/usr/bin/env python3
  2. """
  3. skill_map.py — categorize the discovered attack surface against the hunt-* skill arsenal.
  4. The engine's job is NOT to test everything itself. It maps the surface, then tells the
  5. operator *which skill applies where* and *the first curl to run* — so the human spends
  6. their 20% expert effort where the 80% automation points:
  7. surface (endpoint / parameter) -> attack class -> which hunt-* skill -> first curl
  8. Mappings are grounded in the skills actually installed (auto-detected: the bundle's own
  9. skills/ for repo/plugin installs, or ~/.claude/skills for the copy installer, overridable
  10. via $CBH_SKILLS_DIR); anything not present is filtered out so we never point at a skill
  11. that isn't there.
  12. Active testing is curl-first; Burp MCP is optional (only where noted — OOB/blind/fuzzing).
  13. """
  14. import os
  15. import sys
  16. def _resolve_skills_dir():
  17. """Locate the installed skills/ directory across every install method.
  18. Resolution order:
  19. 1. $CBH_SKILLS_DIR — explicit override (e.g. a non-standard plugin cache path).
  20. 2. skills/ shipped next to the engine — works for both a repo checkout and a
  21. Claude Code plugin install (the whole bundle lives in the plugin cache, so
  22. engine/ and skills/ stay siblings there too).
  23. 3. ~/.claude/skills — the target of the scripts/install.sh copy method.
  24. """
  25. env = os.environ.get("CBH_SKILLS_DIR")
  26. if env:
  27. return os.path.expanduser(env)
  28. bundled = os.path.join(
  29. os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "skills"
  30. )
  31. if os.path.isdir(bundled):
  32. return bundled
  33. return os.path.expanduser("~/.claude/skills")
  34. SKILLS_DIR = _resolve_skills_dir()
  35. # attack class -> hunt skill(s) in the bundle.
  36. # NOTE: hunt-dispatch is an internal loader (for the /hunt orchestrator) and is intentionally
  37. # not listed here — it routes no attack class of its own.
  38. CLASS_SKILL = {
  39. "sqli": ["hunt-sqli"], "nosqli": ["hunt-nosqli"], "xss": ["hunt-xss", "hunt-dom"],
  40. "ssrf": ["hunt-ssrf"], "idor": ["hunt-idor"], "open-redirect": ["hunt-open-redirect"],
  41. "lfi": ["hunt-lfi"], "ssti": ["hunt-ssti"], "rce": ["hunt-rce"], "xxe": ["hunt-xxe"],
  42. "auth-bypass": ["hunt-auth-bypass", "hunt-session"], "ato": ["hunt-ato", "hunt-forgot-password"],
  43. "llm-ai": ["hunt-llm-ai"], "rag-vector": ["hunt-rag-vector", "hunt-llm-ai"],
  44. "saml": ["hunt-saml"], "oauth": ["hunt-oauth"], "mfa": ["hunt-mfa-bypass"],
  45. "graphql": ["hunt-graphql"], "fintech-graphql": ["hunt-fintech-graphql", "hunt-graphql"],
  46. "csrf": ["hunt-csrf"], "cors": ["hunt-cors"], "clickjacking": ["hunt-clickjacking"],
  47. "info-leak": ["hunt-source-leak", "hunt-api-misconfig"], "secret": ["hunt-source-leak"],
  48. "shadow-api": ["hunt-shadow-api", "hunt-source-leak"], "spa-api": ["hunt-spa-api", "hunt-source-leak"],
  49. "deserialization": ["hunt-deserialization"], "file-upload": ["hunt-file-upload"],
  50. "host-header": ["hunt-host-header"], "http-smuggling": ["hunt-http-smuggling"],
  51. "cache-poison": ["hunt-cache-poison"], "race-condition": ["hunt-race-condition"],
  52. "business-logic": ["hunt-business-logic"], "brute-force": ["hunt-brute-force"],
  53. "captcha-bypass": ["hunt-captcha-bypass"], "forgot-password": ["hunt-forgot-password", "hunt-ato"],
  54. "jwt-crypto": ["hunt-jwt-crypto", "hunt-ato"], "websocket": ["hunt-websocket"],
  55. "html-injection": ["hunt-html-injection", "hunt-xss"],
  56. "exceptional-conditions": ["hunt-exceptional-conditions", "hunt-source-leak"],
  57. "cicd": ["hunt-cicd"], "k8s": ["hunt-k8s"], "cloud-misconfig": ["hunt-cloud-misconfig"],
  58. "ldap": ["hunt-ldap"], "ntlm-info": ["hunt-ntlm-info"], "tls-network": ["hunt-tls-network"],
  59. "subdomain-takeover": ["hunt-subdomain"],
  60. }
  61. # detected tech -> tech-specific skill(s)
  62. TECH_SKILL = {
  63. "next.js": ["hunt-nextjs"], "node.js": ["hunt-nodejs"], "react": ["hunt-dom"],
  64. "wordpress": ["hunt-sqli", "hunt-idor"], "laravel": ["hunt-laravel"], "spring": ["hunt-springboot"],
  65. "asp.net": ["hunt-aspnet"], "sharepoint": ["hunt-sharepoint"], "graphql": ["hunt-graphql"],
  66. "grpc": ["hunt-grpc"], "kubernetes": ["hunt-k8s"], "docker": ["hunt-k8s"],
  67. "websocket": ["hunt-websocket"], "socket.io": ["hunt-websocket"],
  68. "jenkins": ["hunt-cicd"], "teamcity": ["hunt-cicd"], "drone": ["hunt-cicd"],
  69. "argo": ["hunt-cicd"], "github actions": ["hunt-cicd"], "gitlab ci": ["hunt-cicd"],
  70. }
  71. # curl-first starter probe per class. {u}=url with FUZZ->1, {ur}=injection prefix (before the value)
  72. CLASS_PROBE = {
  73. "sqli": "curl -s \"{u}\" # then ' OR '1'='1'-- and time-based ' AND SLEEP(5)-- (Burp Intruder for blind)",
  74. "nosqli": "curl -s \"{u}\" # then [$ne]=1 / {\"$gt\":\"\"} in the param",
  75. "xss": "curl -s \"{ur}z1z<svg/onload=alert(1)>\" # check the marker comes back UNencoded",
  76. "open-redirect": "curl -sI \"{ur}https://evil.example\" # inspect the Location: response header",
  77. "ssrf": "curl -s \"{ur}http://169.254.169.254/latest/meta-data/\" # Burp Collaborator for blind OOB",
    • Note: Quoted as data in code: Fetches a raw IP-literal URL — ambiguous (could be legitimate internal tooling) but worth a second look
    • Line 88 on GitHub
  78. "idor": "curl -s \"{u}\" # swap/increment the id across two identities; diff the bodies",
  79. "lfi": "curl -s \"{ur}../../../../etc/passwd\" # also php://filter/convert.base64-encode/resource=",
  80. "ssti": "curl -s \"{ur}{{7*7}}\" # look for 49 (or ${7*7}); confirm engine before RCE",
  81. "rce": "curl -s \"{u}\" # only with explicit authorization; start with benign id;sleep markers",
  82. "xxe": "curl -s -X POST \"{u}\" -d '<?xml ...>' # OOB via Collaborator if blind",
  83. "auth-bypass": "curl -s \"{u}\" # no token / expired token / role swap / forced browse",
  84. "llm-ai": "curl -s -X POST \"{u}\" -H 'Content-Type: application/json' -d '{\"messages\":[{\"role\":\"user\",\"content\":\"...\"}]}' # prompt-injection / system-prompt extraction",
  85. "graphql": "curl -s -X POST \"{u}\" -d '{\"query\":\"{__schema{types{name}}}\"}' # introspection",
  86. "csrf": "curl -s \"{u}\" # check for SameSite / CSRF token on state-changing POST",
  87. "info-leak": "curl -s \"{u}\" # inspect for secrets / verbose errors / source / stack traces",
  88. "secret": "curl -s \"{u}\" # confirm the exposed secret is present (read-only — do NOT exercise it)",
  89. "host-header": "curl -s \"{u}\" -H 'Host: evil.example' # check for reflection / cache / pw-reset poisoning",
  90. "saml": "curl -s \"{u}\" # inspect SAML/SSO config endpoints; test XSW / signature-stripping / IdP confusion (needs auth)",
  91. "oauth": "curl -s \"{u}\" # check redirect_uri validation, state, PKCE, token leakage",
  92. "ato": "curl -s \"{u}\" # reset/email-change flows: host-header poisoning, token in body/referer, no-expiry/reuse",
  93. "forgot-password": "curl -s \"{u}\" # diff valid vs invalid email responses; check token in response/referer, replay, rate limit",
  94. "brute-force": "curl -s -X POST \"{u}\" -d 'user=a&pass=b' # measure lockout/throttle; try X-Forwarded-For bypass",
  95. "captcha-bypass": "curl -s -X POST \"{u}\" # omit/blank/replay the captcha field; test cross-endpoint acceptance",
  96. "jwt-crypto": "curl -s \"{u}\" # decode the JWT; test alg:none / RS256->HS256 key confusion",
  97. "websocket": "curl -s \"{u}\" -H 'Upgrade: websocket' -H 'Connection: Upgrade' -H 'Origin: https://evil.example' # check Origin validation",
  98. "html-injection": "curl -s \"{ur}<b>marker</b>\" # raw HTML reflected (no script exec) -> escalate to XSS if JS runs",
  99. "cache-poison": "curl -s \"{u}\" -H 'X-Forwarded-Host: evil.example' # check if unkeyed input is cached and served to others",
  100. "shadow-api": "curl -s \"{u}\" # enumerate v1/v2/beta/legacy paths; diff Wayback OpenAPI for auth regressions",
  101. "spa-api": "curl -s \"{u}\" # pull JS bundle -> backend route map -> test for missing auth middleware",
  102. "exceptional-conditions": "curl -s \"{u}\" # malformed/unexpected input -> verbose stack-trace / ORM / path leak",
  103. "cicd": "curl -s \"{u}\" # exposed CI dashboard / workflow-injection surface (pull_request_target, self-hosted runner)",
  104. "k8s": "curl -s \"{u}\" # API anonymous access, kubelet /run, etcd unauth",
  105. "cloud-misconfig": "curl -s \"{u}\" # anonymous read on S3/GCS/Blob; PutObjectAcl public-write",
  106. "ldap": "curl -s \"{ur}*)(objectClass=*\" # LDAP search-filter injection in auth/search",
  107. "ntlm-info": "curl -sI \"{u}\" # WWW-Authenticate: NTLM -> leak domain/forest/computer name",
  108. "tls-network": "curl -sI \"{u}\" # HSTS / weak cipher / SPF-DKIM-DMARC / DNS AXFR",
  109. "subdomain-takeover": "curl -sI \"{u}\" # dangling CNAME -> check claimable provider",
  110. "rag-vector": "curl -s \"{u}\" # shared knowledge base / vector-DB port; cross-tenant query",
  111. "fintech-graphql": "curl -s -X POST \"{u}\" -d '{\"query\":\"{__schema{types{name}}}\"}' # money-movement mutations, idempotency-key double-spend",
  112. "clickjacking": "curl -sI \"{u}\" # missing X-Frame-Options / CSP frame-ancestors -> confirm framing in a browser",
  113. "cors": "curl -sD - -o /dev/null \"{u}\" -H 'Origin: https://evil.example' # GET, not HEAD: look for Access-Control-Allow-Origin echoing that origin WITH Allow-Credentials: true",
  114. "deserialization": "curl -s \"{u}\" # hunt for rO0AB (Java) / O:8: (PHP) / gAS (pickle) / __VIEWSTATE, then replay a tampered blob",
  115. "file-upload": "curl -s -X POST \"{u}\" -F 'file=@probe.jpg;type=image/jpeg' # then fetch it back: is it served, and does a .php/.svg extension survive",
  116. "http-smuggling": "curl -s --http1.1 \"{u}\" -H 'Transfer-Encoding: chunked' -H 'Content-Length: 6' # desync probe; confirm with Burp's HTTP Request Smuggler",
  117. "mfa": "curl -s \"{u}\" # after the password step: reach the post-login URL directly, replay an OTP, or omit the MFA field",
  118. "race-condition": "curl -s -X POST \"{u}\" # fire N copies in parallel (Turbo Intruder single-packet); >1 success means the limit is racy",
  119. "business-logic": "curl -s \"{u}\" # replay the same action twice / skip a step / try qty 0 or negative; diff the resulting state",
  120. }
  121. def _present():
  122. """Names in SKILLS_DIR, or None when the directory cannot be read.
  123. None is deliberately distinct from an empty set: an unreadable skills directory
  124. means presence cannot be *verified*, and _filter() must not read that as "assume
  125. everything is installed".
  126. """
  127. try:
  128. return set(os.listdir(SKILLS_DIR))
  129. except OSError:
  130. return None
  131. def _filter(names):
  132. present = _present()
  133. if present is None:
  134. # Unverifiable. The contract above is to name only skills that are actually
  135. # installed, so name none rather than every one of them.
  136. return []
  137. return [s for s in names if s in present]
  138. def skills_for(vuln_class, tech=None):
  139. """Class-specific skill(s) for a vuln class (tech kept separate — see tech_skills)."""
  140. out = _filter(CLASS_SKILL.get(vuln_class, []))
  141. return out or _filter(["hunt-misc"])
  142. def tech_skills(tech):
  143. """Tech-stack skill(s) for the detected service tech (target-wide, not per class)."""
  144. out = []
  145. for t in (tech or []):
  146. for s in _filter(TECH_SKILL.get((t or "").lower(), [])):
  147. if s not in out:
  148. out.append(s)
  149. return out
  150. def probe_for(vuln_class, url, param=None):
  151. """Curl-first starter probe string for a (class, url)."""
  152. tmpl = CLASS_PROBE.get(vuln_class, "curl -s \"{u}\"")
  153. u = url.replace("FUZZ", "1")
  154. if "FUZZ" in url:
  155. ur = url.split("FUZZ", 1)[0]
  156. elif param:
  157. ur = url + ("&" if "?" in url else "?") + param + "="
  158. else:
  159. ur = url + ("&" if "?" in url else "?") + "x="
  160. return tmpl.replace("{u}", u).replace("{ur}", ur)
  161. def main(argv=None):
  162. """Self-check the maps against the skills actually installed.
  163. Errors (exit 1) are conditions that make the routing wrong or unverifiable:
  164. - the skills directory cannot be read, so nothing can be verified
  165. - a mapping names a skill that is not installed
  166. - an installed hunt-* skill is unreachable through every mapping
  167. Warnings (exit 0) are coverage gaps: the class still routes to the right skill,
  168. but no tailored starter probe is defined for it.
  169. """
  170. present = _present()
  171. errors, warnings = [], []
  172. if present is None:
  173. errors.append(
  174. f"skills directory not readable: {SKILLS_DIR} — set $CBH_SKILLS_DIR or "
  175. f"install the bundle; presence cannot be verified"
  176. )
  177. present = set()
  178. referenced = {
  179. s for skills in list(CLASS_SKILL.values()) + list(TECH_SKILL.values()) for s in skills
  180. }
  181. if present:
  182. missing = sorted(referenced - present)
  183. if missing:
  184. errors.append(f"mapped but NOT installed: {', '.join(missing)}")
  185. # Coverage: every installed hunt-* skill should be reachable through CLASS_SKILL or
  186. # TECH_SKILL (hunt-dispatch is an internal loader and hunt-misc is the explicit
  187. # fallback — both exempt).
  188. mapped = referenced | {"hunt-misc"}
  189. unreachable = sorted(
  190. {s for s in present if s.startswith("hunt-") and s != "hunt-dispatch"} - mapped
  191. )
  192. if unreachable:
  193. errors.append(
  194. f"installed hunt-* skills NOT reachable through any mapping: {', '.join(unreachable)}"
  195. )
  196. no_probe = sorted(set(CLASS_SKILL) - set(CLASS_PROBE))
  197. if no_probe:
  198. warnings.append(f"classes with a mapping but no tailored starter probe: {', '.join(no_probe)}")
  199. print(
  200. f"skill_map: {len(CLASS_SKILL)} class mappings, {len(TECH_SKILL)} tech mappings, "
  201. f"{len(CLASS_PROBE)} probes"
  202. )
  203. if present:
  204. print(f" skills installed: {len(present)}")
  205. for w in warnings:
  206. print(f"::warning:: {w}" if os.environ.get("GITHUB_ACTIONS") else f"WARN {w}")
  207. for e in errors:
  208. print(f"::error:: {e}" if os.environ.get("GITHUB_ACTIONS") else f"ERROR {e}")
  209. print(f" {'FAIL' if errors else 'OK'}: {len(errors)} error(s), {len(warnings)} warning(s)")
  210. return 1 if errors else 0
  211. if __name__ == "__main__":
  212. sys.exit(main(sys.argv[1:]))

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.