# Authentication

## Testing credentials

You can use two methods to authenticate to the WMI: `windows` or `local` (default: `windows`). To use local auth, add the following flag `--local-auth`

### **Windows auth**

* With SMB port open

```bash
nxc wmi 10.10.10.52 -u james -p 'J@m3s_P@ssW0rd!'
```

* With SMB port close, add the flag `-d DOMAIN`

```bash
nxc wmi 10.10.10.52 -u james -p 'J@m3s_P@ssW0rd!' -d HTB
```

Expected Results:

```bash
WMI       10.10.10.52     1433   MANTIS           [+] HTB\james:J@m3s_P@ssW0rd! 
```

### **Local auth**

```bash
nxc wmi 10.10.10.52 -u admin -p 'admin' --local-auth
```


---

# 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/wmi-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.
