> For the complete documentation index, see [llms.txt](https://www.netexec.wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.netexec.wiki/smb-protocol/password-spraying.md).

# Password Spraying

### Using Username/Password Lists

You can use multiple usernames or passwords by separating the names/passwords with a space.

```bash
nxc smb 192.168.1.101 -u user1 user2 user3 -p Summer18
nxc smb 192.168.1.101 -u user1 -p password1 password2 password3
```

nxc accepts txt files of usernames and passwords. One user/password per line. Watch out for account lockout!

```bash
nxc smb 192.168.1.101 -u /path/to/users.txt -p Summer18
nxc smb 192.168.1.101 -u Administrator -p /path/to/passwords.txt
```

{% hint style="warning" %}
By default nxc will exit after a successful login is found. Using the **--continue-on-success** flag, it will continue spraying even after a valid password is found. Useful for spraying a single password against a large user list. This is incompatible with command execution.
{% endhint %}

Usage example:

```bash
nxc smb 192.168.1.101 -u /path/to/users.txt -p Summer18 --continue-on-success
```

### Checking 'username == password' using wordlist

```bash
nxc smb 192.168.1.101 -u user.txt -p user.txt --no-bruteforce --continue-on-success
```

### Checking multiple usernames/passwords using wordlist

```bash
nxc smb 192.168.1.101 -u user.txt -p password.txt
```

The result will be:

* user1 => password1
* user1 => password2
* user2 => password1
* user2 => password2

{% hint style="danger" %}
Be careful to not lock accounts using this technique
{% endhint %}

### Checking one login equal one password using wordlist

{% hint style="success" %}
No bruteforce possible with this one as 1 user = 1 password
{% endhint %}

```bash
nxc smb 192.168.1.101 -u user.txt -p password.txt --no-bruteforce --continue-on-success
```

The result will be:

* user1 => password1
* user2 => password2

{% hint style="danger" %}
Avoid range or a list of IPs when using the `--no-bruteforce` option
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://www.netexec.wiki/smb-protocol/password-spraying.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
