मुख्य सामग्री पर जाएँ
Skillpedia
डिप्लॉय और क्लाउड (DevOps)35k · #7786

deploying-ransomware-canary-files

यह क्या करती है

यह टूल आपके कंप्यूटर की अलग-अलग जगहों पर नकली फ़ाइलें (decoy files) बनाता है। अगर कोई प्रोग्राम इन फ़ाइलों को पढ़ने, बदलने या मिटाने की कोशिश करता है, तो यह तुरंत आपको अलर्ट भेजता है, जो ransomware हमले का संकेत हो सकता है।

कब इस्तेमाल करें

  • ✓ransomware आपकी ज़रूरी फ़ाइलों को नुकसान पहुँचाने से पहले उसका पता लगाने के लिए।
  • ✓shared folders या backups पर नज़र रखने के लिए।
  • ✓उन सिस्टम पर अतिरिक्त चेतावनी के तौर पर, जहाँ दूसरे security प्रोग्राम इंस्टॉल नहीं हो सकते।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/deploying-ransomware-canary-files/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे file server पर decoy file अलर्ट सिस्टम सेट करो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह टूल ऐसी जगहों पर 'चारा' (bait) फ़ाइलें रखता है, जिन्हें ransomware आम तौर पर निशाना बनाता है। यह 'watchdog' नाम के प्रोग्राम की मदद से इन फ़ाइलों पर नज़र रखता है। अगर इनके साथ कुछ भी होता है, तो आपको email या message के ज़रिए अलर्ट मिलता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल

'canary' या 'decoy' फ़ाइलें क्या होती हैं?

ये जानबूझकर बनाई गई नकली फ़ाइलें होती हैं, ताकि ransomware जैसे खतरनाक सॉफ़्टवेयर का ध्यान इनकी तरफ़ खिंचे। अगर इन्हें कोई छूता है, तो यह इस बात का मज़बूत संकेत है कि कुछ गड़बड़ है।

क्या यह ransomware हमले को रोकता है?

नहीं, यह टूल जल्दी पता लगाने के लिए है, रोकने के लिए नहीं। यह फ़ायर अलार्म की तरह है, जो चेतावनी देता है लेकिन आग खुद नहीं बुझाता।

क्या इसे इस्तेमाल करने के लिए coding आनी चाहिए?

टूल खुद एक प्रोग्राम है, लेकिन इसे बनवाने का अनुरोध सरल है। आपको बस setup के निर्देशों को फ़ॉलो करना है, code लिखने की ज़रूरत नहीं है।

जानकारी

लेखक का मूल विवरण

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

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#7786
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills