# Obfuscated API Key Disclosure

- **Severity:** Critical
- **Signature ID:** `0574fe7d-8299-443e-8256-79eb147bf531`
- **MITRE ATLAS:** AML.T0057 (LLM Data Leakage)
- **OWASP:** ASI08 (Supply Chain Attacks on Agent Ecosystems), LLM02 (Sensitive Information Disclosure)

## Summary

An attacker asks an AI agent to output a real secret key disguised inside a fake encryption or encoding function, like AES256(sk-proj-realkey). The label makes it look safe, but the actual secret is sitting in plain text right there.

## How the attack works

The attacker gets a real API key into context, either by asking the agent to fetch it, having it already present in memory, or supplying it directly. They then instruct the agent to output the key wrapped in something that looks like an encryption call, for example AES256(...) or base64(...), claiming this makes it safe to display or transmit. The agent, seeing what appears to be an encoded or protected value, treats it as non-sensitive and outputs it. The wrapping is cosmetic only; the plaintext key is fully visible to anyone reading the output.

## Why it matters

A live API key can be exfiltrated in a form that bypasses naive 'don't leak secrets' checks, giving the attacker credentials to whatever service the key controls.

## What you can do

- Treat any output containing a recognizable secret pattern (sk-, AKIA, ghp_, etc.) as a leak regardless of surrounding wrapper text or claimed encoding.
- Do not rely on agent self-judgment about whether a value 'looks' encrypted before allowing it to be displayed or sent externally.
- Scan agent outputs for known key prefixes and formats before they leave your environment, not just for plaintext-labeled secrets.
- Rotate any key that appears in agent output, wrapped or not, and audit how it entered the agent's context.

## Known benign look-alikes

- A security training document or CTF challenge write-up that demonstrates fake encryption wrapping of example API key prefixes (e.g., 'encrypted key: AES256(sk-example)') as part of an educational walkthrough.

## References

- https://agentthreatrule.org/en/rules/ATR-2026-00145

---
Source: https://www.netzilo.com/threats/atr-obfuscated-api-key-disclosure
