Skip to content
Category: Red Team8 min read

Password Spraying: Detection and Defensive Countermeasures

Por Lucas Andrade ·

A blue-team guide to password spraying: how the threat behaves, the telemetry that reveals it, and the identity hardening that stops it before an account is taken.

In this article

Password spraying remains one of the most reliable ways that intruders convert a list of usernames into a foothold, precisely because it is quiet. Instead of hammering a single account, an adversary tries one or two common passwords against many accounts and moves on before lockout thresholds trip. For defenders this article takes an understand-to-defend posture: we explain the concept and how the technique behaves at a high level, then spend most of our time on the signals that expose it in your logs and the identity controls that make it fail. Nothing here is an operational recipe for attacking systems you do not own; everything here is meant to help a blue team see the attack earlier and shut it down.

What Password Spraying Is

Password spraying is a form of credential attack that inverts the usual brute-force pattern. Classic brute force targets one account and cycles through many passwords, which trips account lockout policies quickly. Spraying flips the ratio: it takes a small set of high-probability passwords, seasonal or predictable choices that humans reuse, and tries each one across a broad population of accounts. Because any single account sees only a handful of attempts, per-account lockout counters rarely fire and the noise blends into normal failed-login traffic. The technique is attractive to adversaries because directories are large, password reuse is common, and a single valid credential is often enough to begin lateral movement. Understanding this ratio, few passwords against many accounts, is the key to detecting it, because it produces a distinctive fingerprint that per-account monitoring will miss.

How the Threat Works at a High Level

At a conceptual level the attacker first assembles a roster of valid usernames, often inferred from a naming convention such as first.last, and then selects candidate passwords drawn from breach corpora, company-name variants, and calendar patterns. The attempts are deliberately paced and distributed so that no single account crosses a lockout threshold within the observation window, and they may rotate across many source addresses to avoid volume-based blocks. The goal is not to guess a specific person's password but to find any account where a weak or reused password happens to match. Once one credential validates, the adversary pivots to whatever that identity can reach: mail, VPN, single sign-on, or cloud consoles. We describe the shape of this behavior only so defenders can recognize it; the practical value for a blue team lies entirely in the pacing, distribution, and low-and-slow rhythm, because those properties are exactly what your detections should key on.

Attack Surface and Exposure

Every authentication endpoint that faces the internet is potential spraying surface, and modern estates have more of them than teams remember. Legacy protocols are the most dangerous because many predate modern controls: in Microsoft 365, basic authentication paths and older endpoints have historically bypassed multi-factor prompts, and on-premises Active Directory exposes authentication through several services at once. VPN portals, webmail, remote desktop gateways, and any SSO login page are all in scope. So are API and token endpoints that accept passwords directly. A crucial hardening insight is that your effective attack surface is the union of every place a password is accepted, not just the pretty login screen your users see. Inventory these endpoints deliberately, retire the legacy ones, and put every survivor behind the same monitored, MFA-protected path.

Detection Signals in Your Telemetry

The defining fingerprint of spraying is a horizontal pattern: many distinct usernames experiencing a small number of failures in a short window, frequently from a narrow set of source addresses or a single user agent. In on-premises Active Directory the primary signal is Event ID 4625 (an account failed to log on); correlate these across accounts rather than per account, and pay attention to the failure sub-status codes that distinguish a wrong password (0xC000006A) from a disabled or nonexistent account (0xC0000064, 0xC0000072, 0xC0000234). A spray often reveals itself as a burst of 0xC000006A across dozens of users near the top of the hour. In Microsoft Entra ID, review the sign-in logs for error code 50126 (invalid credentials) spread across many principals, and treat sign-ins from legacy authentication clients as high-risk by default.

Beyond raw events, build detections on aggregate ratios. Alert when the count of distinct usernames with failures from a single source exceeds a threshold within a rolling window, and when failures cluster at round-number timestamps that suggest automation. Watch for a single account that fails on many hosts, and for the tell-tale sequence of many failures followed by one success, which may indicate a spray that landed. EDR and identity-protection tooling can raise risk on impossible-travel and unfamiliar-sign-in-properties signals; feed those into the same case. The mindset that matters is aggregate over horizon, not depth per account, because the per-account view is exactly the blind spot the technique is designed to exploit.

Mitigation and Hardening

The single most effective countermeasure is phishing-resistant multi-factor authentication on every authentication path, because a valid password alone stops being sufficient. Prefer FIDO2 security keys or platform passkeys over one-time codes, and ensure there is no legacy protocol that silently bypasses the second factor. Pair MFA with modern password policy: adopt the NIST guidance of longer passphrases, screening candidate passwords against known-breached lists, and abandoning forced periodic rotation that pushes users toward predictable seasonal patterns. Disable legacy and basic authentication entirely, enforce conditional-access rules that block or challenge unfamiliar locations and clients, and consider smart, observation-window-aware lockout that responds to distributed failure patterns rather than only per-account counts.

Identity and Access Controls That Reduce Blast Radius

Assume that one credential will eventually be guessed and design so that a single win yields little. Enforce least privilege so that a compromised standard account cannot reach sensitive systems, and separate administrative identities from daily-use accounts with their own strong authentication. Rate-limit and add proof-of-work or CAPTCHA-style friction at authentication gateways so automated attempts are expensive. Deploy risk-based conditional access that steps up authentication when a sign-in looks anomalous. Finally, monitor for the post-spray behaviors that indicate a landed credential: a first-ever sign-in from a new country, mailbox rule creation, mass file access, or enrollment of a new MFA method by an account that just authenticated from an unusual location. Defense in depth means the spray can succeed at the password layer and still fail at the access layer.

Common Pitfalls

Teams frequently monitor only per-account lockouts, which is precisely the metric spraying is tuned to stay under, so they see nothing while the horizontal pattern plays out. A second pitfall is protecting the primary login while leaving a legacy endpoint that bypasses MFA; the attacker simply walks through the unlocked side door. A third is treating MFA as complete without measuring adoption, so that a long tail of exempted service accounts and executives remains password-only. Weak or missing logging on VPN and webmail creates blind spots, and overly aggressive lockout can itself become a denial-of-service that an adversary triggers deliberately. The remedy for each is the same: measure coverage, correlate across accounts, and validate that every authentication path is both logged and protected.

Defensive Checklist

Use this as a working checklist. One, enforce phishing-resistant MFA on every authentication endpoint and confirm no legacy path bypasses it. Two, disable basic and legacy authentication in your identity platform. Three, screen passwords against breached-credential lists and adopt passphrase-length policy without forced periodic rotation. Four, build horizontal detections that alert on many distinct accounts failing from one source in a short window, using Event ID 4625 sub-status codes on-premises and sign-in error 50126 in the cloud. Five, alert on the failures-then-success sequence and on first-time sign-ins from new locations. Six, enforce least privilege and separate admin identities. Seven, centralize authentication logs from VPN, webmail, and SSO so no endpoint is dark. Eight, rehearse the response so an analyst can disable an account and revoke sessions in minutes.

Frequently Asked Questions

How is password spraying different from brute force? Brute force concentrates many password guesses on one account and trips lockout quickly; spraying spreads a few common passwords across many accounts to stay under per-account thresholds. The defensive consequence is that you must detect horizontally, correlating failures across your whole user population rather than watching individual counters.

Does multi-factor authentication fully stop it? Strong, phishing-resistant MFA on every path is the closest thing to a complete control because a guessed password no longer grants access. The caveat is coverage: a single legacy endpoint or exempted account can undo it, so MFA must be paired with disabling legacy authentication, screening weak passwords, and monitoring for the post-compromise behaviors that reveal a credential that already landed.

Conclusion

Password spraying succeeds by being unremarkable, hiding a handful of guesses per account inside ordinary login noise, so the defensive answer is to change the vantage point rather than to look harder at any one account. Watch horizontally across your identity estate, key your detections on the low-and-slow, many-accounts fingerprint, and above all remove the payoff by making a single valid password insufficient. With phishing-resistant MFA everywhere, legacy authentication disabled, breached-password screening in place, and least privilege limiting blast radius, a spray that lands one credential still runs into a wall. Treat authentication logging as a first-class data source, rehearse the containment steps, and the technique moves from a quiet risk to a detected and survivable event.

Related posts

No comments yet

Be the first to comment.

Leave a comment

Sign in with your Canverly account to comment. You can use the same account on any site in the network.

Sign in with Canverly