Skip to main content
[← back to blog]

Stolen AI keys paid for the hunt for more AI keys

Amazon's decoy servers captured attackers' ARTEX agents describing their own campaigns: pulling provider keys from exposed AI gateways, then spending them on the model calls that found more keys.

Nov 17, 20266 min read

Between October 3 and November 5, 2026, decoy servers run by Amazon recorded attackers' AI agents describing their own campaigns. In the largest one, stolen keys for AI models paid for the model calls that drove the hunt for more keys, according to Amazon Threat Intelligence, which published its findings on November 13.

The agents ran on ARTEX, the open-source agentic penetration testing framework that turned up in state-linked intrusions in October (we told that story in the AI cyberattack race). Amazon's report shows the campaigns from the inside, in the agents' own records.

What Amazon's decoys captured

Amazon runs MadPot, a network of decoy sensors that pose as services attackers want. For this report, Amazon says, some sensors presented themselves as popular LLM inference APIs. ARTEX agents took them for a model backend and sent them prompts.

Those prompts carried the agents' working memory. Amazon says they held the task context, system prompts, tool histories, the shared knowledge graph and reported findings that an agent framework normally sends to its model to decide what to do next. Because the framework keeps its history, a single request often held a campaign's full operational record.

To decide its next step, an agent has to send its plan to a model, and whoever answers as that model reads the plan. In this case, Amazon's sensors answered.

Amazon is careful about what that proves. It did not watch the activity on the systems the agents described, and it says it cannot verify the outcomes they reported. The records show what the operators were after and how they organized the work. Amazon attributes the campaigns, with moderate confidence, to several separate groups, and says it notified AWS customers who appeared in them.

How the key theft paid for itself

The operators wrote standing instructions and let the agents work. Amazon describes planner, worker, verification and compression agents sharing one knowledge graph, so each agent picked up where another left off.

The main campaign went after keys that unlock AI models. According to Amazon, the agents found internet-exposed AI applications, pulled out the upstream provider keys those applications held, checked that the keys worked and stored them in a pool. The stolen keys then fed the framework's own model gateway, which powered the agents searching for more.

The agents graded every find. Amazon lists three levels: L1 for a lead, L2 for a confirmed working API call, and L3 for quantified impact, such as readable data or a spendable balance. The operators told the agents to treat keys exposed publicly for more than 30 days as low-value inventory, and in GitHub's event archives the agents looked for secrets that had slipped past automated revocation. Fresh, working keys were the product.

For defenders, that 30-day line is the useful number. The operators expected keys older than a month to be dead or rotated, so the days right after a leak are the ones that count.

Cloud credentials got the same treatment. Amazon says the agents checked the identity behind each one, listed storage, measured its permissions and went after managed AI model services, secret stores and application identities. They ranked access to premium frontier models above general cloud permissions.

Where the agents looked for keys

The agents favored applications that hold many provider keys at once, because one weak admin interface can expose many downstream accounts. Amazon names LLM gateways and proxies such as One API, New API, Veloera, Sub2API and LiteLLM, and AI app builders such as Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat and Ollama.

A playbook mapped each product to a known way in. The weaknesses Amazon lists are ordinary ones:

  • installs nobody finished setting up, which anyone could claim
  • management and provider-configuration endpoints with no login
  • default administrator credentials, such as LiteLLM's default master key
  • known flaws in Langflow (CVE-2025-3248) and RAGFlow (CVE-2026-28797)
  • server-side request forgery that reaches cloud metadata services
  • secrets left in client-side JavaScript, source maps, debug routes and environment files

LiteLLM has already had a hard year: its release pipeline was compromised twice in seven months, as we covered in supply chain attacks on AI tools. In Amazon's report it appears for a plainer reason: its default master key is in the agents' playbook.

To find leaked keys, Amazon says, the agents also searched GitHub repositories and event archives, npm and PyPI package tarballs, container image layers, notebooks, model-hosting spaces, paste sites and Telegram channels, alongside internet scans and certificate transparency logs.

Amazon also describes a second campaign, in which agents built real-time deepfake video and edited ID photos to get past identity checks at two cryptocurrency exchanges. The verification vendor's server rejected the deepfake in every attempt the agents recorded.

Why the developer laptop is part of this

Read the agents' search list as a map of where keys leak. Several entries begin on one person's machine: an environment file, a package published from a laptop, a notebook pushed to share a result, a local gateway stood up to try a model.

Coding agents add another reader on that machine. Claude Code, by its own description, can "edit files, run terminal commands, and handle entire workflows" (npm). It does that with the developer's access, so it can open the same .env file the developer can and run the command that publishes a package.

None of the techniques were new, Amazon says; what agents change is the speed and persistence of the attacker. The agents in its records ran with minimal human intervention, working through their target lists without a person driving each step.

What would have caught it

Each step of the campaign left a mark somewhere a defender could look.

  • At the gateway: a management interface reachable from the internet, still on its default admin key, is the first point. Amazon's advice is to bring AI applications, model gateways and inference endpoints under the same controls as other production systems.
  • In what gets published: secret scanning on commits, packages and image layers before they leave the building catches the keys the agents went looking for.
  • On the machine: a record of which process read a credentials file, and which host it contacted next, shows a key on its way out.
  • At the provider account: the stolen keys paid for inference, so the bill moves. Amazon names unexpected spend and unusual usage of AI services as the signal to watch.

What to do this week

  • List every AI gateway and app builder your teams run, including the ones on a test VM or a laptop, and confirm none is reachable from the internet on a default admin credential.
  • Rotate any provider key that has ever sat in a repository, a notebook, an image layer or a published package. Amazon's guidance is to assume exposed secrets will be found quickly.
  • Set spend and usage alerts on every AI provider account, with an owner for each.
  • Patch Langflow and RAGFlow if you run them, and check the CVEs above against your inventory.
  • Ask whether you could say which process read a .env file on a developer machine last week, and where it connected next.

On each Mac, Quint records which files an AI agent opens and which hosts it contacts, from the operating system rather than the agent's own account, and for Claude Code it flags credentials that are read and then sent to a host that is not their provider's. See what your agents did last week on one of your own machines: book a demo.

Related reading

Your agents are running. See what they're actually doing.

Book a demo