AI keys are the loot: attackers use them to pay for their own agent

For years, a leaked API key was an open door. Someone found it, got in, and the problem was what they did inside. Now it is something else: a credit card. And whoever finds it doesn’t use it to get in, but to pay.

Two reports from this November made me see it. The first, from Amazon, on 13 November. For a month, its traps watched criminal groups use ARTEX, a penetration testing tool built on AI agents that was released as open source in July. It dug through GitHub repositories, npm and PyPI packages, container images, notebooks and environment files, looking for keys that give access to AI models. And the funny part, if you’re not the one paying: the stolen keys paid for the models that ran the hunt itself. The attacker’s agent does the work, and someone else gets the bill.

The second, from Microsoft, on 25 November, points the same way. Several groups, some state-backed and some criminal, use ARTEX once they are inside: it reads configuration files, .env files and private keys, and reuses what it finds. Microsoft puts it like this: the AI agents “have focused on AI service credentials”.

Neither of them talks about Claude Code, Cursor or MCP servers. They talk about servers open to the internet and secrets that slipped into code. But read it thinking of your own computer and the loot is the same as what you have there: AI model keys in environment files, in your MCP server settings and in the git history of your projects. Often you don’t even remember they’re there.

What both recommend is short and sensible. Assume an exposed secret will be found, and soon; if a key has been in a repository or a published package, change it, even if you deleted it later. Take secrets out of code and out of the files you publish. And check the spending on your AI accounts now and then: usage you don’t recognise is the first warning.

That’s why RosmarOps tells you which keys each agent on your computer can reach: in your MCP server settings, in your project files and in your git history. It doesn’t copy them or send them anywhere. In the report you only see the first four characters and the last four, enough to know which one it is and go and change it.

Albert

Sources