
PentestGPT is an open-source penetration testing tool that points a large language model at a target and lets it reason through the assessment suggesting next steps, interpreting tool output, and in its newer autonomous mode, running the workflow end to end with no human in the loop. It’s one of the clearest examples yet of AI moving from theory into working security tooling, and also one of the clearest examples of why understanding the fundamentals underneath still matters.
What PentestGPT Actually Is
PentestGPT started as academic research. The original version was published at USENIX Security 2024 by Gelei Deng and colleagues, built around three cooperating LLM sessions one reasoning, one generating, one parsing that together maintained a task tree while a human tester drove the session.
That research version still exists as pentestgpt-legacy. Since then the project has added a v1.0 autonomous pipeline, which is a fundamentally different thing: the agent drives the tools itself and decides what to try next, rather than advising a person who does the work.
The Two Modes: Interactive and Autonomous
| Interactive (Legacy) | Autonomous (v1.0) | |
|---|---|---|
| Who runs the tools | The human tester | The agent |
| Human in the loop | Yes, throughout | No |
| Stages | Guided reasoning and documentation | Recon → exploit → walkthrough, or asset discovery → vulnerability ID → report |
| Model support | Broad — OpenAI, Anthropic, Gemini, DeepSeek, xAI, Qwen, Moonshot, local via Ollama | Narrower — driven through Claude Code or Codex |
| Best suited to | Learning, guided practice, documentation | Hands-off runs on authorised targets |
The distinction matters more than it might look. In the legacy interactive mode, PentestGPT does not perform active scanning or exploitation at all the tester still runs Nmap or whatever else themselves and pastes results back in. The autonomous mode is where the agent actually executes.
7 Things to Know About PentestGPT
- It’s genuinely open source and free available on GitHub, not a commercial product with a trial wall.
- The autonomous mode is Claude-only in practice the broader multi-model flexibility (Gemini, DeepSeek, local Ollama models, and others) lives in the legacy interactive mode, not the autonomous pipeline.
- It runs Docker-first for the autonomous pipeline, with 20+ security tools pre-installed, which removes most of the dependency-management pain.
- Sessions can be saved and resumed a run picks up where it left off rather than starting over, which matters for long assessments.
- The legacy mode is a reasoning assistant, not a scanner it advises, interprets output, and helps with documentation; you still run the tools.
- It sends anonymous telemetry by default more on this below, because it’s the detail with real consequences.
- The original research showed a 228.6% task-completion increase over using GPT-3.5 directly on benchmark targets meaningful, but measured against a baseline, not against a skilled human tester.
What PentestGPT Cannot Do
This is the part worth being clear-eyed about, particularly if you’re early in your learning:
- It has no contextual awareness of business risk. It can flag a technical vulnerability; it cannot tell you whether that vulnerability actually matters to the organisation, what compliance obligations apply, or how it ranks against everything else on the list.
- It reasons from learned patterns, which means genuinely novel attack paths or unusual system behaviour can slip past it entirely.
- It has no ethical or legal judgement. Knowing when to stop, what’s in scope, and how to disclose responsibly is not something the tool decides that stays entirely with the person running it.
- In legacy mode it never touches a live system, so every suggestion is only as good as the data you paste into it.
None of these are bugs. They’re the boundary between a reasoning tool and a professional.
It’s also worth noting what the headline research number actually measures. The 228.6% task-completion improvement was benchmarked against using GPT-3.5 directly in other words, it proves the structured multi-module approach beats throwing a raw model at the problem. That’s a real finding, but it isn’t a claim that the tool matches an experienced tester, and it shouldn’t be read as one.
The Telemetry Detail Most People Miss
By default, PentestGPT sends anonymous usage data to a Langfuse project: session metadata such as target type, duration and completion status, which tools ran, and whether a flag was found. Command outputs, credentials, and flag values are not transmitted.
That distinction is worth reading twice if you ever plan to point this at a client environment. “Anonymous metadata only” is a meaningful safeguard, but it’s still outbound data from an engagement, and it’s the kind of detail a client’s legal team will ask about. Opting out takes a command-line flag or an environment variable trivial to do, easy to forget.
What This Means If You’re Learning Penetration Testing
Tools like PentestGPT change how fast someone can work. They don’t change what someone needs to understand.
The people who get real value out of an AI pentesting agent are the ones who can already tell when its suggestion is wrong. If an agent recommends an exploit path, you need enough grounding in networking, web application behaviour and how the underlying tools work to evaluate whether that recommendation makes sense or whether the model has pattern-matched its way to something plausible and useless.
That’s the same reason OWASP and other industry bodies keep emphasising verifiable, hands-on skill rather than tool familiarity alone. The tool is a multiplier on judgement you already have. With no judgement underneath it, there’s nothing to multiply. The MITRE ATT&CK framework exists for a similar reason knowing the actual techniques attackers use is what lets you evaluate whether an automated finding maps to a real-world threat or not.
This is exactly why hands-on lab training matters more as these tools improve, not less. Offenso’s Offenso Certified Security Analyst course is built around exactly that foundation network, web application and wireless penetration testing practised in a real lab environment. If you’re mapping out where to start, our guide on how to become an ethical hacker covers the full path.
PentestGPT FAQ
Is PentestGPT free to use? Yes. PentestGPT is open source and available for free on GitHub, though the LLM providers it connects to may have their own usage costs.
Does PentestGPT replace a human penetration tester? No. It has no awareness of business risk, no ethical or legal judgement, and reasons from learned patterns, so it can miss novel attack paths. It assists a tester rather than replacing one.
What is the difference between PentestGPT’s legacy and autonomous modes? Legacy interactive mode is a reasoning assistant the human runs the tools and pastes results back in. The v1.0 autonomous mode runs the workflow itself with no human in the loop.
Which AI models does PentestGPT support? The legacy interactive mode supports a broad range including OpenAI, Anthropic, Google Gemini, DeepSeek, xAI, Qwen, Moonshot and local models via Ollama. The autonomous pipeline is driven through Claude Code or Codex.
Does PentestGPT collect data about my testing sessions? By default it sends anonymous session metadata target type, duration, which tools ran, and whether a flag was found. Command outputs, credentials and flag values are not transmitted, and telemetry can be disabled via a command-line flag or environment variable.
Can beginners use PentestGPT to learn penetration testing? It can support learning by explaining reasoning and suggesting next steps, but it works best alongside structured training. Without foundational knowledge, it’s difficult to tell when a suggestion is wrong.
Published Date: August 14, 2026