A password spray is a campaign against the whole directory, not an attack on one account, so the response has to answer a question per-account playbooks never ask: of the thousands of accounts that were tried, which ones did the attacker actually get into? This playbook template gives [Organisation] the run sheet for that answer, from the first alert through the sweep for successful sign-ins, containment of the accounts that fell, handling of lockout storms, communications and the hardening that closes the gap. It is written for SOC analysts, identity engineers and incident managers, with Microsoft Entra ID and AD FS as the worked examples because Microsoft publishes a detailed spray investigation playbook; the same steps apply to other identity providers and to VPN and SSH login points. The attack patterns, detection signals and preventive controls are explained in the Password Spraying and Credential Stuffing Defence Guide; this page is what the team does when a spray is under way. Replace every [placeholder] before use.
How to use this template
- Adopt it as a sub-playbook of [Organisation]'s incident response plan. See the Incident Response Plan Template.
- Hand off single accounts. Once the sweep in section 4 identifies a compromised account, run the Account Takeover Response Playbook for it. This playbook manages the campaign; that one cleans each account.
- Fill in platform specifics: where successful and failed sign-ins are logged for each login point, who can block an IP range at each layer, and who can approve a forced password reset for a population.
- Keep the decision lines. Each "Decision" names who decides and on what evidence. Record the decision and the time in the incident ticket.
- Defensive use only. Do not run spray tests against production to "reproduce" an incident without written authorisation; use the evidence already in the logs.
1. Scope and triggers
This playbook applies when one account or a few accounts are tried with many passwords (handled as brute force under the same steps) or, more typically, when many accounts are tried with a few common passwords (ATT&CK T1110.003 Password Spraying). It covers workforce identity providers, federation services, VPN and remote access gateways, and internet-facing SSH. Customer login stuffing is handled by [Fraud team] under its own runbook. See Credential Stuffing vs Password Spraying for the distinction.
| Trigger | Source | Initial severity |
|---|---|---|
| Identity provider spray detection (for example Entra ID Protection Password spray) or risky IP alert | Identity protection | High: this detection fires on a validated password |
| Many accounts failing from a related set of sources (shared ASN, user agent or target application) | SIEM | Medium |
| Spike in AD FS event 411 or extranet lockouts (event 516) | AD FS, Connect Health | Medium |
| Correct password followed by a failed or denied MFA challenge from an unfamiliar source | Sign-in logs | High: the password is known to the attacker |
| Help desk surge in lockout calls | Service desk | Medium, raise if combined with any other trigger |
| Users reporting unexpected MFA prompts | Users, service desk | High |
Use [Organisation]'s severity matrix to set the final level; see the Incident Severity Classification Matrix Template. Any confirmed successful sign-in from an attacker source raises the incident to [High] at minimum.
2. Roles and contacts
| Role | Responsibility | Name and out-of-hours contact |
|---|---|---|
| Incident manager | Owns timeline, decisions and communications | [Name, phone] |
| SOC lead | Scoping queries, sweep, attacker indicator list | [Name, phone] |
| Identity engineer | Resets, session revocation, Conditional Access and lockout changes | [Name, phone] |
| Network or edge owner | IP and ASN blocks at firewall, VPN, WAF and AD FS | [Name, phone] |
| Service desk lead | Lockout call handling, verified resets, user messaging | [Name, phone] |
| Service account owners | Rotation and validation for any non-human account in scope | [Distribution list] |
| Data protection officer and legal | Notification decisions | [Name, phone] |
3. Detection and triage (first hour)
- Confirm it is a spray. Look for the low and slow signs Microsoft lists in its password spray investigation playbook: failures in address book order, a repeated user agent, target application or IP block, and regular timing between attempts. A single user mistyping does not look like this.
- Find out where sign-ins are logged. For each targeted domain, record whether authentication is managed (cloud, password hash sync or pass-through) or federated. Microsoft's playbook notes that for federated domains successful sign-ins appear in Entra ID while failures stay with the identity provider (AD FS), so a sweep of one log alone misses half the picture.
- Build the indicator list. Start time, source IPs and ranges, ASNs, user agents, target applications and client apps (legacy protocols in particular). Mark it version 1 and update it as the sweep finds more.
- Preserve evidence now (see section 9). Sign-in log retention may be short on lower licence tiers, and AD FS logs roll over.
- Check whether lockouts are hurting users. If the help desk is seeing a lockout surge, open section 5.3 in parallel: the spray may be causing a denial of service even if no account has fallen.
Decision (SOC lead, within [60] minutes): spray confirmed or not; incident severity; whether to start temporary source blocks (section 5.1) before the sweep completes.
4. Sweep for successful sign-ins
This is the step that decides the size of the incident. Query every login point for the indicator list over the window from [first attempt minus 7 days] to now, then sort accounts into the priority order Microsoft's playbook uses.
| Priority | Finding | What it means | Action |
|---|---|---|---|
| 1 | Successful sign-in from an attacker source | Account compromise | Contain immediately (section 5.2), hand to the Account Takeover Response Playbook |
| 2 | Interrupted sign-in from an attacker source (correct password, MFA required or prompted, for example Entra codes 50074 or 50072) | Password compromise, access stopped by MFA | Reset password and revoke sessions; check for MFA fatigue approvals |
| 3 | Failed sign-ins only from an attacker source | Targeted, password not confirmed | Record; include in user messaging; check the password against the banned list |
| 4 | Successful sign-in from another unfamiliar source in the window | Possible compromise via a source not yet on the indicator list | Investigate; if confirmed, add the source to the indicator list and repeat the sweep |
Run these sweep checks for every priority 1 and 2 account:
- Legacy protocols: filter sign-ins on client app. Successful IMAP, POP or SMTP AUTH sign-ins bypass MFA and are a direct compromise even if the account is MFA registered. See the Legacy Authentication and ROPC Retirement Guide.
- Short sessions: Microsoft notes that a sign-in and sign-out within the same second can indicate an attacker testing a guessed password.
- MFA events: look for unexpected MFA prompts, approvals at odd hours and new authentication methods registered after the first attempt.
- Non-human accounts: service accounts, shared mailboxes and other accounts excluded from MFA are the most likely to fall to a spray. Treat any success on them as priority 1. See How to find shared mailboxes and service mailboxes with sign in enabled.
- Persistence and impact: mailbox forwarding and inbox rules, added mailbox delegates, OAuth consents, file access and any admin role use since the first success. See How to Investigate a Compromised Entra ID Account.
Decision (incident manager): number of compromised accounts; whether any privileged or non-human account is among them, which raises severity and pulls in [Tenant compromise] procedures.
5. Containment
5.1 Reduce the attack in progress
- Block sources at the right layer. For cloud authentication, a named location with a Conditional Access block policy; for federated authentication, AD FS banned IPs (
Set-AdfsProperties -AddBannedIps) or the firewall in front of AD FS; for VPN and SSH, the edge device. Microsoft cautions that attackers change IPs, so blocks buy time but are not containment on their own. - Block legacy authentication through Conditional Access if it is not already blocked. Run the policy in Report-only for the shortest time the business can accept, then switch On; record the exceptions that remain. See the Conditional Access Guide.
- Require MFA for any targeted population that does not have it, starting with administrators.
5.2 Contain compromised accounts
- Reset the password and, where the user cannot be reached safely, block sign-in until a verified reset can be done.
- Revoke sessions. In Entra ID,
revokeSignInSessionsinvalidates refresh tokens and browser session cookies. Microsoft notes there may be a delay of a few minutes, so record the time and verify. See How to Revoke All Sessions for a Compromised User. - Mark the user compromised in the identity protection tool so risk policies apply. See Microsoft Entra ID Protection.
- Remove MFA methods registered after the first attacker sign-in, after confirming with the user.
- Service accounts: rotate the credential, update every consumer in the same change, and confirm the old secret is rejected. Where the account has no business need to sign in interactively, block that path. See the Service Account Security Guide.
5.3 Lockout storms
A spray against an on-premises directory can lock out large numbers of real users, which is a denial of service in its own right. Do not respond by setting the lockout threshold to zero during an attack.
- Find the path. Lockouts through AD FS or a VPN mean the spray is reaching Active Directory; extranet lockout settings at the federation layer should trip before the domain threshold does.
- Unlock in bulk only after the source is blocked, otherwise accounts lock again within minutes.
- Protect break-glass and service accounts by confirming they are not reachable from the sprayed login point.
Threshold ordering between cloud smart lockout, AD FS extranet lockout and the domain policy is set out in the Account Lockout and Brute-Force Protection Guide.
Decision (identity engineer with incident manager): whether to force a password reset for the whole targeted population. Choose a population reset when the sprayed password is known and widely used, when priority 2 counts are high, or when the logs do not cover the full window. Otherwise reset priority 1 and 2 accounts and add the sprayed passwords to the banned list.
6. Eradication
- Remove persistence found in the sweep: inbox rules, forwarding, delegates, OAuth grants, new devices and app passwords.
- Ban the sprayed passwords in the custom banned password list for the cloud directory and on-premises AD, and confirm that the policy applies to both.
- Close the entry point: the legacy protocol, MFA exclusion or exposed login page the attacker relied on.
- Re-run the sweep with the final indicator list over the full window, because sources found late often reveal earlier successes.
7. Recovery and hardening
| Gap found | Hardening action | Test before full rollout | Rollback |
|---|---|---|---|
| Legacy authentication used | Block legacy authentication for all users | Report-only, review client app sign-ins | Return policy to Report-only |
| MFA gaps or exclusions | MFA for all users; phishing-resistant MFA for administrators | Pilot group, then rings | Exclude a named pilot group temporarily |
| Common passwords accepted | Custom banned password list, cloud and on-premises | Audit mode on domain controllers | Return to audit mode |
| No risk-based response | Sign-in risk and user risk policies | Report-only | Report-only |
| Federation layer exposed | Extranet lockout, MFA as primary authentication, or migration of the domain to cloud authentication | Single relying party first | Per relying party |
| Detection was late | Cross-account failure rules over 24 hours and 7 days; alert on success after failures | Replay this incident's logs | Tune thresholds |
Keep the attacker indicators tagged in the SIEM and identity protection tools with an alert on any future activity. For federated estates, see the AD FS Security Guide.
8. Communication and notification
- Targeted users (priority 3): short message that their account was tried, no action needed beyond reporting unexpected MFA prompts. Never include links to reset pages in the message.
- Compromised users (priority 1 and 2): contacted by a known channel, reset verified by the service desk, told what was accessed if known.
- All staff, if a population reset is forced: what happens, when, how to get help, and a reminder that IT will not ask for passwords.
- Regulators: if a compromised account gave access to personal data, the DPO decides on notification. Under UK GDPR the ICO states that a notifiable breach must be reported without undue delay and not later than 72 hours after becoming aware of it, that individuals must be told directly where the risk to them is high, and that all breaches must be recorded whether reported or not. Other jurisdictions differ; see the Breach Notification Laws by Country Guide.
- Third parties: customers, partners and law enforcement as required by contract or as decided by legal.
9. Evidence to preserve
| Evidence | Where | Notes |
|---|---|---|
| Cloud sign-in logs, interactive and non-interactive | Identity provider, exported to SIEM or storage | Include status (success, failure, interrupt), client app, user agent, IP, Conditional Access result |
| AD FS events 411, 342, 516, 412, 403 and 1203 | AD FS servers | Microsoft's playbook recommends Verbose auditing; Basic records at most five events per request |
| Domain controller events 4771, 4776, 4625, 4740 | Domain controllers | Kerberos and NTLM sprays from inside the network |
| MFA logs and authentication method changes | Identity provider audit log | Prompts, approvals, new registrations |
| VPN, firewall and WAF logs | Edge devices | Source addresses and timing |
| Containment record | Incident ticket | Time of each reset, revocation and block, with operator |
Hash exported files and record who exported them. Event ID detail is in the Windows Event Log Guide.
10. Post-incident review
- Timeline: first attempt, first detection, first success, containment complete. The gap between first attempt and first detection is the headline lesson.
- Metrics to report: accounts targeted, priority 1 and 2 counts, time from detection to last compromised account contained, number of successes through legacy protocols or MFA-excluded accounts, and lockout tickets raised.
- Control review: which hardening item in section 7 would have stopped the attack, with an owner and date for each.
- Framework references: ATT&CK T1110.003 and T1078.004; NIST SP 800-53 AC-7 and IA-5; NIST CSF 2.0 DE.AE-02 and RS.MI-01.
- Case study: the Microsoft Midnight Blizzard breach began with a spray against a legacy test tenant account that had no MFA, which is why non-production and excluded accounts belong in the sweep.
Implementation guidance
- Prepare the queries before the incident. Save the sweep searches for each login point with the indicator list as a parameter, so section 4 runs in minutes.
- Raise logging now. Verbose AD FS auditing, sign-in log export with retention beyond [90] days, and domain controller Kerberos and credential validation auditing.
- Agree pre-approved changes: Conditional Access source blocks, legacy authentication block and bulk session revocation, so the identity engineer does not wait for a change board during an attack.
- Exercise it. Run a tabletop twice a year using a past incident's logs; time the sweep and the population reset decision.
- Review the template after each use and record the version in the incident ticket.
Standards and references
- Microsoft Learn: Password spray investigation
- Microsoft Learn: user revokeSignInSessions
- MITRE ATT&CK: T1110.003 Password Spraying
- ICO: Personal data breaches, a guide
Related NHI Mgmt Group resources: Password Spraying and Credential Stuffing Defence Guide · Account Takeover Response Playbook · Account Lockout and Brute-Force Protection Guide · Storm-0940 Password Spray Botnet Profile Guide