# OffSet7: Suspicious WmiPrvSE Child Process

> Design for the QRadar Rule Wizard. Not an importable rule and not tested in QRadar.

- Rule type: Event rule (Local), create disabled
- Log source types: Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1

## Building blocks

### BB:OffSet7:Suspicious WmiPrvSE Child Process:selection_parent (match)
All test lines must match (AND).
- when **Parent Process Path** ends with: `\wbem\WmiPrvSE.exe`

### BB:OffSet7:Suspicious WmiPrvSE Child Process:selection_children_1 (match)
All test lines must match (AND).
- when **Process Path / Process Name** ends with: `\certutil.exe`, `\cscript.exe`, `\mshta.exe`, `\msiexec.exe`, `\regsvr32.exe`, `\rundll32.exe`, `\verclsid.exe`, `\wscript.exe`

### BB:OffSet7:Suspicious WmiPrvSE Child Process:selection_children_2 (match)
All test lines must match (AND).
- when **Process Path / Process Name** ends with: `\cmd.exe`
- when **Command** contains: `cscript`, `mshta`, `powershell`, `pwsh`, `regsvr32`, `rundll32`, `wscript`

### BB:OffSet7:Suspicious WmiPrvSE Child Process:filter_main_werfault (exclusion)
All test lines must match (AND).
- when **Process Path / Process Name** ends with: `\WerFault.exe`

### BB:OffSet7:Suspicious WmiPrvSE Child Process:filter_main_wmiprvse (exclusion)
All test lines must match (AND).
- when **Process Path / Process Name** ends with: `\WmiPrvSE.exe`

### BB:OffSet7:Suspicious WmiPrvSE Child Process:filter_main_msiexec (exclusion)
All test lines must match (AND).
- when **Process Path / Process Name** ends with: `\msiexec.exe`
- when **Command** contains: `/i`

## Main rule — option A (building blocks)

1. when the event(s) were detected by one or more of these log source types: `Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1`
2. when an event matches the condition built from these building blocks: `BB:OffSet7:Suspicious WmiPrvSE Child Process:selection_parent AND (ANY of [BB:OffSet7:Suspicious WmiPrvSE Child Process:selection_children_1, BB:OffSet7:Suspicious WmiPrvSE Child Process:selection_children_2]) AND NOT (ANY of [BB:OffSet7:Suspicious WmiPrvSE Child Process:filter_main_werfault, BB:OffSet7:Suspicious WmiPrvSE Child Process:filter_main_wmiprvse, BB:OffSet7:Suspicious WmiPrvSE Child Process:filter_main_msiexec])`

## Main rule — option B (AQL filter test)

1. when the event matches this AQL filter query: `devicetype=12 AND LOWER("Parent Process Path") LIKE '%\wbem\wmiprvse.exe' AND (((LOWER("Process Path") LIKE '%\certutil.exe' OR LOWER("Process Path") LIKE '%\cscript.exe' OR LOWER("Process Path") LIKE '%\mshta.exe' OR LOWER("Process Path") LIKE '%\msiexec.exe' OR LOWER("Process Path") LIKE '%\regsvr32.exe' OR LOWER("Process Path") LIKE '%\rundll32.exe' OR LOWER("Process Path") LIKE '%\verclsid.exe' OR LOWER("Process Path") LIKE '%\wscript.exe') OR (LOWER("Process Name") LIKE '%\certutil.exe' OR LOWER("Process Name") LIKE '%\cscript.exe' OR LOWER("Process Name") LIKE '%\mshta.exe' OR LOWER("Process Name") LIKE '%\msiexec.exe' OR LOWER("Process Name") LIKE '%\regsvr32.exe' OR LOWER("Process Name") LIKE '%\rundll32.exe' OR LOWER("Process Name") LIKE '%\verclsid.exe' OR LOWER("Process Name") LIKE '%\wscript.exe')) OR ((LOWER("Process Path") LIKE '%\cmd.exe' OR LOWER("Process Name") LIKE '%\cmd.exe') AND (LOWER(Command) LIKE '%cscript%' OR LOWER(Command) LIKE '%mshta%' OR LOWER(Command) LIKE '%powershell%' OR LOWER(Command) LIKE '%pwsh%' OR LOWER(Command) LIKE '%regsvr32%' OR LOWER(Command) LIKE '%rundll32%' OR LOWER(Command) LIKE '%wscript%'))) AND (NOT(((LOWER("Process Path") LIKE '%\werfault.exe' OR LOWER("Process Name") LIKE '%\werfault.exe') OR (LOWER("Process Path") LIKE '%\wmiprvse.exe' OR LOWER("Process Name") LIKE '%\wmiprvse.exe') OR ((LOWER("Process Path") LIKE '%\msiexec.exe' OR LOWER("Process Name") LIKE '%\msiexec.exe') AND LOWER(Command) LIKE '%/i %'))))`

## Rule response

- Severity 7, credibility 6, relevance 7
- Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
- Respond no more than once per 30 minutes per Log Source (tune per environment)

## Limitations

- QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.

Source rule: Suspicious WmiPrvSE Child Process (8a582fe2-0882-4b89-a82a-da6b2dc32937). Author: Vadim Khrykov (ThreatIntel), Cyb3rEng, Florian Roth (Nextron Systems). Licence: DRL-1.1.
