Add detection for Hyper-V VM forced shutdown (ransomware preparation)#6034
Open
viizohh wants to merge 1 commit into
Open
Add detection for Hyper-V VM forced shutdown (ransomware preparation)#6034viizohh wants to merge 1 commit into
viizohh wants to merge 1 commit into
Conversation
Detects forced shutdown of Hyper-V virtual machines via PowerShell Stop-VM cmdlet with -Force or -TurnOff flags, and bulk VM shutdown patterns (Get-VM | Stop-VM). Ransomware operators shut down VMs before encryption to release file locks on VHDX files, enabling successful encryption. This technique was observed in Kyber ransomware (Rapid7, 2026). The rule focuses on forced operations and bulk patterns which are strong indicators of malicious intent, while intentionally excluding -Save flag to reduce false positives from legitimate VM maintenance. References: - https://www.rapid7.com/blog/post/tr-kyber-ransomware-double-trouble-windows-esxi-attacks-explained/ - https://learn.microsoft.com/en-us/powershell/module/hyper-v/stop-vm
Contributor
|
Welcome 👋 It looks like this is your first pull request on the Sigma rules repository! Please make sure to read the SigmaHQ conventions to make sure your contribution is adhering to best practices and has all the necessary elements in place for a successful approval. Thanks again, and welcome to the Sigma community! 😃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Detects forced shutdown of Hyper-V virtual machines via the PowerShell
Stop-VMcmdlet. Ransomware operators commonly shut down VMs before encryption to release file locks on VHDX files, enabling successful encryption of the virtual disk.Per Rapid7's analysis of Kyber ransomware: "Each VM is terminated with a hard stop (-TurnOff) which forces an abrupt shutdown, releasing file locks so the malware can encrypt."
Detection Logic:
-Forceor-TurnOffparametersGet-VM | Stop-VMpatternsThe
-Saveflag was intentionally excluded to reduce false positives, as it is more commonly used in legitimate VM maintenance than in ransomware operations (which use immediate hard stops to release file locks quickly).Relationship to Existing Rules
SigmaHQ has an existing Hyper-V cmdlet rule (
posh_ps_susp_hyper_v_condlet.yml) that detects VM creation for evasion (T1564.006) via Script Block Logging.This rule complements that detection in three ways:
process_creationinstead ofps_script, so it works in environments without Script Block Logging enabled (a common visibility gap)False Positives
Hyper-V administrators using
-Forceto terminate unresponsive VMs (when integration services fail to respond to graceful shutdown) may trigger this rule. Recommended mitigations: whitelist Hyper-V admin accounts, exclude scheduled maintenance windows, or correlate with subsequent encryption activity for higher confidence.References
Changelog
new: Hyper-V Virtual Machine Forced ShutdownExample Log Event
N/A – new detection rule based on threat intelligence.
Fixed Issues
N/A – new detection.
Testing
Validated with sigma-cli:
Syntax Check:
Backend Conversions:
Splunk (pipeline:
splunk_windows):Elasticsearch EQL (pipeline:
ecs_windows):