Event Triggered Execution: Windows Management Instrumentation Event Subscription
Other sub-techniques of Event Triggered Execution (15)
ID | Name |
---|---|
T1546.001 | Change Default File Association |
T1546.002 | Screensaver |
T1546.003 | Windows Management Instrumentation Event Subscription |
T1546.004 | .bash_profile and .bashrc |
T1546.005 | Trap |
T1546.006 | LC_LOAD_DYLIB Addition |
T1546.007 | Netsh Helper DLL |
T1546.008 | Accessibility Features |
T1546.009 | AppCert DLLs |
T1546.010 | AppInit DLLs |
T1546.011 | Application Shimming |
T1546.012 | Image File Execution Options Injection |
T1546.013 | PowerShell Profile |
T1546.014 | Emond |
T1546.015 | Component Object Model Hijacking |
Adversaries may establish persistence and elevate privileges by executing malicious content triggered by a Windows Management Instrumentation (WMI) event subscription. WMI can be used to install event filters, providers, consumers, and bindings that execute code when a defined event occurs. Examples of events that may be subscribed to are the wall clock time, user loging, or the computer's uptime. [1]
Adversaries may use the capabilities of WMI to subscribe to an event and execute arbitrary code when that event occurs, providing persistence on a system. [2] [3] Adversaries may also compile WMI scripts into Windows Management Object (MOF) files (.mof extension) that can be used to create a malicious subscription. [4] [5]
WMI subscription execution is proxied by the WMI Provider Host process (WmiPrvSe.exe) and thus may result in elevated SYSTEM privileges.
Procedure Examples
Name | Description |
---|---|
adbupd | |
APT29 | |
APT33 |
APT33 has attempted to use WMI event subscriptions to establish persistence on compromised hosts.[9] |
Blue Mockingbird |
Blue Mockingbird has used mofcomp.exe to establish WMI Event Subscription persistence mechanisms configured from a *.mof file.[10] |
Leviathan | |
PoshC2 |
PoshC2 has the ability to persist on a system using WMI events.[12] |
POSHSPY |
POSHSPY uses a WMI event subscription to establish persistence.[13] |
POWERTON | |
RegDuke |
RegDuke can persist using a WMI consumer that is launched every time a process named WINWORD.EXE is started.[8] |
SeaDuke |
SeaDuke uses an event filter in WMI code to execute a previously dropped executable shortly after system startup.[3] |
Turla |
Turla has used WMI event filters and consumers to establish persistence.[15] |
UNC2452 |
UNC2452 used WMI event subscriptions for persistence.[16][17] |
Mitigations
Mitigation | Description |
---|---|
Privileged Account Management |
Prevent credential overlap across systems of administrator and privileged accounts. [3] |
User Account Management |
By default, only administrators are allowed to connect remotely using WMI; restrict other users that are allowed to connect, or disallow all users from connecting remotely to WMI. |
Detection
Monitor WMI event subscription entries, comparing current WMI event subscriptions to known good subscriptions for each host. Tools such as Sysinternals Autoruns may also be used to detect WMI changes that could be attempts at persistence. [18] [19]
Monitor processes and command-line arguments that can be used to register WMI persistence, such as the Register-WmiEvent
PowerShell cmdlet [20], as well as those that result from the execution of subscriptions (i.e. spawning from the WmiPrvSe.exe WMI Provider Host process).
References
- Mandiant. (2015, February 24). M-Trends 2015: A View from the Front Lines. Retrieved May 18, 2016.
- Devon Kerr. (2015). There's Something About WMI. Retrieved May 4, 2020.
- Ballenthin, W., et al. (2015). Windows Management Instrumentation (WMI) Offense, Defense, and Forensics. Retrieved March 30, 2016.
- Dell SecureWorks Counter Threat Unit™ (CTU) Research Team. (2016, March 28). A Novel WMI Persistence Implementation. Retrieved March 30, 2016.
- Satran, M. (2018, May 30). Managed Object Format (MOF). Retrieved January 24, 2020.
- Windows Defender Advanced Threat Hunting Team. (2016, April 29). PLATINUM: Targeted attacks in South and Southeast Asia. Retrieved February 15, 2018.
- Dunwoody, M. and Carr, N.. (2016, September 27). No Easy Breach DerbyCon 2016. Retrieved October 4, 2016.
- Faou, M., Tartare, M., Dupuy, T. (2019, October). OPERATION GHOST. Retrieved September 23, 2020.
- Microsoft Threat Protection Intelligence Team. (2020, June 18). Inside Microsoft Threat Protection: Mapping attack chains from cloud to endpoint. Retrieved June 22, 2020.
- Lambert, T. (2020, May 7). Introducing Blue Mockingbird. Retrieved May 26, 2020.
- FireEye. (2018, March 16). Suspected Chinese Cyber Espionage Group (TEMP.Periscope) Targeting U.S. Engineering and Maritime Industries. Retrieved April 11, 2018.
- Nettitude. (2018, July 23). Python Server for PoshC2. Retrieved April 23, 2019.
- Dunwoody, M.. (2017, April 3). Dissecting One of APT29’s Fileless WMI and PowerShell Backdoors (POSHSPY). Retrieved April 5, 2017.
- Ackerman, G., et al. (2018, December 21). OVERRULED: Containing a Potentially Destructive Adversary. Retrieved January 17, 2019.
- Faou, M. and Dumont R.. (2019, May 29). A dive into Turla PowerShell usage. Retrieved June 14, 2019.
- Microsoft 365 Defender Team. (2020, December 28). Using Microsoft 365 Defender to protect against Solorigate. Retrieved January 7, 2021.
- MSTIC, CDOC, 365 Defender Research Team. (2021, January 20). Deep dive into the Solorigate second-stage activation: From SUNBURST to TEARDROP and Raindrop . Retrieved January 22, 2021.
- Russinovich, M. (2016, January 4). Autoruns for Windows v13.51. Retrieved June 6, 2016.
- French, D. (2018, October 9). Detecting & Removing an Attacker’s WMI Persistence. Retrieved October 11, 2019.
- Microsoft. (n.d.). Retrieved January 24, 2020.