Sigma rule: Potentially Suspicious Mofcomp Execution
A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-83e825451a00, updated 2026-08-06T00:00:00.000Z.
Rule
- Title
- Potentially Suspicious Mofcomp Execution
- Status
- test
- Level
- high
- Author
- Nasreddine Bencherchali (Nextron Systems)
- Date
- 2022-07-12
- Modified
- 2026-08-06
- File
- rules/windows/process_creation/proc_creation_win_mofcomp_execution.yml
- Commit
- ccbb0369507f796db0b0ae6854c8a2be471b9d84
Detects execution of the "mofcomp" utility as a child of a suspicious shell or script running utility or by having a suspicious path in the commandline.
The "mofcomp" utility parses a file containing MOF statements and adds the classes and class instances defined in the file to the WMI repository.
Attackers abuse this utility to install malicious MOF scripts
Log source
- product
- windows
- category
- process_creation
Detection
selection_img:
- Image|endswith: '\mofcomp.exe'
- OriginalFileName: 'mofcomp.exe'
selection_case:
- ParentImage|endswith:
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\wsl.exe'
- '\wscript.exe'
- '\cscript.exe'
- CommandLine|contains:
- '\AppData\Local\Temp'
- '\Contacts\'
- '\Favorites\'
- '\Favourites\'
- '\Music\'
- '\Pictures\'
- '\Users\Public\'
- '\Videos\'
- '\WINDOWS\Temp\'
- '%appdata%'
- '%temp%'
- '%tmp%'
filter_main_wmiprvse:
ParentImage: 'C:\Windows\System32\wbem\WmiPrvSE.exe'
CommandLine|contains: 'C:\Windows\TEMP\'
CommandLine|endswith: '.mof'
filter_main_installutil:
ParentCommandLine|endswith: '\InstallUtil.exe /Uninstall C:\Windows\CCM\Microsoft.ConfigurationManager.SVProvider.dll'
ParentImage|endswith: '\InstallUtil.exe'
CommandLine|contains|all:
- 'C:\Windows\TEMP'
- '.tmp'
filter_optional_null_parent:
ParentCommandLine: null
condition: all of selection_* and not 1 of filter_main_* and not 1 of filter_optional_*False positives (as the rule lists them)
- Unknown
Tags
- attack.stealth
- attack.t1218
MITRE ATT&CK ids this rule names
References
- https://thedfirreport.com/2022/07/11/select-xmrig-from-sqlserver/
- https://github.com/The-DFIR-Report/Sigma-Rules/blob/75260568a7ffe61b2458ca05f6f25914efb44337/win_mofcomp_execution.yml
- https://learn.microsoft.com/en-us/windows/win32/wmisdk/mofcomp
Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_mofcomp_execution.yml
Sources and licences
SigmaHQ
"Potentially Suspicious Mofcomp Execution" by Nasreddine Bencherchali (Nextron Systems) (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/process_creation/proc_creation_win_mofcomp_execution.yml.
Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License
Cite this page
Dragons Eye Ransomware Tracker, "Sigma rule: Potentially Suspicious Mofcomp Execution",
entity page, dataset version ref-83e825451a00, updated 2026-08-06T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/1dd05363-104e-4b4a-b963-196a534b03a1 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 1dd05363-104e-4b4a-b963-196a534b03a1, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.
Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.