Deploys and monitors ransomware canary files with Python watchdog in key directories, detecting reads/modifies/deletes and alerting via email, Slack Webhook, or Syslog for early warning.
npx claudepluginhub killvxk/cybersecurity-skills-zhThis skill uses the workspace's default tool permissions.
- 在文件服务器、NAS 设备或终端系统上部署主动勒索软件检测
Deploys and monitors ransomware canary files mimicking high-value targets using Python's watchdog library for real-time detection and alerts via email, Slack, or syslog on servers and endpoints.
Deploys and monitors ransomware canary files using Python's watchdog library. Detects filesystem events on decoys and alerts via email, Slack, or syslog for early warning.
Deploys honeypot decoy files, canary tokens, and network shares on Windows servers to detect ransomware encryption attempts early using PowerShell scripts and FSRM monitoring.
Share bugs, ideas, or general feedback.
不适用场景:不可替代终端保护、备份策略或网络分段。诱饵文件仅为检测层,并非预防机制。
pip install watchdog)创建具有真实文件名和内容的诱饵文件,以吸引勒索软件扫描器。文件名应使用 Passwords.xlsx、Financial_Report_2026.docx、backup_credentials.csv 等格式,内容为看似合理的虚假数据。将文件放置在勒索软件通常优先攻击的目录中:用户桌面、Documents 文件夹、网络共享根目录和备份路径。
使用 Python watchdog 库结合自定义 FileSystemEventHandler,监控诱饵文件路径。Handler 针对诱饵文件触发 on_modified、on_deleted、on_moved 和 on_created 事件。任何合法用户或进程都不应接触这些文件,因此任何交互都是勒索软件或未授权访问的高可信度指示器。
将文件系统监控器连接到多个告警渠道:通过 SMTP 发送邮件、发送 Slack Webhook POST、转发 Syslog 到 SIEM,以及写入本地日志文件。告警有效载荷中应包含触发事件类型、文件路径、时间戳和进程信息(如可获取)。
通过程序化方式修改、重命名和删除诱饵文件,模拟勒索软件行为,验证检测管道是否正常触发。测量告警响应时间,并验证所有配置渠道的告警投递情况。
| 术语 | 定义 |
|---|---|
| 诱饵文件(Canary File) | 放置在受监控目录中的诱骗文件,当被访问、修改或删除时触发告警 |
| Watchdog | Python 文件系统监控库,使用操作系统原生 API(Linux 的 inotify、macOS 的 FSEvents、Windows 的 ReadDirectoryChangesW) |
| 蜜罐文件(Honey File) | 诱饵文件的别名;用于吸引和检测恶意活动的虚假文档 |
| 熵值检测(Entropy Check) | 通过测量文件内容的随机性来检测加密行为(勒索软件加密后产生高熵值输出) |
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