All field notesBook a 30-min call

What AI-Assisted Penetration Testing Is Good For

Agent-driven pentesting is fast, cheap, and finds real bugs. It also sends real attack traffic. Here is how I scope it, run it, and decide which findings are real.

AI pentesting tools are no longer a scanner with a chat window. The newer ones use a planner to break a goal into tasks and hand them to several worker agents. The workers send real requests, read the responses, and keep going until they can prove something. Against a deliberately vulnerable practice app, one run found SQL injection on the login form, an IDOR, a missing admin authorization check, and a second injection in about 90 seconds.

That speed is the appeal, and also the risk. Here is how I run these tests and what I've learned about where they help.

It is an attacker, not a scanner

A scanner checks for known signatures. An agent improvises. It forges tokens, tries path tricks, and uses each response to choose the next request. It reports a finding only when it can show impact, such as data it should not have been able to read.

So treat it the way you'd treat a human tester:

  • Get written scope, host by host. "Our domain" is not enough. List the exact hostnames, whether active exploitation is allowed, the test window, and exclusions such as logout, payment, and anything that deletes data.
  • Tell whoever watches the alerts. Weekend traffic from an unfamiliar IP probing auth endpoints is exactly what a security team should be paged about.
  • Set limits the agent can't override. I keep it to about 2 requests per second per host and have it back off on 429s and 5xxs. Brute force, data changes, and anything aimed at cloud control planes or shared CDN paths are banned. New hosts the agents discover need my approval before they're touched.

Check what each host really is

Recon often changes the plan. On one test, the hostname in scope turned out to be a static single-page app served from object storage. There was nothing server-side to break. The real logic lived on an API host and an auth host that weren't in the written scope yet. The right move was to ask for those hosts to be added to the scope, not to test them anyway.

Third-party services behind your own hostnames need the same care. If a hosted identity provider runs your login domain, probing it means testing that vendor, not your app. I mark those hosts note-only unless the provider's testing policy allows more.

Practice on a target you own

Before pointing agents at production, I run them against a local copy of OWASP Juice Shop on an isolated network. It shows how the planner and workers behave, how fast they spend their budget, and what their evidence looks like, with no authorization questions.

Budgets are a kill switch, not a cost control

Model costs are small. A multi-agent run of roughly an hour against a real target cost a few dollars on a low-cost model.

The budget matters because agent loops can burn through context without producing anything. Size it to the work. Each worker reserves its estimated token use when it starts, so three workers running on a budget sized for one will stall in under a minute. My first live run did exactly that. Now I size the budget for every worker plus the planner's rounds, and cap the run with a deadline.

What it actually finds

Tested from outside without a login, a well-run SaaS app usually holds up on the basics. Forged JWTs (alg: none, or HS256 signed with the public key), spoofed headers such as X-Original-URL and X-Forwarded-For, and path normalization tricks typically fail. That is useful to know too.

The findings that do turn up tend to sit where one layer assumes another one is checking:

  • Edge rules that match strings, not routes. A CDN function blocked an internal API prefix only in lowercase. A capitalized variant got past it to an origin that did no auth checks of its own.
  • Auth gates that only check that a token header exists. Sending Authorization: Bearer garbage returned the full API schema and interactive docs, a ready-made map of every admin route.
  • Downstream requests built from caller input. An internal endpoint fetched records using IDs taken straight from the request body. That is a natural starting point for SSRF or cross-tenant access.
  • Hygiene gaps that make everything else easier. Public source maps containing the full front-end source, open redirects on logout URLs, wildcard CORS, and overly broad CSP rules.

The fix is usually the same: enforce authorization at the origin, where the code runs, instead of relying on whatever sits in front of it.

Every finding gets a human

Agents overstate. A static host that returns 200 for every method looks like an open write until you check that the content never changed. So before anything goes in a report:

  • I reproduce it myself with a single request and keep that request as evidence.
  • I rate severity by what it actually exposes, not by the agent's label.
  • After the fix ships, I rerun that same request and confirm it now fails.

Know what wasn't tested

An unauthenticated pass only tests what an outsider can reach. Most SaaS breaches happen behind the login: one tenant reading another's data, a regular user calling admin routes, or IDs that can be swapped. Testing that needs a low-privilege account in a staging environment. A report that doesn't say what was out of scope suggests more coverage than you got.

What carries over

  • Scope it like a human test. The agents send real attack traffic.
  • Don't let one layer stand in for another. Most findings came from trusting an edge rule or gateway to do the origin's job.
  • Verify and retest by hand. Keep the same single-request reproduction for before and after the fix.

If you want to know what an outsider can reach in your production app, an agent-driven pass is a cheap first look. Just make sure someone owns the scope, the limits, and the findings.