PentestGPT Explained: The Complete 2026 Guide to AI-Assisted Penetration Testing

PentestGPT is a free, open-source tool that uses large language models to assist with penetration testing. Its legacy interactive mode acts as a reasoning partner — a human runs every tool and pastes results back in for analysis — while its newer v1.0 "Agentic Upgrade" runs an entire testing workflow autonomously through Claude Code. It's genuinely useful for reconnaissance planning, scan interpretation, CTF practice, and report drafting, but it has no understanding of business risk, no legal judgment, and no ability to catch attack paths outside its training patterns. It's a multiplier on a tester's existing skill, not a substitute for it.

 

Tedora Academy | Ethical Hacking & Penetration Testing Training

Table of Contents

  1. What Is PentestGPT?
  2. Legacy Mode vs. the v1.0 Agentic Upgrade
  3. Core Features That Make It Useful
  4. How PentestGPT Maps to the 5 Stages of Penetration Testing
  5. Getting Started: What Setup Actually Looks Like
  6. What PentestGPT Cannot Do
  7. The Telemetry Detail Most Users Miss
  8. Is Using PentestGPT Legal?
  9. Will AI Tools Like This Replace Pentesters?
  10. Why Hands-On Training Still Comes First
  11. FAQ

What Is PentestGPT?

PentestGPT is an open-source, AI-assisted penetration testing framework that connects a large language model to real security tooling and reasons through an assessment step by step — interpreting scan output, recommending a next move, and helping structure the overall testing workflow rather than just answering isolated questions.

It began as academic research, first presented at USENIX Security 2024, built around three cooperating LLM sessions — one handling reasoning, one generating suggestions, and one parsing tool output — that together maintained a running task tree while a human tester stayed in control of execution. That original architecture still ships today as the legacy interactive mode. On top of it, the project has since added a fully autonomous pipeline capable of running a test from reconnaissance to reporting with no person operating the tools directly.

For anyone studying penetration testing as part of a structured cybersecurity course, PentestGPT is one of the clearest real-world examples of AI moving from research paper to practical, daily-use tooling — which is exactly why understanding both its strengths and its blind spots matters before relying on it.

Legacy Mode vs. the v1.0 Agentic Upgrade

The two modes behave in fundamentally different ways, and knowing which one you’re using changes how much oversight the situation actually needs.

  Legacy (Interactive) Mode v1.0 Agentic Upgrade (Autonomous)
Who runs the tools The human tester The AI agent itself
Human oversight Continuous, every step Minimal during the run
Model support Broad — OpenAI, Anthropic, Gemini, DeepSeek, xAI, Qwen, Moonshot, and local models via Ollama Narrow — requires Claude Code specifically
How it operates Advises based on data the human pastes in Runs on a continuous iteration loop, maintaining a context file of its own progress and restarting from that context if it hits a limit
Stops when The tester ends the session It captures the target flag or reaches a maximum iteration count
Environment Flexible, provider of your choice Docker-first, ships with 20+ pre-installed security tools

In legacy mode, PentestGPT never touches a live system — it’s strictly a reasoning layer. The human still runs Nmap, Burp Suite, or whatever else is needed and feeds the output back into the session. In the Agentic Upgrade, the model is the one executing commands, which is exactly why scope discipline and authorization matter more in this mode, not less.

Both modes support resumable sessions, meaning a long-running assessment can be paused and picked back up later instead of restarting from zero — a practical detail for anyone working through a multi-day engagement or a long CTF box.

Core Features That Make It Useful

Interactive, step-by-step guidance. PentestGPT functions less like a search engine and more like an advisor sitting next to you — recommending an approach, then adjusting its next suggestion based on what you feed it back.

A genuine command-line workflow. It runs as a CLI tool with a small set of core commands (asking for the next step, requesting more detail on the current one, viewing an in-session to-do list, or discussing an approach conversationally) — designed to slot into a workflow a tester already has, rather than replacing it.

Strong fit for CTF and lab practice. PentestGPT is particularly well suited to Capture The Flag challenges and platforms like HackTheBox, across categories including web, cryptography, reverse engineering, forensics, and privilege escalation — which makes it a genuinely useful practice companion for students building skills outside of live client work.

Local model support for privacy-conscious setups. For anyone who doesn’t want assessment data leaving their own infrastructure, PentestGPT can run against locally hosted models rather than a cloud API, with support for custom parsers to adapt to different environments.

No blanket refusal on cybersecurity topics. Because it’s purpose-built for penetration testing, it doesn’t apply the same broad content restrictions a general-purpose chatbot might when asked about exploitation techniques — which is exactly why it’s meant for authorized, scoped testing only, not casual experimentation against systems you don’t own.

How PentestGPT Maps to the 5 Stages of Penetration Testing

Penetration testing is traditionally broken into five stages, and PentestGPT’s usefulness looks different at each one.

1. Reconnaissance — Gathering information about the target: domains, subdomains, IP ranges, exposed services, public records. PentestGPT can recommend techniques and tools (like WHOIS lookups or OSINT platforms) and helps a tester define scope clearly before scanning begins.

2. Scanning — Identifying live hosts, open ports, and running services. PentestGPT doesn’t scan anything itself in legacy mode, but it helps structure the scan (which flags to use, which scan type fits the scenario) and interprets the results once they’re pasted back in.

3. Gaining Access — Exploiting a discovered vulnerability. Based on service banners or a CVE identifier a tester provides, it can suggest possible exploitation paths and explain common attack categories like SQL injection or buffer overflows — but actual execution and validation stay entirely in human hands.

4. Maintaining Access — Testing whether persistence is achievable, mirroring how a real attacker might stay embedded in a system. PentestGPT can explain relevant persistence mechanisms for a given OS or service, though it won’t verify any of them in real time.

5. Reporting — Documenting findings with evidence, risk ratings, and remediation guidance. This is arguably where PentestGPT adds the most immediate time savings — helping draft summaries, prioritize findings, and translate technical detail into language a non-technical stakeholder can act on.

Across all five stages, one pattern holds: in legacy mode, the quality of PentestGPT’s output is a direct function of the quality of the input a tester gives it. Vague descriptions produce vague guidance.

Getting Started: What Setup Actually Looks Like

At a high level, running PentestGPT involves cloning the open-source repository, installing its dependencies, and configuring an environment file with either a cloud provider’s API key (OpenAI, Anthropic, Gemini, and others are supported) or a local Ollama endpoint if you’re running a model on your own hardware. Once configured, launching a session starts an interactive prompt where you describe your target and task in plain language, and the tool takes it from there — recommending an initial approach and waiting for you to feed back results from whatever scanning tool you run separately.

The Agentic Upgrade’s setup path is narrower by design: it currently requires Claude Code CLI specifically, running inside a Docker-first environment that comes with the majority of common security tools already installed.

Neither path requires deep DevOps experience, but both assume the person running it already understands what a port scan or a CVE lookup is for — which is precisely the foundational knowledge a structured course builds before AI tooling ever enters the picture.

What PentestGPT Cannot Do

Being clear-eyed about limitations matters just as much as knowing the features, especially for anyone early in a security career.

  • No understanding of business risk. It can flag a technical flaw but can’t judge how much that flaw actually matters to a specific organization, industry, or compliance framework.
  • No awareness of genuinely novel attack paths. Because it reasons from learned patterns, unusual or unprecedented system behavior can slip past it entirely.
  • No legal or ethical judgment. Decisions about scope, authorization, and responsible disclosure remain fully the tester’s responsibility — the tool has no concept of what “in scope” means for a specific client.
  • No real-time system access in legacy mode. Every suggestion is only as good as the data manually provided to it.
  • No creative exploitation instinct. Skilled human testers routinely connect disparate, seemingly unrelated details into a working exploit chain in a way pattern-based reasoning doesn’t reliably replicate.

None of this makes PentestGPT a flawed tool — it marks the boundary between an AI reasoning assistant and a qualified security professional. That boundary is exactly where structured, hands-on training earns its value.

The Telemetry Detail Most Users Miss

By default, PentestGPT sends anonymized session metadata to an external analytics service — details like target type, session duration, which tools were used, and whether the objective was completed. It does not transmit command output, credentials, or captured flag content.

That distinction is reassuring, but it isn’t the full picture. Even anonymized metadata is still outbound data generated during a security engagement, and it’s exactly the kind of detail a client’s legal or compliance team will want disclosed before authorizing a test. Turning telemetry off takes a single flag or environment variable — simple in theory, easy to forget in practice, and something any team using this professionally should build into a standard pre-engagement checklist rather than remembering ad hoc.

Is Using PentestGPT Legal?

Penetration testing itself is legal only with explicit, documented authorization from the system owner — that rule doesn’t change because an AI tool is involved. Running PentestGPT, in either mode, against a system you don’t have written permission to test is unauthorized access in most jurisdictions, regardless of how the request is framed or which mode generated the commands. The tool is built for use inside a properly scoped, authorized engagement — the legal responsibility for staying inside that scope sits entirely with the person running it.

Will AI Tools Like This Replace Pentesters?

No — and the reasoning is consistent across every serious analysis of the tool. AI-assisted platforms like PentestGPT accelerate reasoning, planning, and documentation, but active scanning, exploitation, and validation still require hands-on execution paired with ethical judgment and business context that current models don’t reliably provide. The realistic trajectory isn’t AI replacing testers — it’s testers who are fluent with AI tooling working faster than those who aren’t, while the underlying skill requirement (knowing when a suggestion is wrong) stays exactly as important as before.

Why Hands-On Training Still Comes First

Tools like PentestGPT change how fast a tester can work. They don’t change what a tester needs to understand.

The professionals who get real value from an AI-assisted pentesting tool are the ones who can immediately tell when its suggestion is wrong. Evaluating a recommended exploitation path requires genuine grounding in networking fundamentals, web application behavior, and how the underlying tools actually function — without that foundation, there’s no reliable way to separate a useful suggestion from a confident-sounding one that doesn’t hold up under a real target.

This is exactly the foundation Tedora Academy’s programs are built around before AI tooling ever enters the conversation:

  • CJPT (Certified Jr. Penetration Tester) — a 6-month track combining 160 hours of networking, Linux, Python, cloud, and offensive security training with a 60-day hands-on internship, so students build the judgment to evaluate a tool like PentestGPT rather than just operate it.
  • CTAPT (Cyber Threat Analysis And Penetration Tester) — a fast, 30-day, 100%-hands-on program covering reconnaissance through reporting on a live cyber range, ideal for building the fundamentals AI tooling assumes you already have.

A tool is only a multiplier on the skill already underneath it. With no judgment to multiply, the multiplier does nothing.

FAQ

What is PentestGPT used for? It supports penetration testers through interactive and autonomous workflows, offering strategic guidance, scan interpretation, and reporting help across reconnaissance, scanning, exploitation planning, and documentation.

Is PentestGPT free to use? Yes, it’s fully open source and free to run, though the underlying LLM provider you connect it to (OpenAI, Anthropic, etc.) may charge for API usage.

What’s the difference between PentestGPT’s legacy and autonomous modes? Legacy mode is a reasoning assistant — a human runs every tool and shares results with the AI. The v1.0 Agentic Upgrade runs the entire testing workflow independently through Claude Code, operating on a continuous iteration loop until it captures the flag or hits a maximum iteration limit.

Does PentestGPT collect data during sessions? By default, yes — anonymized metadata covering target type, session duration, tools used, and completion status. Command output, credentials, and flag content are never transmitted, and telemetry can be disabled with a flag or environment variable.

Is PentestGPT good for CTF practice? Yes — it’s particularly well suited to Capture The Flag challenges and platforms like HackTheBox, with support across web, crypto, reversing, forensics, and privilege-escalation categories, making it a strong supplementary practice tool alongside structured lab training.

Can beginners learn penetration testing using PentestGPT alone? Not effectively. Without foundational networking, Linux, and web application knowledge, it’s genuinely difficult to know when the tool’s suggestion is wrong — which is exactly the gap a structured, lab-based course like Tedora Academy’s CTAPT or CJPT program is built to close first.

Does PentestGPT replace the need for professional penetration testing services? No. Its legacy mode is explicitly a research-driven, human-guided assistant, and even the autonomous mode still requires oversight for scope, authorization, and validation — organizations needing compliance-grade or regulatory testing still need qualified human testers.


Published Date: 6 September,2026

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top