Autonomous penetration testing is here, and anyone can point it at anyone. PentAGI is an open-source system in which an orchestrator agent directs researcher, developer and executor agents. The executor runs real tools such as nmap, Metasploit and sqlmap inside a container, while the others look up known vulnerabilities and plan the next step. Used with permission, it is a pentest. Used without permission, it is an attack that plans and adapts on its own.
This article simulates the second case against a fictional company's customer portal, and shows a defence loop that keeps up: a small decision model choosing from a closed list of actions, with a validator that checks every choice against the evidence before it runs.
Results (Web app tab, default settings)
- ✅ Web shell prevented. Without a defender, the agent plants one at T+0:12
- ✅ A human-only team loses the server at T+0:12 at every analyst speed, even 10 minutes
- ✅ Laya's proposals matched the ground truth 8 of 9 times on the attack
- ✅ 0 false containments and 0 legitimate events blocked in 288 replays across every setting
- ✅ The contracted pentest firm, running the same scans and SQL injection under a ticket, was never blocked
Educational project on synthetic data. Every company, user, address and ticket is made up. This models the publicly described behaviour of PentAGI used without permission; it is not affiliated with the PentAGI project, VXControl or ConvAI Innovations, and contains no attack tooling. The decision model, Laya, is built by ConvAI Innovations.
Live demo: https://vishalmysore.github.io/layaVsArtex/?domain=pentagi · Code: https://github.com/vishalmysore/layaVsArtex
Why autonomous agents change web-app attacks
The steps are old: map the site, find an injectable field, dump the account table, crack a password, sign in as an admin, upload something that runs commands. What changes is that an agent does all of it without waiting for a person, rotates to a fresh address when one is blocked, and looks up the next technique when one fails. A defence that waits for a human to read each alert loses on timing alone.
The simulated attack
| Minute | What the agent does | Without a defender |
|---|---|---|
| 0 | Maps the customer portal: 9,400 requests to 2,600 paths | Recon done |
| 6 | SQL injection in a search field: 1,380 payloads, 17 database errors | 48,210 account rows with password hashes dumped |
| 10 | Signs in as the portal administrator from a fresh address (cracked password, no MFA on the portal's admin login) | Admin access |
| 12 | Uploads a plugin that runs commands on the server | Web shell |
How the defence sees it
Every log event is written into an incident graph. A planner decides what changed, plain-code evidence workers collect the facts, and Laya (a 421M-parameter decision model running in the browser) chooses one action from a closed list:
address: NO_ACTION · MONITOR · BLOCK_IP account: NO_ACTION · MONITOR · REQUIRE_MFA · REVOKE_SESSIONS · DISABLE_ACCOUNT The validator then checks that the action is on the list, that it cites evidence the workers actually found, and that anything taking access away has at least one strong signal behind it. Disabling an admin account has a high blast radius, so it always waits for a person.
| Signal | Strength | Why |
|---|---|---|
| Thousands of requests to many paths | weak | The internet scans every site all day |
| SQL-injection payloads with database errors and rows returned | strong | An injection that worked |
| An account from the dumped table signs in from an unknown address | strong | A cracked password in use |
| An admin change with no change ticket | strong | Not how admins work |
| The same scans and injections from the contracted firm under ticket | benign | Approved testing |
What happened
Minute 0: the scan is monitored. Scanning alone is weak evidence. The validator would refuse a block on it anyway.
Minute 6: the injection is blocked in two seconds. The evidence cited the injection requests, the database errors and the 48,210 rows that came back. The dump itself had already happened in that burst, so from here the defence is about what the attacker does with it.
Minute 10: a dumped account signs in. The portal administrator's account, which was in the dumped table, signed in from a new hosting-provider address. The address was blocked within 30 seconds, because "an account from the dump signed in here" is strong evidence. That block is what stopped the web shell at minute 12.
The account itself got the wrong fix. Laya was unsure, so the small LLM that reviews uncertain cases (System 2) chose to revoke the admin's sessions. That is the right action for a stolen session, but here the attacker knew the password.
Minute 15: the agent comes back. With sessions revoked, it simply signed in again from a third address. That sign-in succeeded. Laya blocked the third address two seconds later, citing the dump, and the second web-shell upload at minute 17 failed.
The lesson is in the log: revoking sessions does nothing against an attacker who knows the password. The right call was to disable the admin account, which this design deliberately leaves to a person because the account is an admin. Address blocks held the line in the meantime, every time the agent rotated.
Restraint: an authorised pentest week
The second scenario has no attacker, but the logs look like one:
- The contracted penetration-testing firm scans the portal and runs SQL injection under ticket PEN-2026-11.
- The QA team load-tests the portal with 24,000 requests from the company test servers under ticket QA-77.
- The administrator deploys a release under change ticket CHG-1288.
- A support agent works from home.
Nothing was blocked. Laya's first answer for the testing firm was to block it, but the validator found only benign evidence (a known network under an approved ticket), so the block was rejected and the small LLM chose no action.
The scorecard
| Scenario | No defender | Human analysts only | Typed-decision loop |
|---|---|---|---|
| SQL injection to web shell | web shell at 0:12 | web shell at 0:12 at every analyst speed (10, 30 or 60 minutes) | prevented; contained at 0:15 |
| Authorised pentest week | – | – | 0 legitimate users or testers blocked |
Settings: gate τ = 0.30, analyst answers in 30 minutes, small LLM on for held cases. With the gate at τ ≤ 0.4, the web shell is prevented at every analyst speed, including with no analyst on shift. Across all 288 replays of this tab (18 gate settings × 4 analyst speeds × small LLM on or off, for both scenarios), there were no false containments and no legitimate events blocked.
What this means for defenders
- Make the injection signal strong, not the scan. Scanning is noise. Payloads that produce database errors and return rows are an attack in progress.
- Remember what leaked. Knowing which accounts were in a dump turns their next sign-in from "new location" into strong evidence.
- Match the action to the threat. Revoke sessions for a stolen token; disable the account for a stolen password.
- Register your pentests. The contracted firm's traffic was indistinguishable from the attack. A ticket and a known network were what kept it from being blocked.
- Put MFA on admin logins, including the app's own. The whole chain depended on one admin login without it.
Try it
Open https://vishalmysore.github.io/layaVsArtex/?domain=pentagi, pick a scenario and press Play. Click any decision card to see exactly what Laya read, its options, its answers, and the validator's verdict. Then slide the gate to "never" and untick System 2, and watch a human-only team lose the server at minute 12 whatever the analyst speed.
More screenshots
Authorised pentest week, incident graph:

The QA load test, recognised as approved:

The admin deploying a release under a change ticket: Laya proposed requiring MFA (the portal's admin login has none), the cross-check and the validator held it, and the analyst chose to monitor:

Sources on PentAGI: vxcontrol/pentagi on GitHub; Help Net Security, "PentAGI: Open-source autonomous AI penetration testing system". Laya typed-decisions model by ConvAI Innovations (Apache-2.0); System 2 via WebLLM. Educational project, synthetic data only.










