GreyDGL /PentestGPT

Automated Penetration Testing Agentic Framework Powered by Large Language Models

★ 16,429⑂ 2,878👁 378⑃ 175● 338▤ 11
PythonMITCreated 2023-02-27
Download: v1.0.0PentestGPT-1.0.0 ↓1.0.02025-12-24
+9
Daily
16,429
stars
2,878
forks
378
watchers
175
prs
338
issues
11
releases

README

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![Discord][discord-shield]][discord-url]





PentestGPT

  
    AI-Powered Autonomous Penetration Testing Agent
    
    Published at USENIX Security 2024
    
    
    Official Website: pentestgpt.com »
    
    
    Research Paper
    ·
    Report Bug
    ·
    Request Feature
  





---

 Demo

 Installation


Watch on YouTube

 PentestGPT in Action


Watch on YouTube

---

 What's New in v1.0 (Agentic Upgrade)

- Multi-Stage Pipeline - The agent works through staged phases (recon → exploit → walkthrough for CTF; asset discovery → vulnerability identification → report for pentests), feeding each stage's findings into the next.
- Autonomous Agent - Drives Claude Code or Codex to run tools and reason without human intervention.
- Session Persistence - Save and resume penetration testing sessions.

 The autonomous CTF pipeline is backend-pluggable for Claude Code and Codex. The interactive
 modernized legacy mode (pentestgpt-legacy) supports a wider provider set: OpenAI, Anthropic,
 Google Gemini, DeepSeek, xAI, Qwen, Moonshot, and local Ollama. See
 Interactive Multi-LLM Mode.

---

 Features

- AI-Powered Challenge Solver - Leverages LLM advanced reasoning to perform penetration testing and CTFs
- Live Walkthrough - Tracks steps in real-time as the agent works through challenges
- Multi-Category Support - Web, Crypto, Reversing, Forensics, PWN, Privilege Escalation
- Real-Time Feedback - Watch the AI work with live activity updates
- Extensible Architecture - Clean, modular design ready for future enhancements

---

 Quick Start

 Prerequisites

- Python 3.12+
- uv - Python package manager
- Claude Code CLI (claude) - installed and authenticated for local Claude runs. See Claude Code docs
- Codex CLI (codex) - installed and authenticated for local Codex runs. The Docker flow below bundles both CLIs.

 Installation

bash
git clone https://github.com/GreyDGL/PentestGPT.git
cd PentestGPT
make install     runs uv sync


 Commands Reference

| Command | Description |
|---------|-------------|
| make install | Install dependencies |
| make test | Run all tests |
| make check | Run lint + typecheck |
| make build | Build distributable package |

---

 Usage

bash
 Run against a target (CTF mode by default)
pentestgpt --target 10.10.11.234

 With challenge context
pentestgpt --target 10.10.11.50 --instruction "WordPress site, focus on plugin vulnerabilities"

 Penetration-test mode (asset discovery → vulnerabilities → report)
pentestgpt --target 10.10.11.234 --mode pentest

 List previously saved sessions
pentestgpt --list-sessions


The agent works through a multi-stage pipeline, feeding each stage's findings into the next — recon → exploit → walkthrough for CTF, asset discovery → vulnerability identification → report for pentest.

 

Top issues

Discussions

Latest release

v1.0.0 v1.0.0 2025-12-24
Highlights
  - Agentic penetration testing pipeline
  - Terminal UI with real-time activity feed
  - 86.5% success rate on XBOW benchmark (90/104)
  - Docker-based deployment

See benchmark results for details."

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON