Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)35k · #8008

implementing-canary-tokens-for-network-intrusion

Fungsinya

Tool ini membuat 'alarm digital' yang disebut 'canary token'. Jika ada yang mencoba mengakses alarm ini, Anda akan langsung diberi notifikasi. Ini adalah cara untuk mengetahui apakah ada orang tidak berwenang yang mencoba menyusup ke sistem Anda.

Kapan dipakai

  • ✓Saat Anda ingin mengetahui apakah ada yang mencoba mengakses file atau sistem yang seharusnya tidak boleh mereka akses.
  • ✓Untuk membuat sistem peringatan dini terhadap akses tidak sah.
  • ✓Untuk menangkap penyusup saat mereka berpindah dari satu sistem ke sistem lain di jaringan Anda.

Link skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-canary-tokens-for-network-intrusion/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-canary-tokens-for-network-intrusion/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Buatkan alarm digital untuk saat ada yang mencoba membaca file konfigurasi database produksi.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Tool ini menghasilkan tautan atau kode khusus (disebut token). Anda menyebarkan token ini di lokasi-lokasi yang sensitif. Jika ada yang mengklik atau menggunakan salah satu token ini, Anda akan menerima pemberitahuan.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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 requests library 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/hosts entries 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"]

…
Pertanyaan umum

Apa itu 'canary token'?

Anggap saja seperti kawat jebakan digital. Ini adalah sumber daya yang seharusnya tidak diakses selama operasi normal. Jika ada yang mengaksesnya, berarti ada sinyal peringatan.

Mengapa menggunakan 'canary token' dan bukan antivirus?

Antivirus mencari ancaman yang sudah dikenal. Canary token mendeteksi akses tidak sah apa pun, bahkan yang baru dan belum dikenal, karena didasarkan pada perilaku orang yang mengaksesnya.

Jenis 'token' apa saja yang tersedia?

Ada token yang akan aktif saat seseorang mencoba menerjemahkan alamat internet (DNS), membuka tautan (HTTP), menggunakan kredensial cloud palsu (AWS API Key), dan lain-lain.

Detail

Deskripsi asli dari pembuat

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

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularitas

Bintang GitHub
35k
Peringkat
#8008
Lisensi
Apache-2.0
Diperbarui
31/8/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa