WinRM and PowerShell Remoting Lateral Movement
WinRM (Windows Remote Management) runs on port 5985 (HTTP) and 5986 (HTTPS) and is the native Windows remoting protocol. It is enabled by default on Windows Server 2012 and later, and on any host where PowerShell Remoting has been configured. Access requires the account to be in the local Administrators group or the Remote Management Users group.
Evil-WinRM — interactive shell from Linux
Evil-WinRM is the standard tool for WinRM-based lateral movement from a Linux attack box. It gives a full interactive PowerShell session and supports file upload, download, and in-memory script loading.
Evil-WinRM shell v3.5 Info: Establishing connection to remote endpoint *Evil-WinRM* PS C:\Users\user\Documents>
PowerShell Remoting from Windows
From a Windows foothold, native PowerShell remoting gives you interactive sessions and the ability to run commands across multiple hosts simultaneously.
Checking WinRM access before connecting
Before attempting a full connection, verify that WinRM is reachable and that your credentials are accepted.
WINRM 192.168.1.10 5985 WIN-TARGET [+] domain\user:password (Pwn3d!)
Impacket WinRM
WinRM sessions run as the authenticated user, not SYSTEM. If you need SYSTEM on the remote host, escalate after connecting — use the techniques in Windows Privilege Escalation. For SMB-based lateral movement when WinRM is not available see PsExec and SMB Lateral Movement.
References
-
Evil-WinRM — GitHubgithub.com/Hackplayers/evil-winrm (opens in new tab)
Full feature list including script loading and file transfer
-
Windows Remote Management — Microsoft Docslearn.microsoft.com/en-us/windows/win32/winrm/portal (opens in new tab)
WinRM protocol documentation and configuration reference
Was this helpful?
Your feedback helps improve this page.