# API Key / Secret Credential Generation or Completion Request

- **Severity:** High
- **Signature ID:** `79b1c9ce-5c8d-4fe4-b3dd-65f17090b09a`
- **MITRE ATLAS:** AML.T0057 (LLM Data Leakage)
- **OWASP:** ASI03 (Identity and Impersonation), LLM02 (Sensitive Information Disclosure), LLM06 (Excessive Agency)

## Summary

This detects attempts to get an AI assistant to invent realistic-looking API keys, tokens, or credentials, or to 'complete' a partial key it was given. The output can be used to build convincing fake credentials for phishing or to impersonate a legitimate service.

## How the attack works

An attacker asks the model to generate a sample API key, token, or credential for a specific service such as a cloud provider, AI vendor, or payment processor. Alternatively, they supply a partial or truncated key and ask the model to complete it, relying on the model having memorised real key formats or fragments from its training data. Either way, the model produces a high-entropy string formatted to look like a genuine secret. The attacker can then use that string in phishing messages, fake support tickets, or social-engineering attempts to appear as though they possess or represent a real account.

## Why it matters

An organisation whose AI assistant is used this way risks having its output turned into convincing fake credentials that support phishing campaigns or impersonation of its own services, damaging trust and enabling downstream fraud. This detects the generation/completion step, not a confirmed breach or actual leaked key.

## What you can do

- Configure the model to refuse generating credential-like strings, even clearly fake or example ones, for named services.
- Review logs for repeated requests asking the model to 'complete' partial keys or tokens.
- Treat any AI-generated string resembling a real vendor's key format as a potential phishing artifact and warn staff not to trust unsolicited credentials.
- Exclude legitimate documentation and training use cases from alerts by checking context, since format explanations are a known false positive.

## Known benign look-alikes

- Developer documentation explaining API key format regex (e.g. "OpenAI keys start with sk-")
- Security awareness training showing example fake credentials
- Code review tools checking for hardcoded key patterns

## References

- https://agentthreatrule.org/en/rules/ATR-2026-00274
- https://github.com/NVIDIA/garak/blob/main/garak/probes/apikey.py

---
Source: https://www.netzilo.com/threats/atr-api-key-secret-credential-generation-or-completion-request
