← All advisories
KSG-ADV-2026-001 Severity: High Audience: SMB

Protecting Your AI API Keys: What Small Businesses Need to Know About Credential Theft

Executive Summary

Kariba Security Group is issuing this advisory in response to a significant and growing threat targeting businesses that use AI services. Organised criminal groups are systematically stealing AI API keys from small businesses, developers, and software vendors — then using those stolen credentials to run their own attack operations at the victim's expense.

A recent threat intelligence report published by Anthropic documents multiple criminal operations running this playbook at industrial scale, including one group that downloaded 1.8 million Android applications specifically to scan them for exposed API keys. Once stolen, your credentials give attackers three things simultaneously: a bill charged to your account, a cover identity for their operations, and the computing power to run further attacks against other victims.

One small business owner affected by this type of theft was unable to work for two weeks while dealing with account suspension, unexpected charges, and the investigation required to regain access. The financial and operational impact on a small business can be severe.

How the Attack Happens

Understanding the attack helps you understand why the defensive steps below matter.

Step 1: Attackers mine for exposed keys

Criminal groups run automated pipelines that continuously scan publicly accessible locations for API keys. One documented operation downloaded 1.8 million Android app install files from multiple app stores and scanned every one for hardcoded credentials. The same groups scan:

Keys found in any of these locations are immediately tested to confirm they work, then either used directly or sold through Telegram channels and underground marketplaces.

Step 2: Attackers validate what they've stolen

Stolen keys don't go directly to use. They go through an automated validation pipeline that tests each key, confirms it works, checks what access level it has, and grades it for resale value. This happens within minutes. By the time you notice unusual activity, the key has likely already been sold or deployed.

Step 3: Attackers use your account for their operations

Documented uses from the Anthropic threat intelligence report include running automated cyberattack workflows against other targets, processing stolen data, developing and testing malware, and running large-scale reconnaissance operations. All of this activity is charged to your account and appears under your identity.

Step 4: Attackers maintain access

Important: Some criminal groups install credential harvesting software that continuously monitors for new sessions and API keys, automatically sending any new credentials to the attacker as they appear. Rotating your key after a breach may not be enough if the harvester is still running.

Warning Signs

Check these indicators immediately if you have any concern about your AI account:

Immediate Actions if You're Compromised

  1. Revoke all existing API keys immediately. Log into your Anthropic console at console.anthropic.com, go to API Keys, and delete any key that may have been exposed. Do this before anything else.
  2. Review your usage logs for the past 30 days. Note dates, times, and volume of API calls you didn't make. You'll need this for the incident report and any billing dispute.
  3. Contact your AI provider's support team. Report the suspected theft immediately. The earlier you report, the better your position for account recovery and potential billing adjustments.
  4. Check all devices that had access to the key. If you find signs of credential harvesting software, treat this as a full security incident.
  5. Create a new API key following secure storage practices (see below).
  6. Review what the attacker used your account for. If your account was used to conduct attacks against other organisations, consult with a security professional about potential liability.

Prevention

Never put API keys in your code

This is the most common exposure vector and the most preventable.

# Wrong — key is visible to anyone who sees your code
client = anthropic.Anthropic(api_key="sk-ant-api03-...")

# Right — key lives in an environment variable
import os
client = anthropic.Anthropic(api_key=os.environ.get("ANTHROPIC_API_KEY"))

Use a .env file and add it to .gitignore

Store keys in a .env file for local development, then add it to your .gitignore so it can never be accidentally committed:

# .env file (never commit this)
ANTHROPIC_API_KEY=sk-ant-api03-your-key-here

# .gitignore entry
.env
*.env
.env.local

Audit your repository history

If you've ever had a key in your code — even briefly, even in a commit you later deleted — it may still be in your repository's history. Use GitGuardian (free tier available) or GitHub's built-in secret scanning to check every repository that handles API keys.

Critical: Deleting a file that contained a key does not remove it from git history. If a key appeared in any commit, revoke it immediately, regardless of whether you've removed it from current code.

Rotate keys every 90 days

Treat API keys like passwords: change them periodically even without a known compromise. Log into your console, create a new key, update your environment, and revoke the old one. This limits the exposure window if a key was quietly stolen.

Use separate keys for separate purposes

If you use AI APIs for multiple purposes — customer-facing features, internal tools, development testing — use separate API keys for each. This limits the blast radius if one key is compromised and makes anomalous activity easier to detect.

Be cautious with third-party integrations

Some business tools and plugins ask for your AI API key. Before providing one, verify the service's legitimacy and confirm how they protect your key. Create a dedicated key for that service so you can revoke it independently if needed.

Documented threat: A criminal operation documented in Anthropic's September 2026 threat intelligence report (GTG-50021) ran fraudulent "discounted AI access" services as a credential theft vector. Never provide your key to a service offering cheap AI access.

Enable usage alerts

Set a billing alert at 150% of your typical monthly usage. High enough to avoid false alarms, low enough to catch a theft quickly. Most AI providers offer this in their billing settings.

For Developers: Additional Considerations

For Non-Technical Business Owners

If a developer manages your AI integrations, ask them these questions:

If you can't get clear answers to these questions, contact Kariba Security Group for an AI credential security review.

Summary Checklist

Immediate

  • Review API usage in the last 30 days for anomalies
  • Confirm API key is not stored directly in code or configuration files
  • Confirm .env files are in .gitignore
  • Set up usage and billing alerts

This Week

  • Audit code repository history for exposed keys (GitGuardian or GitHub secret scanning)
  • Create separate keys for separate use cases
  • Review third-party services that hold your API key

Ongoing

  • Rotate API keys every 90 days
  • Review usage logs monthly
  • Train team members who handle API keys on secure storage practices