← All articles

Agentic AI Pentesting Explained: How AI Agents Find and Verify Exploits

"AI pentesting" covers everything from a chatbot that explains Nmap output to systems that enumerate a target, pick a technique, run it, read the response and decide what to try next without a human typing commands. Only that last category is agentic, and it works differently from both traditional scanners and human testers. This post explains what an agentic pentest system actually does, grounded in published research: the reasoning loop, tool use, verification, guardrails, and where it still falls short of an experienced engineer.

From scanners to agents

A traditional vulnerability scanner runs a fixed set of checks. It sends known payloads, matches known signatures and reports anything that matches. It doesn't change its plan based on what it learns. If it finds an exposed .git directory, it reports it and moves on. It won't pull the config file, notice a staging hostname and go test that host.

A human pentester works the opposite way. NIST SP 800-115 describes penetration testing in four phases: planning, discovery, attack and reporting. The attack phase loops back into discovery, because each new foothold reveals new targets (NIST SP 800-115, section 5.2). That feedback loop is what separates a pentest from a scan.

An agentic system automates that loop: a language model decides which tool to call next based on what the last one returned.

The plan, act, observe loop

Most agentic pentest systems descend from the ReAct pattern (Yao et al., ICLR 2023). ReAct has a language model produce reasoning traces and actions in an interleaved way. Reasoning helps it "induce, track, and update action plans," and actions let it "interface with external sources... to gather additional information." The authors also reported that grounding the model in real observations reduced the hallucination and error propagation seen in pure chain-of-thought reasoning.

In a security context the loop looks like this:

  1. Plan. Given the scope and what's known so far, decide the next objective, for example "identify which subdomains serve web applications."
  2. Act. Call a tool: a DNS resolver, an HTTP client, a port probe, a JavaScript parser.
  3. Observe. Parse the output into structured facts: host X serves a login page, framework Y, header Z missing.
  4. Update. Add those facts to working memory, re-rank hypotheses and loop back to planning.

Researchers have shown this pattern works for offensive tasks. Fang et al. built a ReAct-style agent with a browser, terminal and code interpreter and reported that it exploited 87% of a 15-vulnerability one-day benchmark when given the CVE description. Without the description, success fell to 7%. That gap is the most useful single data point for anyone evaluating these tools: exploiting a known, described flaw is far easier for an agent than discovering it in the first place. Discovery is the hard part.

Recon, hypothesis, validation

A well-designed agent breaks the work into stages that mirror how a pentester thinks.

Recon

Enumerate what exists: subdomains, resolving hosts, open ports, web technologies, JavaScript bundles, exposed files. This stage is broad and mostly deterministic, so it suits conventional tools driven by the agent.

Hypothesis

Turn observations into testable claims. An agent that sees a CNAME pointing at a cloud hosting provider, with a response matching that provider's "unclaimed resource" page, forms the hypothesis "this subdomain may be vulnerable to takeover." An agent that finds a string resembling a cloud API key inside a bundle hypothesises "this is a live, over-scoped credential."

Validation

Test the hypothesis with the least invasive check that can confirm or refute it, then collect evidence. This is where agents differ most from scanners. A scanner says "signature matched." An agent can run follow-up checks (resolve the CNAME target, compare the response to known fingerprints, check whether the key format is valid for the claimed provider) before deciding whether the finding is real.

OWASP's own guidance shows why that step matters. The current WSTG chapter on subdomain takeover structures testing as enumeration, automated fingerprint detection, then manual validation, and warns that "automated tools produce false positives. Validate each finding manually before reporting it." An agent can do part of that validation. A human should still sign off on anything that ends up in a formal report.

Why verification is the whole game

False positives are the main reason engineers stop reading security tool output. A report full of "potential" findings, mostly noise, burns trust fast.

Verification changes the economics in three ways:

  • Evidence over signatures. Every finding carries the request, the response and the reasoning that connects them, so an engineer can reproduce it in minutes instead of re-investigating from scratch.
  • Pivoting reduces both false positives and false negatives. A weak signal (an interesting header, an unusual redirect) can trigger deeper checks rather than being reported raw or dropped.
  • Severity becomes defensible. A confirmed, reachable issue with evidence can be ranked against others. A pattern match can't.

Research systems show the same pattern. The original PentestGPT paper (USENIX Security 2024) found that LLMs were good at sub-tasks like "using testing tools, interpreting outputs, and proposing subsequent actions" but struggled to "maintain a whole context of the overall testing scenario." Its fix was a modular design that splits reasoning, generation and parsing. Later work such as PentestGPT v2 added typed tool interfaces and evidence-guided attack-tree search, and the authors report that structured tool interfaces reduced trial-and-error LLM calls. In practice that's a lot of what verification comes down to: structure and evidence instead of free-form guessing.

Safety guardrails: scope, read-only, rate limits

An autonomous system that sends traffic to the internet needs hard boundaries that the model can't reason its way around. NIST SP 800-115 is explicit that the planning phase, with rules of engagement and documented management approval, comes before any testing. Agentic systems need the same thing, enforced in code:

GuardrailWhat it preventsHow it's typically enforced
Verified ownershipScanning assets the requester doesn't controlDNS TXT record or matching work email before any scan runs
Scope allowlistAgent "pivoting" into third-party infrastructureEvery tool call is checked against the verified domain set outside the LLM
Read-only checksData modification, destructive payloads, account changesTools exposed to the agent can't write or delete; no state-changing exploitation
Rate limitsAccidental denial of service, WAF lockoutsPer-host request budgets and concurrency caps in the tool layer
Audit loggingUnexplainable behaviourEvery action and observation recorded and attached to findings

The key design principle is that guardrails live in the tool layer, not the prompt. A model told "don't scan out-of-scope hosts" will usually comply. A tool that refuses to resolve a host outside the allowlist always complies.

At SecurityInfinity, scans only run against domains the customer has verified they own, through a DNS TXT record or a matching work email, and checks are read-only. Our agents run recon, web, network and secrets checks, and they pivot when one check surfaces a signal worth following. Every finding ships with evidence and exact remediation, ordered by severity. The internals are covered in how we built our agentic pentest scanner, and the individual checks are listed on our scanners page.

Where AI agents still fall short

Business logic

OWASP's position hasn't changed: business logic flaws "cannot be detected by a vulnerability scanner," and "automation of business logic abuse cases is not possible and remains a manual art relying on the skills of the tester and their knowledge of the complete business process" (WSTG). Agents can reason about some of these patterns better than signature scanners can, but knowing that a refund should never exceed the original charge, or that a "viewer" should never see billing data, requires understanding the business. That context usually lives in people's heads, not in the HTTP responses.

Authentication and multi-role access control

Broken access control sits at #1 in the OWASP Top 10:2021. Testing it properly means logging in as several roles and tenants, mapping what each one should and shouldn't reach, and trying every cross-boundary combination. MFA flows, SSO handoffs and session edge cases are fragile terrain for automation.

End-to-end autonomy on hard targets

The research is mixed. The PentestEval benchmark reported that across 12 realistic scenarios, fully autonomous agents did poorly: PentestAgent reached 3% end-to-end success and VulnBot 6%. Attack decision-making and exploit generation were the weakest stages. On the other hand, a 2026 paper on difficulty-aware attack planning reports up to 91% task completion on CTF benchmarks with frontier models, and compromised 4 of 5 hosts in the GOAD Active Directory lab versus 2 for prior systems. Strong results on structured benchmarks, weak results on open-ended realistic scenarios: that split is the honest state of the field.

The fair reading is that agents have become genuinely capable at well-defined, observable vulnerability classes, and remain unreliable at open-ended, context-heavy work.

Where human engineers remain essential

That leaves a clear division of labour:

  • Agents: continuous breadth. Recon, exposed secrets, misconfigurations, known-vulnerable components, subdomain takeovers and regressions, re-checked on a schedule with evidence attached.
  • Engineers: depth and judgment. Authenticated multi-role testing, authorization models, business logic, attack chaining, confirming severity, and signing their name to a report an auditor or enterprise buyer will rely on.

That's how we've structured SecurityInfinity. Pro scanning runs all the agents with continuous monitoring and compliance mapping for $9/month. When you need a report that holds up in a SOC 2 or ISO 27001 audit, our engineer-delivered pentests add human verification. The authenticated tier ($999) includes multi-role testing, access-control and business-logic review, and a signed attestation letter.

Try it on your own domain

The quickest way to judge agentic testing is to read what it finds on infrastructure you know well. Start a free scan on the Starter plan (100 free credits, one verified domain, no card), or try the deep security scan to watch the agents pivot from recon into deeper checks.

Frequently asked questions

What is agentic AI pentesting?

Agentic AI pentesting uses a language model as a decision-maker that repeatedly plans a step, calls a security tool, observes the result and decides what to do next. Unlike a traditional scanner that runs a fixed checklist, an agent can change course based on what it finds, such as following a leaked hostname into deeper checks on that host.

How do AI pentesting agents reduce false positives?

They validate hypotheses before reporting them. Instead of flagging every signature match, an agent runs follow-up checks and attaches the request, response and reasoning as evidence. OWASP's testing guide still recommends manual validation of automated findings, so the best setups combine agent verification with engineer review for formal reports.

Is agentic AI pentesting safe to run against production?

It can be, if guardrails are enforced in the tool layer rather than left to the model. That means verified domain ownership before any scan, a strict scope allowlist, read-only checks with no state-changing payloads, per-host rate limits and full audit logging. Only test assets you own or are explicitly authorised to test.

Can AI agents replace human penetration testers?

Not today. Published research shows agents doing well on well-defined vulnerability classes but struggling with novel exploitation, long multi-stage attacks and business logic. OWASP states that business logic abuse can't be automated. Agents are best used for continuous breadth, with human engineers handling authenticated, access-control and logic testing.

What standards should an AI pentesting process follow?

NIST SP 800-115 provides the phase structure (planning, discovery, attack, reporting) and stresses rules of engagement before testing. The OWASP Web Security Testing Guide gives test cases for web applications, and the OWASP Top 10 is the usual baseline for mapping and prioritising web findings.

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.