Detection rules › Splunk
WmiPrvSE Suspicious Child Process (Sysmon)
Windows Management Instrumentation Provider Service (WmiPrvSE.exe) is a Windows component used for system management, monitoring, and reporting. While it is legitimately used by system administrators, its system privileges make it an attractive target for abuse by threat actors. This use case detects unusual child processes of WmiPrvSe.exe. It specifically looks for instances where known scripting or executable processes are spawned by WmiPrvSe.exe. The rule excludes certain system processes like 'werfault' and 'wmiprvse' and specific user accounts to reduce false positives, focusing on patterns that are often associated with security threats or attacks
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution |
References
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule body
id: '25922.47939'
title: WmiPrvSE Suspicious Child Process
description: Windows Management Instrumentation Provider Service (WmiPrvSE.exe) is
a Windows component used for system management, monitoring, and reporting. While
it is legitimately used by system administrators, its system privileges make it
an attractive target for abuse by threat actors. This use case detects unusual child
processes of WmiPrvSe.exe. It specifically looks for instances where known scripting
or executable processes are spawned by WmiPrvSe.exe. The rule excludes certain system
processes like 'werfault' and 'wmiprvse' and specific user accounts to reduce false
positives, focusing on patterns that are often associated with security threats
or attacks. Living Off the Land Binary and Scripts (LOLBAS) (LOLBIN)
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
(TERM(wmiprvse) OR "wmiprvse.exe") (TERM(certutil) OR TERM(cscript) OR TERM(mshta)
OR TERM(msiexec) OR TERM(regsvr32) OR TERM(rundll32) OR TERM(verclsid) OR TERM(wscript)
OR "certutil" OR "cscript" OR "mshta" OR "msiexec" OR "regsvr32" OR "rundll32" OR
"verclsid" OR "wscript") | where match(parent_process_path, "(?i)(\x5cwbem\x5cwmiprvse\.exe)")
and (match(process_name, "(?i)(certutil|cscript|mshta|msiexec|regsvr32|rundll32|verclsid|wscript)\.exe")
or match(process_name, "(?i)cmd\.exe") and match(process, "(?i)(cscript|mshta|powershell|pwsh|regsvr32|rundll32|wscript)"))
and not match(process_name, "(?i)(werfault|wmiprvse)\.exe") and not match(user,
"AUTHORI|AUTORI") | table _time, host, user, process, process_*, parent_process_*
| bin span=1s | stats values(*) as * by _time, host '
techniques:
- execution:windows management instrumentation
technique_id:
- T1047
data_category:
- Windows Sysmon
references:
- https://thedfirreport.com/2021/03/29/sodinokibi-aka-revil-ransomware/
- https://blog.osarmor.com/319/onenote-attachment-delivers-asyncrat-malware/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") (TERM(wmiprvse) OR "wmiprvse.exe") (TERM(certutil) OR TERM(cscript) OR TERM(mshta) OR TERM(msiexec) OR TERM(regsvr32) OR TERM(rundll32) OR TERM(verclsid) OR TERM(wscript) OR "certutil" OR "cscript" OR "mshta" OR "msiexec" OR "regsvr32" OR "rundll32" OR "verclsid" OR "wscript")
Stage 2: where
| where match(parent_process_path, "(?i)(\x5cwbem\x5cwmiprvse\.exe)") and (match(process_name, "(?i)(certutil|cscript|mshta|msiexec|regsvr32|rundll32|verclsid|wscript)\.exe") or match(process_name, "(?i)cmd\.exe") and match(process, "(?i)(cscript|mshta|powershell|pwsh|regsvr32|rundll32|wscript)")) and not match(process_name, "(?i)(werfault|wmiprvse)\.exe") and not match(user, "AUTHORI|AUTORI")
Stage 3: table
| table _time, host, user, process, process_*, parent_process_*
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process_name | regex_match | "(?i)(werfault|wmiprvse).exe" | excludes:process_name |
user | regex_match | "AUTHORI, AUTORI" | excludes:user |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"1" |
parent_process_path | regex_match |
| field:"parent_process_name" kind:regex_match |
process | regex_match |
| field:"CommandLine" kind:regex_match |
process_name | regex_match |
| field:"process_name" kind:regex_match |
Search terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>1<" |
| 1 | wmiprvse |
| 1 | "wmiprvse.exe" |
| 1 | certutil |
| 1 | cscript |
| 1 | mshta |
| 1 | msiexec |
| 1 | regsvr32 |
| 1 | rundll32 |
| 1 | verclsid |
| 1 | wscript |
| 1 | "certutil" |
| 1 | "cscript" |
| 1 | "mshta" |
| 1 | "msiexec" |
| 1 | "regsvr32" |
| 1 | "rundll32" |
| 1 | "verclsid" |
| 1 | "wscript" |