How the attack works
Password guessing tries many passwords for one account and is stopped by account lockout. Password spraying turns that around. The attacker takes one or a few passwords that people commonly choose, tries each against a long list of domain accounts, and waits between rounds so that no account collects enough failures to be locked. Any service that checks domain credentials can be used for it: a domain controller directly, or a VPN, mail, web or remote desktop front end that passes the credentials on.
Every attempt ends at a domain controller as a failed authentication. Over Kerberos, a wrong password is a failed pre-authentication, recorded as event 4771 with failure code 0x18 together with the account and the client address. Over NTLM, the domain controller that validates the credentials records event 4776 with error code 0xC000006A, the account and the name of the source workstation. One such event is a user who mistyped a password. What gives a spray away is its shape: one source that fails for many different accounts within a short time. The computer that received the logon attempt, which can be a member server, also records it as event 4625 with the code 0xC000006A, the account and the source network address. A third rule on this page counts those events per source address.
That shape cannot be seen in a single event, so the rules on this page are threshold rules. They count the distinct accounts that failed per source in a time window. The values are starting points to tune, and a fixed threshold has limits. A patient attacker slows down or spreads the attempts over several sources, and a spray through a front end arrives from the address of that front end. A lockout policy, a banned password list and multifactor authentication remain the main defense. The count is the alarm for what gets past them.
A further rule counts event 8004 of the NTLM operational log, which a domain controller writes when NTLM auditing is enabled and which names the server the authentication came through as well as the account and the workstation. The event has no result, so the rule counts the accounts one workstation presented through one server whether or not the logons failed. Another rule counts the accounts for which one address received result code 0x12 in event 4768 (the account is disabled, expired or locked out), which Microsoft lists as a possible sign of a brute-force attack when it appears many times in a short period.
What an attacker needs
- A list of account names. Names follow predictable formats and can be confirmed without credentials, for example through Kerberos account enumeration.
- Network access to a domain controller or to any service that validates domain credentials.
- No credentials. Knowing the lockout policy helps the attacker pace the attempts, but it is not required.
Impact
A valid password for one or more domain accounts. That is a foothold as an ordinary user, with everything the account can read in the directory and reach on the network, and a starting point for privilege escalation. If a privileged or service account uses a common password, the spray leads straight to administrative access. A spray that misjudges the lockout policy locks many accounts at once, which interrupts the organization without any credentials being needed.
Detection rules
One Source Failed Kerberos Pre-Authentication for Many Accounts
Counts, per client address, the distinct accounts for which a domain controller logged event 4771 (Kerberos pre-authentication failed) with failure code 0x18, which Microsoft documents as a wrong password. One source that fails for 10 or more accounts within 30 minutes has the shape of a password spray; a single failure is a mistyped password. The threshold and the window are starting points to tune against your own baseline. Event 4771 is written only on domain controllers, is not written for accounts that do not require Kerberos pre-authentication, and needs failure auditing in the subcategory Audit Kerberos Authentication Service. Collect it from every domain controller, because one source can spread its attempts over several.
Fires when one IpAddress has at least 10 different TargetUserName values within 30 minutes.
title: Kerberos Pre-Authentication Failure With a Wrong Password (Spraying Base Event)
id: a275476f-bd99-4160-a741-75ecea833cc5
name: kerberos_wrong_password_many_accounts
status: experimental
description: >-
Base event of the threshold rule in this file. Event 4771 (Kerberos
pre-authentication failed) with failure code 0x18, KDC_ERR_PREAUTH_FAILED,
which Microsoft documents as a wrong password.
logsource:
product: windows
service: security
detection:
selection:
EventID: 4771
Status: '0x18'
condition: selection
level: low
---
title: One Source Failed Kerberos Pre-Authentication for Many Accounts
id: a1b57d53-f4f3-460d-83b4-81c7bb69c1cc
status: experimental
description: >-
Counts, per client address, the distinct accounts for which a domain
controller logged event 4771 (Kerberos pre-authentication failed) with
failure code 0x18, which Microsoft documents as a wrong password. One source
that fails for 10 or more accounts within 30 minutes has the shape of a
password spray; a single failure is a mistyped password. The threshold and
the window are starting points to tune against your own baseline. Event 4771
is written only on domain controllers, is not written for accounts that do
not require Kerberos pre-authentication, and needs failure auditing in the
subcategory Audit Kerberos Authentication Service. Collect it from every
domain controller, because one source can spread its attempts over several.
references:
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4771
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/audit-kerberos-authentication-service
- https://attack.mitre.org/techniques/T1110/003/
author: Forestall
date: 2026-11-15
tags:
- attack.credential-access
- attack.t1110.003
correlation:
type: value_count
rules:
- kerberos_wrong_password_many_accounts
group-by:
- IpAddress
timespan: 30m
condition:
field: TargetUserName
gte: 10
falsepositives:
- Systems that authenticate many users from one address, such as terminal servers, virtual desktop hosts, VPN gateways, reverse proxies and web or mail front ends that log users on with Kerberos. Baseline them, then exclude them by IpAddress or give them their own higher threshold.
- A mass password change or expiry, after which many devices present an old password in the same window, and a misconfigured application that tries a list of accounts. Compare the alert with the change calendar.
- The values of 10 accounts and 30 minutes are starting points, not tested limits. Measure how many distinct accounts normally fail per source in your environment and adjust both.
level: medium
False positives
- Systems that authenticate many users from one address, such as terminal servers, virtual desktop hosts, VPN gateways, reverse proxies and web or mail front ends that log users on with Kerberos. Baseline them, then exclude them by IpAddress or give them their own higher threshold.
- A mass password change or expiry, after which many devices present an old password in the same window, and a misconfigured application that tries a list of accounts. Compare the alert with the change calendar.
- The values of 10 accounts and 30 minutes are starting points, not tested limits. Measure how many distinct accounts normally fail per source in your environment and adjust both.
One Source Address Failed to Log On to Many Accounts With a Wrong Password
Counts, per source network address, the distinct accounts for which event 4625 (an account failed to log on) was logged with the code 0xC000006A in Status or Sub Status, which Microsoft documents as a logon with a misspelled or bad password. One address that fails for 10 or more accounts within 30 minutes has the shape of a password spray. Unlike events 4771 and 4776, which a domain controller writes for domain accounts, event 4625 is written by the computer on which the logon was attempted. Collected from member servers such as remote desktop, file, web and mail servers, it shows a spray at the server that received it, together with the source address and the logon type. The threshold and the window are starting points to tune. Requires failure auditing in the subcategory Audit Logon on the servers that forward their Security log.
Fires when one IpAddress has at least 10 different TargetUserName values within 30 minutes.
title: Logon Failure With a Wrong Password (Spraying Base Event)
id: 65f148ae-2af6-4a23-a9e2-5dd7a28fe09d
name: logon_wrong_password_many_accounts
status: experimental
description: >-
Base event of the threshold rule in this file. Event 4625 (an account failed
to log on) with the code 0xC000006A in Status or Sub Status, which Microsoft
documents as a user logon with a misspelled or bad password.
logsource:
product: windows
service: security
detection:
selection:
EventID: 4625
selection_wrong_password:
- Status: '0xc000006a' # the event XML writes the code in lowercase
- SubStatus: '0xc000006a'
condition: selection and selection_wrong_password
level: low
---
title: One Source Address Failed to Log On to Many Accounts With a Wrong Password
id: 9467a37b-28b6-4177-9ac2-db338daba6cb
status: experimental
description: >-
Counts, per source network address, the distinct accounts for which event
4625 (an account failed to log on) was logged with the code 0xC000006A in
Status or Sub Status, which Microsoft documents as a logon with a misspelled
or bad password. One address that fails for 10 or more accounts within 30
minutes has the shape of a password spray. Unlike events 4771 and 4776,
which a domain controller writes for domain accounts, event 4625 is written
by the computer on which the logon was attempted. Collected from member
servers such as remote
desktop, file, web and mail servers, it shows a spray at the server that
received it, together with the source address and the logon type. The
threshold and the window are starting points to tune. Requires failure
auditing in the subcategory Audit Logon on the servers that forward their
Security log.
references:
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4625
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/audit-logon
- https://attack.mitre.org/techniques/T1110/003/
author: Forestall
date: 2026-11-16
tags:
- attack.credential-access
- attack.t1110.003
correlation:
type: value_count
rules:
- logon_wrong_password_many_accounts
group-by:
- IpAddress
timespan: 30m
condition:
field: TargetUserName
gte: 10
falsepositives:
- Systems that log many users on from one address, such as terminal servers, virtual desktop hosts, VPN gateways, reverse proxies and load balancers in front of the server. Baseline them, then exclude them by IpAddress or give them their own higher threshold.
- Events without a usable source address. A server that performs the logon on behalf of remote users, such as a web or mail front end, can record no address or its own, and all of those events are then counted as one source. Read the log of that service to find the client addresses.
- A mass password change or expiry, after which many devices present an old password in the same window. Compare the alert with the change calendar.
- The values of 10 accounts and 30 minutes are starting points, not tested limits. Measure how many distinct accounts normally fail per source address and adjust both.
level: medium
False positives
- Systems that log many users on from one address, such as terminal servers, virtual desktop hosts, VPN gateways, reverse proxies and load balancers in front of the server. Baseline them, then exclude them by IpAddress or give them their own higher threshold.
- Events without a usable source address. A server that performs the logon on behalf of remote users, such as a web or mail front end, can record no address or its own, and all of those events are then counted as one source. Read the log of that service to find the client addresses.
- A mass password change or expiry, after which many devices present an old password in the same window. Compare the alert with the change calendar.
- The values of 10 accounts and 30 minutes are starting points, not tested limits. Measure how many distinct accounts normally fail per source address and adjust both.
One Workstation Presented NTLM Authentications for Many Accounts Through One Server
Counts, per server and source workstation name, the distinct accounts for which a domain controller logged event 8004 in the NTLM operational log. The event audits an NTLM authentication that a member server passed to the domain controller. It names that server (secure channel name), the account, the domain and the workstation. One workstation name that presents 10 or more accounts through one server within 30 minutes has the shape of a password spray over NTLM. Unlike event 4776, the event names the server that received the logons. It has no field for the result, so the count includes authentications that succeeded, and a source that many users share reaches the threshold in normal use. The workstation name is the one the client reported and can be empty or false. When it is, count per secure channel name alone. The threshold and the window are starting points to tune. Requires the policy "Network security: Restrict NTLM: Audit NTLM authentication in this domain" on domain controllers, set to Enable all to cover every account and server. The field names (SChannelName, UserName, DomainName, WorkstationName, SChannelType) are those of the event template that ships with Windows. Microsoft's documentation gives the labels of the event text only.
Fires when one combination of SChannelName and WorkstationName has at least 10 different UserName values within 30 minutes.
title: NTLM Authentication Audited by a Domain Controller (Spraying Base Event)
id: c9a0de6d-cb97-43e0-b378-7b342deb0cb2
name: ntlm_audit_event_many_accounts
status: experimental
description: >-
Base event of the threshold rule in this file. Event 8004 in the NTLM
operational log (Microsoft-Windows-NTLM/Operational), written by the
provider Microsoft-Windows-Security-Netlogon on a domain controller for an
NTLM authentication that a member server passed to it.
logsource:
product: windows
service: ntlm
detection:
selection:
Provider_Name|contains: Security-Netlogon
EventID: 8004
condition: selection
level: low
---
title: One Workstation Presented NTLM Authentications for Many Accounts Through One Server
id: d5276b20-402a-4e20-9d9b-db9d5ed86a86
status: experimental
description: >-
Counts, per server and source workstation name, the distinct accounts for
which a domain controller logged event 8004 in the NTLM operational log.
The event audits an NTLM authentication that a member server passed to the
domain controller. It names that server (secure channel name), the account,
the domain and the workstation. One workstation name that presents 10 or
more accounts through one server within 30 minutes has the shape of a
password spray over NTLM. Unlike event 4776, the event names the server
that received the logons. It has no field for the result, so the count
includes authentications that succeeded, and a source that many users share
reaches the threshold in normal use. The workstation name is the one the
client reported and can be empty or false. When it is, count per secure
channel name alone. The threshold and the window are starting points to
tune. Requires the policy "Network security: Restrict NTLM: Audit NTLM
authentication in this domain" on domain controllers, set to Enable all to
cover every account and server.
The field names (SChannelName, UserName, DomainName, WorkstationName,
SChannelType) are those of the event template that ships with Windows.
Microsoft's documentation gives the labels of the event text only.
references:
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/jj865682(v=ws.10)
- https://learn.microsoft.com/en-us/archive/blogs/askds/ntlm-blocking-and-you-application-analysis-and-auditing-methodologies-in-windows-7
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/network-security-restrict-ntlm-audit-ntlm-authentication-in-this-domain
- https://learn.microsoft.com/en-us/defender-for-identity/deploy/configure-windows-event-collection
- https://learn.microsoft.com/en-us/defender-for-identity/whats-new-archive
- https://attack.mitre.org/techniques/T1110/003/
author: Forestall
date: 2026-11-16
tags:
- attack.credential-access
- attack.t1110.003
correlation:
type: value_count
rules:
- ntlm_audit_event_many_accounts
group-by:
- SChannelName # "Secure Channel name" in the event text
- WorkstationName # "Workstation name"
timespan: 30m
condition:
field: UserName # "User name"
gte: 10
falsepositives:
- Clients that many users share, such as terminal servers, virtual desktop hosts and proxies, when they reach a server over NTLM. Baseline them, then exclude the pair by SChannelName and WorkstationName or give it its own higher threshold.
- Servers that perform the logon on behalf of remote users, such as web and mail front ends and RADIUS servers. Their events can carry one workstation name, or none, for all users. Read the log of that service to find the clients.
- Events with an empty workstation name. Depending on the SIEM they are counted together as one source or left out of the count, so review them per SChannelName.
- The event has no result, so users who authenticate successfully are counted as well. The values of 10 accounts and 30 minutes are starting points, not tested limits. Measure how many distinct accounts each pair normally presents and adjust both.
level: medium
False positives
- Clients that many users share, such as terminal servers, virtual desktop hosts and proxies, when they reach a server over NTLM. Baseline them, then exclude the pair by SChannelName and WorkstationName or give it its own higher threshold.
- Servers that perform the logon on behalf of remote users, such as web and mail front ends and RADIUS servers. Their events can carry one workstation name, or none, for all users. Read the log of that service to find the clients.
- Events with an empty workstation name. Depending on the SIEM they are counted together as one source or left out of the count, so review them per SChannelName.
- The event has no result, so users who authenticate successfully are counted as well. The values of 10 accounts and 30 minutes are starting points, not tested limits. Measure how many distinct accounts each pair normally presents and adjust both.
One Workstation Failed NTLM Authentication for Many Accounts
Counts, per source workstation name, the distinct accounts for which a domain controller logged event 4776 (the computer attempted to validate the credentials for an account) with error code 0xC000006A, which Microsoft documents as a logon with a misspelled or bad password. One workstation name that fails for 10 or more accounts within 30 minutes has the shape of a password spray over NTLM. The event holds the workstation name the client reported and no network address, and that name can be empty or false; read the logon failure events (4625) of the server that received the logons to find the address. The threshold and the window are starting points to tune. Requires failure auditing in the subcategory Audit Credential Validation on domain controllers.
Fires when one Workstation has at least 10 different TargetUserName values within 30 minutes.
title: NTLM Credential Validation Failure With a Wrong Password (Spraying Base Event)
id: 61454dc0-f186-42a7-8a66-5faef961b9d7
name: ntlm_wrong_password_many_accounts
status: experimental
description: >-
Base event of the threshold rule in this file. Event 4776 (the computer
attempted to validate the credentials for an account) with error code
0xC000006A, which Microsoft documents as an account logon with a misspelled
or bad password.
logsource:
product: windows
service: security
detection:
selection:
EventID: 4776
Status: '0xc000006a' # the event XML writes the code in lowercase
condition: selection
level: low
---
title: One Workstation Failed NTLM Authentication for Many Accounts
id: 69952a93-2596-44a1-8ff3-bdf00b339619
status: experimental
description: >-
Counts, per source workstation name, the distinct accounts for which a
domain controller logged event 4776 (the computer attempted to validate the
credentials for an account) with error code 0xC000006A, which Microsoft
documents as a logon with a misspelled or bad password. One workstation name
that fails for 10 or more accounts within 30 minutes has the shape of a
password spray over NTLM. The event holds the workstation name the client
reported and no network address, and that name can be empty or false; read
the logon failure events (4625) of the server that received the logons to
find the address. The threshold and the window are starting points to tune.
Requires failure auditing in the subcategory Audit Credential Validation on
domain controllers.
references:
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4776
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/audit-credential-validation
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4625
- https://attack.mitre.org/techniques/T1110/003/
author: Forestall
date: 2026-11-15
tags:
- attack.credential-access
- attack.t1110.003
correlation:
type: value_count
rules:
- ntlm_wrong_password_many_accounts
group-by:
- Workstation
timespan: 30m
condition:
field: TargetUserName
gte: 10
falsepositives:
- Servers that pass NTLM logons of many users to the domain controller under one workstation name, such as terminal servers, mail and web front ends, proxies and RADIUS servers. Baseline them, then exclude them by Workstation or give them their own higher threshold.
- Events with an empty workstation name. Depending on the SIEM they are counted together as one source or left out of the count, so review them separately.
- A mass password change or expiry, after which many devices present an old password in the same window. Compare the alert with the change calendar.
- The values of 10 accounts and 30 minutes are starting points, not tested limits. Measure how many distinct accounts normally fail per workstation name and adjust both.
level: medium
False positives
- Servers that pass NTLM logons of many users to the domain controller under one workstation name, such as terminal servers, mail and web front ends, proxies and RADIUS servers. Baseline them, then exclude them by Workstation or give them their own higher threshold.
- Events with an empty workstation name. Depending on the SIEM they are counted together as one source or left out of the count, so review them separately.
- A mass password change or expiry, after which many devices present an old password in the same window. Compare the alert with the change calendar.
- The values of 10 accounts and 30 minutes are starting points, not tested limits. Measure how many distinct accounts normally fail per workstation name and adjust both.
One Source Requested Kerberos Tickets for Many Disabled, Expired or Locked Out Accounts
Counts, per client address, the distinct accounts for which a domain controller logged event 4768 with result code 0x12 (KDC_ERR_CLIENT_REVOKED: the account is disabled, expired or locked out). Microsoft lists many such events in a short time as a possible sign of a brute-force attack. A list of account names used for a spray usually holds disabled and departed accounts, and a spray that goes over the lockout threshold locks accounts, so one address that collects this error for 10 or more accounts within 30 minutes has the shape of a spray even when the wrong-password failures of event 4771 are spread out. The threshold and the window are starting points to tune. Requires failure auditing in the subcategory Audit Kerberos Authentication Service on domain controllers.
Fires when one IpAddress has at least 10 different TargetUserName values within 30 minutes.
title: Kerberos Ticket Request for a Disabled, Expired or Locked Out Account (Spraying Base Event)
id: d762472d-fc57-487c-9801-adf51f802907
name: kerberos_tgt_request_revoked_account
status: experimental
description: >-
Base event of the threshold rule in this file. Event 4768 (a Kerberos
authentication ticket was requested) with result code 0x12,
KDC_ERR_CLIENT_REVOKED, which Microsoft explains as an account that is
disabled, expired or locked out.
logsource:
product: windows
service: security
detection:
selection:
EventID: 4768
Status: '0x12'
condition: selection
level: low
---
title: One Source Requested Kerberos Tickets for Many Disabled, Expired or Locked Out Accounts
id: b98be1fe-04b1-4bad-8335-f1be6945b831
status: experimental
description: >-
Counts, per client address, the distinct accounts for which a domain
controller logged event 4768 with result code 0x12 (KDC_ERR_CLIENT_REVOKED:
the account is disabled, expired or locked out). Microsoft lists many such
events in a short time as a possible sign of a brute-force attack. A list of
account names used for a spray usually holds disabled and departed accounts,
and a spray that goes over the lockout threshold locks accounts, so one
address that collects this error for 10 or more accounts within 30 minutes
has the shape of a spray even when the wrong-password failures of event 4771
are spread out. The threshold and the window are starting points to tune.
Requires failure auditing in the subcategory Audit Kerberos Authentication
Service on domain controllers.
references:
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4768
- https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/audit-kerberos-authentication-service
- https://attack.mitre.org/techniques/T1110/003/
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1110.003
correlation:
type: value_count
rules:
- kerberos_tgt_request_revoked_account
group-by:
- IpAddress
timespan: 30m
condition:
field: TargetUserName
gte: 10
falsepositives:
- Servers and applications that keep trying accounts that were disabled or removed, such as a scheduled task or a service still configured with a departed user. They repeat the same few names from one address at regular intervals.
- A wave of lockouts after a mass password change, when many devices behind one address present old passwords. Compare the alert with the change calendar.
- The values of 10 accounts and 30 minutes are starting points, not tested limits. Measure how many distinct accounts normally receive this error per address and adjust both.
level: medium
False positives
- Servers and applications that keep trying accounts that were disabled or removed, such as a scheduled task or a service still configured with a departed user. They repeat the same few names from one address at regular intervals.
- A wave of lockouts after a mass password change, when many devices behind one address present old passwords. Compare the alert with the change calendar.
- The values of 10 accounts and 30 minutes are starting points, not tested limits. Measure how many distinct accounts normally receive this error per address and adjust both.
Triage
- Identify the source. Event 4771 gives the client address. Event 4776 gives only the workstation name the client reported, which can be empty or false, so find the server that received the logons and read the source network address in its logon failure events (4625).
- Decide whether the source is a system that many users authenticate through, such as a terminal server, a VPN gateway or a web or mail front end. If it is, the real origin is behind it and the logs of that system have to be read.
- List the accounts and the times of the failures. Attempts in alphabetical or address book order, at regular intervals, with one failure per account, point to a tool. A handful of users failing repeatedly points to a password change or a broken application.
- Search for successful authentications from the same source during and after the burst (4768 and 4776 with status 0x0, and 4624 on the target systems). An account that succeeded where the others failed is the finding that matters.
- Look at the hours before the burst for ticket requests that failed because the account does not exist (4768 with result code 0x6) from the same source. Enumeration of account names often comes first.
- Check for account lockouts (4740) in the same window. Many lockouts at once mean the attempts went over the lockout threshold.
Response
Once the attack is confirmed:
- Cut the source off. Isolate the internal host the attempts came from, or block the external address on the front end that passed them on, and watch for the attempts continuing from another address.
- Treat every account that authenticated successfully from the source during the attack as compromised. Reset its password, end its sessions and keep it disabled until its activity has been reviewed.
- Review what those accounts did after the first successful logon, including logons to other systems, directory queries, changes to groups and new accounts, and widen the scope of the incident to whatever they touched.
- If the source is an internal machine, treat the machine as compromised. Preserve it for investigation and find out how the attacker got onto it, because the spray was not the first step.
- Force a password change for the targeted accounts whose passwords are likely to follow the same weak pattern, and put a banned password list in place before they choose new ones.
- Unlock the accounts the spray locked once the source is contained, and keep the threshold rules on a lower threshold for the following weeks.
Mitigation
- Set an account lockout threshold and a counter reset time, so that each account allows only a few guesses per period. The Windows security baselines recommend a threshold of 10 failed attempts. The default of 0 never locks an account.
- Block the passwords a spray tries first. Microsoft Entra Password Protection for Active Directory Domain Services enforces the global and custom banned password lists on domain controllers when a password is changed or reset.
- Require multifactor authentication on every externally reachable service that accepts domain credentials, so that a guessed password is not enough.
- Apply stricter fine-grained password policies to privileged accounts, and give service accounts long random passwords or replace them with group managed service accounts.
- Reduce the number of systems that accept domain passwords from the internet, and retire protocols that cannot enforce modern controls.
- Enable failure auditing for the subcategories Audit Kerberos Authentication Service and Audit Credential Validation on every domain controller, and collect the events from all of them. The attempts of one spray are spread over several domain controllers.
Frequently asked questions
Why does a password spray not trigger account lockout?
Account lockout counts failed attempts per account and resets the count after a configured time. A spray tries only one or a few passwords for each account and waits between rounds, so every account stays below the threshold. Seen per account nothing unusual happens. The pattern only shows when failures are counted per source across all accounts.
Which events show a password spray on a domain controller?
Event 4771 with failure code 0x18 for Kerberos and event 4776 with error code 0xC000006A for NTLM. Both mean a wrong password. They are written only when failure auditing is enabled for Audit Kerberos Authentication Service and Audit Credential Validation. A single event is normal, so the rules count the distinct accounts that failed from one source.
Why does the NTLM rule group by workstation name instead of an IP address?
Event 4776 records the account, the error code and the name of the source workstation, and no network address. The rule can only group by that name, which the client reports itself. To find the address, look at the logon failure events (4625) on the server that received the logon attempts.
What threshold should I use to detect password spraying?
The rules start at 10 distinct accounts from one source in 30 minutes. Measure how many accounts normally fail per source over a few weeks, exclude or raise the limit for shared systems such as terminal servers and VPN gateways, and then lower the threshold as far as the noise allows. A slow spray can stay under any fixed threshold, so the rules do not replace a lockout policy, banned passwords and multifactor authentication.
References
- MITRE ATT&CK T1110.003: Password Spraying
- Event 4771: Kerberos pre-authentication failed
- Event 4776: The computer attempted to validate the credentials for an account
- Audit Kerberos Authentication Service
- Audit Credential Validation
- Event 4625: An account failed to log on
- Security policy setting: Account lockout threshold
- Enforce Microsoft Entra Password Protection for Active Directory Domain Services
- Microsoft Defender for Identity alerts (suspected password spray attack, Kerberos and NTLM)
- Password spray investigation
- Event 4768: A Kerberos authentication ticket (TGT) was requested (result code 0x12)