GreyDGL/PentestGPT

Automated Penetration Testing Agentic Framework Powered by Large Language Models

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 57 minutes ago
Added to GitGenius on December 19th, 2025
Created on February 27th, 2023
Open Issues & Pull Requests: 70 (+0)
Number of forks: 2,626
Total Stargazers: 15,039 (+2)
Total Subscribers: 356 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 26.3 hours
Mean response time: 64.3 days
90th percentile: 257.0 days
Tracked items: 213

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 100% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 14% of issues opened in the past year have been closed. Three people close 87% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 58
New in 7 days: 6
Closed in 7 days: 1
Avg open age: 162 days
Stale 30+ days: 46
Stale 90+ days: 35

Recent activity

Opened in 7 days: 4
Closed in 7 days: 1
Comments in 7 days: 3
Events in 7 days: 4

Top labels

  • enhancement (5)
  • bug (4)

Most active issues this week

Detailed Description

PentestGPT is an AI-powered autonomous penetration testing agent built in Python that leverages large language models to automate security testing and capture-the-flag challenges. The project was published at USENIX Security 2024 and represents a significant evolution in applying LLM reasoning to cybersecurity tasks. The codebase has attracted interest from developers across major technology projects, as evidenced by GitGenius linking this repository to microsoft/vscode, microsoft/typescript, and rust-lang/rust through overlapping contributor networks.

The core functionality centers on an agentic framework that runs in an iteration loop, maintaining a context file with progress and restarting with prior context when hitting computational limits. The agent terminates either upon flag capture or after reaching a maximum iteration count, defaulting to ten iterations. This autonomous approach differs fundamentally from earlier interactive modes, as the agent operates continuously without requiring human intervention between steps. The framework supports multiple challenge categories including web exploitation, cryptography, reverse engineering, forensics, privilege escalation, and binary exploitation.

Version 1.0 introduced the agentic upgrade, which added the iteration loop mechanism, autonomous agent capabilities, and session persistence functionality. Users can save and resume penetration testing sessions, allowing long-running assessments to be paused and continued. The modernized legacy mode, accessible via pentestgpt-legacy, preserves the original USENIX 2024 implementation as a human-in-the-loop system. This mode runs three cooperating LLM sessions for reasoning, generation, and parsing while maintaining a Pentesting Task Tree that users drive interactively through commands like next, more, todo, and discuss.

The legacy mode supports extensive multi-model functionality across eight LLM providers. OpenAI models include gpt-5.5, gpt-5.5-pro, gpt-5.4-mini, and others. Anthropic provides claude-opus-4-8, claude-sonnet-4-6, and claude-haiku-4-5-20251001. Google Gemini, DeepSeek, xAI Grok, Alibaba Qwen, Moonshot Kimi, and local Ollama instances are all supported through their official SDKs. The model registry lives in pentestgpt_legacy/llm/registry.py and can be extended by adding single ModelSpec entries.

Benchmark results demonstrate strong performance on the XBOW validation suite with an 86.5% success rate across 104 benchmarks. Successful runs averaged $1.11 in cost with a median of $0.42, and averaged 6.1 minutes with a median of 3.3 minutes. Success rates varied by difficulty level: 91.1% for Level 1, 74.5% for Level 2, and 62.5% for Level 3 challenges.

The project implements anonymous telemetry collection through Langfuse to track session metadata, tool execution patterns, and flag detection events, explicitly excluding sensitive data like command outputs, credentials, or actual flag values. Users can opt out of telemetry collection. The repository uses Python 3.12 or higher, the uv package manager, and Claude Code CLI for its primary agent implementation. Development commands include make install, make test, make check, and make build. The project is distributed under the MIT License with support from Quantstamp and NTU Singapore.