implementing-ransomware-kill-switch-detection

Detects ransomware kill switches and deploys mutex vaccination to block execution.

954|172|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/xalgord/xalgorix --skill implementing-ransomware-kill-switch-detection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implementing-ransomware-kill-switch-detection
Source: https://github.com/xalgord/xalgorix/tree/main/internal/tools/skills/data/ransomware-defense/implementing-ransomware-kill-switch-detection
Command: npx skills add https://github.com/xalgord/xalgorix --skill implementing-ransomware-kill-switch-detection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ransomware often contains built-in kill switches (mutexes, domains, registry keys) that defenders can exploit to stop encryption, but identifying and operationalizing these mechanisms requires specialized Windows internals knowledge and tooling.

Core Features & Use Cases

  • Kill Switch Identification: Analyze ransomware samples for mutex-based, domain-based, registry-based, file-based, and language-based termination checks.
  • Mutex Vaccination: Pre-create known ransomware mutexes (WannaCry, Conti, Ryuk, Maze) on endpoints using Python ctypes to prevent execution.
  • Detection Engineering: Configure Sysmon Event ID 17/18 monitoring and DNS sinkhole detection for kill switch domain lookups.
  • Use Case: During incident response, enumerate active mutexes on an infected endpoint with Velociraptor or Sysinternals Handle to determine if the ransomware variant can be stopped by activating its kill switch.

Quick Start

Analyze this ransomware sample for kill switch mechanisms and generate mutex vaccination scripts for our endpoints.

Frequently Asked Questions about implementing-ransomware-kill-switch-detection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect ransomware kill switches in a malware sample?

Analyze the sample in a sandbox for mutex creation, domain resolution attempts, registry checks, and file existence checks at startup. Common patterns include named mutexes like WannaCry's Global\MsWinZonesCacheCounterMutexA and high-entropy domain lookups before encryption begins.

How to vaccinate endpoints against ransomware using mutexes?

Use Python ctypes to call CreateMutexW with known ransomware mutex names, pre-creating them so the ransomware detects an existing instance and exits. Deploy via a scheduled task running before user logon, since named mutexes do not survive reboots.

Does mutex vaccination survive a system reboot?

No, named mutexes are per-session kernel objects that vanish on restart. Re-apply vaccination at startup via a scheduled task or service, and verify by attempting to create the same mutex and checking for ERROR_ALREADY_EXISTS (error 183).

What Sysmon events detect ransomware mutex creation?

Sysmon Event ID 17 and 18 capture named pipe and mutex-related activity, while Event ID 1 logs process creation with command lines. Wire these events to automated host isolation rather than ticket queues, since encryption completes within minutes.

What are the limitations of kill switch vaccination as a defense?

Not all ransomware families implement kill switches, and those that do may remove them in newer versions. Over-broad mutex names can also collide with legitimate software, so vaccination is a supplementary layer, not a primary defense.