← All articles

What Is an AI Pentest Agent? How Autonomous Security Testing Works

An AI pentest agent is a piece of software that uses a language model to decide which security test to run next, runs it through real tools, reads the result and chooses its next step, without a person typing each command. Where a scanner runs a fixed checklist, an agent changes its plan based on what it finds. That lets it follow a lead from a leaked hostname to a forgotten staging app to an exposed admin panel. This guide covers what an agent is built from, what it can realistically find, where it fails, and how to judge one before you point it at your production domain.

If you want the reasoning loop itself (plan, act, observe, update) explained in depth, we covered that in Agentic AI Pentesting Explained. This post is about the agent as a product: its parts, its outputs and how to evaluate it.

The five parts of an AI pentest agent

Every serious agent, research or commercial, is built from roughly the same parts. When a vendor says "AI-powered", ask which of these it actually has.

ComponentWhat it doesWhat goes wrong without it
Planner (the model)Picks the next objective from what's known so farYou get a scanner with a chatbot bolted on
Tool layerDNS resolvers, HTTP clients, port probes, JS parsers, template enginesThe model "imagines" results instead of measuring them
Working memoryStructured record of hosts, tech, endpoints, hypothesesThe agent loses track on long runs and repeats work
Scope and safety guardrailsHard limits on which targets and which actions are allowedOut-of-scope traffic, destructive requests
ValidatorsIndependent checks that confirm a finding before it's reportedHallucinated or unconfirmed "critical" findings

The planner gets the attention, but the last two rows decide whether the agent is safe and useful.

Why memory and task splitting matter

Language models are good at individual steps and weaker at holding a long engagement in their heads. The PentestGPT paper found exactly that: LLMs were proficient at sub-tasks like "using testing tools, interpreting outputs, and proposing subsequent actions" but struggled to maintain "an integrated understanding of the overall testing scenario." Their fix was to split the work into separate modules that talk to each other, which produced a 228.6% task-completion increase over the GPT-3.5 baseline on their benchmark.

Later work pushed the same idea further. Researchers at the University of Illinois built HPTSA, where a planning agent explores the target and launches specialised sub-agents, and reported improvements of up to 4.3x over prior agent frameworks on a benchmark of 14 real-world vulnerabilities. The pattern for buyers: an agent that delegates to specialised workers (recon, web, network, secrets) tends to hold up better than one model doing everything in a single long conversation.

Validators are the difference between signal and noise

An agent that reports whatever the model believes is worse than a scanner, because its false positives come with confident explanations. The better systems add a separate confirmation step. XBOW, which publicly documented its run on HackerOne, describes validators as "automated peer reviewers". For cross-site scripting, a headless browser visits the page to confirm the payload actually executed. Look for that pattern: a finding should be proven by a check that doesn't depend on the model's opinion.

What an AI pentest agent actually does on a run

Here is what a typical external run looks like against a domain you own. It's a simplified, hypothetical walk-through, not a transcript.

  1. Seed. You give it example.com. It confirms the domain is in scope.
  2. Enumerate. It collects subdomains from certificate transparency logs, DNS and archived URLs, then resolves which ones are live.
  3. Fingerprint. For each live host it records the server, framework and CDN, plus open ports and TLS configuration.
  4. Branch. Different hosts trigger different work. A host returning a dangling CNAME gets a takeover check. A React app gets its JavaScript bundles pulled and searched for keys and hidden API routes. A host on an old framework version gets checked against known CVE templates.
  5. Pivot. A newly discovered API route from step 4 feeds back into enumeration, so the agent tests endpoints no sitemap listed.
  6. Validate. Each candidate finding gets a confirming check, such as whether the key format matches the claimed provider or whether the bucket really lists objects anonymously.
  7. Report. Confirmed findings are ordered by severity, with evidence and a specific fix.

Step 5 is what separates an agent from a scanner. A scanner would report the leaked route in a JS file as an informational finding. An agent goes and tests it.

The kinds of issues agents find reliably

Agents do best on issues that can be confirmed mechanically from outside:

  • Exposed secrets in JavaScript bundles and public repos (see how to scan JS bundles for leaked API keys)
  • Subdomain takeovers and dangling DNS
  • Publicly readable cloud storage (checking S3 exposure)
  • Outdated software with known CVEs
  • Weak TLS, missing security headers, exposed admin panels and debug endpoints
  • Undocumented API endpoints and some injection classes

Where AI pentest agents still fall short

Be clear-eyed about the limits, because some vendors aren't.

Finding vs exploiting. In the one-day exploitation study by Fang et al., a GPT-4 agent exploited 87% of 15 known vulnerabilities when given the CVE description, but only 7% without it. Discovering an unknown flaw is much harder than exploiting a described one.

Business logic. Whether user A can approve their own refund, or whether a trial account can reach a paid feature by replaying a request, depends on intent that isn't visible in HTTP responses. An agent can test some authorization patterns if given multiple accounts, but deciding what should be forbidden still needs someone who understands the product.

Human review is still in the loop, even at the top end. XBOW submitted nearly 1,060 vulnerabilities on HackerOne, and the company notes its security team reviewed them pre-submission to comply with HackerOne's policy on automated tools. Of those, 208 were marked duplicates and 209 informative. That's an impressive result, and it also shows that volume needs triage.

Authenticated depth. Most agents run unauthenticated by default. Anything behind login (IDOR, privilege escalation across roles) needs credentials, test accounts and usually a human reviewer. Our authenticated vs unauthenticated pentesting post covers that gap.

For a fuller side-by-side, see agentic AI pentesting vs traditional pentesting.

How to evaluate an AI pentest agent

Before you trust an agent's output, or let it touch your infrastructure, ask these questions:

  1. How does it enforce scope? It should refuse targets you haven't proven you own or are authorized to test. Ownership checks such as a DNS TXT record are a good sign.
  2. Is it read-only, and can it prove it? Ask what actions it is allowed to take. Payloads that write data, send emails or create accounts on a production system need explicit consent.
  3. What does a finding contain? You want the request, the response, the reasoning and a reproduction path, not just "AI detected possible SQLi."
  4. How are findings validated? Ask whether confirmation is programmatic (a browser executing a payload, a bucket listing returning objects) or just the model's opinion.
  5. Does it pivot? Give it a domain and see whether it tests endpoints that appear only in JS bundles or archived URLs. If it only tests what you listed, it's a scanner.
  6. Can it re-test? Fix a finding, re-run and confirm the agent marks it closed.
  7. What does the report look like? If you need it for SOC 2 or a customer questionnaire, check whether an auditor will accept it. See what a verified pentest report looks like.

How SecurityInfinity's agents work

SecurityInfinity runs autonomous agents for recon, web, network and secrets checks. They only run against domains you've verified you own, either with a DNS TXT record or a matching work email, and scans are read-only. Each agent runs checks in context and pivots on what it finds, rather than working through a fixed list. The underlying checks include certificate transparency lookups for subdomains, a JavaScript secrets scanner and API endpoint discovery for REST and GraphQL routes. Every finding comes with evidence and an exact fix, ordered by severity.

The engineering details are in how we built our agentic pentest scanner.

When you need a human-verified report, the Startup Pentest adds engineer verification of high and critical findings, a PDF report and a signed attestation letter in 3 business days. Scope and authorization are confirmed by email or a 15-minute call before testing starts.

Try an agent on your own domain

The fastest way to understand what an AI pentest agent finds is to run one on something you own. Start a scan on the free Starter plan (100 credits, one verified domain, no card), or see pricing for continuous monitoring with all four agents.

Frequently asked questions

Can an AI pentest agent replace a human penetration tester?

Not entirely. Agents are fast and consistent at recon, known-vulnerability checks, secrets exposure and misconfigurations, and they can chain findings together. They're weaker at business logic and authorization flaws that depend on understanding what the product is supposed to do. Most teams use an agent for continuous coverage and a human-verified pentest when they need a report.

Is it safe to run an AI pentest agent against production?

It can be if the agent enforces scope and limits itself to non-destructive checks. Look for proof-of-ownership before scanning, read-only testing by default, and clear documentation of what requests it sends. Never run an agent against systems you don't own or aren't authorized to test.

How is an AI pentest agent different from a vulnerability scanner?

A scanner runs a fixed list of checks and reports matches. An agent chooses its next check based on previous results, so a leaked hostname or hidden API route becomes a new target instead of a line in a report. Good agents also validate findings before reporting them, which cuts false positives.

Do AI pentest agents hallucinate vulnerabilities?

The language model can produce wrong conclusions, which is why the tool layer and validators matter. A well-built agent only reports findings confirmed by an independent check, such as a browser executing a payload or an API response proving exposure. Ask any vendor how findings are validated before trusting their severity ratings.

Will an AI pentest agent's report satisfy SOC 2 auditors?

It depends on what your auditor and customers expect, so ask them before you buy. What matters is usually the report itself: clear scope, methodology, evidence for each finding and remediation status. Customers reviewing vendors often ask for an attestation letter as well. See SOC 2 penetration testing for what auditors typically look for.

Find what attackers can see, before they do.

AI pentesting agents test your web app, API and cloud, and every finding comes with evidence and a fix. First report in about 10 minutes.

Stay ahead of attackers.

New vulnerabilities, breach write-ups and practical fixes. A few emails a month.