In this article
- A bot tested an AWS key just 7.86 seconds after researchers published it
- Attackers used up about $60 in prepaid OpenAI and Anthropic credit
- If you accidentally publish a key, revoke it and check your account for unexpected usage and charges
Eight seconds is barely enough time to notice a mistake, let alone fix it.
But researchers at Stony Brook University found that it was enough time for a bot to test a cloud access key they’d deliberately left inside a publicly available software package. The fastest observed use came just 7.86 seconds after publication.
You don’t need a company cloud account to have a key worth stealing. If you’ve created an API key for an AI service and used it in an app or script, someone who gets hold of it can run up charges on your account. OpenAI warns that they could also use up your quote and interrupt your service.
To see who was collecting those secrets, Billy Tsouvalas and Nick Nikiforakis set up honeypots, or decoys that let researchers monitor what happens when someone takes the bait. Over four months, they published 300 honeypot images across eight public registries. The bait included working access keys for Amazon Web Services (AWS), OpenAI, and Anthropic. Each key was tied to monitoring, so any use would show up in the provider’s logs.
The researchers didn’t advertise the images anywhere, but they were still downloaded tens of thousands of times.
Most of the early activity looked like bots checking whether the keys worked. Nearly every bot that tested an AWS key began with GetCallerIdentity, essentially a “who am I?” request that tells an attacker whether a key is live. About half the IP addresses researchers saw scanning for AWS keys stopped after that initial check. Only around 6% went on to sustained use of account resources.
A key that passes that check can still be sold on or used later. In the AI-service tests, the OpenAI keys sat quiet for weeks before someone used one to burn through the remaining balance in under 24 hours. The researchers offered an explanation:
“We speculate that the wait phase reflects validated keys being resold and held idle until a buyer eventually uses them.”
The researchers loaded about $60 in total onto their OpenAI and Anthropic accounts, and attackers used up all of it.
How to stay safe
The researchers published honeypot container images on Docker Hub and seven other registries, then shared their findings with Docker. According to the paper, Docker acknowledged the disclosure, and its security team was reviewing the findings.
The number of probing bots and their speed is something developers should worry about. If you use cloud or AI services, a few precautions can help keep your keys safe:
- Keep secrets out of what you share. Don’t put keys in code, public repositories, or container images.
- Scan before you publish. A bot can find an exposed key within seconds, so a check after publication is too late. The researchers also recommend that registries scan images as they’re uploaded.
- Limit what each key can do. In the second round of tests, every OpenAI and Anthropic key that attackers used to burn through credits had unrestricted permissions. No restricted key was used that way. The scanners appear to check permissions first, so a narrowly scoped key gives them less to work with. A narrowly scoped key can only perform specific actions or access particular resources.
- Prefer short-lived credentials. AWS recommends using temporary credentials instead of long-term access keys wherever possible.
- Set spending limits and alerts. Check whether your provider’s budget setting just sends an alert or sets a hard limit on what you can spend.
If you’ve already published a key, treat it as compromised, even if it was public for only a minute. Revoke it and replace it. Then review account activity and charges.
Scammers don’t need to hack you. They just need you to click once.
Malwarebytes Identity Theft Protection catches suspicious activity before it becomes a problem.

