Service:
WinRM
Protocol:
TCPPort:
5985 (HTTP), 5986 (HTTPS)Used for:
Remote PowerShell & admin tasksWhy It’s Open
WinRM is the backbone of PowerShell remoting in modern Windows environments.
Common Risks
- NTLM Relay Attacks
- Credential Theft
- Lateral Movement in AD
Want to save time on reporting?
Let PentestPad generate, track, and export your reports - automatically.

Enumeration & Testing
Nmap check
nmap -p 5985,5986 -sV
nmap -p 5985 --script http-winrm-enumWinRM enumeration
winrm enumerate http://:5985/wsman
evil-winrm -i -u -p
winrm get winrm/configWhat to Look For
| Checkpoint | What it means |
|---|---|
| No encryption | Major data theft risk |
| Weak auth allowed | May be vulnerable to relay |
Known Exploits
- CVE-2016-3115 WinRM in Microsoft Windows allows remote attackers to execute arbitrary code via a crafted request.
- CVE-2015-0014 WinRM in Microsoft Windows allows remote attackers to execute arbitrary code via a crafted request.
Mitigation
- Enforce HTTPS (5986).
- Disable basic/NTLM if not required.
- Use endpoint protection and event logging.
TL;DR
- Service: Windows Remote Management (WinRM)
- Default Ports: 5985 (HTTP), 5986 (HTTPS)
- Risks: Unauthorized remote code execution, information disclosure
- Mitigation: Use HTTPS (5986), restrict access, enforce strong authentication, monitor logs