| 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. Use when working with deploying ransomware canary files. |
| domain | cybersecurity |
| tags | ["ransomware","canary-files","watchdog","detection","early-warning","deception","defense"] |
| subdomain | ransomware-defense |
| version | 1.0.0 |
| author | oyi77 |
| license | Apache-2.0 |
| nist_csf | ["PR.DS-11","RS.MA-01","RC.RP-01","PR.IR-01"] |
Deploying Ransomware Canary Files
Overview
Cybersecurity skill for deploying ransomware canary files. Follows industry best practices and security standards.
When to Use
Trigger phrases:
-
"deploying ransomware canary files"
-
"Deploying proactive ransomware detection on file servers, NAS devices, or endpoi"
-
"Building an early-warning system that detects ransomware before it encrypts busi"
-
"Supplementing EDR solutions with lightweight canary file monitoring on systems w"
-
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.
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
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
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def () -> :
{k: re.findall(v, text) k, v IOC_PATTERNS.items()}