deploying-ransomware-canary-files
Skill này làm gì
Công cụ này tạo các tệp mồi nhử ở những vị trí chiến lược trên máy tính. Nếu bất kỳ chương trình nào cố đọc, sửa đổi hoặc xóa các tệp này, nó sẽ cảnh báo ngay, cho thấy có khả năng bị tấn công ransomware.
Khi nào nên dùng
- ✓Để phát hiện ransomware trước khi nó làm hỏng các tệp quan trọng.
- ✓Để giám sát thư mục chia sẻ hoặc bản sao lưu.
- ✓Như một cảnh báo bổ sung trên các hệ thống không cài được chương trình bảo mật khác.
Liên kết skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/deploying-ransomware-canary-files/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Thiết lập hệ thống cảnh báo tệp mồi nhử trên máy chủ tệp của tôi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ đặt các tệp “bẫy” ở những vị trí mà ransomware thường nhắm đến. Nó dùng chương trình tên “watchdog” để theo dõi các tệp này. Nếu có gì xảy ra với chúng, bạn sẽ nhận được cảnh báo qua email hoặc tin nhắn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
“Canary” hoặc “decoy” là gì?
Đây là các tệp giả được tạo có chủ đích để thu hút sự chú ý của phần mềm độc hại như ransomware. Nếu chúng bị truy cập, đó là dấu hiệu mạnh cho thấy có vấn đề.
Công cụ này có ngăn được tấn công ransomware không?
Không, công cụ này dùng để phát hiện sớm chứ không phải ngăn chặn. Nó giống như chuông báo cháy; nó cảnh báo nhưng không dập lửa.
Tôi có cần biết lập trình để dùng công cụ này không?
Công cụ là một chương trình, nhưng yêu cầu tạo nó rất đơn giản. Bạn chỉ cần làm theo hướng dẫn cài đặt, không cần viết mã.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 35k
- Vị trí xếp hạng
- #7786
- Giấy phép
- Apache-2.0
- Cập nhật
- 31/8/2026
Bình luận
- …
Thêm skill từ kho mã này
abusing-dpapi-for-credential-access
35kCung cấp cho agent AI của bạn hướng dẫn có sẵn cho một tác vụ cụ thể, giúp nó làm việc tốt hơn và nhanh hơn.
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.