cd /news/ai-agents/transferring-the-pentesters-spidey-s… · home › topics › ai-agents › article
[ARTICLE · art-176664] src=equixly.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Transferring the pentester’s spidey sense into a machine learning model

Equixly built a machine learning model that predicts which vulnerability classes are likely on each API endpoint and now uses it to decide which attack agents run during scans, cutting agent runs by 39% and tokens by 40% on a full scan of a deliberately vulnerable application while finding the same vulnerabilities. The model is trained on labels built from CVE records whose advisories name the endpoint and input, manually labeled findings, and benchmark applications with known vulnerable endpoints, and it reads only the operation specification — method, path, parameters, request body, responses and security requirements — never a CVE ID, advisory or vulnerability description. Equixly reported that on one real-world scan, 1,017 of 2,109 specialist runs (48%) ended not applicable, and said the model still needs a second opinion.

recommendation

Score each endpoint's likely CWE classes from its OpenAPI spec before dispatching specialist agents, and run only the probable ones; Equixly measured 39% fewer agent runs and 40% fewer tokens with the same findings.

more in playbook: Securing agents and AI tools
by read7 min views11 publishedNov 26, 2026
Transferring the pentester’s spidey sense into a machine learning model
Image: Equixly (auto-discovered)

Abstract

Every experienced penetration tester has a spidey sense. A parameter called file on a download endpoint tingles for path traversal, a redirect for an open redirect, a template on a rendering endpoint for template injection. Long before the first payload leaves the laptop, the tester has already decided where to look and where not to.

In this work, we transfer the pentester’s spidey sense into a machine learning model: by learning from penetration testers and historical findings, the model estimates which vulnerability classes are most likely for each endpoint, allowing autonomous attack agents to prioritize probable attacks and skip improbable ones.

In Equixly, the model now decides which attack agents run on each endpoint. On a full scan of a deliberately vulnerable application, it cut agent runs by 39% and tokens by 40%, and found the same vulnerabilities. This post explains how the model was built and measured, and why it still needs a second opinion.

Agents on every endpoint #

Equixly attacks an application with autonomous agents. Each one is a specialist: an agent that knows one weakness class and nothing else. Examples include SQL injection, local file inclusion, server-side template injection, BOLA, and mass assignment. A specialist reads the operation, plans, sends requests, and either proves the vulnerability with evidence or concludes that it isn’t there.

For maximum coverage, every specialist runs on every operation. The arithmetic is simple: runs = operations × specialists. Each run spends model turns, tokens, and GPU time. Most of those runs were never going to find anything. On one real-world scan, 1,017 of 2,109 specialist runs (48%) ended not applicable: the agent read the operation and concluded that the weakness could not exist there.

A human pentester would never work this way. Nobody tries LDAP injection against a health check. Testers prune, and they prune by intuition. Correct or not, they prune.

The problem with intuition is that it is neither measured nor reproducible. Two testers prune differently, the same tester prunes differently on a Friday afternoon, and nobody knows how many vulnerabilities the pruning costs. If a machine is going to prune, it has to do it with a number attached.

Framing the spidey sense as a ranking problem #

The research question was: from the specification of a single operation, before any request is sent, can we rank the weaknesses it most likely has?

  • One sample is one endpoint: its method, path, parameters, request body, responses, and security requirements, rendered as a one-operation OpenAPI document.
  • The output is one probability per CWE. The probabilities are independent, because an operation can hold more than one weakness: an upload endpoint can be both a path traversal and an XXE.
  • A specialist’s score is the highest probability among the CWEs of its weakness class.

The model never sees a CVE ID, an advisory, or a vulnerability description. It reads only what an attacker has before the first request: the operation itself.

Building the labels

Ground truth for "which CWE lives on this endpoint" does not exist off the shelf. The labels were built from sources that are independent of the features:

  1. CVE records whose advisory names the endpoint and the input, with the CWE from NVD.
  2. Manually labeled findings and the CVEs they reproduce.
  3. Benchmark applications with known vulnerable endpoints, read from their exploits and their code.

The labeling was done manually, with the evidence recorded for every label and every label marked sure or doubt. Doubts went to Equixly’s security team before they could enter the dataset.

Two rules mattered:

  • Ancestors inside one specialist, never across specialists. A relative path traversal (CWE-23) also carries path traversal (CWE-22), so the general class learns from every variant. But MITRE places SQL, LDAP, and XPath injection under CWE-943, which here means NoSQL injection. Propagating across that edge would make the NoSQL specialist rank at least as high as SQL injection on every endpoint.
  • Split by product family. No product appears in both training and test, and every model is scored on products it has never seen. Shortcut probes check that nothing in an endpoint gives away where it came from.

Teaching the model what Equixly already knows #

Words are only half of what a pentester reads. The other half is structure. Is this a read or a write? Does the caller control the identifier? Does this parameter take free text or a UUID? Is it a filter?

Equixly already answers those questions for every operation. Its classifiers label each operation’s category and each parameter’s format, and mark filters, resource identifiers, and the parameter that carries the caller’s credential. The model reads those labels alongside the specification.

The model is one logistic regression per CWE on standardized features, chosen because:

  • it is interpretable, so every weight can be read and questioned;
  • it is small enough to run inside the scanner with no ML runtime, and it matches the reference ONNX graph to within 1e-6;
  • it scores an operation in a few thousand multiply-adds, so ranking every operation of a scan costs less than a single agent turn.

The current release reads over 100 features, and the team keeps improving it.

From a ranking to a cut #

A ranking saves nothing until something is skipped. To decide what can be skipped, every cut was measured on Equixly’s verification bench: vulnerable targets, each with a fixed twin and decoys. Each case’s specification is parsed with the production classifiers and ranked as a scan ranks it.

The bench caught one mistake before it shipped. Its operations had IDs named after the weakness they hold. A model that reads operation IDs reads the answer key, and an early measurement did that and looked much better than it was. Every number below is measured with the IDs removed.

The naive cut, keeping the top k specialists of each operation, is not enough on its own:

The model is good at the head of the ranking and uncertain at its tail. A second opinion fixed it.

Ask for a second opinion

The model has seen thousands of labeled operations, but only through the features it was given. It cannot read a description saying that the endpoint evaluates the expression in filter against the directory. A language model can.

So each operation gets one call to a small, fast LLM. It reads the operation and every specialist the model scored, each with a title and one sentence about its weakness class, and names the ones that apply, most likely first, at most eight. The attack strength then adds back a few of the dropped specialists it names. If the call fails, the model’s next ones are added instead. The question doesn’t depend on the strength, so the answer is cached once per operation.

That call costs about 2,400 tokens. A single specialist run costs about 65,000. The second opinion costs less than 4% of one of the runs it saves.

Neither half is enough alone. The model alone keeps 86–89% of the cases at medium. The LLM alone, asked for up to eight picks, keeps 93–96% with 8.5 runs per operation, and has no answer at all when the call fails. Together they keep 98% at medium, with 11.3 runs instead of N.

Conclusion #

A pentester’s spidey sense is a prior: years of findings compressed into the reflex that says look here first. It lets a tester spend a limited budget on the attacks most likely to land. It is also invisible: nobody can measure it, review it, or improve it.

A model can be measured, reviewed, and improved. Every weight can be inspected, every release is measured on products it has never seen, and every cut is held to a margin before it ships at an attack strength. Where the model is unsure, it asks for a second opinion, as a tester asks a colleague.

Equixly’s mission is to bring an attacker’s perspective directly into the SDLC. Running fewer, better-chosen attacks lets autonomous testing scale to larger APIs at a lower cost.

── more in #ai-agents 4 stories · sorted by recency
── more on @equixly 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/transferring-the-pen…] indexed:0 read:7min 2026-11-26 · —