# Authentication

### WinRM Authentication

#### Testing credentials

```bash
nxc winrm 192.168.1.0/24 -u user -p password
```

Expected Results:

```bash
WINRM       192.168.255.131 5985   ROGER            [*] http://192.168.255.131:5985/wsman
WINRM       192.168.255.131 5985   ROGER            [+] GOLD\user:password (Pwn3d!)
```

If the SMB port is closed you can also use the flag `-d DOMAIN` to avoid an SMB connection

```bash
nxc winrm 192.168.1.0/24 -u user -p password -d DOMAIN
```

Expected Results:

```bash
WINRM       192.168.255.131 5985   192.168.255.131  [*] http://192.168.255.131:5985/wsman
WINRM       192.168.255.131 5985   192.168.255.131  [+] GOLD\user:password (Pwn3d!)
```

### Example

Monteverde machine is a good example to test **WinRM** procotol with NetExec

{% embed url="<https://www.hackthebox.com/machines/monteverde>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.netexec.wiki/winrm-protocol/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
