WinRM
WinRM is remote PowerShell — and if your credentials land you in the Remote Management Users group, it gives you a clean, fully-featured shell on the target. On a Windows engagement, finding open WinRM with working creds is one of the most direct paths to interactive access.
Protocol: TCP · Ports: 5985 (HTTP) · 5986 (HTTPS)
What Is WinRM?
Windows Remote Management (WinRM) is Windows’ built-in, command-line-based remote management protocol. It uses SOAP (Simple Object Access Protocol) to connect to remote hosts and their applications. From Windows 10 onward it must be explicitly enabled and configured — it’s not on by default on workstations. WinRM communicates over TCP 5985 (HTTP) and 5986 (HTTPS). In practice you’ll often see only HTTP (5985) in use rather than the encrypted 5986. A companion component is WinRS (Windows Remote Shell), which executes arbitrary commands on the remote system. It’s included by default as far back as Windows 7. The account you use needs to be in the Remote Management Users group (or be an administrator) to connect.Footprinting the Service
Nmap
Scan the two WinRM ports. Seeing 5985 open (and 5986 often closed) is the common case:Test-WsMan — Check Reachability from Windows
From a Windows host, theTest-WsMan cmdlet confirms whether a remote server is reachable via WinRM:
evil-winrm — Connect from Linux
On Linux,evil-winrm is the go-to tool for interacting with WinRM. With valid credentials it drops you into a clean PowerShell session:
Quick Reference
| Command | Purpose |
|---|---|
nmap -sV -p5985,5986 <ip> | Detect WinRM (HTTP/HTTPS) |
Test-WsMan <ip> | Check reachability from Windows |
evil-winrm -i <ip> -u <user> -p <pass> | Connect from Linux |
evil-winrm -i <ip> -u <user> -H <hash> | Connect via pass-the-hash |
Next: WMI — Windows Management Instrumentation and remote command execution.