What is a honeytoken?
A honeytoken is a piece of data with no legitimate use, planted so that any access to it or use of it signals an intrusion. It can be a credential, a document, a database record, an API key or a configuration entry. Nobody legitimate touches it, so an alert from a honeytoken is high-confidence, and CISA’s September 2026 decoy guidance rates honeytokens as low complexity, suitable even for teams early in their security maturity.
The idea is older than most security tools in use today. Augusto Paes de Barros coined the term on 21 February 2003, describing “an idea that I call honeytokens” for Windows networks. MITRE D3FEND now lists the same idea under its Deceive tactic as Decoy File, Decoy User Credential and related techniques.
How do honeytokens work?
A honeytoken works by carrying something unique, a hostname, URL, key or account name, that only gets used if someone finds the honeytoken and acts on it.
- CreateGenerate a decoy with a unique value tied to infrastructure you watch.
- PlantPut it where intruders search: a .env, a kubeconfig, a CI secret, a file share.
- UseAn intruder, script or agent reads it and tries what is inside.
- AlertThe unique value reaches your server or logs, and you learn which honeytoken fired.
Good honeytokens alert on use, not on reading. Backup, sync and indexing tools read files all day; they do not connect to the database or API inside them. That is what keeps false positives low.
Generate honeytokens now
Enter a domain you control. The generator makes a set of honeytokens for the places intruders and AI agents look first, each with its own id in a hostname under that domain. It runs entirely in your browser; nothing is sent anywhere.
These are generic starter files for trying the idea: the same templates for everyone, with random secrets that carry no real provider prefix. FalseTrail’s decoys are generated for the place they go instead: named the way your environment names things, unique to each machine and path, with real but powerless cloud keys and genuine Word and Excel documents.
To receive the alerts, point wildcard DNS (*.decoy.example.com) at a small server and run the listener from decoy-kit, the open-source project behind this generator: one docker compose up -d obtains certificates for every decoy hostname, logs each hit with its id, and can post to a Slack-style webhook. Test one honeytoken yourself before you rely on it.
The secrets are random strings with no real provider prefix, so they will not trip GitHub secret scanning or a provider’s revocation process, and nobody wastes an afternoon on a “leaked” key. Only plant honeytokens on systems you own or are authorised to test.
What are the main types of honeytokens?
| Type | Example | It fires when |
|---|---|---|
| Credential in a file | .env with a database URL and API token |
The decoy database or API is reached |
| Cloud access key | An extra profile in a cloud CLI credentials file | The key is used against the cloud API |
| Kubernetes config | A prod-legacy kubeconfig context |
A client connects to the decoy cluster |
| AI tooling config | A decoy MCP server entry | An agent or person connects to the decoy server |
| Package and git credentials | .npmrc, .git-credentials |
The decoy registry or git host is used |
| Identity account | A dormant admin account tagged as a honeytoken | Someone tries to sign in with it |
| Document | A spreadsheet of “VPN passwords” on a share | It is opened, or what is inside is used |
| Database record | A fake customer with a unique e-mail address | Mail arrives at that address |
Microsoft Defender for Identity, for example, lets you tag dormant accounts as honeytoken accounts and alerts on any sign-in. For 34 concrete placements mapped to MITRE ATT&CK, see honeytoken examples.
Honeytoken vs honeypot: what is the difference?
A honeypot is a whole decoy system or service an attacker interacts with; a honeytoken is a single planted piece of data.
Honeytoken
- One planted credential, file, record or config entry.
- Seconds to create; spread widely across laptops, CI and cloud.
- Tells you it was used, and where it was planted.
Honeypot
- A decoy server or service that answers like a real one.
- More work to build, run and keep believable.
- Shows what the attacker does after contact.
They work best together: honeytokens are the bait spread across the estate, and decoy services give a followed trail somewhere believable to lead. A deception platform combines the two.
Where should you plant honeytokens first?
Start where real secrets were stolen in recent incidents: developer machines, CI/CD secrets and cloud configuration.
- CI/CD secrets. Grafana Labs kept decoy cloud keys in repository and organisation secrets; in April 2025 an attacker who read secrets through a vulnerable workflow tried them, the canary fired, and the intrusion was contained within minutes.
- Developer laptops. A
.envin a project folder, an extra cloud CLI profile, a decoy kubeconfig context. - AI tooling. A decoy MCP server entry and a decoy API key where coding agents read configuration. See MCP servers as decoys.
- Servers. A line in shell history, an SSH config entry for a “legacy bastion”.
- Identity. A dormant, well-named admin account that nobody uses.
What are the limits of honeytokens?
- Recognisable infrastructure. Tokens issued from a shared public service can be recognised: Truffle Security made its scanner flag keys from the public canarytokens.org service without triggering them. Honeytokens that point at your own domain avoid that list.
- One alert, then silence. A honeytoken tells you it was used, once. What the intruder touched next is left to your other tools.
- Upkeep. Honeytokens drift out of date, lose owners and stop matching the real secrets around them. Keep a manifest, test them, and retire them deliberately. See the deployment guide.
When is a honeytoken not enough?
When you need to know what the intruder wanted, not only that they were there. FalseTrail plants decoy credentials, documents and references across workstations, servers, cloud, Kubernetes, CI and AI tooling through your own deployment tools. Each one is generated for its place, so it looks like it belongs there rather than like a template. The first use opens a finding that names the exact machine and file, and the trail continues through decoy services, so your SOC investigates a path instead of a single ping. It runs entirely in your environment.
For hosted versus self-hosted options, read canary tokens, explained and self-hosted vs hosted canary tokens.