Canary Token's Post-LLM Leakage Detection
Rebuff's post-LLM defense injects a hidden, unique canary token into the system prompt. If this token appears in the LLM's response, it signals a successful prompt injection, indicating context leakage.
The top 3
- Canary Tokens' Origin: Ancient Tripwire for Modern LLM Leaks: Canary Tokens, named after coal mine canaries, originated as a deception technique involving planted 'tripwires' like fake credentials or files. This concept is now adapted to LLMs by embedding unique, high-entropy strings or invisible markers within system prompts to detect unauthorized data leakage or prompt extraction.
- Top 3 Stealthy Techniques for Post-LLM Leakage Detection: For post-LLM leakage, Canary Tokens utilize steganographic methods like zero-width Unicode characters, Cyrillic homoglyph substitution, or whitespace patterns to embed invisible tokens in prompts. These tokens are designed to persist through paraphrasing or copy-pasting, allowing programmatic detection in the LLM's output with confidence levels (high/medium/low).
- Canary Tokens' Role: Detection vs. Prevention in LLM Security: Canary Tokens excel as a deterministic detection mechanism, providing early, actionable alerts for prompt injection and data exfiltration with minimal false positives. However, they are not a prevention tool; they confirm *that* a leak occurred after the fact, rather than stopping the initial attack, and may miss sophisticated injections that bypass marked regions.
Sources
Open the full topic