PentestAgent: Open-Source AI Framework for Penetration Testing with Attack Playbooks


PentestAgent is an open-source AI agent framework for penetration testing. Developer Masic from GH05TCREW released it on GitHub. It uses LLMs like Claude Sonnet or GPT-5 via LiteLLM for black-box security assessments.

The tool runs in a terminal user interface with three modes. Users pick assisted chat, single autonomous agent, or multi-agent crew setups. Prebuilt attack playbooks handle web app tests like THP3 workflows. Legal warning stresses authorized targets only to avoid law violations.

Playbooks launch via CLI commands. They guide AI through recon, scanning, and exploitation steps. RAG systems inject domain knowledge. Notes save to loot/notes.json and build shadow graphs for crew mode insights.

Built-in tools include nmap, sqlmap, Playwright browser, and Tavily web search. TUI controls like /target, /tools, and /report give full command. Docker images pack Kali tools like Metasploit.

New HexStrike integration adds advanced pentesting workflows. MCP servers expose scoring tools. Setup scripts handle dependencies on Windows, Linux, or Mac.

GH05TCREW repo README states: “PentestAgent is an open-source AI agent framework for penetration testing. Use only on authorized systems.”ย 

HexStrike docs confirm: “Model Context Protocol framework for pentesting tools integration.”

Core Modes Table

ModeCommandUse Case
AssistDefault chatUser-guided tests
Agent/agent <task>Single autonomous run
Crew/crew <task>Multi-agent orchestration
Playbookrun -t target –playbook thp3_webStructured web attacks

Setup Process

Clone repo and run platform scripts. Configure .env with API keys like ANTHROPIC_API_KEY. Install Chromium via Playwright.

Docker option pulls ghcr.io/gh05tcrew/pentestagent:kali image. Run with environment variables. Local builds use docker compose.

HexStrike installs via scripts/install_hexstrike_deps.sh. Add MCP configs like pentestagent mcp add nmap.

Attack Playbooks

  • THP3-style web assessments.
  • Reconnaissance to exploitation flows.
  • RAG-enhanced domain knowledge.
  • Persistent notes and shadow graphs.

Built-in Tools

  • Terminal: nmap, sqlmap execution.
  • Browser: Playwright automation.
  • Notes: loot/notes.json storage.
  • Search: Tavily API queries.

TUI shows memory usage. Esc stops agents. /memory checks status.

Integration Benefits

HexStrike MCP exposes pentest tools via mcp_servers.json. CLI lists and tests servers. Stability fixes aid long tasks.

  • Test only authorized systems.
  • Unauthorized access breaks laws.
  • Document permission scopes.

FAQ

What is PentestAgent?

Open-source AI pentest framework with playbooks.

Supported LLMs?

Claude Sonnet, GPT-5 via LiteLLM.

Legal restrictions?

Authorized targets only.

Docker images available?

Kali-based with Metasploit.

HexStrike integration?

MCP servers for tool workflows.

Readers help support VPNCentral. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help VPNCentral sustain the editorial team Read more

User forum

0 messages