Honey Tokens

Difficulty: Advanced

Question

What are honey tokens, how do they differ from honeypots, and where would you deploy them?

Answer

A honey token is a piece of fake data planted inside a real system that has no legitimate use, so any access to it is a high-confidence sign of an intruder. Nobody should ever touch it, which means an alert from a honey token is almost never a false positive. They turn detection from 'hunt for anomalies' into 'wait for someone to trip the wire'.

Honey token vs honeypot

A honeypot is a whole fake system or service, such as a decoy database server, set up to attract and study attackers. A honey token is much lighter: a single fake credential, file, record or URL embedded in your genuine systems. You do not run extra infrastructure; you just scatter tripwires among real data. Both are forms of deception technology, but honey tokens are cheap, easy to deploy widely, and catch attackers who are already inside.

Common types of honey tokens

  • Fake credentials: a decoy username and password or API key in a config file or secrets store. Any login attempt with them means someone is reading places they should not.
  • Canary files and documents: a file like passwords_backup.xlsx that, when opened, calls home with the opener's IP (Canarytokens is a well-known free service for these).
  • Decoy database rows: a fake 'customer' record. If it ever appears in a data dump or a query, your database was exfiltrated.
  • Honey URLs and API endpoints: links that appear only in internal areas or robots.txt; a request to them signals scanning or an insider poking around.
  • AWS canary keys: fake AWS access keys that alert the moment someone tries to use them, catching leaked-secret scanners.

Why they are valuable

Traditional detection drowns teams in false positives. Honey tokens flip that: because legitimate users never interact with them, a single hit is a strong, actionable signal. They are especially good at catching threats that evade perimeter defences, such as an attacker who already has a foothold, a malicious insider, or a scanner trawling leaked secrets. They also help answer 'were we breached?' after a suspected incident.

How to deploy them well

  • Make them believable: name and place them so an attacker would plausibly target them, but ensure no real process ever reads them.
  • Spread them across source code, backups, databases, cloud secrets and endpoints.
  • Wire alerts to your SIEM or on-call so a trigger creates an immediate incident.
  • Document every token so your own team does not panic or, worse, treats a real alert as a known decoy.
  • Rotate and track them; a stale token list causes confusion during an incident.

Common mistakes

  • Planting tokens but never connecting them to alerting, so nobody notices when they fire.
  • Making them obviously fake, so skilled attackers avoid them.
  • Letting a real automated job touch a token, generating false alarms that get ignored.
  • Forgetting they exist, so a genuine trigger is dismissed as noise.
How a honey token catches an intruder. The token sits quietly until an attacker who should not be there interacts with it.
  1. Plant the token: A fake credential or file placed in a real system.
  2. Attacker gains a foothold: Through phishing, a stolen key or an insider.
  3. Attacker explores: Reads config, dumps data, tries credentials.
  4. Token is touched: The fake credential is used or the canary file opened.
  5. Alert fires: High-confidence signal reaches the security team.

Code examples

A decoy credential wired to alerting

# A fake admin account that no real code ever uses.
# Any login attempt against it means someone is probing.
HONEY_USERS = {"backup_admin", "svc_legacy_db"}

def on_login_attempt(username: str, ip: str):
    if username in HONEY_USERS:
        # never a legitimate login: raise a high-severity incident
        alert_security_team(
            severity="critical",
            message=f"Honey token login attempt for {username}",
            source_ip=ip,
        )
        # still return a generic failure so the attacker learns nothing
    return reject_login()

The decoy account exists only to be tripped. The login always fails as normal, but a hit fires a critical alert because no real user or job would ever target it.

Key points

  • A honey token is fake data planted in real systems; any access signals an intruder.
  • A honeypot is a whole decoy system, while a honey token is a single lightweight tripwire.
  • Types include fake credentials, canary files, decoy DB rows and AWS canary keys.
  • Their big advantage is near-zero false positives and catching insiders and post-breach activity.
  • Alerts must be wired up and tokens documented, or triggers get missed or misread.

Common follow-up questions

  • How does a honey token differ from an intrusion detection system?
  • How would you use an AWS canary key to detect leaked secrets?
  • What makes a honey token believable to a skilled attacker?
  • How do honey tokens help confirm whether a database was exfiltrated?

Interview tips

  • Draw the honeypot vs honey token distinction clearly; it is the most common follow-up.
  • Emphasise the low false-positive rate; that is the whole selling point.
  • Give a concrete example like a canary AWS key to show practical experience.

Concepts covered

Deception, Threat Detection, Honeypots, Canary Tokens, Incident Response

More Web Security (OWASP, JWT, XSS, CSRF) questions