-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Create Mofcomp.yml #513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Create Mofcomp.yml #513
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| --- | ||
| Name: Mofcomp.exe | ||
| Description: Compiler that parses a file containing MOF statements and adds the classes and class instances defined in the file to the WMI repository. Threat actors can leverage this binary to install malicious MOF scripts | ||
| Author: Daniel Gott | ||
| Created: 2022-07-19 | ||
| Commands: | ||
| - Command: mofcomp.exe C:\Windows\SERVIC~1\MSSQL$~1\AppData\Local\Temp\xitmf | ||
| Description: Abuse of mofcomp.exe to parse a file which contains MOF statements in order create new classes as part of the WMI repository | ||
| Usecase: Threat actors can use mofcomp.exe to decompile a BMOF binary and then register a malicious class in the WMI repository | ||
| Category: Execute | ||
| Privileges: User | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should include Tags:
- Execute: MOF |
||
| MitreID: T1047 | ||
| OperatingSystem: Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11, Windows Server 2008+ | ||
| - Command: mofcomp.exe C:\Programdata\x.mof | ||
| Description: Abuse of mofcomp.exe to parse a file which contains MOF statements in order create new classes as part of the WMI repository | ||
| Usecase: Threat actors can use mofcomp.exe to register a malicious MOF file as a new class in the WMI repository | ||
| Category: Execute | ||
| Privileges: User | ||
| MitreID: T1047 | ||
| OperatingSystem: Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10, Windows 11, Windows Server 2008+ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is redundant if we generalise the first example, and can be removed. |
||
| Full_Path: | ||
| - Path: C:\Windows\System32\wbem\mofcomp.exe | ||
| - Path: C:\Windows\SysWOW64\wbem\mofcomp.exe | ||
| Code_Sample: | ||
| - Code: N/A | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be deleted |
||
| Detection: | ||
| - IOC: strange parent processes spawning mofcomp.exe like cmd.exe or powershell.exe | ||
| - Sigma: https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_susp_mofcomp_execution.yml | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No longer exists - should be using commit hashes like the example below anyway |
||
| - Sigma: https://github.com/The-DFIR-Report/Sigma-Rules/blob/75260568a7ffe61b2458ca05f6f25914efb44337/win_mofcomp_execution.yml | ||
| Resources: | ||
| - Link: https://docs.microsoft.com/en-us/windows/win32/wmisdk/mofcomp | ||
| - Link: https://docs.microsoft.com/en-us/windows/win32/wmisdk/managed-object-format--mof- | ||
| - Link: https://thedfirreport.com/2022/07/11/select-xmrig-from-sqlserver/ | ||
| - Link: https://in.security/2019/04/03/an-intro-into-abusing-and-identifying-wmi-event-subscriptions-for-persistence/ | ||
| - Link: https://medium.com/threatpunter/detecting-removing-wmi-persistence-60ccbb7dff96 | ||
| Acknowledgement: | ||
| - Person: Daniel Gott | ||
| Handle: '@gott_cyber' | ||
| - Person: The DFIR Report | ||
| Handle: '@TheDFIRReport' | ||
| - Person: Nasreddine Bencherchali | ||
| Handle: '@nas_bench' | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this path? Since it is not explained, I'm guessing this should be generalised to
{PATH_ABSOLUTE:.mof}