2023-04-03 12:06:14 +02:00
title : Potential Suspicious Mofcomp Execution
2022-07-12 01:27:51 +01:00
id : 1dd05363-104e-4b4a-b963-196a534b03a1
2024-03-01 15:38:35 +01:00
status : test
2022-07-12 01:27:51 +01:00
description : |
2023-10-28 13:15:09 +02:00
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.
2022-07-12 01:27:51 +01:00
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
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
2024-07-02 06:00:11 -04:00
- https://learn.microsoft.com/en-us/windows/win32/wmisdk/mofcomp
2023-02-01 11:14:59 +01:00
author : Nasreddine Bencherchali (Nextron Systems)
2024-08-12 12:02:50 +02:00
date : 2022-07-12
modified : 2023-04-11
2022-10-28 15:06:36 +02:00
tags :
2024-08-12 12:02:50 +02:00
- attack.defense-evasion
2022-10-28 15:06:36 +02:00
- attack.t1218
2022-07-12 01:27:51 +01:00
logsource :
category : process_creation
product : windows
detection :
selection_img :
2023-02-21 22:15:30 +01:00
- Image|endswith : '\mofcomp.exe'
- OriginalFileName : 'mofcomp.exe'
2022-07-12 01:27:51 +01:00
selection_case :
- ParentImage|endswith :
2023-10-18 11:53:44 +02:00
- '\cmd.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\wsl.exe'
- '\wscript.exe'
- '\cscript.exe'
2022-07-12 01:27:51 +01:00
- CommandLine|contains :
2023-10-18 11:53:44 +02:00
- '\AppData\Local\Temp'
- '\Users\Public\'
- ' \WINDOWS\Temp\'
- '%temp%'
- '%tmp%'
- '%appdata%'
2023-04-03 12:06:14 +02:00
filter_main_wmiprvse :
ParentImage : 'C:\Windows\System32\wbem\WmiPrvSE.exe'
CommandLine|contains : 'C:\Windows\TEMP\'
CommandLine|endswith: ' .mof'
2023-04-11 13:04:22 +02:00
filter_optional_null_parent :
2023-10-28 13:15:09 +02:00
# Sometimes the parent information isn't available from the Microsoft-Windows-Security-Auditing provider.
2023-04-11 13:04:22 +02:00
CommandLine|contains : 'C:\Windows\TEMP\'
CommandLine|endswith: ' .mof'
condition : all of selection_* and not 1 of filter_main_* and not 1 of filter_optional_*
2022-07-12 01:27:51 +01:00
falsepositives :
- Unknown
2023-04-03 12:06:14 +02:00
level : high