| name | implementing-deception-based-detection-with-canarytoken |
| description | Deploy and monitor Canary Tokens via the Thinkst Canary API for deception-based breach detection using web bug tokens, DNS tokens, document tokens, and AWS key tokens. Use when deploying and monitor canary tokens via the thinkst canary api. |
| domain | cybersecurity |
| subdomain | deception-technology |
| tags | ["canarytoken","deception","honeytokens","breach-detection","Thinkst-Canary","tripwire","early-warning"] |
| version | 1.0 |
| author | oyi77 |
| license | Apache-2.0 |
| nist_csf | ["DE.CM-01","DE.AE-06","PR.IR-01"] |
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
Trigger phrases:
-
"implementing deception based detection with canarytoken"
-
"When deploying or configuring implementing deception based detection with canary"
-
"When establishing security controls aligned to compliance requirements"
-
"When building or improving security architecture for this domain"
-
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
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs(text: str) -> dict:
return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}
- Authenticate to the Canary Console API using auth_token