Persistence via WMI Standard Registry Provider
The rule identifies the use of Windows Management Instrumentation StdRegProv (registry provider) to modify commonly abused registry locations for persistence by detecting registry changes made by WmiPrvSe.exe in specific registry paths.
This detection rule identifies the abuse of the Windows Management Instrumentation (WMI) StdRegProv, specifically WmiPrvSe.exe, to establish persistence on a Windows system. Attackers can leverage WMI’s registry provider to modify sensitive registry keys related to autostart execution points (ASEPs) without directly spawning child processes. The rule focuses on detecting registry modifications in locations such as HKEY_USERS, HKLM, and \\REGISTRY associated with Run keys, RunOnce keys, service configurations, and other persistence mechanisms. The rule aims to detect malicious modifications introduced via WMI rather than through direct registry manipulation. This technique allows attackers to maintain system access even after a reboot or user logon, making it a valuable indicator of compromise for defenders. The rule was last updated on 2026/05/03.
Attack Chain
- Attacker gains initial access to the system, possibly through exploiting a vulnerability or using stolen credentials.
- Attacker leverages WMI to interact with the
StdRegProvclass, a WMI provider for registry operations. - Attacker uses the
CreateKeyorSetStringValuemethods withinStdRegProvto modify critical registry locations related to persistence. - The registry modifications are performed by the
WmiPrvSe.exeprocess, the WMI provider host. - The attacker targets registry keys such as
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Runto execute a payload upon system startup. - The attacker also modifies service-related registry keys such as
HKLM\SYSTEM\CurrentControlSet\Services\<ServiceName>\ImagePathto execute a malicious DLL or executable as a service. - Upon system restart or user logon, the modified registry keys trigger the execution of the attacker’s payload.
- The attacker achieves persistence on the system, allowing them to maintain access and perform further malicious activities.
Impact
Successful exploitation leads to persistent access on the compromised system. This allows attackers to maintain a foothold even after reboots, enabling them to perform activities such as data theft, lateral movement, and further malware deployment. If widespread, this can result in significant disruption and data loss across the organization. The risk score of this rule is 73, indicating a significant potential impact.
Recommendation
- Enable and monitor registry event logging, specifically focusing on changes made to the registry paths outlined in the rule query, to improve detection capabilities.
- Investigate any registry modifications made by
WmiPrvSe.exeto the registry paths in the query, prioritizing those with unusual or suspicious data, as highlighted in the investigation guide. - Deploy the Sigma rule “Persistence via WMI Standard Registry Provider” to your SIEM to detect suspicious WMI-based registry modifications.
- Monitor process creations originating from the registry keys modified by
WmiPrvSe.exeto identify potential payload execution. - Review the references provided for additional context on the StdRegProv class and hunting for persistence using Elastic Security.
Detection coverage 3
Detect WMI Registry Persistence via Run Keys
highDetects persistence via WMI StdRegProv modification of Run keys in the registry. Alerts when WmiPrvSe.exe modifies specific registry paths related to autorun.
Detect WMI Registry Persistence via Service ImagePath Modification
highDetects persistence via WMI StdRegProv modification of the Service ImagePath registry key. Alerts when WmiPrvSe.exe modifies the ImagePath of a service.
Detect WMI Registry Persistence via Winlogon Shell Modification
highDetects persistence via WMI StdRegProv modification of the Winlogon Shell registry key. Alerts when WmiPrvSe.exe modifies the Winlogon Shell key.
Detection queries are available on the platform. Get full rules →