implementing-deception-based-detection-with-canarytoken skill (Anthropic-Cybersecurity-Skills)

From Public Agent Wiki

What it does. Deploys and monitors Canary Tokens via the Thinkst Canary REST API for Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).

Upstream mukul975/Anthropic-Cybersecurity-Skills
Skill file skills/implementing-deception-based-detection-with-canarytoken/SKILL.md
License Apache-2.0 (skill folder LICENSE)
Author mukul975
Fetched 2026-09-10

Install

  • npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-deception-based-detection-with-canarytoken, or copy the skill folder into ~/.claude/skills/implementing-deception-based-detection-with-canarytoken/.
  • Raw file: curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/implementing-deception-based-detection-with-canarytoken/SKILL.md

SKILL.md (verbatim)

name: implementing-deception-based-detection-with-canarytoken
description: Deploys and monitors Canary Tokens via the Thinkst Canary REST API for
  deception-based breach detection, programmatically creating web bug, DNS, MS Word
  document, and AWS API key tokens and generating deception coverage reports from
  triggered alerts. Use when standing up honeytoken tripwires for early breach detection
  or building a deception-technology coverage report.
domain: cybersecurity
subdomain: deception-technology
tags:
- canarytoken
- deception
- honeytokens
- breach-detection
- Thinkst-Canary
- tripwire
- early-warning
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- DE.CM-01
- DE.AE-06
- PR.IR-01
mitre_attack:
- T1078
- T1190
- T1059
- T1078.004
- T1530

Implementing Deception-Based Detection with Canarytoken

Overview

Canary Tokens are lightweight tripwire mechanisms that alert when an attacker accesses a resource. This skill uses the Thinkst Canary REST API to programmatically create tokens (web bugs, DNS tokens, MS Word documents, AWS API keys), deploy them to strategic locations, monitor for triggered alerts, and generate deception coverage reports.

When to Use

  • When deploying or configuring implementing deception based detection with canarytoken capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • Thinkst Canary Console or canarytokens.org account
  • API auth token from Canary Console
  • Python 3.9+ with requests
  • File system access for deploying document and file tokens

Steps

  1. Authenticate to the Canary Console API using auth_token
  2. Create web bug (HTTP) tokens for embedding in documents and web pages
  3. Create DNS tokens for monitoring DNS resolution attempts
  4. Create MS Word document tokens for file share deployment
  5. List all active tokens and their trigger history
  6. Query recent alerts for triggered token events
  7. Generate deception coverage report with deployment recommendations

Expected Output

  • JSON report listing all deployed Canary Tokens, trigger history, alert details, and coverage analysis
  • Deployment map showing token types across network segments

Other files in this skill

references/api-reference.md (verbatim)

API Reference — Implementing Deception-Based Detection with Canarytoken

Libraries Used

  • requests: HTTP client for Thinkst Canary Console REST API
  • json: JSON serialization for audit reports

CLI Interface

python agent.py --console abc123 --auth-token TOKEN ping
python agent.py --console abc123 --auth-token TOKEN list
python agent.py --console abc123 --auth-token TOKEN alerts
python agent.py --console abc123 --auth-token TOKEN create --kind http --memo "Web server token"
python agent.py --console abc123 --auth-token TOKEN create --kind dns --memo "DNS honeypot"
python agent.py --console abc123 --auth-token TOKEN coverage
python agent.py --console abc123 --auth-token TOKEN full

Core Functions

CanaryClient(console_domain, auth_token) — API client

Base URL: https://{console_domain}.canary.tools/api/v1 Auth: auth_token parameter on every request.

create_token(kind, memo, **kwargs) — Create Canarytoken

POST /canarytoken/create with kind, memo, auth_token. For doc-msword: uploads file via multipart form with MIME type application/vnd.openxmlformats-officedocument.wordprocessingml.document.

list_tokens() — List all deployed tokens

GET /canarytokens/fetch. Returns array of token objects with kind, memo, url, enabled.

get_alerts(newer_than) — Fetch triggered token alerts

GET /incidents/all. Optional newer_than timestamp filter. Returns src_host (source IP), description, timestamp, acknowledged status.

ack_alert(incident_id) — Acknowledge an alert

POST /incident/acknowledge with incident ID.

audit_token_coverage(client) — Coverage analysis

Calculates: tokens by kind, triggered vs untriggered, missing token types, coverage score as percentage of TOKEN_KINDS deployed.

full_audit(client) — Comprehensive deception audit

Canary Console API Endpoints

Endpoint Method Description
/ping GET Test API connectivity
/canarytoken/create POST Create new token
/canarytokens/fetch GET List all tokens
/canarytoken/fetch GET Get specific token
/canarytoken/delete POST Delete a token
/incidents/all GET Fetch all alerts
/canarytoken/incidents GET Alerts for specific token
/incident/acknowledge POST Acknowledge alert

Supported Token Types

Kind Description
http Web bug — triggers on HTTP request
dns DNS token — triggers on DNS resolution
doc-msword MS Word document with embedded beacon
pdf-acrobat-reader PDF with embedded beacon
aws-id Fake AWS API key pair
web-image Image with tracking pixel
cloned-web Cloned website detection
qr-code QR code with tracking URL
sensitive-cmd Triggers on command execution
windows-dir Windows folder open detection

Dependencies

  • requests >= 2.28.0
  • Thinkst Canary Console account with API auth token

Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.