Password spraying

On this page 6

Password spraying is an authentication attack in which an adversary tries a small number of common passwords against a large number of accounts, rather than many passwords against one account. In cybersecurity, it belongs to the family of credential attacks within malware & attacks, and it succeeds because every large organization has some users with weak passwords.

The technique is designed to evade account lockout policies. By spacing attempts so that each account sees only one or two failures per lockout window, the attacker stays below the threshold while still testing thousands of accounts. Password spraying is cataloged in MITRE ATT&CK as sub-technique T1110.003 under brute force.

How a password spraying attack works

A password spraying attack follows a predictable sequence: collect usernames, choose likely passwords, and test them slowly across every account. The attacker gains access as soon as one combination works, and a single valid account is often enough for initial access.

  1. Username harvesting. Attackers build lists from public staff directories, social networks, email format guessing and earlier breaches.
  2. Password selection. They pick passwords that satisfy common complexity rules yet remain predictable, such as a season plus a year or the company name plus a digit.
  3. Throttled attempts. Each password is tried once against every account, followed by a pause longer than the lockout observation window.
  4. Distribution. Requests are spread across many IP addresses, residential proxies or cloud hosts to avoid rate limits and reputation blocks.
  5. Exploitation. Valid credentials are used for email access, VPN logins or further reconnaissance.

Targets are usually internet-facing authentication endpoints that accept a username and password directly. Legacy protocols are especially attractive because they often bypass modern controls.

Target endpointWhy attackers choose itTypical weakness
Cloud identity portalsOne login opens email and filesMFA gaps for some users
Legacy mail protocolsIMAP, POP3 and SMTP AUTH skip MFABasic authentication still enabled
VPN gatewaysDirect network accessPassword-only logins
Remote desktop servicesInteractive control of hostsExposed to the internet
Web applicationsCustom logins with weak limitsNo lockout or rate limiting
Common password spraying targets

Password spraying compared with other credential attacks

Password spraying differs from related attacks mainly in the ratio of passwords to accounts and in the source of the guesses. These differences determine which defenses work and which detection signals appear.

AttackPatternMain defense
Password sprayingFew passwords, many accountsBanned password lists and MFA
Brute-force attackMany passwords, one accountAccount lockout and rate limiting
Credential stuffingLeaked pairs replayed on other sitesBreached password detection and MFA
Dictionary attackWordlist against one account or hashLong, unique passwords
Offline hash crackingGuessing against stolen hashesStrong hashing such as Argon2
Credential attacks compared

The key distinction is that account lockout defeats brute force but not spraying. A lockout threshold of five failures in 30 minutes stops an attacker hammering one account, yet it never triggers when each account sees one attempt per hour.

Detecting password spraying

Detection depends on looking across accounts rather than within one. Per-account monitoring sees only isolated failures, so defenders correlate authentication logs by source, time window and password outcome.

SignalWhat it revealsLimitation
Many accounts, one sourceOne IP failing against hundreds of usersDefeated by distributed proxies
Failure spike across tenantSudden rise in bad-password eventsNoisy in large organizations
Logins to nonexistent usersGuessed or outdated usernamesRequires user-not-found logging
Legacy protocol attemptsUse of basic authenticationOnly useful if legacy is rare
Success after many failuresA sprayed password workedDetected only after compromise
Detection signals and their limits

Identity providers increasingly offer built-in spray detection that uses machine learning across many customers. Even so, on-premises Active Directory environments require event correlation in a SIEM, typically using Windows events 4625 and 4771 for failed logons and Kerberos pre-authentication failures.

Defending against password spraying

The most effective defense is phishing-resistant multifactor authentication, because a correct password alone no longer grants access. Since MFA coverage is rarely complete, layered controls remain necessary.

  • Ban predictable passwords with a custom list containing the company name, local sports teams, seasons and years, as NIST SP 800-63B recommends.
  • Disable legacy authentication so that every login passes through conditional access and MFA.
  • Use smart lockout that tracks failures by source and familiar locations instead of locking legitimate users out.
  • Remove forced periodic password changes, which push users toward patterns such as Spring2026 followed by Summer2026.
  • Move toward passwordless sign-in with FIDO2 security keys or passkeys, which removes the guessable secret entirely.

A common mistake is lowering lockout thresholds in response to an attack. Aggressive lockout turns spraying into a denial-of-service tool against the organization’s own users, while doing little to stop an attacker who already throttles requests.

Response planning matters as much as prevention. When spraying succeeds, defenders should reset affected passwords, revoke refresh tokens and active sessions, review mailbox forwarding rules and newly registered MFA methods, and check whether the attacker accessed other services with the same identity. Attackers who obtain one mailbox often launch internal phishing from it within hours, so containment speed directly limits the damage. Regular simulated spraying exercises against the organization’s own directory, run with approval, also reveal weak passwords before an adversary finds them.

In plain words

Password spraying is guessing a few popular passwords on many accounts. Imagine a thief with a ring of ten common keys. Instead of trying every key on one door, the thief tries one key on every door in a large building.

Each door is tried only once, so no alarm goes off. In a big organization, a few doors will open. The key takeaway: avoid predictable passwords and use a second sign-in step, so a guessed password is not enough.

A real-world example

A university with about 18,000 staff and student accounts notices a rise in failed sign-ins to its cloud email portal over a weekend. Its security analyst groups the failures by password hash outcome and time and sees a clear pattern: one attempt per account every 45 minutes, coming from more than 600 residential IP addresses. The lockout policy, set to ten failures, never triggered.

The analyst finds that nine accounts signed in successfully through a legacy IMAP endpoint that did not enforce MFA. All nine used variations of the university name followed by the current year. The team resets those passwords, revokes active sessions, disables legacy authentication for the whole tenant and adds the university name to its banned password list. Follow-up monitoring over the next month shows similar spray waves with zero successful logins.