deploying-ransomware-canary-files

mukul975/Anthropic-Cybersecurity-Skills · updated May 25, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills install mukul975/Anthropic-Cybersecurity-Skills/deploying-ransomware-canary-files
0 commentsdiscussion
summary

Deploys and monitors ransomware canary files across critical directories using Python's watchdog library for real-time filesystem event detection. Places strategically named decoy files that mimic high-value targets (financial records, credentials, database exports) in locations ransomware typically enumerates first. Monitors for any read, modify, rename, or delete operations on canary files and triggers immediate alerts via email, Slack webhook, or syslog when interaction is detected, providing early warning before full encryption begins.

skill.md
name
deploying-ransomware-canary-files
description
'Deploys and monitors ransomware canary files across critical directories using Python''s watchdog library for real-time filesystem event detection. Places strategically named decoy files that mimic high-value targets (financial records, credentials, database exports) in locations ransomware typically enumerates first. Monitors for any read, modify, rename, or delete operations on canary files and triggers immediate alerts via email, Slack webhook, or syslog when interaction is detected, providing early warning before full encryption begins. '
domain
cybersecurity
subdomain
ransomware-defense
tags
- ransomware - canary-files - watchdog - detection - early-warning - deception - defense
version
1.0.0
author
mahipal
license
Apache-2.0
nist_csf
- PR.DS-11 - RS.MA-01 - RC.RP-01 - PR.IR-01

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

TermDefinition
Canary FileA decoy file placed in a monitored directory that triggers an alert when accessed, modified, or deleted
WatchdogPython library that monitors filesystem events using OS-native APIs (inotify on Linux, FSEvents on macOS, ReadDirectoryChangesW on Windows)
Honey FileSynonym for canary file; a fake document designed to attract and detect malicious activity
Entropy CheckMeasuring 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
how to use deploying-ransomware-canary-files

How to use deploying-ransomware-canary-files on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add deploying-ransomware-canary-files
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills install mukul975/Anthropic-Cybersecurity-Skills/deploying-ransomware-canary-files

The skills CLI fetches deploying-ransomware-canary-files from GitHub repository mukul975/Anthropic-Cybersecurity-Skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/deploying-ransomware-canary-files

Reload or restart Cursor to activate deploying-ransomware-canary-files. Access the skill through slash commands (e.g., /deploying-ransomware-canary-files) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.739 reviews
  • Pratham Ware· Dec 28, 2024

    deploying-ransomware-canary-files fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Tariq Desai· Dec 28, 2024

    deploying-ransomware-canary-files is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Camila Kim· Dec 20, 2024

    Useful defaults in deploying-ransomware-canary-files — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Hana Li· Dec 16, 2024

    We added deploying-ransomware-canary-files from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Yash Thakker· Nov 19, 2024

    Registry listing for deploying-ransomware-canary-files matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Arjun Torres· Nov 19, 2024

    Useful defaults in deploying-ransomware-canary-files — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Hana Zhang· Nov 11, 2024

    deploying-ransomware-canary-files is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Dev Sharma· Nov 11, 2024

    Solid pick for teams standardizing on skills: deploying-ransomware-canary-files is focused, and the summary matches what you get after install.

  • Emma Thomas· Nov 7, 2024

    deploying-ransomware-canary-files reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Chinedu Thompson· Oct 26, 2024

    Registry listing for deploying-ransomware-canary-files matched our evaluation — installs cleanly and behaves as described in the markdown.

showing 1-10 of 39

1 / 4