Skillpedia
النشر والسحابة (DevOps)35k · #8105

implementing-ransomware-kill-switch-detection

ما الذي تفعله

هذه المهارة تساعد على اكتشاف البرمجيات الخبيثة (برمجيات الفدية) ومنعها من العمل. تفحص إن كانت تحاول استخدام آليات للتهرب من الكشف أو لإيقاف نفسها، مثل إنشاء أسماء خاصة (mutexes) أو الاتصال بعناوين إنترنت (domains). ويمكنها أيضاً إنشاء هذه الأسماء مسبقاً لمنع البرمجية الخبيثة من العمل.

متى تستخدمها

  • ✓عندما تدرس برمجية خبيثة لتعرف إن كان لها «مفتاح إيقاف» (kill switch).
  • ✓عندما تريد حماية الأجهزة من تشغيل برمجيات خبيثة معروفة.
  • ✓عندما تريد مراقبة الإنترنت لترى إن كانت البرمجية الخبيثة تحاول الاتصال بعنوان مشبوه قبل أن تتحرك.

رابط المهارة

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-ransomware-kill-switch-detection/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-ransomware-kill-switch-detection/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“تحقّق إن كانت هذه البرمجية الخبيثة تستخدم «مفتاح إيقاف»، وأخبرني كيف أمنعها.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تحلل هذه المهارة كيف تحاول برمجيات الفدية حماية نفسها أو إيقاف تشغيلها. ويمكنها إنشاء «أسماء حجب» (mutexes) قبل تشغيل البرمجية لمنع تنفيذها، أو مراقبة إن كانت تحاول الوصول إلى عناوين إنترنت محددة.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

Implementing Ransomware Kill Switch Detection

When to Use

  • Analyzing a ransomware sample to determine if it contains a kill switch mechanism (mutex, domain, registry)
  • Deploying proactive mutex vaccination across endpoints to prevent known ransomware families from executing
  • Monitoring DNS for kill switch domain lookups that indicate ransomware attempting to check before encrypting
  • During incident response to quickly determine if a ransomware variant can be stopped by activating its kill switch
  • Building detection signatures for ransomware mutex creation events using Sysmon or EDR telemetry

Do not use kill switch vaccination as a primary defense. Not all ransomware families implement kill switches, and those that do may remove them in newer versions. This is a supplementary detection and prevention layer.

Prerequisites

  • Python 3.8+ with ctypes (Windows) for mutex creation and enumeration
  • Sysmon installed with Event ID 1 (process creation) and Event ID 17/18 (pipe/mutex events) configured
  • Access to malware analysis sandbox for identifying kill switch mechanisms in samples
  • DNS monitoring capability for detecting kill switch domain resolution attempts
  • Familiarity with Windows internals: mutexes (mutants), kernel objects, named pipes
  • Reference database of known ransomware mutexes (github.com/albertzsigovits/malware-mutex)

Workflow

Step 1: Identify Kill Switch Mechanisms in Ransomware

Analyze samples for common kill switch patterns:

Kill Switch Types Found in Ransomware:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. MUTEX-BASED (most common):
   - Ransomware creates a named mutex at startup
   - If mutex already exists → another instance is running → exit
   - Defense: Pre-create the mutex to prevent execution
   - Examples:
     WannaCry:     Global\MsWinZonesCacheCounterMutexA
     Conti:        kasKDJSAFJauisiudUASIIQWUA82
     REvil:        Global\{GUID-based-on-machine}
     Ryuk:         Global\YOURPRODUCT_MUTEX

2. DOMAIN-BASED:
   - Ransomware resolves a hardcoded domain before executing
   - If domain resolves → security sandbox detected → exit
   - Defense: Register/sinkhole the domain to activate kill switch
   - Examples:
     WannaCry v1:  iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com
     WannaCry v1:  fferfsodp9ifjaposdfjhgosurijfaewrwergwea.com

3. REGISTRY-BASED:
   - Check for specific registry key/value before executing
   - If key exists → exit (anti-analysis or kill switch)
   - Defense: Create the registry key proactively

4. FILE-BASED:
   - Check for existence of specific file or directory
   - If marker file exists → exit
   - Defense: Create the marker file on all endpoints

5. LANGUAGE-BASED:
   - Check system language/keyboard layout
   - Exit if Russian/CIS country keyboard detected
   - Common in Eastern European ransomware groups

Step 2: Deploy Mutex Vaccination

Pre-create known ransomware mutexes on endpoints to prevent execution:

# Windows mutex vaccination using ctypes
import ctypes
from ctypes import wintypes

kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)

def create_mutex(name):
    """Create a named mutex to vaccinate against ransomware."""
    handle = kernel32.CreateMutexW(None, False, name)
    error = ctypes.get_last_error()
    if handle == 0:
        return False, f"Failed to create mutex: error {error}"
    if error == 183:  # ERROR_ALREADY_EXISTS
        return True, f"Mutex already exists (already vaccinated): {name}"
    return True, f"Mutex created successfully: {name}"

KNOWN_RANSOMWARE_MUTEXES = [
    "Global\\MsWinZonesCacheCounterMutexA",        # WannaCry
    "Global\\kasKDJSAFJauisiudUASIIQWUA82",        # Conti
    "Global\\YOURPRODUCT_MUTEX",                     # Ryuk variant
    "Global\\JhbGjhBsSQjz",                         # Maze
    "Global\\sdjfhksjdhfsd",                         # Generic ransomware
]

Step 3: Monitor for Mutex Creation Events

Use Sysmon to detect when ransomware creates its characteristic mutexes:

<!-- Sysmon configuration for mutex monitoring -->
<Sysmon schemaversion="4.90">
  <EventFiltering>
    <!-- Event ID 1: Process creation with mutex indicators -->
    <ProcessCreate onmatch="include">
      <CommandLine condition="contains">mutex</CommandLine>
      <CommandLine condition="contains">CreateMutex</CommandLine>
    </ProcessCreate>
  </EventFiltering>
</Sysmon>
Detection via Event Logs:
━━━━━━━━━━━━━━━━━━━━━━━━

…
الأسئلة الشائعة

ما هو «mutex»؟

هو اسم فريد يستخدمه البرنامج ليقول «أنا أعمل بالفعل». إذا حاول برنامج آخر استخدام الاسم نفسه، يعرف أنه لا ينبغي أن يكمل.

ما هو «مفتاح الإيقاف» (kill switch)؟

هو آلية تستخدمها برمجيات الفدية لإيقاف نفسها عن العمل. يمكن أن تُفعَّل إذا اكتشفت أنها في بيئة اختبار، أو إذا اتصلت بعنوان إنترنت محدد.

هل يمكنني اعتماد هذه المهارة وحدها دفاعاً ضد برمجيات الفدية؟

لا. هذه المهارة طبقة دفاع إضافية. ليست كل برمجيات الفدية تملك «مفاتيح إيقاف»، وقد تُزال في الإصدارات الأحدث.

التفاصيل

الوصف الأصلي من المؤلف

Analyzes ransomware kill switch mechanisms, including mutex-based execution guards, domain-based kill switches (e.g. WannaCry-style), and registry termination checks, then implements mutex vaccination and kill switch domain monitoring to stop ransomware before it runs. Use when analyzing a sample''s execution guards or deploying vaccination/monitoring as a defensive control. '

repo: mukul975/Anthropic-Cybersecurity-Skills

الشعبية

نجوم GitHub
35k
الترتيب
#8105
الترخيص
Apache-2.0
آخر تحديث
31‏/8‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة