AI Penetration Testing Explained: How Claude Agents Find Vulnerabilities That Legacy Scanners Miss
Pentestas Team
Security Analyst

A legacy scanner matches signatures. An AI pentest reasons about your app.
This post covers what an AI pentest actually is, how Pentestas's Claude-powered agent pipeline works, and why a pentest as a service powered by AI produces dramatically different results than the tools you already own.
The Problem
Why "run more scans" stopped working
The traditional vuln-scanner playbook — point it at staging once a quarter, read the CSV, ignore 80% of the findings — broke around 2020. Three things happened:
- Apps got smarter. Single-page React apps, server-rendered API routes, GraphQL, serverless functions, and 15 microservices per company mean the "scan the homepage + follow the links" crawler misses half your attack surface on day one.
- Attackers got faster. A criminal with Claude Code can weaponise a CVE in an afternoon. The annual pentest cycle assumes defenders move on calendar time; attackers move on API time.
- Compliance raised the bar. PCI DSS 4.0, SOC 2 CC7, HIPAA Security Rule, DORA, NIS2 — every major framework now demands continuous security testing. "One pentest per year" no longer satisfies auditors.
"Run more scans" doesn't fix this because the bottleneck isn't scanning — it's triage. Every extra scan produces more false positives, which means more engineering time deciding what's real. At some point your security team becomes a finding-processor for the scanner.
The Breakdown
What makes an AI pentest different
An AI pentest flips the bottleneck. Instead of firing every payload and hoping, it plans attacks like a human pentester: reads your app, reasons about the architecture, picks probes that match the stack, fires them in a specific order, and only reports findings it was able to exploit end-to-end.
The Pentestas AI pentest pipeline runs five phases:
- Reconnaissance — a Claude agent crawls your app with headless Chromium, correlates what it sees with your source code (if available), and builds a comprehensive attack-surface map: every route, every parameter, every auth check, every input sink.
- Vulnerability analysis — five specialist agents (one each for Injection, XSS, SSRF, Auth, Authz) read the attack surface and produce ranked lists of exploitable hypotheses. Each hypothesis specifies the exact payload to try and the oracle for confirming success. The Authz specialist caps at 25 hypotheses per scan; the SSRF specialist atQuality over quantity.
- Exploitation — parallel exploit agents fire the hypothesis queue using real-world attacks: SQLi payloads with time-based blind oracles, XSS with headless-Chromium JS-execution hooks, SSRF with out-of-band DNS callbacks, JWT forging, IDOR probes against adjacent IDs. A strict "no exploit, no report" policy applies — if the agent can't demonstrate impact, the finding is discarded.
- Attack-chain synthesis — a chain agent reads every validated finding and links them into multi-step compromise paths. "File upload + missing MIME check + SVG rendering = stored XSS on admin profile" is one chain. "Path traversal on /etc/passwd + SSH keys in user home + outbound SSH allowed = LAN lateral movement" is another. Individual findings may be MEDIUM; the chain is usually CRITICAL. Chains are rendered as an interactive mindmap.
- Report — a final agent consolidates everything into a pentester-grade report with copy-and-paste PoCs, CVSS 3.1 scores, CWE + OWASP mappings, stack-specific remediation code, and (optionally) the line of source code that caused the bug.
Every step is verified by a separate Accuracy Gate that re-fires the proven payload through an independent HTTP client with a fresh session. If the signal doesn't reproduce, the finding is filtered out. If it reproduces, it's marked verified: true and survives to the final report.
The net effect: an ai pentest that reports 20 findings produces 18–20 actionable issues. A legacy scanner reporting 200 findings produces ~40 after triage.
The Problem
Why Claude specifically
The Pentestas pipeline uses three Claude model tiers matched to task complexity:
- **Small (Haiku 4.5)*for summary generation, finding narratives, log classification. Fast, cheap.
- **Medium (Sonnet 4.6)*for per-category vulnerability analysis, attack-chain synthesis, exploit planning, tool-use during exploitation. The balanced workhorse.
- **Large (Opus 4.6)*for source-code architecture analysis — reading a 100Ktoken codebase and extracting the entire security model. Only fires when you supply source code.
Three-tier routing cuts LLM costs ~60% vs. "Sonnet everywhere" while improving quality on the tasks that need maximum capability. Shops running Pentestas on bring-your-own-Anthropic-key configurations report single-digit-dollar AI bills per scan.
How It Works
How this maps to different industries
Fintech + payments
PCI DSS 4.0 requires authenticated penetration testing of the full cardholder data environment annually and after any "significant change". In practice, your team ships significant changes every sprint. An ai pentest lets you re-run the full PCI-relevant scan against your staging environment on every merge to main — not instead of your annual human pentest, but as the continuous supplement that keeps compliance real between engagements. Authenticated scans handle 2FA/TOTP, refresh OAuth tokens mid-run, and can drive a WebView2 browser through multi-step login flows. Findings like auth bypass, JWT weakness, or IDOR on /api/accounts/{id} — the ones most likely to end up as payment-processor incidents — are exactly what the five-specialist agent pipeline is tuned to catch.
Medtech + healthtech
HIPAA's Security Rule requires covered entities to "implement procedures for periodic technical evaluation". Health data doesn't forgive the quarterly compliance-theatre scan missing an unauthenticated /api/patient/{id} endpoint. Pentestas's Authz specialist — the agent tuned for IDOR, BFLA, and mass-assignment — caps at 25 hypotheses per scan and will produce proof-of-exploit evidence for every one it confirms. Every finding includes the exact source-code line (when white-box mode is on) so your engineers don't spend an afternoon figuring out where the vuln lives. The platform's per-tenant Fernet encryption and optional BYOK (AWS KMS / Azure Key Vault / GCP KMS) satisfy the technical-safeguard side of HIPAA.
Legaltech
Legal document platforms are attractive targets — the data is inherently sensitive, and the user base skews less technical. Stored XSS in a case-note field that fires on the next reviewer's session is the kind of finding that ends up in a breach disclosure. Pentestas's stored-XSS probes fire through a real headless Chromium instance with JS execution hooks; a probe only "works" if a real browser executes the payload on a second user's render. Zero theoretical reports.
Banks + financial services
Banks typically run three security programmes in parallel: continuous internal scanning, quarterly external pentest, and an annual red-team engagement. The AI pentest slots in between "internal scan" (too noisy) and "external pentest" (too rare). Because the Pentestas platform supports agents running inside your network — both a Python Linux agent for headless deployments and a native .NET Windows agent with an embedded browser for scan-as-you-browse — you can run an ai pentest against internal admin panels, intranet apps, and staging environments that the public internet never sees. Continuous authenticated ai pentest against an internal corp app would have cost $500K/year in consultancy fees in 2019; in 2026 it's a $5–10K Pentestas subscription.
Insurance
Insurance carriers face the double-threat of high-value PII and regulatory scrutiny from the NAIC Insurance Data Security Model Law, GDPR, and state-level regulators. The pentest as a service model gives underwriters a continuous attestation of security posture they can show auditors, not a one-off PDF that goes stale 24 hours after it's printed. Scheduled ai pentest on every production deploy, with SOC 2-friendly evidence retention, is a much easier story to tell a regulator than "we did a pentest nine months ago".
The Breakdown
What to watch out for
AI pentesting is not a silver bullet. Three honest caveats:
- **White-box access unlocks 2× the findings.*Running Pentestas without
source_codeaccess is still valuable but misses the class of findings where the bug is obvious from the code but unreachable via external crawling (a specific endpoint that requires a magic header, a backup file at an unguessable path, a conditional that only triggers on specific data). If your engagement allows it, supply the repo.
- **LLMs hallucinate at the margins.Pentestas mitigates this with the Accuracy Gate"no exploit, no report" rule, but no system is perfectly hallucination-proof. Every CRITICAL finding ships with a copy-and-paste PoC — run itbefore you page someone.
- **Model rate limits.*A full ai pentest against a medium-complexity SaaS takes 30–90 minutes and fires thousands of LLM calls. If you're on the Anthropic subscription-plan path, enable the
subscriptionretry preset so Pentestas backs off during the 5-hour rolling rate-limit window rather than failing the scan.
Get Started
Try it
Running a Pentestas ai pentest against your staging environment takes two commands:
pentestas login # paste your API key
pentestas start -u https://staging.example.com -c scan.yaml -w 1hScan-config templates for common stacks (Next.js, Rails, Django, Laravel, .NET, Go) are shipped with the CLI. The default scan hits the whole OWASP Top 10 + OWASP API Top 10 and produces a full pentester-grade report in under 60 minutes on a medium-complexity app.
Start your first ai pentest
Free tier includes 10 scans/month on a verified domain. No credit card.
Start your AI pentestMore Reading
Further reading
- Attack chains — the multi-step compromise paths Pentestas synthesises
- AI specialist agents — what each of the five agents does
- Source-code-aware scans — the white-box unlock
- YAML scan config — reproducible scans for CI

Alexander Sverdlov
Founder of Pentestas. Author of 2 information security books, cybersecurity speaker at the largest cybersecurity conferences in Asia and a United Nations conference panelist. Former Microsoft security consulting team member, external cybersecurity consultant at the Emirates Nuclear Energy Corporation.