CybersecurityNovember 16, 20264 min read

Why Attackers Are Going After AI App Keys Instead of the Models

Why would an attacker target an AI app like LiteLLM or Dify? Because the real prize is often the provider key inside, and stolen keys can fund more automated searching.

Why would someone attack an AI app just to steal a key?

Because the key is the wallet.

Amazon’s threat intelligence team says attackers have been using AI agents to scan internet-exposed AI apps such as LiteLLM, One API, and Dify for weaknesses, then steal the AI provider keys stored in them.

The notable part is not just the theft. It’s the loop.

According to records captured from the attackers’ own systems using decoy servers, some stolen keys were then used to run the AI models that helped search for more keys. In plain terms, the campaign appears to be using other people’s credits and access to keep the campaign going.

That’s a practical attacker mindset. If they can make your account pay for the compute that helps them compromise the next target, their costs drop close to zero.

Think of it like someone stealing a company fuel card, then using that fuel to drive around looking for more unlocked vans with more fuel cards inside.

Why apps like LiteLLM, One API, and Dify are attractive targets

A lot of AI apps sit between users and model providers. They handle prompts, route requests, log usage, and store the credentials needed to call upstream models.

That makes them useful operationally. It also makes them a concentration point for secrets.

If one of these apps is exposed to the internet and badly configured or vulnerable, an attacker may not need to break into the model provider directly. They can go after the layer that already has working keys saved inside.

For a non-specialist, an API key is basically a machine password. It tells a provider, “this request is allowed, and bill it to this account.”

If an attacker gets that key, a few things can follow:

  • unauthorized model usage billed to the victim
  • access to whatever permissions the key already has
  • abuse of the compromised app as a stepping stone to other systems
  • more automated probing funded by the victim’s own account

That last part is what gives this campaign its shape.

It is not only about one stolen secret. It is about turning stolen access into more searching, more theft, and more scale.

The underlying security problem is old, even if the tooling is new

The “AI agent” angle sounds new, but the basic pattern is familiar.

Attackers automate discovery. They find exposed services. They look for weak defaults, exposed admin panels, poor authentication, secret leaks, or known bugs. They grab credentials. Then they reuse those credentials fast.

AI can make parts of that loop cheaper or faster, especially the sorting and probing work. But the defenders’ problem is still the same one admins have dealt with for years: internet-facing software that holds valuable secrets needs tight control.

If you store provider keys inside an app, you should assume that app is now a vault door, not just a convenience layer.

And weak vault doors get tested.

Another detail worth keeping in view: Amazon says the evidence came from the agents’ own records collected through decoy servers. That does not mean every claimed action in those records is automatically complete or perfect. But it does give unusual visibility into the operators’ workflow and intent, which is often hard to get.

What I’d do if I ran one of these AI apps

If you expose AI infrastructure to the internet, this is a good week to act like your keys are worth stealing, because they are.

Start with the obvious controls:

  • rotate any AI provider keys stored in internet-exposed apps
  • remove old or unused keys entirely
  • give each app its own key instead of reusing one key across multiple systems
  • restrict key permissions and spending limits where the provider allows it
  • keep admin panels off the public internet unless there is a strong reason not to
  • require strong authentication for management access, ideally with MFA
  • patch LiteLLM, Dify, One API, and similar tools promptly when fixes are available
  • review logs for unusual model usage, billing spikes, or requests from odd locations
  • store secrets in a proper secret manager rather than hardcoding them in configs or containers
  • segment the host so that compromise of the app does not automatically expose everything else

If you are a smaller team, do the first three today.

They get you a lot of risk reduction fast.

Also, treat unexpected AI costs as a security signal, not just a finance problem. Unusual billing can be the first visible sign that a key has already been taken and is being abused.

The clear read on this story is simple: attackers do not need to “hack the AI” in some dramatic sci-fi sense. Often they can just steal the credentials around it and let your own account fund the rest of their operation.

That is less flashy than model sabotage. It is also more likely.

So if you run AI apps, protect the keys like cash, because for an attacker, that is exactly what they are.