Detectionmediumtest

Powershell WMI Persistence

Adversaries may establish persistence and elevate privileges by executing malicious content triggered by a Windows Management Instrumentation (WMI) event subscription.

Convert In Phoenix Studio

Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.

Launch
François HubautCreated Thu Aug 19Updated Sun Dec 259e07f6e7-83aa-45c6-998e-0af26efd0a85windows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enabled

Detection Logic
Detection Logic1 selector
detection:
    selection_ioc:
        - ScriptBlockText|contains|all:
              - 'New-CimInstance '
              - '-Namespace root/subscription '
              - '-ClassName __EventFilter '
              - '-Property ' # is a variable name
        - ScriptBlockText|contains|all:
              - 'New-CimInstance '
              - '-Namespace root/subscription '
              - '-ClassName CommandLineEventConsumer '
              - '-Property ' # is a variable name
    condition: selection_ioc
False Positives
Unknown

False positive likelihood has not been assessed. Additional context may be needed during triage.

Rule Metadata
Rule ID
9e07f6e7-83aa-45c6-998e-0af26efd0a85
Status
test
Level
medium
Type
Detection
Created
Thu Aug 19
Modified
Sun Dec 25
Path
rules/windows/powershell/powershell_script/posh_ps_wmi_persistence.yml
Raw Tags
attack.persistenceattack.privilege-escalationattack.t1546.003
View on GitHub