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

deploying-decoy-files-for-ransomware-detection

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

यह टूल आपके computers और servers पर नकली फ़ाइलें (जिन्हें 'canaries' कहते हैं) बनाता है। अगर ransomware जैसा malicious software इन नकली फ़ाइलों को बदलने या मिटाने की कोशिश करता है, तो आपको तुरंत alert मिल जाता है।

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

  • ✓ransomware को नुकसान करने से पहले पकड़ने के लिए।
  • ✓अपने मौजूदा antivirus की सुरक्षा को और मज़बूत करने के लिए।
  • ✓यह सुनिश्चित करने के लिए कि आपकी ज़रूरी फ़ाइलें सुरक्षित हैं।

Skill का लिंक

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

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

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

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

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

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

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

“मेरे documents पर ransomware पकड़ने के लिए canary files सेट करो।”

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

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

टूल नकली फ़ाइलों को सही जगहों पर रखता है। वह इन फ़ाइलों पर नज़र रखता है, और अगर कोई इन्हें बदलने की कोशिश करता है, तो एक alarm बज जाता है, जो संभावित infection का संकेत देता है।

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

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Deploying Decoy Files for Ransomware Detection

When to Use

  • Setting up early-warning detection for ransomware on file servers or endpoints
  • Supplementing EDR/AV with a deception-based detection layer that catches unknown ransomware variants
  • Creating high-fidelity ransomware alerts that have very low false-positive rates (legitimate users have no reason to touch decoy files)
  • Testing ransomware response procedures by validating that canary file modifications trigger the expected alerting pipeline
  • Protecting high-value file shares (finance, HR, legal) with tripwire files that indicate unauthorized encryption activity

Do not use decoy files as the sole ransomware defense. They are a detection mechanism, not a prevention mechanism, and should complement backups, EDR, and access controls.

Prerequisites

  • Python 3.8+ with watchdog library for cross-platform file system monitoring
  • Administrative access to target file shares or endpoints for canary placement
  • File integrity monitoring (FIM) tool or SIEM integration for alert routing
  • Understanding of target directory structure to place canaries in high-value locations
  • Windows: NTFS change journal or ReadDirectoryChangesW API access
  • Linux: inotify support in kernel (standard in modern kernels)

Workflow

Step 1: Design Canary File Strategy

Plan file placement for maximum detection coverage:

Canary File Placement Strategy:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Naming Convention:
  - Use names that sort FIRST and LAST alphabetically in each directory
  - Ransomware typically enumerates directories A-Z or Z-A
  - Examples: _AAAA_budget_2024.docx, ~zzzz_report_final.xlsx

Placement Locations:
  - Root of every file share (\\server\share\_AAAA_canary.docx)
  - Desktop, Documents, Downloads on each endpoint
  - Department-specific shares (Finance, HR, Legal)
  - Backup staging directories
  - Home directories of high-privilege accounts

File Types:
  - .docx, .xlsx, .pdf (most targeted by ransomware)
  - .sql, .bak (database files, high value)
  - Mix of file types to detect ransomware that targets specific extensions

Step 2: Generate Realistic Canary Files

Create decoy files with realistic content and metadata:

import os
import time

def create_canary_docx(filepath, content="Q4 Financial Summary - Confidential"):
    """Create a realistic .docx canary file using python-docx."""
    from docx import Document
    doc = Document()
    doc.add_heading("Financial Report - CONFIDENTIAL", level=1)
    doc.add_paragraph(content)
    doc.add_paragraph(f"Generated: {time.strftime('%Y-%m-%d')}")
    doc.save(filepath)

def create_canary_txt(filepath):
    """Create a simple text canary with known content for hash verification."""
    content = "CANARY_TOKEN_DO_NOT_MODIFY\n"
    content += f"Created: {time.strftime('%Y-%m-%dT%H:%M:%S')}\n"
    content += "This file is monitored for unauthorized changes.\n"
    with open(filepath, "w") as f:
        f.write(content)

Step 3: Deploy File System Watcher

Monitor canary files for any modification, rename, or deletion:

from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler

class CanaryHandler(FileSystemEventHandler):
    def __init__(self, canary_paths, alert_callback):
        self.canary_paths = set(canary_paths)
        self.alert_callback = alert_callback

    def on_modified(self, event):
        if event.src_path in self.canary_paths:
            self.alert_callback("MODIFIED", event.src_path)

    def on_deleted(self, event):
        if event.src_path in self.canary_paths:
            self.alert_callback("DELETED", event.src_path)

    def on_moved(self, event):
        if event.src_path in self.canary_paths:
            self.alert_callback("RENAMED", event.src_path)

Step 4: Configure Alerting and Response

Define automated responses when canary files are triggered:

Alert Response Matrix:
━━━━━━━━━━━━━━━━━━━━━
Event: Canary MODIFIED
  → Severity: CRITICAL
  → Action: Alert SOC, identify modifying process (PID), isolate endpoint

Event: Canary DELETED
  → Severity: HIGH
  → Action: Alert SOC, check for ransomware note in same directory

Event: Canary RENAMED (new extension added)
  → Severity: CRITICAL
  → Action: Alert SOC, check extension against known ransomware extensions
  → Automated: Kill modifying process, disable network interface

Event: Multiple canaries triggered within 60 seconds

…
अक्सर पूछे जाने वाले सवाल

Canary files क्या होती हैं?

ये नकली फ़ाइलें होती हैं, जिन्हें malicious software बदलने की कोशिश करे, ऐसा सोचकर बनाया जाता है। इनमें बदलाव होना ही alarm का काम करता है।

क्या यह ransomware को रोकता है?

नहीं, यह टूल ransomware को सीधे रोकता नहीं, बल्कि उसके काम शुरू करते ही उसे पहचानता है। दूसरी सुरक्षा व्यवस्थाएँ भी ज़रूरी हैं।

क्या इसे इस्तेमाल करने के लिए technical knowledge चाहिए?

हाँ, administrator access की ज़रूरत होती है, और canary files को सही जगह रखने के लिए यह पता होना चाहिए कि आपकी ज़रूरी फ़ाइलें कहाँ रखी हैं।

जानकारी

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

Deploys canary files (honeytokens) across file systems to detect ransomware encryption activity in real time. Uses strategically placed decoy documents monitored via file integrity monitoring or OS-level watchdogs to trigger alerts when ransomware modifies or encrypts them. Activates for requests involving ransomware canary deployment, honeyfile setup, deception-based ransomware detection, or file

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

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

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

0

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

कमेंट

  • …

इस repository की और skills

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