# PentestGPT

> Automated Penetration Testing Agentic Framework Powered by Large Language Models

- Type: agent or tool
- Field: Security
- Repository: https://github.com/GreyDGL/PentestGPT
- GitHub stars: 16598
- Licence: MIT
- Language: Python
- Last push: 2026-07-14
- Page: https://imutechz.in/agents/pentestgpt

## What it is
PentestGPT is an AI-powered autonomous penetration testing agent published at USENIX Security 2024. It drives Claude Code or Codex to run tools and reason through staged pipelines: recon, exploit and walkthrough for CTF challenges, or asset discovery, vulnerability identification and report for pentests. A modernized legacy mode keeps the interactive, human-in-the-loop workflow with multiple LLM providers.

## Features
- Multi-stage pipeline feeding each stage's findings into the next
- Autonomous agent that drives Claude Code or Codex to run tools
- Session persistence to save and resume testing sessions
- Live walkthrough with real-time activity updates
- Covers web, crypto, reversing, forensics, PWN and privilege escalation
- Legacy interactive mode with a Pentesting Task Tree across multiple providers

## Best for
- CTF challenge solving
- Penetration tests producing asset discovery and reports
- Hands-on security learning with live agent feedback
- Interactive multi-LLM testing sessions

## Pros
- Published at USENIX Security 2024
- Backend-pluggable for Claude Code and Codex
- Legacy mode supports OpenAI, Anthropic, Gemini, DeepSeek, xAI, Qwen, Moonshot and local Ollama
- Docker image bundles the tool with both CLIs and persists logins

## Cons
- Requires Python 3.12+ and the uv package manager
- Autonomous pipeline needs Claude Code CLI or Codex CLI installed and authenticated
- Legacy multi-provider mode requires an API key for each provider used

## Install
```
git clone https://github.com/GreyDGL/PentestGPT.git
cd PentestGPT
make install
```

## Usage
```
pentestgpt --target 10.10.11.234
```

Tags: pentestgpt, penetration-testing, security, llm-agent, ctf, claude-code, codex, automation
