Zum Inhalt springen
Skillpedia
Deployment & Cloud (DevOps)35k · #8008

implementing-canary-tokens-for-network-intrusion

Was er macht

Dieses Tool erstellt digitale Alarme, sogenannte „Canary Tokens“. Wenn jemand auf einen dieser Alarme zugreift, wirst du sofort benachrichtigt. So erfährst du, ob eine unbefugte Person versucht, in deine Systeme einzudringen.

Wann du ihn nutzt

  • ✓Wenn du wissen möchtest, ob jemand versucht, auf Dateien oder Systeme zuzugreifen, für die er keine Berechtigung hat.
  • ✓Um ein Frühwarnsystem gegen unbefugten Zugriff aufzubauen.
  • ✓Um Eindringlinge zu erkennen, die sich in deinem Netzwerk von einem System zum nächsten bewegen.

Link zum Skill

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

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-canary-tokens-for-network-intrusion/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Erstelle einen digitalen Alarm, der mir Bescheid gibt, wenn jemand versucht, die Konfigurationsdatei der Produktionsdatenbank zu lesen.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Das Tool erzeugt spezielle Links oder Codes (Tokens). Du platzierst diese Tokens an sensiblen Stellen. Wenn jemand einen dieser Tokens anklickt oder verwendet, wird dir ein Alarm gesendet.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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"]

…
Häufige Fragen

Was sind „Canary Tokens“?

Sie funktionieren wie digitale Stolperdrähte. Es sind Ressourcen, auf die im normalen Betrieb niemand zugreifen sollte. Wenn doch jemand darauf zugreift, ist das ein Warnsignal.

Warum Canary Tokens statt Antivirus?

Antivirus sucht nach bekannten Bedrohungen. Canary Tokens erkennen jeden unbefugten Zugriff, auch wenn er neu und unbekannt ist, weil sie auf das Verhalten der zugreifenden Person reagieren.

Welche Arten von Tokens gibt es?

Es gibt Tokens, die auslösen, wenn jemand versucht, eine Internetadresse aufzulösen (DNS), einen Link aufruft (HTTP), gefälschte Cloud-Zugangsdaten (AWS API Key) verwendet, und weitere.

Details

Originalbeschreibung des Autors

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

Beliebtheit

GitHub-Sterne
35k
Platz im Ranking
#8008
Lizenz
Apache-2.0
Aktualisiert
31.8.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills