Detection rules › Sigma
WMI registration (PowerShell)
Detects scenarios where an attacker createsan instance of a WMI class using tools like WMImplant or PowerLurk.
Known false positives
- legitimate WMI class registration
- monitoring products
- Microsoft System Center or security products
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry coverage
Rule body
title: WMI registration (PowerShell)
description: Detects scenarios where an attacker createsan instance of a WMI class using tools like WMImplant or PowerLurk.
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0003-Persistence/T1546-Event%20Triggered%20Execution
- https://github.com/Sw4mpf0x/PowerLurk
- https://github.com/FortyNorthSecurity/WMImplant
- https://www.netspi.com/blog/technical/adversary-simulation/getting-started-wmi-weaponization-part-5/
- https://www.darkoperator.com/blog/2017/10/14/basics-of-tracking-wmi-activity
tags:
- attack.persistence
- attack.t1546.003
author: mdecrevoisier
status: experimental
logsource:
product: windows
category:
- ps_module
- ps_classic_script
- ps_script
detection:
selection1_powershell_native:
EventID: 800
EventData|contains:
- Set-WmiInstance
- Swmi
EventData|contains:
- Class
- Namespace
- Arguments
selection2_powershell_modern:
EventID: 4103
Payload|contains:
- Set-WmiInstance
- Swmi
Payload|contains:
- Class
- Namespace
- Arguments
selection3_powershell_block:
EventID: 4104
ScriptBlockText|contains:
- Set-WmiInstance
- Swmi
ScriptBlockText|contains:
- Class
- Namespace
- Arguments
condition: 1 of selection*
falsepositives:
- legitimate WMI class registration
- monitoring products
- Microsoft System Center or security products
level: high
Stages and Predicates
Stage 0: condition
1 of selection*Stage 1: selection1_powershell_native
selection1_powershell_native:
EventID: 800
EventData|contains:
- Set-WmiInstance
- Swmi
EventData|contains:
- Class
- Namespace
- Arguments
Stage 2: selection2_powershell_modern
selection2_powershell_modern:
EventID: 4103
Payload|contains:
- Set-WmiInstance
- Swmi
Payload|contains:
- Class
- Namespace
- Arguments
Stage 3: selection3_powershell_block
selection3_powershell_block:
EventID: 4104
ScriptBlockText|contains:
- Set-WmiInstance
- Swmi
ScriptBlockText|contains:
- Class
- Namespace
- Arguments
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventData | match |
| field:"EventData" kind:match |
Payload | match |
| field:"Payload" kind:match |
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |