Rapid7 VulnDB

Authenticated WMI Exec via Powershell

Back to Search

Authenticated WMI Exec via Powershell



This module uses WMI execution to launch a payload instance on a remote machine. In order to avoid AV detection, all execution is performed in memory via psh-net encoded payload. Persistence option can be set to keep the payload looping while a handler is present to receive it. By default the module runs as the current process owner. The module can be configured with credentials for the remote host with which to launch the process.


  • RageLtMan <rageltman@sempervictus>




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/local/ps_wmi_exec
msf exploit(ps_wmi_exec) > show targets
msf exploit(ps_wmi_exec) > set TARGET < target-id >
msf exploit(ps_wmi_exec) > show options
    ...show and set options...
msf exploit(ps_wmi_exec) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security