> ## Documentation Index
> Fetch the complete documentation index at: https://www.0101isnothacking.nl/llms.txt
> Use this file to discover all available pages before exploring further.

# WinRM enumeration

> WinRM enumeration cheat sheet for ports 5985 and 5986.

Windows Remote Management (WinRM) listens on ports 5985 (HTTP) and 5986 (HTTPS).

## Port scan

```sh theme={null}
nmap -p5985,5986 $ip
```

## Banner grabbing

```sh theme={null}
nc -nv $ip 5985
```

## Nmap scripts

```sh theme={null}
nmap -sV -sC $ip -p5985,5986 --disable-arp-ping -n
```

## Connect to WinRM

```powershell theme={null}
# Basic connection
evil-winrm -i target.com -u administrator -p 'password'

# With domain
evil-winrm -i target.com -u 'DOMAIN\username' -p 'password'

# Pass-the-Hash
evil-winrm -i target.com -u administrator -H 'NTHASH'

# SSL on port 5986
evil-winrm -i target.com -u administrator -p 'password' -S

# Custom port
evil-winrm -i target.com -u administrator -p 'password' -P 5985
```

## Steps

![WinRM enumeration steps](https://mintcdn.com/non-9fcb5a21/P-t86H21MW2fT7Il/images/7be5c9ed969b.png?fit=max\&auto=format\&n=P-t86H21MW2fT7Il\&q=85\&s=04255758903e8498a705b271106e2836)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.