Summery
Wmiexec.py utilizes a semi-interactive shell where commands are executed through Windows Management Instrumentation. It does not drop any files or executables on the target host and generates fewer logs than other modules.
Note that this shell environment is not fully interactive, so each command issued will execute a new cmd.exe from WMI and execute your command.
This is a more stealthy approach to execution on hosts than other tools, but would still likely be caught by most modern anti-virus and EDR systems.
The downside of this is that if a vigilant defender checks event logs and looks at event ID 4688: A new process has been created, they will see a new process created to spawn cmd.exe and issue a command. This isn’t always malicious activity since many organizations utilize WMI to administer computers, but it can be a tip-off in an investigation.
Regular authentication
wmiexec.py inlanefreight.local/user:'password'@1.3.3.7
Kerberos authentication
wmiexec.py dc01 -k
Fun note:
This is a very stable shell so it should let you run Pentesting/The Grimoire/Tools/Mimikatz with it!