Most SMB breaches aren't caught by a shiny SIEM rule — they're caught (if at all) weeks later, after an intruder has already walked the network end to end. Canarytokens flip that timeline. They're free, zero-infrastructure tripwires: a fake AWS key, a "Payroll_2026.docx" file, a DNS hostname, or a bogus database credential that does nothing except phone home the instant someone opens, queries, or uses it. No attacker expects a decoy, which is exactly why it works — the alert fires on the first touch, not after data has already left the building.
This guide walks through generating tokens from the free hosted service (or a self-hosted instance), placing them where attackers actually look, and wiring alerts into email, Slack, or your existing SOAR/webhook pipeline.
Prerequisites
- A file share, shared drive, email inbox, or cloud account where decoys can live without disrupting real users
- Admin/write access to the target systems (file server, AD, AWS IAM, mail server)
- An email address or webhook URL to receive trigger notifications
- Optional: Docker, if self-hosting instead of using the free
canarytokens.orgservice
Step 1: Generate Your First Tokens
Canarytokens.org requires no account. Pick a token type based on where you want the tripwire:
| Token Type | Best Placed In | Triggers On |
|---|---|---|
| AWS keys | .env files, CI secrets, password managers | Any API call using the key |
| Web bug / URL | Email signatures, internal wikis | HTTP GET on the pixel URL |
| Microsoft Word / Excel doc | File shares, Desktop, "Confidential" folders | Document opened (even offline, later online) |
| DNS token | Internal configs, hosts file comments | Any DNS lookup of the hostname |
| Fast redirect | Phishing takedown links, decoy login pages | Click-through |
| AD credential (honey account) | Active Directory | Logon attempt with that account |
| Kubeconfig | Dev laptops, CI runners | kubectl usage against the fake cluster |
Create one from the CLI using the public API (no auth needed for basic token creation):
curl -s -X POST https://canarytokens.org/generate \
-d "token_type=web" \
-d "email=soc-alerts@yourdomain.ca" \
-d "memo=Finance-share-decoy-pixel"For the Word-doc and AWS-key types, use the web UI at https://canarytokens.org/generate — it packages the actual .docx/.xlsx file or a scoped-down IAM key for you to download directly.
Step 2: Place Tokens Where Attackers Actually Look
Decoys only work if they sit in paths a real intruder would check during lateral movement or data staging. Good placements:
\\fileserver\Finance\Payroll_2026_Q4_FINAL.xlsx (Word/Excel token)
\\fileserver\IT\passwords_backup.docx (Word token)
/home/*/.aws/credentials (AWS key token, low-privilege decoy key)
C:\Users\Public\Desktop\VPN_Config_DoNotDelete.docx (Word token)
DNS: internal-backup-vault.yourdomain.ca (DNS token, referenced nowhere but a config comment)Seed Active Directory with a honey account too — a dormant-looking but never-used account is one of the highest-signal tripwires available:
New-ADUser -Name "svc_backup_legacy" `
-SamAccountName "svc_backup_legacy" `
-AccountPassword (ConvertTo-SecureString "DoNotRotate!2026x" -AsPlainText -Force) `
-Enabled $true `
-PasswordNeverExpires $true `
-Description "DECOY - DO NOT DELETE - monitored by SOC"Then feed every logon attempt against svc_backup_legacy into your SIEM/Canarytoken alert pipeline — a real user has no reason to ever authenticate as this account.
Step 3: Wire Up Alerting
Canarytokens.org emails you by default, but for faster triage point it at a webhook (n8n, Slack, Discord, or your SOAR):
curl -s -X POST https://canarytokens.org/generate \
-d "token_type=web" \
-d "webhook_url=https://your-n8n-host/webhook/canarytoken-trigger" \
-d "memo=Finance-share-decoy-pixel"A trigger payload looks like this — route it straight into your incident channel:
{
"token": "a1b2c3d4e5f6",
"channel": "HTTP",
"time": "2026-10-05T14:32:07Z",
"src_ip": "203.0.113.44",
"useragent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
"memo": "Finance-share-decoy-pixel"
}Treat every single trigger as a real incident, not a false positive to dismiss — nobody and nothing should ever legitimately touch a token.
Step 4: Self-Hosting (Optional, for Sensitive Environments)
If you don't want token metadata or trigger IPs touching a third-party SaaS, self-host Thinkst's open-source stack:
git clone https://github.com/thinkst/canarytokens.git
cd canarytokens
cp .env.example .env
# Edit .env: set CANARY_DOMAINS, mail relay settings, and your own signing secret
docker compose up -dConfirm the stack is healthy before relying on it:
docker compose ps
docker compose logs frontend --tail 50Point internal token generation at your own domain (https://canarytokens.yourdomain.ca) instead of the public service.
Verification
Trip each token type deliberately right after deployment to confirm the alert path works end to end:
# Trip a web/URL token
curl -s "https://canarytokens.org/<generated-path>" -A "test-verification"
# Trip a DNS token
nslookup <token-id>.canarytokens.comWithin 1-2 minutes you should see:
- An email or webhook payload with the correct
memofield identifying which decoy fired - A source IP and user-agent captured in the trigger details
- (If self-hosted) a new row in the canarytokens database for that token ID
If nothing arrives, double-check the webhook URL is internet-reachable and that outbound HTTPS from the Canarytokens service isn't being blocked by your firewall if self-hosted.
Troubleshooting
- No alert after a real trigger: Confirm the token wasn't accidentally indexed by a vulnerability scanner or backup job first — those can "use up" the surprise factor without being malicious. Check
memoandsrc_ipagainst known scanner ranges. - DNS tokens never fire: Verify the token hostname is actually resolvable from the network segment where it's planted — an isolated VLAN with no DNS egress will never trigger.
- Word/Excel token doesn't fire on open: Modern Office builds with Protected View enabled block the outbound call until the user clicks "Enable Editing." This is expected — document it so false negatives aren't misread as tool failure.
- Too many alerts from legitimate automation: If a backup tool or AV scanner touches the decoy file routinely, either exclude the decoy path from that tool or move the decoy somewhere automation doesn't crawl.
- Self-hosted stack not sending mail: Check the mail relay credentials in
.envand confirm the container can reach your SMTP relay —docker compose logs backendwill show delivery failures.
Summary
Canarytokens give you breach detection with almost no engineering cost: generate a token, drop it somewhere an intruder would look, and wire the trigger to a channel someone actually watches. They won't replace EDR or a SIEM, but they catch the specific failure mode those tools often miss — a quiet, patient attacker who hasn't tripped any behavioral rule yet. Seed a handful across file shares, AD, and cloud credentials today; the cost is minutes, and the payoff is knowing about an intrusion the moment it starts, not the moment it shows up on the news.