Amazon Exposes Self-Funding AI Agent Campaign Hunting API Keys in LiteLLM, Dify, and One API

Amazon's threat intelligence team has documented something that until recently lived mostly in speculative fiction: autonomous AI agents scanning the internet for exposed AI infrastructure, stealing the API keys stored inside, and then using those very keys to pay for the compute that powers their next round of attacks. The findings, reported by The Hacker News, describe a campaign targeting internet-facing AI applications such as LiteLLM, One API, and Dify.

What the attackers were after

LiteLLM, One API, and Dify are popular open-source projects that act as gateways and orchestration layers for large language models. Organizations deploy them to route requests across multiple AI providers, manage quotas, and build LLM-powered applications. To do that, they hold something extremely valuable: provider API keys for services like OpenAI, Anthropic, and others.

Those keys are effectively bearer tokens for paid compute. A stolen key can be resold, abused to run inference at the victim's expense, or, as this campaign shows, recycled back into the attack itself.

Recorded by decoy servers

The visibility into the campaign came from honeypots. Amazon's threat intelligence team deployed decoy servers designed to look like vulnerable AI applications. Because the attackers' tooling left behind its own logs and records, the researchers were able to read, in the attackers' own words and data structures, what the agents were doing.

Those records describe a loop: find exposed AI apps, extract credentials, then use the stolen keys to run the AI models that drive the search for more keys. In other words, the campaign is at least partially self-funding. Each successful compromise lowers the marginal cost of finding the next victim, because the victim's own quota pays for the attacker's inference.

Why this matters

The headline is not simply that AI applications are being attacked. Exposed services with embedded credentials have been a target for years. What is new is the degree of autonomy and the economics of the operation.

Traditional credential-harvesting campaigns still require a human or a fixed script to decide where to look next. Agentic tooling changes that calculation. An agent can probe an endpoint, interpret error messages, adapt its payload, and pivot, all without a human in the loop. When the fuel for that reasoning is drawn from the victim's own account, the attacker's cost structure collapses.

There is also a supply-chain dimension. LiteLLM, One API, and Dify are widely used precisely because they simplify multi-provider AI deployments. A single misconfigured instance can expose keys for several upstream providers at once, multiplying the blast radius of one mistake.

The familiar root cause

The technical weakness the agents exploited is not exotic. AI gateway and orchestration tools are frequently deployed with default or weak authentication, exposed management interfaces, or permissive configurations that let unauthenticated users reach administrative endpoints. When these services sit directly on the public internet, they become attractive targets for automated discovery.

The pattern echoes earlier waves of attacks against other self-hosted infrastructure that shipped with convenient defaults: dashboards, proxies, and admin consoles that were never intended to face the open internet. The AI ecosystem is now reproducing that history at speed, because the payoff for a successful compromise is direct access to paid compute.

Defensive recommendations

Organizations running LiteLLM, One API, Dify, or comparable AI gateways should treat them as sensitive credential stores rather than convenience tooling. Practical steps include:

  • Inventory exposed instances. Identify any AI gateway or orchestration service reachable from the internet, including shadow deployments spun up by individual teams.
  • Enforce authentication and network controls. Restrict administrative interfaces to trusted networks, require strong authentication, and place gateways behind a reverse proxy or VPN where feasible.
  • Scope and rotate keys. Issue provider keys with the narrowest permissions and spending limits available, and rotate any key that may have been exposed. Monitor provider dashboards for anomalous usage spikes.
  • Log and alert. Forward gateway logs to a SIEM and alert on unexpected authentication failures, enumeration patterns, and unusual inference volumes.
  • Patch promptly. Track advisories for the AI tooling in your stack; these projects move quickly and configuration guidance changes.

The bigger picture

This campaign is a useful marker of where things are heading. AI agents are moving from defensive copilots into the attacker's toolkit, and the first targets are the AI systems themselves, because that is where the keys live. The self-funding loop Amazon observed is a preview of an economic model in which compromised AI infrastructure subsidizes further compromise.

For defenders, the lesson is straightforward: the AI applications you deploy are not just consumers of credentials, they are custodians of them. Treat their exposure accordingly, and assume automated agents are already looking.