Description
This module will create a permanent WMI event subscription to achieve file-less persistence using an event filter that will query the event log for an EVENT_ID_TRIGGER (default: failed logon request id 4625) that also contains a specified USERNAME_TRIGGER (note: failed logon auditing must be enabled on the target for this method to work, this can be enabled using "auditpol.exe /set /subcategory:Logon /failure:Enable"). When these criteria are met a command line event consumer will trigger an encoded powershell payload.
Additionally a custom command can be specified to run once the trigger is activated using the advanced option CustomPsCommand. This module requires administrator level privileges as well as a high integrity process. It is also recommended to use staged payloads due to powershell script length limitations.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/windows/persistence/wmi/wmi_event_subscription_event_logmsf undefined(wmi_event_subscription_event_log) > show actions ...actions...msf undefined(wmi_event_subscription_event_log) > set ACTION < action-name >msf undefined(wmi_event_subscription_event_log) > show options ...show and set options...msf undefined(wmi_event_subscription_event_log) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub