Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)35k · #7786

deploying-ransomware-canary-files

Ce qu’il fait

Cet outil crée de faux fichiers pièges (appelés « fichiers canaris » ou « leurres ») à des endroits stratégiques de votre ordinateur. Si un programme tente de lire, de modifier ou de supprimer ces fichiers, il vous prévient immédiatement, ce qui peut signaler une attaque par rançongiciel.

Quand l’utiliser

  • ✓Pour détecter un rançongiciel avant qu'il n'endommage vos fichiers importants.
  • ✓Pour surveiller les dossiers partagés ou les sauvegardes.
  • ✓Comme alerte supplémentaire sur les systèmes où d'autres logiciels de sécurité ne peuvent pas être installés.

Lien du skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/deploying-ransomware-canary-files/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/deploying-ransomware-canary-files/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Mets en place un système d'alerte par fichiers leurres sur mon serveur de fichiers.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'outil place des fichiers « appâts » à des endroits que les rançongiciels ciblent habituellement. Il utilise un programme appelé « watchdog » pour surveiller ces fichiers. Si l'un d'eux est touché, vous recevez une alerte par e-mail ou par message.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Deploying Ransomware Canary Files

When to Use

  • Deploying proactive ransomware detection on file servers, NAS devices, or endpoint systems
  • Building an early-warning system that detects ransomware before it encrypts business-critical data
  • Supplementing EDR solutions with lightweight canary file monitoring on systems where agents cannot be deployed
  • Testing ransomware incident response procedures by simulating canary file triggers
  • Monitoring shared drives, home directories, and backup volumes for unauthorized file operations

Do not use as a replacement for endpoint protection, backup strategy, or network segmentation. Canary files are a detection layer, not a prevention mechanism.

Prerequisites

  • Python 3.8+ with pip
  • watchdog library (pip install watchdog)
  • Write access to directories where canary files will be placed
  • SMTP server credentials or Slack webhook URL for alerting
  • Administrative access for placing canaries in system directories

Workflow

Step 1: Generate Canary Files

Create decoy files with realistic names and content that attract ransomware scanners. Files should have names like Passwords.xlsx, Financial_Report_2026.docx, backup_credentials.csv and contain plausible-looking but fake data. Place them in directories ransomware typically targets first: user desktops, Documents folders, network share roots, and backup paths.

Step 2: Deploy Filesystem Monitor

Use Python's watchdog library with a custom FileSystemEventHandler that watches canary file paths. The handler triggers on on_modified, on_deleted, on_moved, and on_created events for canary files. Any legitimate user or process should never touch these files, so any interaction is a high-confidence indicator of ransomware or unauthorized access.

Step 3: Configure Alert Pipeline

Wire the filesystem monitor to multiple alert channels: email via SMTP, Slack webhook POST, syslog forwarding to SIEM, and local log file. Include the triggering event type, file path, timestamp, and process information (when available) in alert payloads.

Step 4: Validate and Test

Simulate ransomware behavior by programmatically modifying, renaming, and deleting canary files to verify the detection pipeline fires correctly. Measure time-to-alert and validate alert delivery across all configured channels.

Key Concepts

Term Definition
Canary File A decoy file placed in a monitored directory that triggers an alert when accessed, modified, or deleted
Watchdog Python library that monitors filesystem events using OS-native APIs (inotify on Linux, FSEvents on macOS, ReadDirectoryChangesW on Windows)
Honey File Synonym for canary file; a fake document designed to attract and detect malicious activity
Entropy Check Measuring randomness in file content to detect encryption (ransomware produces high-entropy output)

Tools & Systems

  • watchdog: Python filesystem monitoring library using OS-native event APIs
  • smtplib: Python standard library for SMTP email alerting
  • requests: HTTP library for Slack webhook integration
  • hashlib: SHA-256 hashing for canary file integrity verification
  • psutil: Process information gathering when canary file access is detected

Output Format

RANSOMWARE CANARY ALERT
========================
Timestamp: 2026-03-11T14:23:07Z
Event: FILE_MODIFIED
Canary File: /srv/shares/finance/Passwords.xlsx
Directory: /srv/shares/finance
SHA-256 Before: a3f2...8b4c
SHA-256 After: 7e91...2d3f
Alert Channels: [email, slack, syslog]
Action: Investigate immediately - potential ransomware activity
Questions fréquentes

Que sont les fichiers « canaris » ou « leurres » ?

Ce sont de faux fichiers créés volontairement pour attirer l'attention des logiciels malveillants, comme les rançongiciels. Si quelqu'un y accède, c'est un signe fort que quelque chose ne va pas.

Est-ce que cela empêche les attaques par rançongiciel ?

Non, cet outil sert à la détection précoce, pas à la prévention. C'est comme un détecteur de fumée : il vous alerte, mais il n'éteint pas l'incendie.

Faut-il savoir programmer pour utiliser cet outil ?

L'outil lui-même est un programme, mais la demande pour le créer est simple. Il suffit de suivre les instructions d'installation ; vous n'avez pas besoin d'écrire de code.

Détails

Description originale de l’auteur

Deploys and monitors ransomware canary files using Python's watchdog library, placing decoy files mimicking high-value targets (financial records, credentials, database exports) where ransomware enumerates first, and alerting via email, Slack, or syslog on any read/modify/rename/delete. Use for early-warning ransomware detection on file servers, NAS, or endpoints, or to supplement EDR where agents

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularité

Étoiles GitHub
35k
Position au classement
#7786
Licence
Apache-2.0
Mis à jour
31/08/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires