mukul975/anthropic-cybersecurity-skills/deploying-honeytokens-and-canarytokens
Claude Code and agent skill by mukul975/anthropic-cybersecurity-skills
- community
Checking that the SKILL.md file is still in the repository.
Plants Canarytokens-based decoy artifacts (honey credentials, DNS tokens, web-bug URLs, AWS keys, documents, kubeconfigs) using Thinkst's open-source Canarytokens project and alerts via email or webhook when a token is touched. Use for high-fidelity intrusion detection in low-telemetry areas like file shares or credential stores, or to catch credential dumping and data-theft staging.
Install
npx vskill@latest install mukul975/anthropic-cybersecurity-skills/deploying-honeytokens-and-canarytokensSKILL.md
The same SKILL.md was published earlier as mukul975/anthropic-cybersecurity-skills/deploying-honeytokens-and-canarytokens.
Deploying Honeytokens and Canarytokens
Authorized Use Only: Deception assets described here are defensive controls deployed inside your own environment. Deploying tokens, decoy credentials, or honeypots on infrastructure you do not own or administer, or using them to entrap third parties, may violate computer-misuse and privacy law. Deploy only on assets you own or are explicitly authorized to instrument, and route all alert data through approved monitoring channels.
Overview
Honeytokens (a.k.a. canarytokens) are decoy artifacts — credentials, files, URLs, API keys, DNS names, database connection strings, documents — that have no legitimate operational use. Because no authorized user or process should ever touch them, any interaction is a high-fidelity signal of an intrusion, insider misuse, or reconnaissance. Unlike signature- or anomaly-based detection, honeytokens generate near-zero false positives: the alert is the compromise.
Thinkst's open-source Canarytokens project (https://canarytokens.org and the self-hostable thinkst/canarytokens-docker) generates dozens of token types that "phone home" when triggered: an HTTP/web-bug URL that fires on GET, an AWS API key that fires when used against AWS, an MS Word/PDF document that fires on open, a DNS token that fires on resolution, a Slack API token, a Kubernetes kubeconfig, an Azure login certificate, a log4shell payload, and more. Each token is bound to a unique memo (so you know where it was planted) plus an alert channel (email and/or webhook).
This skill maps to MITRE D3FEND's Decoy File (D3-DF), Decoy User Credential (D3-DUC), and Honeytoken techniques. From an ATT&CK perspective, a triggered honey credential most commonly evidences adversary attempts to abuse or modify authentication material (T1556 – Modify Authentication Process and related credential-access activity), giving the SOC an early, unambiguous tripwire deep inside the kill chain — typically after initial access but before lateral movement completes.
When to Use
- When you need high-fidelity intrusion detection in segments where traditional telemetry is sparse (file shares, password vaults, code repos, cloud accounts).
- When validating that an attacker who reaches a "crown-jewel" host or document store is detected, not just blocked at the perimeter.
- When seeding decoy credentials into LSASS-reachable memory, browser stores,
.aws/credentials, or password managers to catch credential dumping and reuse. - When instrumenting documents, repos, or wikis to catch data theft and ransomware staging.
- When building a MITRE D3FEND-aligned deception layer as part of a defense-in-depth or zero-trust program.
Prerequisites
- Docker Engine and Docker Compose v2 for self-hosting (
docker compose version). - A registered domain you control plus DNS delegation for DNS-based tokens (NS records pointing at your switchboard host).
- A public IPv4 address reachable on 80/443 (HTTP tokens) and 53/udp (DNS tokens).
- An SMTP relay or Mailgun account, and/or a Slack/Teams/generic webhook URL for alert delivery.
- Python 3.8+ for the helper script:
``bash python3 -m pip install requests ``
- For quick use with no hosting, an account-free token from the public service at https://canarytokens.org.
Objectives
- Stand up a self-hosted Canarytokens instance (or use the public service) with working alerting.
- Generate the major token types (HTTP, DNS, AWS key, MS Word/PDF, Slack, kubeconfig) with descriptive memos.
- Plant decoy credentials and decoy files in realistic, monitored locations.
- Validate that each token fires and that alerts reach the SOC channel.
- Catalogue deployed tokens and map them to MITRE D3FEND/ATT&CK for coverage tracking.
MITRE ATT&CK Mapping
| ID | Official Technique Name | Relevance | |
|---|---|---|---|
| T1556 | Modify Authentication Process | A triggered honey credential reveals an adversary harvesting/abusing authentication material; the decoy provides a detection tripwire for credential abuse activity. |
Related MITRE D3FEND defensive techniques (the offensive counter-mapping for this control):
| D3FEND ID | Technique | Role | |
|---|---|---|---|
| D3-DF | Decoy File | Canary documents, fake configs, decoy archives placed and monitored. | |
| D3-DUC | Decoy User Credential | Honey credentials (AWS keys, AD accounts, kubeconfig) integrated with a monitored decoy asset. | |
| D3-DO | Decoy Object | Umbrella for honeytokens/canarytokens as monitored decoy artifacts. |
Workflow
1. Deploy a self-hosted Canarytokens switchboard
Clone the official Docker repo and create the two environment files from their distributed templates:
Set the core variables. In frontend.env:
In switchboard.env:
2. Bring the stack up
The frontend (token generator UI) is now served on your CANARY_PUBLIC_DOMAIN; the switchboard listens on 80/443 and 53/udp to receive triggers.
3. Generate an HTTP (web-bug) token via the API
Both the public service and a self-hosted frontend expose a POST /generate endpoint. Create an HTTP token that fires on any GET:
The returned url is the trip-wire link; place it where only an intruder would find it (a fake bookmark, a hidden link in a wiki page, an email signature).
4. Generate a cloud credential (AWS API key) honeytoken
Drop the keys into a plausible ~/.aws/credentials on a monitored host. Any sts:GetCallerIdentity or other AWS call using them triggers an alert with the source IP and user agent.
5. Generate a document token (MS Word / PDF) for data-theft detection
For PDFs use type=adobe_pdf. The document phones home when opened (DNS/HTTP callback), exposing the reader's IP.
6. Plant a DNS token for resolver-level tripwires
Embed the hostname in scripts, configs, or /etc/hosts comments. Because resolution alone triggers it, DNS tokens catch reconnaissance even when egress HTTP is blocked.
7. Generate infrastructure tokens (Slack, kubeconfig, Azure)
Commit decoy .env / kubeconfig files only to repos and hosts you instrument, never to public repos.
8. Plant Active Directory honey credentials (decoy user)
Create a non-privileged-looking but never-used AD account whose authentication is alerted on. Set a SPN so it appears Kerberoastable bait, and forward Event ID 4768/4769/4625 for it to your SIEM:
Add a Windows audit ACL/SACL or a SIEM correlation rule so any 4768/4769 for svc_backup_legacy pages the SOC — no legitimate logon should ever occur.
9. Validate and catalogue
Trigger each token from a controlled host and confirm the alert lands:
Record each deployed token (type, memo, location, alert channel, D3FEND mapping) in an inventory. Use the helper script below to bulk-generate and export this inventory as JSON.
Tools and Resources
| Tool / Resource | Purpose | Link | |
|---|---|---|---|
| Canarytokens (public) | Free hosted token generation | https://canarytokens.org | |
| canarytokens-docker | Self-hosted switchboard + frontend | https://github.com/thinkst/canarytokens-docker | |
| canarytokens (core) | Source for the token engine | https://github.com/thinkst/canarytokens | |
| Canarytokens docs | Per-token-type usage guides | https://docs.canarytokens.org | |
| MITRE D3FEND | Defensive technique taxonomy (D3-DF, D3-DUC) | https://d3fend.mitre.org | |
| MITRE ATT&CK T1556 | Modify Authentication Process | https://attack.mitre.org/techniques/T1556/ |
Token Type Reference
type value | Token | Fires when | |
|---|---|---|---|
http | Web-bug URL | URL is requested (GET) | |
dns | DNS name | Hostname is resolved | |
aws_keys | AWS API key | Keys used against AWS | |
msword / adobe_pdf | Office/PDF document | Document is opened | |
slack_api | Slack API token | Token used against Slack | |
kubeconfig | Kubernetes config | Used against the kube API | |
azure_id | Azure login certificate | Cert used to authenticate to Azure | |
qr_code | QR code | Encoded URL is requested | |
web_image | Image web-bug | Image is loaded | |
log4shell | Log4j JNDI string | Vulnerable logger evaluates it | |
cmd | Sensitive command (Windows) | Process/command is executed |
Validation Criteria
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/deploying-honeytokens-and-canarytokens/SKILL.md
Popularity
- Repository stars
- 31,056
- Repository forks
- 3,697
- 7-day trend score
- 52
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mukul975/anthropic-cybersecurity-skills/deploying-honeytokens-and-canarytokens)