How the attack works
Active Directory Federation Services (AD FS) signs users in to cloud and partner applications with their domain credentials. Its user name and password endpoints are published to the internet through the Web Application Proxy, so anyone can submit a user name and a password and learn from the answer whether the pair is valid. That makes the federation service a place to test domain passwords without being inside the network. In a password spray the attacker tries one or a few common passwords against many accounts, staying below the lockout threshold of each. In password guessing the attacker tries many passwords against one account. Older clients that sign in to Exchange Online with basic authentication reach AD FS through Microsoft's servers, which then appear as the client address.
Microsoft built extranet lockout into AD FS because of these attacks. It counts bad passwords per user for requests that come through the proxy and stops validating them against the domain once a threshold is reached, so that the account is locked for extranet access and stays usable inside. Extranet smart lockout, available since AD FS 2016, adds the notion of familiar locations and keeps a separate counter for unknown ones.
With AD FS auditing enabled, the failures are written to the Security log of each AD FS server under the event source AD FS Auditing. Event 1203 is written for each bad password attempt and event 411 for a failed token validation, with the user name and the address of the submitter. Events 1210 and 516 say that a user was locked out, and 512 that a sign-in was allowed for a locked-out user because lockout runs in log-only mode. Event 515 says that an account in the locked out state supplied the correct password, which Microsoft's own event text calls a sign that the account might be compromised. The Web Application Proxy servers do not need auditing, and the domain controllers see these attempts only as failed validations coming from the AD FS servers.
What an attacker needs
- Network access to the user name and password endpoints of AD FS, which are reachable from the internet where the service is published through the Web Application Proxy.
- A list of user names of the organization.
Impact
A password that the spray finds is a valid domain credential. It signs in to every application federated through AD FS and, without multifactor authentication, to mail and collaboration services, and it is a way into the network through remote access. Where extranet lockout is not configured, the guessing locks the accounts in the domain itself, which keeps users out of work.
Detection rules
AD FS Received the Correct Password for a Locked Out Account
Detects event 515 of AD FS Auditing in the Security log of an AD FS server. Its text says that the user account was in a locked out state and the correct password was provided, and that the account might be compromised. An account reaches the extranet lockout state because bad passwords were submitted for it from unknown locations. A correct password that arrives while it is in that state means that someone who is being counted as an attacker knows the password. It can be the owner, signing in from a new location during the attack, or the attacker who guessed it. The event text carries the activity ID, the user and the client IP address. The log source maps the event ID and the provider only, so these values are read in triage. The event is written while extranet lockout is enabled and AD FS security auditing is on.
title: AD FS Received the Correct Password for a Locked Out Account
id: 11bdc183-2481-460b-99dc-d36758f43355
status: experimental
description: >-
Detects event 515 of AD FS Auditing in the Security log of an AD FS
server. Its text says that the user account was in a locked out state and
the correct password was provided, and that the account might be
compromised. An account reaches the extranet lockout state because bad
passwords were submitted for it from unknown locations. A correct
password that arrives while it is in that state means that someone who
is being counted as an attacker knows the password. It can be the owner,
signing in from a new location during the attack, or the attacker who
guessed it. The event text carries the activity ID, the user and the
client IP address. The log source maps the event ID and the provider
only, so these values are read in triage. The event is written while
extranet lockout is enabled and AD FS security auditing is on.
references:
- https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/configure-ad-fs-extranet-smart-lockout-protection
- https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/troubleshooting/ad-fs-tshoot-logging
- https://attack.mitre.org/techniques/T1110/003/
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1110.003
- attack.t1110.001
logsource:
product: windows
service: adfs
detection:
selection:
Provider_Name|contains: 'AD FS Auditing'
EventID: 515
condition: selection
falsepositives:
- The owner of an account that is under attack, who signs in with the right password from a location AD FS does not know yet. The password is still worth changing, because the account is being targeted.
level: high
False positives
- The owner of an account that is under attack, who signs in with the right password from a location AD FS does not know yet. The password is still worth changing, because the account is being targeted.
AD FS Extranet Lockout of a User
Detects the AD FS audit events that report an extranet lockout, in the Security log of an AD FS server. Event 1210 is written each time a user is locked out. Event 516 says that the user account has been locked out due to too many bad password attempts, and event 512 that the account is locked out and a sign-in attempt is being allowed due to the system configuration, which is what lockout in log-only mode produces. A lockout means that the bad password count of one user passed the extranet threshold, the result of password guessing against that user or of a spray that came back often enough. Events 512 and 516 name the user, the client IP, the bad password count and the time of the last bad attempt. Event 1210 carries its data as one XML document. The log source maps the event ID and the provider only, so the user and the address are read in triage and a count per address has to be built in the SIEM. The events are written while extranet lockout is enabled and AD FS security auditing is on.
title: AD FS Extranet Lockout of a User
id: 9b18f7b9-6d19-48a9-afcb-5d91d7505a5d
status: experimental
description: >-
Detects the AD FS audit events that report an extranet lockout, in the
Security log of an AD FS server. Event 1210 is written each time a user
is locked out. Event 516 says that the user account has been locked out
due to too many bad password attempts, and event 512 that the account is
locked out and a sign-in attempt is being allowed due to the system
configuration, which is what lockout in log-only mode produces. A lockout
means that the bad password count of one user passed the extranet
threshold, the result of password guessing against that user or of a
spray that came back often enough. Events 512 and 516 name the user, the
client IP, the bad password count and the time of the last bad attempt.
Event 1210 carries its data as one XML document. The log source maps the
event ID and the provider only, so the user and the address are read in
triage and a count per address has to be built in the SIEM. The events
are written while extranet lockout is enabled and AD FS security
auditing is on.
references:
- https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/configure-ad-fs-extranet-smart-lockout-protection
- https://learn.microsoft.com/en-us/security/zero-trust/security-operations-playbook-password-spray
- https://attack.mitre.org/techniques/T1110/001/
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1110.001
- attack.t1110.003
logsource:
product: windows
service: adfs
detection:
selection:
Provider_Name|contains: 'AD FS Auditing'
EventID:
- 1210
- 516
- 512
condition: selection
falsepositives:
- Users whose old password is saved in a mail client or on a phone, which keeps submitting it until the account is locked for extranet access. The client address then belongs to the user. Have the saved password updated.
level: medium
False positives
- Users whose old password is saved in a mail client or on a phone, which keeps submitting it until the account is locked for extranet access. The client address then belongs to the user. Have the saved password updated.
AD FS Failed to Validate a User's Credentials
Detects the AD FS audit events for a failed password sign-in, in the Security log of an AD FS server. Event 1203 is the fresh credential validation error, written for each bad password attempt on AD FS 2016 and later. Event 411 reports a failed token validation and is the event Microsoft tells administrators to search for on AD FS for Windows Server 2012 R2 and 2016. It contains the user principal name of the targeted user and the IP address of the submitter. One event is a mistyped password. The rule is the building block for counting, because a password spray shows as failures for many users from one client address and password guessing as many failures for one user. Event 1203 carries its data as one XML document and the log source maps the event ID and the provider only, so the count per address or per user has to be built in the SIEM, as described under Detection logic on the attack page. Requires AD FS security auditing with failure audits enabled.
title: AD FS Failed to Validate a User's Credentials
id: b6891257-524a-4939-8f99-b07937877464
status: experimental
description: >-
Detects the AD FS audit events for a failed password sign-in, in the
Security log of an AD FS server. Event 1203 is the fresh credential
validation error, written for each bad password attempt on AD FS 2016
and later. Event 411 reports a failed token validation and is the event
Microsoft tells administrators to search for on AD FS for Windows Server
2012 R2 and 2016. It contains the user principal name of the targeted
user and the IP address of the submitter. One event is a mistyped
password. The rule is the building block for counting, because a
password spray shows as failures for many users from one client address
and password guessing as many failures for one user. Event 1203 carries
its data as one XML document and the log source maps the event ID and
the provider only, so the count per address or per user has to be built
in the SIEM, as described under Detection logic on the attack page.
Requires AD FS security auditing with failure audits enabled.
references:
- https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/operations/configure-ad-fs-extranet-smart-lockout-protection
- https://learn.microsoft.com/en-us/windows-server/identity/ad-fs/troubleshooting/ad-fs-tshoot-logging
- https://learn.microsoft.com/en-us/troubleshoot/entra/entra-id/mfa/account-lockout-adfs-window-server
- https://attack.mitre.org/techniques/T1110/003/
author: Forestall
date: 2026-11-18
tags:
- attack.credential-access
- attack.t1110.003
- attack.t1110.001
logsource:
product: windows
service: adfs
detection:
selection:
Provider_Name|contains: 'AD FS Auditing'
EventID:
- 1203
- 411
condition: selection
falsepositives:
- Users who mistype their password and clients that keep submitting a saved, expired password. Every organization has a steady level of these. Use the rule for counting and for investigation, not as an alert on each event.
level: low
False positives
- Users who mistype their password and clients that keep submitting a saved, expired password. Every organization has a steady level of these. Use the rule for counting and for investigation, not as an alert on each event.
Detection logic
Patterns that need more than one event, a baseline or knowledge of your own environment. Each is a hypothesis to build and tune in your SIEM, not a ready rule.
Failed AD FS password validations for many users from one client address
A spray tries a few passwords against many accounts, so one client address collects failures for far more users than a single person or office produces. Counting distinct users per address finds it even when no account reaches the lockout threshold. The rule on this page reports each failure. The count has to be built where the event data can be parsed.
- Collect events 1203 and 411 from the Security log of every AD FS server (event source AD FS Auditing).
- Extract the user and the client address. In event 1203 they are in the XML document of the event, where the IpAddress element lists the forwarded client address first. In event 411 they are the user principal name and the IP address values.
- Count the distinct users per client address in windows of 30 minutes and report an address with failures for 10 or more users.
- For each reported address, list the lockouts (events 1210 and 516) and any successful validation (event 1202) in the same period.
Events120341112105161202
LimitsThe 10 users in 30 minutes are a starting point. Compare them with the failures a normal day produces. Offices and carriers that put many users behind one address, and Microsoft's Exchange Online addresses for legacy clients, reach the count without an attack and have to be listed. A spray spread over many addresses stays below it.
Successful sign-in from an address that just failed for many accounts
The moment that matters in a spray is the first password that works. A successful credential validation from an address that has just produced failures for many other users is that moment, and it names the account to reset.
- Take the client addresses that produced failed validations (events 1203 and 411) for several users in the last 24 hours.
- Find event 1202, a successful fresh credential validation, with one of those addresses as client.
- Read the user of that event. If the same address failed for other users and succeeded for this one, treat the password of this user as known to the attacker.
- Add event 515 for the same period, which reports a correct password for an account in the locked out state.
Events12034111202515
LimitsUsers behind a shared address sign in successfully while colleagues mistype their passwords, so the result needs the count of failed users to be high. Event 1202 is written only when success audits are enabled. The 24 hours are a starting point.
Triage
- Read the user and the client addresses in the event. In events 1203 and 1210 the data is one XML document whose IpAddress element lists the forwarded client address first. In events 411, 512, 515 and 516 the user and the client IP are separate values.
- Count the events per client address and per user over the last hours. One address with failures for many users is a spray. Many failures for one user from many addresses is guessing or a distributed spray.
- Check whether the address is one of Microsoft's. Legacy authentication through Exchange Online shows a Microsoft address as client and the real submitter in the forwarded address.
- Look for a successful validation (event 1202) for one of the targeted users from the same address after the failures, and for event 515.
- Compare with the normal level. Expired passwords saved in mail clients and phones produce a steady stream of failures per user from that user's own addresses.
Response
Once the attack is confirmed:
- Reset the password of every account for which a correct password was supplied during the attack (event 515, or a success after the failures) and end its sessions in the federated applications.
- Block the source addresses at the proxy or the firewall, and expect the attacker to change them.
- Switch extranet smart lockout to enforce mode if it runs in log-only mode, and lower the threshold if it was not reached.
- Review what the affected accounts did after the first successful sign-in, in the cloud sign-in logs and in the domain.
- Require multifactor authentication for the accounts that did not have it.
Mitigation
- Enable extranet smart lockout in enforce mode, with a threshold below the lockout threshold of the domain, so that guessing from the internet cannot lock accounts in the domain or continue without limit.
- Require multifactor authentication for extranet requests, so that a guessed password is not enough to sign in.
- Move clients to modern authentication and disable the legacy user name and password endpoints that are not needed.
- Keep guessable passwords out of the domain with a banned password list.
- Enable AD FS auditing (success and failure audits, and the audit subcategory Application Generated) on every AD FS server and collect its Security log.
Frequently asked questions
Which AD FS events show a wrong password?
Event 1203, which Microsoft describes as written for each bad password attempt, and on AD FS for Windows Server 2012 R2 and 2016 also event 411, a failed token validation that contains the user principal name and the address of the submitter. Both are in the Security log of the AD FS servers under the event source AD FS Auditing.
Why is there no threshold rule on this page?
A spray shows as many failures from one address for many users, and counting that needs the client address and the user as fields. Events 1203 and 1210 carry their data as one XML document, and the log source maps only the event ID and the provider. The counting is therefore described under Detection logic as a query to build in your SIEM, where the XML can be parsed.
What does event 515 mean?
Its text says that the user account was in a locked out state and the correct password was provided, and that the account might be compromised. Someone knew the password of an account that was being guessed at. It can be the owner, who signs in while the attack runs, or the attacker, who found the password. Either way the password should be changed.
Do the Web Application Proxy servers have to be audited as well?
No. Microsoft states that auditing is configured on the AD FS servers and does not have to be configured on the Web Application Proxy servers. In a farm behind a load balancer every AD FS server has to be audited and collected, because each one logs only the requests it handled.
References
- MITRE ATT&CK T1110.003: Brute Force: Password Spraying
- MITRE ATT&CK T1110.001: Brute Force: Password Guessing
- AD FS Extranet Lockout and Extranet Smart Lockout (events 1203, 1210, 512, 515, 516)
- Troubleshoot account lockout in AD FS on Windows Server (event 411)
- Troubleshoot AD FS with events and logging (audit event types 1200 to 1207, enabling auditing)
- Microsoft incident response playbook: Password spray investigation