Skip to content
CommonHuman-Lab edited this page Apr 26, 2026 · 5 revisions

Requires: OpenCode with NyxStrike MCP configured.

HTB CTF Agent (@htb-ctf)

A 14-specialist agent system designed to autonomously solve Hack The Box machines and CTF challenges end-to-end. Give it an IP or hostname and a goal, and it will drive the full kill chain from initial port scan through privilege escalation to flag capture.

Key features:

  • Confirm before fire — the leader builds a structured attack plan and waits for your yes before any tool runs.
  • Full kill chain: recon → enumeration → foothold → privilege escalation → flag capture → loot report.
  • 14 specialist subagents: recon, web, api, service-enum, and more.
  • Shared state machine via /tmp/htb-<target>/state.json — all agents coordinate through a single canonical file.
  • Anti-loop rules prevent duplicate tool runs, blind wordlist exhaustion, and credential spray.
  • Generates a full markdown report at /tmp/htb-<target>/report.md on completion.

Specialist subagents

Agent Role
planner Produces structured attack plan — no tool calls
recon rustscan → nmap → NSE scripts → autorecon
web Endpoint discovery + XSS, SQLi, SSRF, LFI, SSTI exploitation
api GraphQL, JWT attacks, IDOR, mass assignment
service-enum SMB, FTP, SSH, RPC, SNMP, databases
foothold Exploit-DB, Metasploit, msfvenom, credential-based shells
creds Targeted brute-force with hydra, medusa, netexec
crypto Hash cracking with hashid, john, hashcat; JWT secrets
binary checksec, Ghidra, GDB, ROP chains, pwntools
forensics binwalk, Volatility3, steghide, foremost, pcap analysis
privesc-linux LinPEAS, sudo/SUID/GTFOBins, kernel CVEs, cron, capabilities
privesc-windows WinPEAS, SeImpersonatePrivilege, Kerberoasting, SAM dump, PtH
flag Locates and validates flag files, writes to state
loot Post-exploitation collection, writes final report

Presets

Three presets tune the agent for common machine types. Pass as preset: in your invocation, or call them directly.

Preset Use when
@htb-web Web-heavy machines — aggressive endpoint discovery, API checks, vhost enum
@htb-linux Linux machines — GTFOBins priority, NFS checks, common HTB Linux patterns
@htb-windows Windows/AD machines — SMB-first, Kerberoasting, SeImpersonatePrivilege

Use cases

  • Solving HTB active or retired machines
  • CTF competitions with standard pwn/web/crypto/forensics challenges
  • Practicing a full penetration testing methodology in a lab environment
  • Learning how attack chains are built by watching the agent reason through each phase

Usage

Basic invocation

@htb-ctf target: 10.10.11.23, goal: user and root flags

With a preset

@htb-ctf target: 10.10.11.23, goal: root flag, preset: htb-linux

With extra context

@htb-ctf target: 10.10.11.23, goal: user and root flags, preset: htb-windows, notes: port 5985 open, likely WinRM available

Bug Bounty Agent (@bugbounty)

A 7-specialist agent system designed for autonomous bug bounty hunting. Give it a program name, scope, and goal — it maps the attack surface, discovers endpoints and parameters, tests all viable vulnerability classes, triages findings by severity, and writes a submission-ready report with a working PoC per finding.

Scope enforcement is absolute. Every single tool call is checked against scope[] and out_of_scope[] before firing. No violations.

Key features:

  • Scope-first — scope enforcement is absolute. Every tool call is checked against scope[] and out_of_scope[] before firing. No violations.
  • Confirm before fire — the leader builds a structured attack plan and waits for your yes before any tools run.
  • Full chain: recon → OSINT → enumeration → fuzzing → vulnerability confirmation → report.
  • 7 specialist subagents: recon, osint, web, and more.
  • web and api agents run in parallel during ENUM and VULN phases for broad scopes.
  • P1–P4 severity triage with CVSSv3 scores on every finding.
  • Auto-generated PoC per finding: working curl command + numbered reproduction steps.
  • Final report at /tmp/bb-<program>/report.md — submission-ready markdown.

Specialist subagents

Agent Role
planner Produces scoped attack plan — no tool calls
recon subfinder, amass, httpx, rustscan, nmap, wafw00f
osint Email/employee harvest, JS secret extraction, historical URL discovery
web Dual-mode: endpoint enumeration + XSS, SQLi, SSRF, LFI, SSTI, open redirect testing
api Dual-mode: schema/GraphQL enumeration + IDOR, JWT attacks, mass assignment, BFLA
fuzz arjun, x8_discover, paramspider — full parameter and hidden endpoint discovery
report P1–P4 triage, CVSSv3 scoring, PoC generation, final markdown report

Presets

Three presets tune the agent for different scope types.

Preset Use when
@bb-web Single web application — deep directory brute force, XSS/SQLi/SSRF/LFI focus
@bb-api API-heavy target — schema discovery, IDOR, JWT attacks, mass assignment, GraphQL
@bb-broad Wildcard / mixed scope — full subdomain enum, subdomain takeover checks, parallel web + API

Severity classification

Severity CVSS Examples
P1 — Critical 9.0–10.0 RCE, SQLi with data exfil, account takeover, auth bypass
P2 — High 7.0–8.9 SSRF (internal), stored XSS, IDOR on sensitive data, JWT forgery
P3 — Medium 4.0–6.9 Reflected XSS, open redirect, CSRF, info disclosure
P4 — Low 0.1–3.9 Missing security headers, verbose errors, weak SSL
INFO Interesting, below reportable threshold

Use cases

  • Running structured recon and vulnerability discovery against a HackerOne or Bugcrowd program
  • Mapping a wide wildcard scope to find forgotten subdomains and exposed dev environments
  • Testing API-heavy targets for IDOR, mass assignment, and JWT weaknesses
  • Generating a complete, formatted submission report with reproducible PoCs

Usage

Basic invocation with broad preset

@bugbounty program: HackerOne - Acme Corp, target: *.acme.com, scope: *.acme.com, out_of_scope: blog.acme.com status.acme.com, goal: P1/P2 vulnerabilities

With API preset and extra context

@bugbounty program: Bugcrowd - Acme, target: api.acme.com, scope: api.acme.com, out_of_scope: [], preset: bb-api, goal: IDOR and auth bypass, notes: JWT in Authorization header, Swagger at /api/docs

Web app only

@bugbounty program: HackerOne - Acme, target: https://app.acme.com/, scope: app.acme.com, out_of_scope: [], preset: bb-web, goal: find anything reportable

The agent will respond with a confirmation table before doing anything. Type yes to begin, or describe changes to the plan.

Recon Agent System (@recon)

A 5-specialist agent system built natively for OpenCode, designed for pure read-only information gathering across domains, IP addresses, web applications, and APIs.

Key features:

  • Read-only by contract — no exploitation, no payload delivery, no login attempts, no brute-force under any circumstances.
  • Auto-detects target type (domain, IP, web, API) and invokes only the relevant specialists.
  • 5 specialist subagents: domain, network, web, api, and report — running in parallel where possible.
  • Passive-first: certificate transparency, historical URLs, and OSINT sources always run before active scanning.
  • Nuclei runs in technologies and exposures mode only — no CVE or exploit templates.
  • Structured report at /tmp/recon-<target>-<timestamp>/report.md covering subdomains, open ports, tech stack, API surface, and notable observations.

Clone this wiki locally