PentestGPT is an AI-powered penetration testing agent that orchestrates external tools and models through staged phases for reconnaissance, exploitation, and reporting. It automates penetration testing and CTF challenges using large language models.
Project overview
The project recorded an 86.5% success rate on the XBOW validation-suite, providing benchmark evidence for its automated, multi-stage attack pipeline.
Project type
AI Agent · AI Coding
Use cases
Automation
Deployment
Refer to project documentation
License
MIT
Best for
Developers and security practitioners conducting authorized penetration testing and CTF challenges who need an AI agent to assist in driving tools through structured phases.
Key capabilities
Works through staged phases, feeding each stage's findings into the next. For CTFs, it covers recon to exploit to walkthrough; for pentests, it spans asset discovery to vulnerability identification to report.
A human-in-the-loop legacy mode that runs three cooperating LLM sessions while maintaining a Pentesting Task Tree.
Supports Web, Crypto, Reversing, Forensics, PWN, and Privilege Escalation categories.
Limitations and risks
Support is limited to Web, Crypto, Reversing, Forensics, PWN, and Privilege Escalation categories.
This tool is designed for educational purposes and authorized security testing only; illegal use is not condoned.
Users should be aware that remote model APIs and optional Langfuse telemetry involve sending data to external services.
Getting started
Setup is rated medium difficulty, requiring Python 3.12+ and the uv package manager, along with authenticated Claude Code CLI or Codex CLI. The first success path is to clone the repository, navigate to the PentestGPT directory, run make install, and execute pentestgpt --target <IP>.
Evidence and sources
GitHub project description: Automated Penetration Testing Agentic Framework Powered by Large Language Models
Release: v1.0.0
README: AI-Powered Challenge Solver - Leverages LLM advanced reasoning to perform penetration testing and CTFs
README: The agent works through staged phases (recon → exploit → walkthrough for CTF; asset discovery → vulnerability identification → report for pentests), feeding each stage's findings…
README: The classic, human-in-the-loop PentestGPT from the USENIX 2024 paper is preserved and modernized as `pentestgpt-legacy`. It runs three cooperating LLM sessions