implementing-canary-tokens-for-network-intrusion
하는 일
이 도구는 ‘카나리 토큰’이라는 ‘디지털 경보기’를 만듭니다. 누군가 이 경보기에 접근하려고 하면 즉시 알림을 받습니다. 승인되지 않은 사람이 시스템에 침입하려고 하는지 알 수 있는 방법입니다.
사용하는 경우
- ✓누군가 접근해서는 안 되는 파일이나 시스템에 접근하려는지 알고 싶을 때.
- ✓승인되지 않은 접근에 대한 조기 경고 시스템을 만들 때.
- ✓네트워크 안에서 한 시스템에서 다른 시스템으로 이동하는 침입자를 잡을 때.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-canary-tokens-for-network-intrusion/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“누군가 운영 데이터베이스 설정 파일을 읽으려고 하면 알려 주는 디지털 경보기를 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 특별한 링크나 코드(토큰)를 생성합니다. 이를 민감한 위치에 배치하고, 누군가 이 토큰을 클릭하거나 사용하면 알림이 전송됩니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Implementing Canary Tokens for Network Intrusion Detection
When to Use
- When deploying deception-based tripwires across network infrastructure to detect intrusions
- When building early warning systems that alert on unauthorized access to sensitive resources
- When planting fake AWS credentials, DNS beacons, or HTTP tokens to catch attackers during lateral movement
- When integrating canary token alerts with SOC workflows via Slack, Microsoft Teams, or SIEM webhooks
- When complementing traditional IDS/IPS with zero-false-positive deception technology
Prerequisites
- Python 3.8+ with
requestslibrary installed - Network access to canarytokens.org API (or self-hosted Canarytokens instance)
- Webhook endpoint for alert delivery (Slack, Teams, email, or generic HTTP)
- For Thinkst Canary enterprise: valid console domain and API auth token
- Administrative access to target systems where tokens will be planted
- Appropriate authorization for all deployment activities
Core Concepts
What Are Canary Tokens?
Canary 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 Types for Network Intrusion Detection
| 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 |
Alert Flow Architecture
[Attacker Action] --> [Token Triggered] --> [Canarytokens Server]
|
[Webhook POST]
|
+-------------------------+-------------------------+
| | |
[Slack Alert] [Email Alert] [SIEM Ingestion]
| | |
[SOC Analyst] [On-Call Page] [Correlation Rule]
Instructions
Step 1: Generate DNS Canary Tokens
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/hostsentries pointing to the canary FQDN- Application configuration files (
database_host,backup_server) - SSH config files (
~/.ssh/config) with canary hostnames - Internal DNS zone files as decoy A records
- CI/CD pipeline environment variables
Step 2: Deploy HTTP Canary Tokens
HTTP 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"]
…
자주 묻는 질문
‘카나리 토큰’이란 무엇인가요?
디지털 철사 덫과 같습니다. 정상적인 작업 중에는 접근되지 않아야 하는 자원이며, 누군가 접근하면 경고 신호가 됩니다.
백신 대신 ‘카나리 토큰’을 사용하는 이유는 무엇인가요?
백신은 알려진 위협을 찾습니다. 카나리 토큰은 행동을 기준으로 삼기 때문에 새롭고 알려지지 않은 것이라도 승인되지 않은 접근을 감지합니다.
어떤 종류의 ‘토큰’이 있나요?
누군가 인터넷 주소(DNS)를 조회하거나, 링크(HTTP)에 접근하거나, 가짜 클라우드 자격 증명(AWS API 키)을 사용하려고 할 때 작동하는 토큰 등이 있습니다.
상세 정보
작성자의 원본 설명
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 intrusio
인기도
- GitHub 스타
- 35k
- 순위
- #8008
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.