Sigma rule: Suspicious WSL InstallLocation Registry Key Modification Via CommandLine
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-686d10157e4f, updated 2026-05-05T00:00:00.000Z.
Rule
- Title
- Suspicious WSL InstallLocation Registry Key Modification Via CommandLine
- Status
- experimental
- Level
- high
- Author
- Swachchhanda Shrawan Poudel (Nextron Systems)
- Date
- 2026-05-05
- File
- rules/windows/process_creation/proc_creation_win_wsl_installlocation_modification_via_cmdline.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects the use of reg.exe or PowerShell to modify the WSL InstallLocation registry key via command-line arguments.
Legitimate modifications to this key are performed exclusively by the Windows Installer (msiexec.exe) during WSL package installation or update.
Manual use of reg.exe or PowerShell to set this value strongly indicates an attempt to redirect WSL execution to a malicious binary.
Log source
- product
- windows
- category
- process_creation
Detection
selection_img:
- Image|endswith:
- '\powershell.exe'
- '\pwsh.exe'
- '\reg.exe'
- OriginalFileName:
- 'powershell.exe'
- 'pwsh.dll'
- 'reg.exe'
selection_cli_action:
CommandLine|contains:
- ' add ' # reg.exe add subcommand
- 'New-ItemProperty'
- 'Set-ItemProperty'
- 'sp ' # PowerShell alias for Set-ItemProperty
selection_cli_key:
CommandLine|contains:
- '\Lxss\MSI'
- '/Lxss/MSI' # forward-slash variant sometimes used with PowerShell paths
selection_cli_value:
CommandLine|contains: 'InstallLocation'
condition: all of selection_*False positives (as the rule lists them)
- Unlikely
Tags
- attack.stealth
- attack.defense-impairment
- attack.persistence
- attack.t1112
- attack.t1218
MITRE ATT&CK ids this rule names
Related rules
References
- https://cardinalops.com/blog/bash-and-switch-hijacking-via-windows-subsystem-for-linux/
- https://blog.qualys.com/vulnerabilities-threat-research/2022/04/20/implications-of-windows-subsystem-for-linux-for-adversaries-defenders-part-2
- https://www.bleepingcomputer.com/news/security/new-malware-uses-windows-subsystem-for-linux-for-stealthy-attacks/
- https://thehackernews.com/2021/09/new-malware-targets-windows-subsystem.html
- https://learn.microsoft.com/en-us/windows/wsl/
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_wsl_installlocation_modification_via_cmdline.yml
Sources and licences
SigmaHQ
"Suspicious WSL InstallLocation Registry Key Modification Via CommandLine" by Swachchhanda Shrawan Poudel (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_wsl_installlocation_modification_via_cmdline.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Suspicious WSL InstallLocation Registry Key Modification Via CommandLine",
entity page, dataset version ref-686d10157e4f, updated 2026-05-05T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/f9f62824-de4e-40ca-afe7-8358f76a876d (accessed 2026-11-03).
Underlying source: SigmaHQ rule f9f62824-de4e-40ca-afe7-8358f76a876d, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.