Deploys DNS, HTTP, and AWS API key canary tokens across network infrastructure to detect unauthorized access and lateral movement. Integrates with webhook alerting (Slack, Teams, email, generic HTTP) for real-time intrusion notifications. Provides automated token generation, placement strategies, and monitoring for enterprise network environments. Use when building deception-based network intrusion detection with Canarytokens.org and Thinkst Canary platforms.
Automate repetitive workflows and reduce manual effort
Example: Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example: Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example: Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Time estimate: 15-45 minutes depending on use case complexity
Prerequisites
Submit your Claude Code skill and start earning
epx add mukul975/Anthropic-Cybersecurity-Skills/implementing-canary-tokens-for-network-intrusionCompatible with
Supported agents
| name | implementing-canary-tokens-for-network-intrusion |
| description | 'Deploys DNS, HTTP, and AWS API key canary tokens across network infrastructure to detect unauthorized access and lateral movement. Integrates with webhook alerting (Slack, Teams, email, generic HTTP) for real-time intrusion notifications. Provides automated token generation, placement strategies, and monitoring for enterprise network environments. Use when building deception-based network intrusion detection with Canarytokens.org and Thinkst Canary platforms. ' |
| domain | cybersecurity |
| subdomain | security-operations |
| tags | - canary-tokens - intrusion-detection - deception - network-security - honeytokens - breach-detection |
| version | '1.0' |
| author | mukul975 |
| license | Apache-2.0 |
| nist_csf | - DE.CM-01 - RS.MA-01 - GV.OV-01 - DE.AE-02 |
requests library installedCanary tokens are digital tripwires -- resources that should never be accessed during normal operations. When an attacker interacts with a canary token, it immediately triggers an alert with near-zero false positives. Unlike signature-based detection, canary tokens detect attackers by their behavior (accessing bait resources) rather than matching known patterns.
| Token Type | Trigger Mechanism | Best Placement | Detection Scenario |
|---|---|---|---|
| DNS Token | DNS resolution of FQDN | Config files, scripts, internal docs | Attacker reads configs during recon |
| HTTP Token | HTTP GET to unique URL | Internal wikis, bookmark files, HTML | Attacker browses internal resources |
| AWS API Key | AWS API call with fake creds | .aws/credentials, env files, repos | Attacker tests found credentials |
| Cloned Site | Visit to cloned page | Internal portals, admin panels | Attacker accesses cloned services |
| SVN Token | SVN checkout | Repository configs | Attacker clones repositories |
| SQL Server | Database login attempt | Connection strings, config files | Attacker attempts DB access |
[Attacker Action] --> [Token Triggered] --> [Canarytokens Server]
|
[Webhook POST]
|
+-------------------------+-------------------------+
| | |
[Slack Alert] [Email Alert] [SIEM Ingestion]
| | |
[SOC Analyst] [On-Call Page] [Correlation Rule]
DNS tokens are the most versatile -- they trigger on any DNS resolution, even from air-gapped networks with only DNS egress. The token is an FQDN that, when resolved, alerts the token owner.
import requests
# Create DNS canary token via Canarytokens.org
response = requests.post("https://canarytokens.org/generate", data={
"type": "dns",
"email": "soc@company.com",
"memo": "Production database server - /etc/app/db.conf",
"webhook_url": "https://hooks.slack.com/services/T.../B.../xxx"
}, timeout=15)
token_data = response.json()
dns_hostname = token_data["hostname"]
# Example: abc123def456.canarytokens.com
Plant DNS tokens in locations attackers commonly inspect:
/etc/hosts entries pointing to the canary FQDNdatabase_host, backup_server)~/.ssh/config) with canary hostnamesHTTP tokens generate a unique URL that triggers on any HTTP request. They reveal the source IP, User-Agent, and other HTTP headers of the requester.
# Create HTTP token
response = requests.post("https://canarytokens.org/generate", data={
"type": "http",
"email": "soc@company.com",
"memo": "Internal wiki - IT admin passwords page",
"webhook_url": "https://hooks.slack.com/services/T.../B.../xxx"
}, timeout=15)
http_url = response.json()["url"]
# Embed in internal HTML pages, documents, or bookmark files
Placement strategies for HTTP tokens:
<img> tags in internal wiki pages with sensitive titles.url or .webloc shortcut files in network sharesAWS key tokens are among the highest-fidelity canary tokens. They generate real-looking AWS access keys that trigger an alert whenever anyone attempts to use them against any AWS API endpoint.
# Create AWS API key canary token
response = requests.post("https://canarytokens.org/generate", data={
"type": "aws_keys",
"email": "soc@company.com",
"memo": "DevOps jump box - /home/deploy/.aws/credentials",
"webhook_url": "https://hooks.slack.com/services/T.../B.../xxx"
}, timeout=15)
aws_token = response.json()
access_key_id = aws_token["access_key_id"]
secret_access_key = aws_token["secret_access_key"]
Deploy the fake credentials:
# Place in ~/.aws/credentials on honeypot or jump servers
[default]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
region = us-east-1
# Also plant in:
# - .env files in code repositories
# - Docker environment configurations
# - Terraform state files (decoy)
# - Jenkins/CI credential stores
Set up real-time alerting to your SOC through multiple channels:
# Slack webhook integration
def send_slack_alert(webhook_url, alert_data):
"""Forward canary token alert to Slack channel."""
payload = {
"text": f":rotating_light: *Canary Token Triggered*",
"attachments": [{
"color": "#FF0000",
"fields": [
{"title": "Token Memo", "value": alert_data.get("memo", "Unknown"), "short": True},
{"title": "Source IP", "value": alert_data.get("src_ip", "Unknown"), "short": True},
{"title": "Token Type", "value": alert_data.get("channel", "Unknown"), "short": True},
{"title": "Triggered At", "value": alert_data.get("time", "Unknown"), "short": True},
],
"footer": "Canarytokens Alert System",
}]
}
requests.post(webhook_url, json=payload, timeout=10)
# Generic webhook receiver (Flask) for SIEM ingestion
from flask import Flask, request, jsonify
import json, logging
app = Flask(__name__)
logging.basicConfig(filename="/var/log/canary_alerts.json", level=logging.INFO)
@app.route("/canary-webhook", methods=["POST"])
def receive_alert():
alert = request.json or request.form.to_dict()
logging.info(json.dumps({
"event_type": "canarytoken_triggered",
"memo": alert.get("memo"),
"src_ip": alert.get("src_ip"),
"token_type": alert.get("channel"),
"time": alert.get("time"),
"manage_url": alert.get("manage_url"),
"additional_data": alert.get("additional_data", {}),
}))
return jsonify({"status": "received"}), 200
For organizations using Thinkst Canary, leverage the API for mass deployment and centralized management:
import canarytools
# Connect to Thinkst Canary console
console = canarytools.Console(
domain="yourcompany",
api_key="your_api_auth_token"
)
# Create tokens programmatically at scale
token_types = {
"dns": "DNS beacon in config files",
"aws-id": "AWS credentials on jump servers",
"http": "Web bug in internal documentation",
"doc-msword": "Word document in finance share",
"slack-api": "Fake Slack bot token in source code",
}
for kind, memo in token_types.items():
result = console.tokens.create(memo=memo, kind=kind)
print(f"[+] Created {kind} token: {result}")
# Monitor for triggered alerts
alerts = console.tokens.alerts()
for alert in alerts:
print(f"[ALERT] {alert.memo} triggered from {alert.src_ip}")
DMZ / Public-Facing:
.env files on staging serversInternal Network / Corporate:
\\fileserver\IT\passwords.docx)Production / Data Center:
Cloud Infrastructure:
# Deploy a comprehensive canary token network
python scripts/agent.py --action full_deploy \
--email soc@company.com \
--webhook https://hooks.slack.com/services/T.../B.../xxx \
--output deployment_report.json
# Check for triggered alerts
python scripts/agent.py --action monitor \
--console-domain yourcompany \
--api-key YOUR_AUTH_TOKEN
# Create inventory of all deployed tokens
python scripts/agent.py --action inventory \
--output token_inventory.json
aws sts get-caller-identityAI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionimplementing-canary-tokens-for-network-intrusionExecute the skills CLI command in your project's root directory to begin installation:
epx add mukul975/Anthropic-Cybersecurity-Skills/implementing-canary-tokens-for-network-intrusionFetches implementing-canary-tokens-for-network-intrusion from mukul975/Anthropic-Cybersecurity-Skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
.cursor/skills/implementing-canary-tokens-for-network-intrusion
Restart Cursor to activate implementing-canary-tokens-for-network-intrusion. Access via /implementing-canary-tokens-for-network-intrusionin your agent's command palette.
Learn more:View source on GitHubSkills CLI docsAbout CursorWhat are agent skills?
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
hardening-windows-endpoint-with-cis-benchmark
mukul975/Anthropic-Cybersecurity-Skills · hardening-windows-endpoint-with-cis-benchmark · same repo
exploiting-deeplink-vulnerabilities
mukul975/Anthropic-Cybersecurity-Skills · exploiting-deeplink-vulnerabilities · same repo
deobfuscating-javascript-malware
mukul975/Anthropic-Cybersecurity-Skills · deobfuscating-javascript-malware · same repo
implementing-soar-playbook-with-palo-alto-xsoar
mukul975/Anthropic-Cybersecurity-Skills · implementing-soar-playbook-with-palo-alto-xsoar · same repo
analyzing-outlook-pst-for-email-forensics
mukul975/Anthropic-Cybersecurity-Skills · analyzing-outlook-pst-for-email-forensics · same repo
detecting-pass-the-ticket-attacks
mukul975/Anthropic-Cybersecurity-Skills · detecting-pass-the-ticket-attacks · same repo
Solid pick for teams standardizing on skills: implementing-canary-tokens-for-network-intrusion is focused, and the summary matches what you get after install.
Registry listing for implementing-canary-tokens-for-network-intrusion matched our evaluation — installs cleanly and behaves as described in the markdown.
Solid pick for teams standardizing on skills: implementing-canary-tokens-for-network-intrusion is focused, and the summary matches what you get after install.
Registry listing for implementing-canary-tokens-for-network-intrusion matched our evaluation — installs cleanly and behaves as described in the markdown.
implementing-canary-tokens-for-network-intrusion fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
We added implementing-canary-tokens-for-network-intrusion from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
Solid pick for teams standardizing on skills: implementing-canary-tokens-for-network-intrusion is focused, and the summary matches what you get after install.
Keeps context tight: implementing-canary-tokens-for-network-intrusion is the kind of skill you can hand to a new teammate without a long onboarding doc.
Registry listing for implementing-canary-tokens-for-network-intrusion matched our evaluation — installs cleanly and behaves as described in the markdown.
I recommend implementing-canary-tokens-for-network-intrusion for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 49