deploying-decoy-files-for-ransomware-detection
Fungsinya
Tool ini membuat file palsu (disebut 'canary') di komputer dan server Anda. Jika perangkat lunak berbahaya, seperti ransomware, mencoba mengubah atau menghapus file palsu ini, Anda akan langsung mendapat peringatan.
Kapan dipakai
- βUntuk mendeteksi ransomware sebelum menyebabkan kerusakan.
- βSebagai pelengkap antivirus yang sudah Anda gunakan.
- βUntuk memastikan file penting Anda tetap aman.
Link skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/deploying-decoy-files-for-ransomware-detection/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βSiapkan file canary untuk mendeteksi ransomware pada dokumen saya.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Tool ini menempatkan file umpan (decoy) di lokasi-lokasi strategis. Tool akan memantau file tersebut, dan jika ada yang mencoba mengubahnya, alarm akan berbunyi sebagai tanda kemungkinan infeksi.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
watchdoglibrary 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
β¦
Pertanyaan umum
Apa itu file canary?
Itu adalah file palsu yang dibuat agar diubah oleh perangkat lunak berbahaya. Perubahan pada file ini berfungsi sebagai alarm.
Apakah ini bisa menghentikan ransomware?
Tidak. Tool ini berfungsi untuk mendeteksi ransomware begitu mulai beraksi, bukan untuk mencegahnya secara langsung. Penting untuk tetap memiliki perlindungan lain.
Apakah saya perlu pengetahuan teknis untuk menggunakannya?
Ya. Akses administrator sangat disarankan, dan Anda perlu tahu di mana file penting disimpan agar file canary bisa ditempatkan dengan tepat.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 35k
- Peringkat
- #7781
- Lisensi
- Apache-2.0
- Diperbarui
- 31/8/2026
Komentar
- β¦
Skill lain dari repositori ini
abusing-dpapi-for-credential-access
35kMemberi agent AI Anda instruksi siap pakai untuk tugas tertentu, sehingga hasilnya lebih baik dan pengerjaannya lebih cepat.
abusing-shadow-credentials-for-privesc
35kMengajarkan agent AI Anda menulis teks yang jelas dan terstruktur dengan baik.
achieving-cmmc-level-2-compliance
35kMembantu agent Anda menyiapkan lingkungan untuk kepatuhan CMMC Level 2. Skill ini menerapkan persyaratan keamanan dan mengelola dokumentasi yang diperlukan.
acquiring-disk-image-with-dd-and-dcfldd
35kMembantu agent Anda membuat salinan persis dari hard drive. Berguna untuk memastikan tidak ada informasi yang hilang atau berubah selama investigasi.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.