Amazon's threat team caught AI agents stealing API keys from exposed apps like LiteLLM and Dify. Learn how they operate and how to protect your keys.
Imagine an intruder so relentless it never sleeps, never gets tired, and never stops looking for a way in. That's exactly what's happening right now, according to Amazon's threat intelligence team. They've uncovered a campaign where AI agents are actively hunting for weaknesses in internet-exposed AI apps like LiteLLM, One API, and Dify. The goal? To steal the AI provider keys stored inside—keys that unlock powerful models.
### The Setup: Decoy Servers and Stolen Keys
Amazon's team didn't just stumble on this. They set up decoy servers to capture the agents in action. What they found was chilling: the stolen keys were being used to run the very AI models that powered the search for more keys. It's a self-sustaining cycle—steal a key, use it to find more, repeat. The agents' own records detailed this process, leaving little doubt about their intent.
> "The agents' records describe stolen keys being used to run the AI models that powered the search for more keys." — Amazon threat intelligence team
This isn't a one-off. It's a systematic campaign targeting apps that are exposed to the internet. If you're running LiteLLM, One API, Dify, or similar tools, you're in the crosshairs.
### Why These Apps?
These apps are popular because they make it easy to integrate AI models into your workflows. But that convenience comes at a cost: they often store API keys—the credentials that let you access services like OpenAI, Anthropic, or others. If those keys fall into the wrong hands, attackers can rack up huge bills, access sensitive data, or even disrupt your services.
- **LiteLLM**: A lightweight proxy for multiple LLM APIs.
- **One API**: A unified API gateway for various AI providers.
- **Dify**: An open-source platform for building AI applications.
All of them are designed to be developer-friendly, but that also means they're prime targets if not properly secured.
### How the Attack Works
The AI agents are scanning the internet for exposed instances of these apps. Once they find one, they look for vulnerabilities—misconfigurations, weak authentication, or unpatched software—that allow them to extract API keys. Then they use those keys to access AI services, often to run their own operations, including further scanning.
It's a clever and dangerous loop. The more keys they steal, the more resources they have to steal even more.
### What You Can Do to Protect Yourself
If you're using any of these apps, here's how to keep your keys safe:
- **Never expose your app to the public internet without proper authentication.** Use strong passwords, API keys, or OAuth.
- **Keep your software up to date.** Patch known vulnerabilities as soon as updates are available.
- **Use a secrets manager.** Don't hardcode API keys in your code or store them in plaintext.
- **Monitor for unusual activity.** Set up alerts for unexpected API usage or billing spikes.
- **Consider a web application firewall (WAF).** It can help block malicious traffic.
### The Bigger Picture
This campaign highlights a growing trend: attackers are using AI to automate and scale their efforts. It's not just about stealing keys anymore; it's about building an infrastructure that can continuously find and exploit weaknesses. As AI tools become more integrated into our lives, securing them becomes non-negotiable.
For professionals in the antidetect browser space, this is a wake-up call. Many of you rely on these AI apps for automation, data collection, or managing multiple accounts. A compromised key could expose your entire operation. So take this seriously—review your security posture today.
Remember, the bad guys are using AI to find your weak spots. It's time to use AI to defend them.