Amazon Catches Self-Funding AI Agents Stealing API Keys

Amazon Catches Self-Funding AI Agents Stealing API Keys

Amazon has disclosed on its security blog that a group of attackers used the open-source penetration-testing framework Artex to drive AI agents, spending roughly a month stealing API keys from AI applications exposed on the public internet. Once an agent obtained a key, it first checked whether the key worked, then pooled the working ones in a shared store. The attackers then used those keys to pay for more LLM calls, which in turn were used to hunt for the next batch of keys.

In Amazon's words, the most significant Artex operation was large-scale theft of model-access credentials, organized to be "self-sustaining": stolen keys paid for inference, and inference drove the next round of harvesting. The campaign began on October 3 and was intercepted and blocked on November 5 by MadPot, Amazon's decoy sensor network. Amazon has notified AWS customers who may have been affected.

The agents handed over their own ledger

The full picture emerged thanks to a somewhat ironic detail. MadPot runs a set of decoy systems disguised as common LLM access services, and the attacking agents sent requests to them that carried the agents' working memory, in effect a record of their own actions. Amazon's report quotes these records extensively.

The logs show a tightly organized workflow. An agent first searches the internet for exposed AI applications, extracts API keys, verifies that they work, and then adds them to the pool. The operators' instructions to the agents include scanning countries one by one in a fixed order, prioritizing enterprise production environments and leaving personal projects alone, and scoring every stolen key based on whether it works and what resources it can reach.

The instructions also set red lines: mainland China targets and government domains are excluded, and all outbound traffic must go through a proxy.

"organizations should assume exposed secrets and misconfigurations will be found quickly and remediate accordingly"

A separate operation targeted cryptocurrency exchanges, using real-time deepfake injection to get past KYC identity checks. The report does not give a success rate for that operation.

The named tools are familiar to developers in China

The hundreds of targets listed in the logs fall into two groups. One is LLM gateways and proxies, such as LiteLLM, One API and Veloera. The other is AI application-building platforms, such as FastGPT and Dify.

The list will look familiar to Chinese teams. One API and FastGPT are open-source projects built by Chinese developers, and Dify is widely deployed in Chinese enterprises. Many teams run them on overseas cloud hosts to give internal users or clients a single entry point to models. The configuration of such a gateway often stores keys from several model vendors at once, so when one machine falls, an entire string of bills goes with it.

Because the attack instructions exclude mainland China targets, instances hosted in mainland data centers should in theory have escaped this round, while instances running on cloud platforms in Hong Kong, Singapore or the United States were within the scanning scope. At a glance, three things deserve checking first: whether the admin console is directly exposed to the public internet, whether default passwords and initial tokens have been changed, and whether the upstream keys stored in the gateway have spending caps and source-IP restrictions.

Amazon also made clear that organizations listed as targets in the logs have not all been compromised. The report does not disclose how many keys were actually stolen or how many customers were affected; Amazon says it published the report so that organizations can run their own checks.

Attribution and the FBI warning

Amazon's threat intelligence team assesses with "medium confidence" that the activity comes from several independent threat groups with ties to China. The basis includes prompts written in Simplified Chinese, system clocks set to China time, target selection that fits Chinese interests, and tooling commonly seen with such groups. No other government agency has publicly confirmed this attribution so far.

Several companies had already reported Artex being used in attacks. In late October, Microsoft said a group it tracks as Storm-0940 used Artex to automate attacks on hundreds of organizations worldwide, and Google's threat intelligence group later said it had observed attackers weaponizing agent frameworks.

Last week the FBI issued a FLASH alert saying that multiple threat actors had used Artex to attack organizations across industries, with some cases going from target selection to full compromise in under three hours. The alert says that in an attack on South Korea's financial sector, the personal data of at least 68,000 people was stolen, and that through a breach at ConnectWise, attackers gained access to the Microsoft 365 environments of at least 2,250 customers. Some media outlets have noted, however, that the alert compiles 11 earlier reports and discloses no new cases.

After a string of attacks came to light, Artex's developer has switched the software to closed source; the FBI believes the earlier open-source versions remain widely circulated.

Sources: Amazon Security Blog, Cybernews, CocoLoop, TechCrunch, FBI FLASH alert. The South Korean victim count and the number of ConnectWise customers follow TechCrunch's account of the alert; the campaign dates and attribution confidence follow Amazon's account.