Powershell Remoting - WinRM
Par défaut, il faut obligatoirement disposer de droit d'administrateur sur la machine cible.
Windows Remote Management enables server hardware management and is also how Microsoft employs WMI over HTTP(S). Unlike traditional web traffic, it doesn't utilize protocol 80/443, but instead uses protocols 5985 (HTTP) and 5986 (HTTPS).
WinRM comes pre-installed with Windows but requires some configuration to be used. An exception to this rule pertains to server operating systems, as it has been enabled by default since 2012R2 and onwards.
WinRM requires a port to be listening for a WINRM connection on the victim machine. This can be done via the command in Powershell, or remotely via WMI and Powershell:
With Windows Powershell:
Create a session:
Execute command on the opened session
Detection :
Outbound network connections can be searched for with a destination port of 5985/5986. The process start event for wsmprovhost.ex
e can be observed (with a "-Embedding" parameter in the command line arguments).
Last updated