Skip to content
Haxset
Back to Blog

Authenticated AI Pentesting: Getting Past Login and OTP

By Haxset Research10 min read

TL;DR: Authenticated AI pentesting means AI agents sign in to your application and test what a signed-in user can reach. Haxset Agentic Pentesting, new for web applications, signs in with the test accounts you supply. It can also register one account and read a test mailbox to pass that account's email verification and one-time passwords (OTP). Given two same-role accounts, the agents test whether one can read the other's data. A scope filter checks each agent shell command before it executes.

What is authenticated AI pentesting?

Authenticated AI pentesting is a penetration test run with real user sessions. The AI agents then reach pages, APIs and records that an anonymous scan never sees. Testing an AI system itself is a different job: see AI red teaming vs AI pentesting.

Broken access control is first in the OWASP Top 10:2025. It also has the most occurrences in the data contributed to that edition: 1,839,701 across 40 mapped weakness types (CWEs).1 One form OWASP lists is "Permitting viewing or editing someone else's account by providing its unique identifier (insecure direct object references)".1 A test that never signs in cannot check for it, and a test with one signed-in user has no second user's data to reach.

How do AI pentest tools get past the login page?

AI pentest tools get past the login page with customer-supplied credentials or sessions, a vendor-hosted mailbox, agent-owned email and phone numbers, or self-registration. We found these four approaches in vendor documentation.

ApproachWho creates the accountHow email codes arriveMain gap
Customer supplies credentials or a sessionThe customerA person relays them, or a pasted session skips the codeSessions expire, and a person must relay each code
Vendor-hosted mailboxThe customer, with the vendor's addressThe agent reads itSign-up and verification go untested
Agent-owned email and phone numbersThe customer, with the vendor's detailsThe agent receives email and SMSSign-up goes untested, and each engagement needs a number
Self-registrationThe agentThe agent reads a mailbox it is givenNeeds public sign-up, and one account cannot test cross-user access

Haxset's agents use the first and the last.

How do Haxset's agents sign in?

Haxset's authentication agent signs in with each account you supply, or registers one test account, and shares the sessions with the testing agents. This happens in a gray-box engagement, where the agents get some access, such as accounts. A black-box engagement gives them only the target address.

The authentication agent:

  1. Signs in with every account you supplied, not only the first.
  2. Checks each pasted cookie or authorization header with one request to a protected endpoint, and marks the session valid or expired.
  3. Registers one account through your public sign-up page if you supplied none, with "haxset" in the username, and leaves existing accounts alone.
  4. Reproduces any in-browser password encryption on the login page, so the sign-in succeeds.

An expired session is the most important thing it reports, because later tests would otherwise run anonymously and report untested pages as clean.

In a black-box engagement, code stops the agents from creating an account. It checks everything an agent does for account creation before it runs, refuses anything it cannot read, and keeps the engine's own scans off sign-up routes.

What test accounts should you give an AI pentest?

Give two accounts of the same role, plus one for each higher role. With two accounts of the same role, the agents test whether one can read the other's data, such as another customer's order. One account per privilege level lets them test whether a customer can reach admin functions. Self-registration gives only one session, so these tests need accounts you supply, and so does an application with no public sign-up.

Can AI pentesting handle login MFA and email OTP?

AI pentesting can pass multi-factor authentication (MFA) when the code reaches a mailbox or phone number the agent controls. Haxset's agents pass email verification and email one-time passwords (OTP) through a Haxset test mailbox. They do not pass SMS codes, authenticator apps, push approvals, passkeys, hardware keys or CAPTCHA.

When it registers an account, the authentication agent uses the test mailbox's address, waits for mail from the target's domain, and completes verification with the code or link. It records whether the application enforced verification, since an account usable before email confirmation is a finding. The same mailbox serves that account's password-reset and email-based MFA flows. The agents never hold the mailbox's credentials: Haxset's servers read the mail and pass it to the agents.

How does Haxset keep its agents in scope?

Haxset keeps its agents in scope with a scope filter that blocks agent shell commands it reads as aimed at hosts outside the allowlist. The allowlist holds the hosts the engagement covers. The filter checks each command before it runs, and allows a command it cannot read, such as a script an agent writes and then runs. The engine also checks each host in code before its own scans. No engagement starts until someone attests that they are authorized to test those hosts, and the platform records who attested and when.

The filter looks only at the host a command contacts. A server-side request forgery (SSRF) probe with a cloud metadata address in its body still goes to the in-scope target, so it runs. Read-only lookups in public sources, such as web archives, are allowed.

What stops Haxset's agents from damaging your data?

Data-safety rules in code check each agent shell command they can read, and refuse one that would destroy data the engagement did not create. They recognize money, mass-mail and restart routes by words in the URL path, such as refund, broadcast and shutdown.

RuleWhat it refuses
An account marked read-only writes nothingWrites from an admin account you shared for viewing only
Delete only what this engagement createdDeleting your records. Ownership needs the server's 201 status or Location header, not the agent's claim
A cap on records created per collectionA runaway loop filling your database with test rows
No collection wipesBulk deletes, ?all=true, purge and truncate routes
No money movement, mass mail or service restartsHigh-consequence actions, even on the engagement's own records
Password, email and MFA changes only on the agent's own accountLocking a real person out

The rules judge a request's target and method, not its payload, except for GraphQL and JSON-RPC operation names. A mass-assignment probe that posts {"role":"admin"} to the agent's own profile still runs, because testing for mass assignment is the point. A request that names another user only in its body is judged by its URL, and a route named without such words passes.

Is autonomous pentesting safe to run in production?

Autonomous pentesting can be safe in production when the platform enforces scope, limits on impact and an audit trail in code. The OWASP Autonomous Penetration Testing Standard (APTS) is an OWASP Incubator project at version 0.1.0. It sums up its first tier this way: "The platform will not test outside scope, can be stopped immediately, and provides an audit trail."2

Canceling a Haxset engagement from its page stops the engine's scans and the running agents, and the platform's audit log records the cancel. The engagement's log records every scope block and data-safety refusal. The agents' HTTP requests are recorded with their responses, and our PDF report's proof-of-concept requests come only from those records. Before you see any finding, a Haxset reviewer checks the engagement.

Where do Haxset's agents and guards stop?

Haxset's agents stop at sign-in methods they cannot complete, and its guards, the scope filter and data-safety rules, stop at actions they cannot see. The agents also cannot read codes sent to a supplied account's own email address, or sign in where single sign-on (SSO) is the only way in. In each case, sign in yourself and paste a session that will outlast the engagement.

Both guards read only shell commands and allow a command they cannot read. A web page that an agent opens with its built-in fetch tool is not checked, and no network-level filter backs them up. Haxset sets no overall cap on an engagement's request rate, so test a staging copy if your application cannot take scanner load.

How Haxset can help

Haxset offers Agentic Pentesting as a module of the Haxset Engine. It tests web applications in gray box, with your accounts or one it registers, or in black box, with none. Haxset does not keep the prompts its AI models process and does not train models on them. It stores only scan metadata and scan results. Contact us to scope a first engagement.

FAQ

Will the agents create accounts in our live application?

In a gray-box engagement, yes. If you supply no accounts, the authentication agent registers one test account through your public sign-up page, with "haxset" in its username. The engagement page's cleanup section names it so your team can remove it. Testing agents may also submit your sign-up form while testing it, so more test records can appear, within the cap per collection. In a black-box engagement, no account is created.

How do we recognize Haxset's test traffic in our logs?

Each request from the engine's own scans carries a Haxset marker header. The agents are instructed to send it too, so their requests normally carry it. The user agent is an ordinary browser string, so it does not identify the traffic.

Can we give the agents an admin account without risking changes?

It lowers the risk but does not remove it. Mark the account read-only when you add it, and the data-safety rules refuse each write they can read that carries its session. A script an agent writes and then runs is not checked, so if you need a guarantee, give an account whose role in your application cannot write. The agents still use the admin session to see what an administrator can reach, which helps them judge whether a lower account reaches the same pages or data.

What happens if a pasted session expires during the engagement?

The authentication agent checks each pasted session once, at the start. The agents hold no password for a pasted session, so they cannot sign in again when it expires, and later tests that depend on it are no longer authenticated. Paste a session whose lifetime is longer than the engagement.

Related research

References

  1. OWASP Foundation, A01:2025 Broken Access Control, OWASP Top 10:2025. ↩ ↩2

  2. OWASP Foundation, OWASP Autonomous Penetration Testing Standard (APTS), version 0.1.0, README, "Compliance Tiers", as of September 3, 2026. ↩

The module in this post

Interested in how this research applies to your organization?

Get in touch