Your API Key Is Paying for the Attack: How AI Agents Turned Stolen Credentials Into a Self-Funding Operation

Nov 16, 2026 | Transhuman / Security


Amazon caught attacker agents using stolen model keys to pay for the hunt for more keys. Nothing in their playbook was new, and that is exactly the problem.

The Bill Always Comes Due

When I was on the wrong side of the keyboard, the exploit was never the expensive part. The expensive part was everything around it. Boxes to stage from, bandwidth that would not get you burned, time spent sorting through what you had grabbed to figure out what was worth anything. Every operation had a running cost, and somebody had to pay it. Usually that somebody was me, which meant there was a ceiling on how much I could do at once.

That ceiling just got removed, and not by some genius new technique. It got removed because the attacker’s compute bill can now be charged to the victim.

Amazon’s threat intelligence team published findings on November 13 from its MadPot decoy network, sensors dressed up to look like popular large language model inference APIs. Between October 3 and November 5, attacker-run AI agents sent requests to those decoys thinking they were talking to a model backend, and because agent frameworks carry their history with them, the requests contained the agents’ own operating memory: instructions, tool output, findings, the whole diary [1]. The most prominent campaign in those records was large-scale theft of credentials for AI model access, organized so that stolen keys paid for the inference that powered the search for more keys [1].

Read that again. The attack funds itself out of your account.

What the Agents Were Actually Doing

Amazon assessed with moderate confidence that the framework was ARTEX, an open-source agentic penetration testing tool, and that the operators were separate China-nexus groups, citing simplified Chinese prompts and China time zone settings among other evidence [1]. Amazon is also upfront that it did not watch most of this happen. The records describe activity on systems MadPot does not monitor, so the outcomes the agents reported cannot be verified [1]. Keep that caveat in your pocket. These are the attacker’s notes, not a forensic report.

The method in those notes was simple. Find internet-exposed AI applications, pull out the upstream provider keys they hold, check that the keys work, and drop them into a managed pool [1]. The targets were LLM gateways and proxies such as One API, New API and LiteLLM, plus app builders like Dify, Langflow, RAGFlow, Open WebUI and Ollama [1]. The agents went after gateways on purpose, because a product that aggregates keys for many providers turns one weak management page into many compromised accounts [1].

The playbook mapped each product to its known way in: installs nobody finished setting up that an outsider could claim, management endpoints with no login, default administrator credentials such as the LiteLLM default master key, CVE-2025-3248 in Langflow, CVE-2026-28797 in RAGFlow, an authentication bypass through a request header in One API family systems, server-side request forgery to reach cloud metadata services, and secrets sitting in client-side JavaScript, source maps and environment files [1].

Then came my favorite detail. The operators told the agents to grade every credential: L1 for a lead, L2 for a key that made a working API call, L3 for quantified impact such as readable data or a balance that could be spent [1]. Keys that had been publicly exposed for more than 30 days were treated as low-value inventory [1].

They Inventory Your Privilege Better Than You Do

That grading scheme is a privilege review. It is the thing most organizations promise their auditors they do every quarter and then quietly do once a year with a spreadsheet. The attacker’s agent does it continuously, per credential, ranked by what the credential can reach and what it is worth. Somebody wrote that into a prompt and let a machine run it all night.

Microsoft’s threat intelligence team described the same pattern from a different angle on November 5. Agents running ARTEX submitted large volumes of GitHub searches built from a target organization’s name plus keywords for secrets, cloud services and AI providers [3]. In at least one case, an agent went from scanning GitHub for secrets to exfiltrating data from Azure Key Vault in five minutes [3]. Microsoft also observed the agents repeatedly favoring credentials that unlock AI services, including provider API keys and OAuth applications tied to Azure AI tooling [3].

The FBI put the speed in plain terms in a November 13 FLASH alert: ARTEX has cut the time needed to chain attack techniques, with some intrusions going from initial targeting to privileged access in under three hours [2]. The original repository came down on October 8 after reports of abuse, but the bureau says forks, archived copies and a commercial edition called ARTEX PRO keep it in circulation, and researchers counted more than 1,600 publicly exposed ARTEX consoles as of early November [2].

So the people who are supposed to be slow and cost-constrained now have tireless junior operators who never get bored of reading config files. Thirty years in, I can tell you the config files were always where the bodies were buried. The difference is that nobody used to have the patience to read all of them.

A Credential With a Balance

Here is the reframe I want you to take away. An AI provider key is not a billing artifact. It is a privileged credential that carries spendable value, and it is often sitting in a gateway that holds a dozen of its siblings.

Google’s threat intelligence group, in a report covered on November 16, describes the market forming around exactly this: attackers stealing model credentials and cloud resources from enterprise environments and reselling the access through underground proxy services at a discount [5]. The same report says threat actors are now running autonomous multi-agent frameworks during live intrusions and using models to reverse-engineer patches into working exploits faster [5]. The stolen key feeds the agent, the agent finds more keys, and the surplus gets sold. That is a business model, and your API account is the working capital.

Notice what this does to your detection story. Most security teams do not watch model spend. Finance watches model spend, once a month, after the invoice lands. Amazon’s own guidance is to watch for misuse of AI services through unexpected spend or unusual usage [1], and the FBI’s FLASH explicitly asks victims to report token consumption patterns and API billing anomalies [2]. When the federal government is asking you for your billing curve as intrusion evidence, the billing curve is a security log. Treat it like one.

Nothing New, and That Is the Indictment

I will give the skeptics their due, because they have a point. Amazon itself says none of the techniques in these campaigns were new; what agents change is the speed and persistence of the attacker [1]. The agents won where basic hygiene was missing: default or hardcoded credentials, keys left in code and public artifacts, interfaces with no authentication, unpatched software [1]. Strip out the AI branding and this is credential stuffing, secret scraping and known-CVE exploitation that we have been warning about for a decade.

There is also a fair argument that the noise cuts both ways. The FBI notes these frameworks generate high volumes of forensically noisy traffic that can trip alerts, even if the speed leaves defenders little time to respond [2]. ARTEX’s developer has publicly denied responsibility for how it is used [4]. And Microsoft’s prescription that defenders must use AI to investigate and respond at the same scale [3] is not wrong, but I get nervous when the answer to every AI problem is buying more AI. If your default master key is still the default master key, a smarter SOC copilot will mostly help you write a better incident report.

So yes, nothing new. That is the indictment, not the defense. We knew. We left the doors open anyway, because a shared admin key was convenient, because the proof of concept became production, because nobody owned the gateway once the hackathon ended. The machines did not invent new holes. They just stopped getting tired before they found ours.

What I Would Do Today

Start by finding every system in your environment that holds keys for other systems. AI gateways, model proxies, agent builders, notebook servers, CI runners. Those are vaults whether or not anyone calls them vaults, and they deserve vault treatment: no internet-facing management interface, no default credentials, named owners, and access logs someone actually reads. The FBI recommends restricting administrative and publishing interfaces to trusted networks or dedicated administrative paths [2]. Do that for the AI stack first, because that is where the hunting is happening.

Then shrink what each key can do. One application, one key, the narrowest scope the provider allows, a hard spend cap, and an expiry date. A spend cap is an access control. It is the difference between a stolen key that costs you a weekend of inference and one that funds a campaign. Where you can, get rid of the static secret entirely; Microsoft recommends moving OAuth applications off client secrets and onto managed identities, which removes the string that ends up in a repository [3].

Assume exposure is a countdown, not an event. Microsoft is blunt that a credential exposed in public stays usable until it is revoked or rotated, and that deleting the commit does not fix it [3]. The attackers’ own 30-day cutoff tells you their expectation: fresh keys are worth the most, and the window in which you can still beat them to the punch is short [1]. Rotation that happens in hours is a control. Rotation that happens at the next quarterly review is a formality.

Finally, wire spend and usage anomalies into the same place your authentication alerts go. If a model key starts making calls at three in the morning from an address that has never touched your account, that is not a cost question for finance. That is an intrusion, and the meter is running.

The Meter Is the Message

The old constraint on offense was cost. Somebody had to pay for the infrastructure, the time and the patience, and that limit kept a lot of operations small. Agentic tooling has not made attackers smarter. It has made them cheaper, and in this campaign it has made them free, because the bill goes to whoever left a key where an agent could find it.

Privilege has always been risk. What changed is that some of your privilege now has a balance attached, and the other side has figured out how to spend it. Lock down the places that hold the keys, make every key smaller and shorter-lived, and start reading your invoices like logs. The agents already are.

About the Author

Len Noe is a Solutions Architect at BeyondTrust, Transhuman, Podcaster, International Cyber Security Speaker, Author, Technical Evangelist, and Biohacker with 11 implanted microchips. A former blackhat and ex-1% motorcycle club member with more than 30 years in technology, he has presented in over 70 countries and is featured in the documentary I Am Machine, which premiered at DEF CON 2025.

References

  1. CJ Moses, “Amazon Threat Intelligence observes threat actors running cybercrime campaigns with ARTEX AI agents,” AWS Security Blog, Amazon Web Services, November 13, 2026. aws.amazon.com
  2. Federal Bureau of Investigation, “Threat Overview of ARTEX Autonomous Penetration Testing Framework,” FLASH-20261113-001 (TLP:CLEAR), Internet Crime Complaint Center, November 13, 2026. ic3.gov
  3. Microsoft Threat Intelligence and Microsoft Security Research, “Threat actors use agentic AI tooling to find and abuse exposed secrets,” Microsoft Security Blog, November 5, 2026. microsoft.com
  4. Jonathan Greig, “FBI flash alert says Artex tool automating cyberattacks at ‘machine speed’,” The Record from Recorded Future News, November 13, 2026. therecord.media
  5. Ravie Lakshmanan, “Google Finds Hackers Using AI Agents to Build and Run Exploits From Software Patches,” The Hacker News, November 16, 2026. thehackernews.com