WinRM [5985, 5986]

WinRM is Microsoft’s implementation of the Web Services-Management Protocol (WS-Management).

  • Based on SOAP and XML Web Services

  • Enables remote administration of Windows systems

  • Interfaces with WMI, WBEM, and optionally DCOM


πŸ” Security & Configuration

  • Not enabled by default on Windows 10

  • Must be manually activated and configured

  • Heavily reliant on domain/local environment security

Port
Protocol

5985

HTTP

5986

HTTPS (secured via certificates)

πŸ” Best practice: Use certificates or secure authentication mechanisms


Tools for WinRM Exploitation

CrackMapExec (CME)

A versatile post-exploitation tool often called the Swiss Army Knife for Pentesters πŸ—‘οΈ

Supports: SMB, LDAP, MSSQL, SSH, and WinRM

πŸ”§ Installation


πŸ” Example with WinRM:

βœ”οΈ Success Output Example:

🟒 Pwn3d! indicates successful login and likely command execution capability.


πŸ“š CME Help Options

  • General Help:

  • Protocol-specific Help:

Great for discovering additional modules like enumeration, file access, or lateral movement scripts.


Login with Evil-WinRM

An essential tool designed specifically for communicating with WinRM endpoints πŸͺŸπŸ”

πŸ”§ Installation

πŸ’» Basic Usage

πŸ” Example:

βœ… On success, a PowerShell Remoting Protocol shell is launched:

🎯 Use this session to enumerate, download/upload files, escalate privileges, and move laterally within the network.


Last updated