s0ld13rr /pentestcode
PentestCode - Multi-agent AI penetration testing system with persistent engagement state, strategic coordination, and parallel autonomous operations.
★ 1,098⑂ 177👁 14⑃ 14● 9▤ 14
1,098
stars
177
forks
14
watchers
14
prs
9
issues
14
releases
README
PentestCode AI penetration testing agent in your terminal. Multi-agent architecture • Engagement state tracking • 20+ LLM providers --- PentestCode is an autonomous pentesting agent for your terminal. Point it at a target and it runs the tools, reads the output, updates its picture of the network, and decides what to do next — the way an operator would. A hard fork of OpenCode (MIT), stripped of the code-editing focus and rebuilt for offensive security. Beta — it holds up on real engagements and CTFs, but expect rough edges. File an issue when something breaks; that's what makes it better. What it does One instruction in, a full attack chain out: you: "pentest 10.10.10.5, goal is domain admin" | Stage | What the agent does | |-------|---------------------| | Scan | nmap -sS -p- finds 7 open ports and parses the XML straight into engagement state | | Recognize | Ports 88 + 389 → Domain Controller. Fans out three enumerators in parallel (SMB, LDAP, HTTP) | | Enumerate | Null SMB session → writable share. LDAP → user list. Gobuster → web dirs | | Attack | AS-REP roast → crackable hash → first valid credential | | Spray | That credential sprayed across SMB, WinRM, LDAP and RDP on every known host | | Exploit | WinRM foothold → post-exploit agent dumps SAM / LSA / DPAPI | | Result | Domain admin hash in hand — every step recorded with its evidence chain | It's methodical where people get lazy: it sprays every credential against every service on every host, and it doesn't forget to check things. Everything it learns lands in a structured state you can query mid-run with /status, /vulns, or /creds. Install bash npm install -g pentestcode-ai via curl curl -fsSL https://raw.githubusercontent.com/s0ld13rr/pentestcode/main/install.sh | bash A single self-contained binary — no Bun, Node, or runtime to install. Linux and macOS, x64 and arm64. Arch Linux (AUR): bash paru -S pentestcode-bin Other options Pin version: bash PENTESTCODE_VERSION=0.1.7 curl -fsSL https://raw.githubusercontent.com/s0ld13rr/pentestcode/main/install.sh | bash Custom directory: bash PENTESTCODE_INSTALL=/usr/local/bin curl -fsSL https://raw.githubusercontent.com/s0ld13rr/pentestcode/main/install.sh | bash From source: bash bun install bun run build --single --skip-embed-web-ui binary at packages/opencode/dist/pentestcode--/bin/pentestcode Quick start bash pentestcode auth login connect your LLM provider pentestcode interactive session pentestcode --prompt "scan 10.10.10.0/24 and enumerate all services" one-shot Works with 20+ providers through ai-sdk — Anthropic, OpenAI, Google, Azure, AWS Bedrock, Ollama, and more. How it works Two things separate PentestCode from a pentester prompt pasted into a chat window: a team of agents and a memory they share. A team, not a monologue The design follows the strategist-coordinator model from HPTSA research — a 4.3× improvement over a sin
Top issues
#22tunnel_manage command injection via credential/host interpolation4 comments · 2026-10-20#21arbitrary file write bypasses the external-directory guard4 comments · 2026-10-20#19FreeTierError: opencode free-tier models fail through packages/opencode driver2 comments · 2026-10-09#24Document DemonRoute as a custom OpenAI-compatible provider example0 comments · 2026-10-31
Latest release
v0.2.7 v0.2.7 2026-10-23What's Changed Security - fix(security): command injection in tunnel_manage and arbitrary file write in report_gen (21, 22) Features - Screenshot tool — capture screenshots during engagements - Subagent kill dialog — TUI dialog to terminate stuck subagents - State query/update extensions — new actions for engagement state - Kernel prompt updates — improved shared operator protocol - Orchestrator mode removal — replaced by inline coordinator doctrine in pentest.txt Skills - 8 new pentest methodology skills (20) — recon-phase, enumeration-phase, vuln-assess-phase, exploitation-phase, playb