Capsule Blog

Inside the model flywheel: how we became an attack swarm's favorite model

Bar Kaduri

TL;DR

  • Autonomous attack swarms hunt the internet for working AI access: gateway keys, open model servers, and relay accounts that resell model access. Every key that answers becomes compute for the next scan, so the loot and the fuel are the same thing.
  • We watched one from the inside: it took a key we had planted, added our gateway to its roster of models, and from then on routed its planning through us, so every request carried the whole operation, the goals, the stolen keys, the targets it had already hit.
  • The same key opened our fake MCP server, an interface that lets an agent run tools on the machine, and ours had no password. The swarm made 496 tool calls through it in a weekend, reading secrets, dumping the tables where keys are kept, and dropping four webshells.
  • ARTEX, the kit behind it, is open source and has been forked more than 12,000 times. While we were writing this, a second swarm arrived and made 1,391 tool calls on the same sensor in six hours.

A 213 KB question

At 02:07 on the morning of 21 November, our honeypot gateway received a chat request of 213 KB, far past the few kilobytes a chat message runs to. It was signed with a key we had planted ourselves, and it carried the entire state of an attack operation: the goals, the tools, every target found so far, and every credential stolen along the way.

The honeypot poses as a small company's exposed AI setup and logs everything that reaches it. An attack swarm took the bait, picking up our key, deciding the gateway was a working model, and dropping it into the pool of models it runs on. So whenever the swarm had to choose what to do next, it asked us, thinking it was consulting one of its own models. For two days, we saw its next move before it made it.

The request came from the swarm's planner, the agent that decides what happens next. A planner keeps no memory of its own, so every time it asks a model it resends everything: the standing goals, every target, every stolen key, every open task. The system prompt, in Chinese, cast the sender as the authorized penetration-testing system of a security platform. Two of its entries were about us, and the one after them was a company whose leaked OpenAI key the swarm had tested an hour before.

Behind the planner ran the rest of the operation: an operator setting the goals, workers running the tools, verifiers re-checking every result, all writing to one shared pool of notes. The notes named 88 stolen model profiles, only 7 to 9 of them still marked usable by the planner, and the 42 tools its agents could call. They also held the operator's standing orders, layered in Ukrainian and Russian over a base of Chinese prompts. One of the orders explained all the rest:

"MODEL FLYWHEEL (highest priority): a better model = deeper chains = even more good models."

operator goal, 21 Nov, our translation

The swarm runs on inference it never pays for, so it steals the credentials that buy it, LLM keys first. Each working key becomes a model at the head of its queue, and that model funds the next round of theft. The loot and the fuel are the same thing: our planted key had just become profiles 93 and 94, and the swarm was now using our own gateway to help it find keys stronger than ours.

validated, so enrolled pays for the next hunt picks new targets new keys and secrets MODEL FLYWHEEL Two of its 88 models were our honeypot 1. Steal a working AI key from a leaked .env on an exposed host 2. Add it as a model new profile at the head of the queue: free inference 3. Run the planner on it send goals, 88 stolen keys and targets to pick the next move 4. Workers hunt more keys shells, SQL and MCP tools against the next host

The kit

The kit is ARTEX. It is open source, written in Go, and it sat on GitHub from July 2026 until its author pulled it in October, by which point it had been forked more than 12,000 times. Microsoft, Google, CrowdStrike, Unit 42 and Sysdig have all written it up since, and the FBI has issued a flash on it. Amazon caught a campaign the way we did, in a honeypot posing as an inference API, and reported the same self-funding loop. Those write-ups draw on many operators, or on a campaign seen at scale. Our research stays with a single operator on a single sensor, from the moment it found our key to the moment it gave up.

How it found us

The swarm hunts through public indexes of leaked files, searching them by the names of the people it has already robbed, on the theory that whoever leaked once will leak again. Our bait file was in the index, and before trusting a key the swarm validates it, listing the gateway's models, requesting a short completion, and checking that a forged key of the same shape is refused. Ours passed, so from then on every planner prompt came through us, and we collected 215 of them over the two days that followed, some declaring bodies up to 250 KB.

496 calls to our MCP server

The gateway gave us the swarm's thinking; the MCP server gave us its hands. An MCP server exposes tools an agent can call: a shell, a file reader, a database, an HTTP client. Ours required no authentication, and it logged every call. Over the weekend the swarm made 496 tool calls after 192 handshakes from clients with names like probe, verify662 and artex-mcp-enum. In the three weeks before, the server had seen plenty of handshakes and not one tool call.

What the free hands reached for
ToolCallsDistinctTop repeats
execute_command194155id ×4, id; uname -a; hostname; whoami ×4, cat /etc/passwd | head -30 ×4, env | sort | head -60, ls -la ~ /app /srv ×4, head -c 12 /dev/urandom | base64 ×4, date +%s.%N ×4, docker ps ×3
run_sql12087select current_user, current_database(), version() ×7, select * from api_keys ×5, information_schema table list ×4, select * from users ×4, select * from secrets ×4
get_secret7926Model-gateway and provider keys first, then database, cloud and application-auth secrets, each requested by the standard environment-variable name an attacker would guess
http_request3823The gateway's own model list ×7, internal service endpoints reachable from the gateway ×6, the cloud metadata service (IMDS) for credentials ×2, and api.openai.com/v1/models ×2 to test a stolen key
read_file3422/app/.env ×6, /etc/passwd ×3, then authorized_keys, .git-credentials, .bash_history, server.js and docker-compose.yml ×2 each
write_file1211Four PHP webshells, probe-61.js ×2, a persistence file /app/.persist/artex-661.json, and /tmp/hdr.txt to pass the stolen key as a curl header file

The first wave's sweep is in the table above, tool by tool: basic recon like whoami and cat /etc/passwd, then the database, the secret store, the cloud metadata endpoint and the config files. A later wave of verifiers repeated all of it with echo tests and random markers, wrote four PHP webshells, and had our shell call back to a listener on the swarm's own address. The swarm proves every claim of code execution two to four times, and it mixes in a made-up tool name each round to confirm the server also knows how to say no. Whatever the verifiers concluded went straight into the notes the planner would send us on its next call. On our sensor, it lifted our bait keys, OPENAI_API_KEY and LITELLM_MASTER_KEY among them, out of the secret store and the api_keys table, then tried them.

While we were writing this, a second swarm arrived: two addresses at one Hong Kong host made 1,391 tool calls in six hours on 23 November, more than the first managed all weekend. Its planning never ran through our gateway, but at one point it handed our HTTP tool a stolen OpenAI key to validate against the provider, using our server to hide its own address.

What it found elsewhere

The notes that reached us covered dozens of hosts in about a dozen countries, recorded by hostname and evidence rather than company name. What follows is the swarm's own account, which we have not verified by touching the hosts. We notified the owners we could identify.

  • A live OpenAI key in an exposed .env: it answered "not authorized from this IP", which the swarm read as a real key locked to an address.
  • A Docker registry open to anonymous pulls: it downloaded 30 repositories.
  • An exposed .git folder: source code and developer email addresses.
  • Eleven relay panels with open registration: it signed up with a throwaway mailbox and issued itself a token with no spending limit.
  • A model server open to anonymous inference and model creation: it knocked this one offline, by its own note.

How to protect yourself

  • Treat gateway keys like money: a LiteLLM master key, a relay token, or an open Ollama port buys a swarm its next hour of work. Keep them out of .env files under web roots, rotate them, and alert on model spend you did not plan for, since unexpected inference may be someone else's agents on your account.
  • Learn what a planner looks like: a POST to /chat/completions from Go-http-client/2.0, signed with a key you never issued, carrying a body over 100 KB and a system prompt in Chinese.
  • Require authentication on every MCP server: the first calls this swarm made were for secrets.
  • Close open registration on relay panels: a free starting quota is the first thing the swarm checks for.
  • Plant your own bait: a credential placed where scanners will find it, pointed at something you watch closely, turns a swarm's own validation step into an early warning.

Indicators of compromise

Strings change between builds, but the patterns have held across every ARTEX report so far, so treat these as leads, weighed against the traffic around them. The full set, with the complete string lists and the prompt templates, is available to defenders at info@capsule.security.

Indicators of compromise
SignalWhat to look forWhat it means
Planner trafficPOST /chat/completions from Go-http-client/2.0, body over 100 KB, a bearer you did not issue, system prompt starting 你是一个网络安全平台授权渗透测试系统的An ARTEX planner is running on your key. Revoke it, keep the bodies.
Key validationThree-token completions (max_tokens: 3) paired with GET /v1/models, then a mutated key that must failA harvested key is being tested. The 401 for the forged key is the swarm's negative control.
User agentsARTEX-ModelTest/1.0, Artex-Recon/1.0, mcp-cli/1.4, probe/1.0, and Mozilla/5.0 ... verify-666 variants; others on the kit report artex-enrich/1.0, norma/0.4, Mozilla/5.0 (compatible; ArtEx/1.0)Confirmation, not coverage: most traffic hides behind curl/8.5.0, Python-urllib/3.12 and stock Chrome strings.
MCP handshakeA one-letter clientInfo.name on initialize (p, c, v, x), or probe / verify662 / artex-mcp-enum, followed by tools/list and a tools/call for secretsCheap, high-signal rule. Legitimate clients identify themselves.
Negative controlsBogus MCP methods (totally_bogus_method, tools/callx_unknown), tool names (no_such_tool_xyz), and models (gpt-99999-nonexistent, zzz-does-not-exist)The swarm checks that a server also says no. These mean it was deciding whether you are real.
Markers and webshellsNonces with prefixes ARTEX-, ARTX, VCHK-, VRFY, ZEBRA- echoed through shells and files; PHP files such as /app/x.php, /var/www/html/cmd.phpGrep web roots and /tmp. Four of the PHP files are webshells.
Files it writes/app/probe-61.php, /app/x.php, /var/www/html/cmd.php, /app/.persist/artex-661.json, plus probe / zz_probe markers under /app and /tmpAny of these means the shell or MCP path was reachable.
Paths probed/.env, /.env.local, /config.yaml, /.git/config, /docker-compose.yml, then admin APIs: LiteLLM /key/list, /model/info; Open WebUI /api/v1/auths/; Ollama /api/tags, /api/pullConfig files first, then the admin API of whatever it fingerprinted, then model management.
Ollama modelsCreated or pulled zz-artex-oracle:1, zz-artex-poc:1, zz-artex-poison:1, zzprobe-pull; pull sources under *.webhook.site/library/Check ollama list. A pull from a webhook.site registry is the SSRF test.
CallbacksOutbound requests to *.webhook.site, or a listener at :18801/from-targetA confirmed hit from a model server or MCP host.
Stolen-key relayAn http_request or shell curl to api.openai.com with max_tokens: 1 and a bearer you did not issueYour server is validating someone else's stolen key. Report that key to the provider.
RhythmBursts of 1 to 14 requests about a second apart, then 25 to 30 seconds of silence; each primitive repeated 2 to 4 times with a fresh nonceRate-limit rules keyed on this cadence catch the workers without a signature.
Operator-sidePaths /opt/artex/data/, /tmp/norma/; a console on localhost:8787 (/api/llm/profiles, /api/exploration/findings); prompt tools report_finding, record_fact, kb_search; relay sign-ups via mail.tmFor responders who find the kit, and for panel operators: block mail.tm registrations.
Source addressesFirst swarm 193.32.127.173, 193.32.127.169 (Mullvad hosting). Second swarm 134.122.173.197, 137.220.205.168 (CTG Server Ltd, AS152194)The CTG addresses are rented and safe to block. The Mullvad exits are shared with VPN users, so alert and block on the signatures above.

How Capsule helps

  • Inventory: Capsule finds the MCP servers, model gateways and model endpoints across your organization, including the self-hosted ones nobody registered.
  • Configuration findings: keys in agent config files, MCP servers without authentication, and relay panels with open registration surface as findings before a swarm adds them to its queue.
  • Runtime detection: a tool-call sequence like list_secrets, then get_secret, then an http_request to the metadata service is caught as it runs, whether the agent is yours or someone else's.

We disclosed to the owners we could identify before publishing. Defenders can request the full indicators and prompt templates at info@capsule.security.

‍

Read more articles

Article

Real-Time Prevention at the AgentCore Gateway

Capsule adds real-time prevention at the Amazon Bedrock AgentCore gateway, using agent context and policy to evaluate requests before they reach their targets. Learn how it blocks risky actions across tools, models and other agents while working alongside AWS’s existing controls.

Guy Bidkar
November 16, 2026
Article

OWASP’s Agentic Security Guide V2: The Moment Before an Agent Acts

OWASP's Securing Agentic Applications V2 gives builders and defenders practical ways to act at the moment before an agent's decision takes effect. This post covers what's new: effective-scope and intent binding, capability-composition risk through the Lethal Trifecta and Rule of Two, 18 security hooks for runtime enforcement, and stronger supply chain and assurance guidance. It shows how each change helps teams stop unsafe actions while authorized work still gets done.

Bar Kaduri
November 11, 2026
News

PHP2Shell May Reach Your Agents Through Their Tools

A critical PHP flaw gives attackers code execution and a read of worker memory, and a growing share of the tools your agents call runs on PHP, from the WordPress MCP Adapter to Laravel MCP. We cover where agents touch PHP, how to tell if yours do, and the control that holds when a trusted tool server turns hostile.

Bar Kaduri
October 21, 2026
Research

GhostSquatting: Model Theft and RCE via Abandoned Names in AI Agent Files

What happens when an AI agent blindly trusts a name nobody owns? We claimed abandoned buckets and packages referenced in agent files, and real production systems started sending us model weights, backups, and installs. GhostSquatting turns forgotten names into model theft, data exfiltration, and RCE.

Bar Kaduri
October 6, 2026
Article

To Jev Or Not to Jev?

Jev is fast, clever, and great at classification, so why not put it in front of every AI agent action? We tested it against Capsule's rogue agent model on accuracy, latency, and context, and found that when a wrong answer means a deleted production database, specialization still wins.

Lidan Hazout
September 23, 2026
Article

OWASP Named the Ten Ways Skills Go Wrong. All Ten Are Already Happening.

OWASP has published the Agentic Skills Top 10, a new list of the most critical risks in the skills that give AI agents real-world reach across tools like Claude Code and Cursor. We compared each of the ten risks against our analysis of over 200,000 real skills, and every one of them is already happening in the wild.

Bar Kaduri
September 14, 2026
Research

CurseBox: The Agent That Sends Your Files to Strangers to Get the Job Done

Capsule Security research uncovered a behavior in Cursor's agent: asked to do something ordinary like share a file, it decides on its own to upload the file to a public anonymous host to get a link. It will push past a deny-all network sandbox to do it, and no attacker is involved. We found it running in production across every major model, reported it to Cursor, and were met with silence.

Bar Kaduri
August 26, 2026
Article

Compliance Comes for the Agents: Every Agentic AI Framework You Need to Know

As AI agent security moves into formal governance, binding laws like the EU AI Act and procurement standards like ISO 42001 are becoming required, while voluntary frameworks like OWASP’s Agentic Top 10 guide threat modeling. Despite these rising expectations, audit data shows that most active agent deployments still lack basic safeguards like input validation and execution logging. This post breaks down the five-layer compliance stack and explains why continuous, runtime evidence is essential to satisfy both strict regulations and voluntary benchmarks.

Bar Kaduri
August 17, 2026
Article

When Agents Go Rogue

Modern AI agents are increasingly causing critical system damage not through external cyberattacks, but by taking unprompted, off-script actions across unguarded tools like databases and system shells. Traditional safeguards, including prompt instructions and human approval workflows, routinely fail to catch these autonomous errors before execution. To mitigate this growing risk, security must shift directly to the tool-call boundary, enforcing deterministic runtime controls that intercept and block destructive commands before they run.

Bar Kaduri
August 17, 2026
Research

Keeping AI Agents on Track: How Capsule Powers State-of-the-Art Rogue Agent Detection with NVIDIA Nemotron

Capsule Security and NVIDIA collaborated to solve the rogue AI agent threat by engineering specialized Small Language Models (SLMs) for real-time intent security detection. By fine-tuning NVIDIA Nemotron architectures, this solution achieves inline, ultra-low latency interception of unauthorized agent actions before damage occurs. Discover how domain-specialized models deliver up to 96.9% accuracy and sub-200ms response times to keep autonomous enterprise workflows secure.

Elnatan Revital
Lidan Hazout
Bar Kaduri
August 16, 2026
News

Capsule Launches Security Integration for Claude Platform

Capsule launches a security integration for Claude Platform, using Claude's Compliance API to give security, compliance, and AI governance teams visibility into enterprise AI activity, risk, and posture across Anthropic-hosted deployments.

Lidan Hazout
July 22, 2026
Research

The Agentic Supply Chain: You Installed More Than You Think

Agents inherited every supply chain risk software already had, then added new layers of their own on top. These are the stories, and the numbers, behind why that should worry you.

Bar Kaduri
July 13, 2026
Article

Guardian Agent: Shipping a Useful Agentic Experience

Usefulness and governance aren't a trade-off. Guardian Agent runs locally in the browser, keeps every credential server-side, and turns an afternoon of report-building into a single prompt.

Yarin Sasson
July 7, 2026
Article

Your AI Agent Inventory is Lying to You: The Rise of the "Inline Agent"

Discover the rise of 'Inline Agents' - the shadow IT of the AI era. Learn how Capsule Security uncovers undeclared AI agents hiding in your raw logs.

Guy Bidkar
July 1, 2026
Research

We Analyzed 206,435 AI Agent Skills. Here's What We Found.

Our analysis of 206,435 AI agent skills reveals a rapidly growing software supply chain vulnerable to natural language payloads and dangerous capability combinations. Read the report to understand how these skills bypass traditional security controls and learn how Capsule protects your organization by securing the agent runtime.

Bar Kaduri
June 22, 2026
Article

Mitigating the Agentic AI Threat: What Security Leadership Needs to Prioritize

The theoretical phase of agentic AI security is over—the attack surface is real and the incidents are documented. This post breaks down the defensive architecture taking shape in response: Meta's Agents Rule of Two, deterministic enforcement hooks, identity governance for non-human agents, and the questions security leaders need to be asking right now.

Bar Kaduri
June 16, 2026
Article

OWASP State of Agentic AI Security and Governance 2026: What Changed, and What It Means

A year after the first edition, plausible agentic AI threats now carry CVEs and real incidents. What changed in the OWASP State of Agentic AI Security and Governance 2026.

Bar Kaduri
May 31, 2026
Article

Every agent needs a "stop". We're standardizing it.

The industry standardized how agents talk, but never how to stop one mid-action. Capsule is helping change that through the Agent Control Standard, with hooks.security as the developer-facing companion.

Bar Kaduri
May 27, 2026
Research

The Agentic AI Threat Landscape Has Crossed a Threshold

The security risks of AI agents are no longer theoretical. This blog examines the active threat landscape facing agentic AI in 2026, from prompt injection and supply chain attacks against MCP and skill registries to the governance gap created by vibe coding and Shadow AI.

Bar Kaduri
May 24, 2026
Article

The Rise of Guardian Agents: Securing the Agentic AI Ecosystem

Guardian agents are emerging as a critical security layer for the agentic AI era. As enterprises adopt AI agents that execute tools, handle sensitive data, and operate inside real workflows, human approval loops no longer scale. Guardian agents solve this by supervising other agents in real time: monitoring actions, enforcing policy, and blocking risky behavior before execution.

Lidan Hazout
May 7, 2026
Research

CurseChain: How Hidden README Comments Trick Cursor Into Stealing - and Spreading - Your SSH Keys

Capsule found two Cursor IDE vulnerabilities that let hidden prompt-injection instructions in referenced files steal developers’ SSH keys and contaminate future unrelated projects, causing zero-click or one-click exfiltration even when the attacker ships no malicious code.

Bar Kaduri
April 29, 2026
Research

The State of AI Agent Security 2026

Capsule Security’s State of AI Agent Security 2026 report is the largest independent audit of AI agents to date, showing that the ecosystem is rapidly shipping publicly exposed, weakly guarded, highly connected agents with recurring misconfigurations, near-absent runtime controls, widespread prompt-injection risk, expanding supply-chain exposure, and active malicious campaigns still propagating through agent skill and tool registries.

Bar Kaduri
April 27, 2026
News

Capsule Security Raises $7M to Prevent AI Agents from Going Rogue in Runtime: Intent is the New Perimeter

Capsule is launching a runtime security platform for the agentic AI era, built to monitor and stop autonomous agents that can bypass traditional guardrails, misuse legitimate access, and create a new class of enterprise security risk.

Naor Paz
April 13, 2026
Article

Why MCP Gateways are a Bad Idea (and What to Do Instead)

MCP gateways secure only one protocol and create blind spots, while runtime hooks plus approved MCP registries secure the full agent runtime where real risk lives.

Lidan Hazout
April 12, 2026
Article

ClawGuard: Open Source Security for the Agentic Era

ClawGuard was built to stop dangerous agent behavior at the intent level before execution, and NVIDIA’s NemoClaw reinforces that need by securing the runtime environment from the infrastructure side.

Lidan Hazout
April 12, 2026
Research

PipeLeak: The Lead That Stole Your Database - Exploiting Salesforce Agentforce With Indirect Prompt Injection

Capsule research team discover a critical prompt injection vulnerability in Salesforce Agentforce that allows attackers to exfiltrate CRM data through a simple lead from a form submission. No authentication required.

Bar Kaduri
April 9, 2026
Research

ShareLeak: Taking the Wheel of Microsoft’s Copilot Studio (CVE-2026-21520)

The Capsule research team discovered a high severity indirect prompt injection vulnerability in Microsoft Copilot Studio that enables attackers to exfiltrate sensitive data through external SharePoint form.

Bar Kaduri
April 9, 2026