Detection rules › Sigma
Potential Suspicious Mofcomp Execution
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
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Defense Evasion | T1218 System Binary Proxy Execution |
Event coverage
| Provider | Event ID | Title |
|---|---|---|
| Sysmon | 1 | Process creation |
Stages and Predicates
Stage 1: all of selection_img
or:
Image|endswith: '\mofcomp.exe'
OriginalFileName: mofcomp.exe
Stage 2: all of selection_case
or:
CommandLine|contains: '%appdata%'
CommandLine|contains: '%temp%'
CommandLine|contains: '%tmp%'
CommandLine|contains: '\AppData\Local\Temp'
CommandLine|contains: '\Users\Public\'
CommandLine|contains: '\WINDOWS\Temp\'
ParentImage|endswith: '\cmd.exe'
ParentImage|endswith: '\cscript.exe'
ParentImage|endswith: '\powershell.exe'
ParentImage|endswith: '\pwsh.exe'
ParentImage|endswith: '\wscript.exe'
ParentImage|endswith: '\wsl.exe'
Stage 3: not 1 of filter_main_wmiprvse
CommandLine|endswith: .mof
CommandLine|contains: 'C:\Windows\TEMP\'
ParentImage: 'C:\Windows\System32\wbem\WmiPrvSE.exe'
Stage 4: not 1 of filter_optional_null_parent
CommandLine|endswith: .mof
CommandLine|contains: 'C:\Windows\TEMP\'
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
CommandLine | ends_with |
|
CommandLine | match |
|
Image | ends_with |
|
OriginalFileName | eq |
|
ParentImage | ends_with |
|
ParentImage | eq |
|