PentestGPT
PentestGPT is an AI-powered autonomous penetration testing agent that uses large language models to perform penetration testing and capture-the-flag (CTF) challenges. It solves the problem of manual, time-consuming security assessments by automating multi-stage pipelines. It is for security professionals, ethical hackers, and CTF enthusiasts.
🎬 PentestGPT Installation - AI-Powered Penetration Testing Agent Setup · Gelei Deng
✨ Key features
- AI-powered challenge solver for pentesting and CTFs
- Multi-stage pipeline: recon, exploit, walkthrough for CTF
- Autonomous agent drives Claude Code or Codex
- Session persistence to save and resume tests
- Interactive legacy mode supports multiple LLM providers
- Live walkthrough with real-time activity updates
🎯 Use cases
- Automate penetration testing of web applications and networks
- Solve CTF challenges across web, crypto, reversing, forensics, PWN
- Perform asset discovery and vulnerability identification for pentests
- Generate penetration testing reports automatically
- Practice and learn penetration testing with AI guidance
📦 Installation
🧰 Requirements: Python 3.12+, uv package manager, and either Claude Code CLI or Codex CLI installed and authenticated for autonomous mode; for legacy mode, API keys for desired LLM providers.
git clone https://github.com/GreyDGL/PentestGPT.git
cd PentestGPT
make install # runs uv sync
🚀 Usage
pentestgpt --target 10.10.11.234pentestgpt --target 10.10.11.50 --instruction "WordPress site, focus on plugin vulnerabilities"pentestgpt --target 10.10.11.234 --mode pentestpentestgpt --list-sessions⚠️ Good to know
The tool is for educational and authorized testing only; the 86.5% success rate is a historical research result and not a current regression guarantee.
❓ FAQ
What are the prerequisites for using PentestGPT?
You need Python 3.12+, uv, and either Claude Code CLI or Codex CLI installed and authenticated for autonomous mode. For legacy mode, you need API keys for the LLM providers you want to use.
Can I use PentestGPT with local LLMs?
Yes, the legacy mode supports local Ollama models via an OpenAI-compatible endpoint, e.g., using --reasoning-model ollama:qwen3 --base-url http://localhost:11434/v1.
Does PentestGPT collect any sensitive data?
No, it collects anonymous usage data like session metadata and tool execution patterns, but never command outputs, credentials, or actual flag values. You can opt out with --no-telemetry or setting LANGFUSE_ENABLED=false.
How do I run PentestGPT in Docker?
Build the image with make docker-build, log in once with make docker-login, then run with make docker-run TARGET=... BACKEND=... MODEL=... MODE=... . Logins persist across container recreation.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.