Brute Force vs Password Spraying, Explained
If you are reading this, you have probably seen "brute force" and "password spraying" described as different attacks and want to know exactly how they differ and how to defend against them.
By the end you will be able to define brute force, password spraying and credential stuffing, explain how each works and what it looks like in logs, understand why account lockout alone is not enough, and apply the defences.
1. The family of password attacks
MITRE ATT&CK groups them under Brute Force (T1110): "Adversaries may use brute force techniques to gain access to accounts when passwords are unknown or when password hashes are obtained." It has four sub-techniques (T1110):
| ID | Name | Short description |
|---|---|---|
| T1110.001 | Password guessing | Many guesses against one account |
| T1110.002 | Password cracking | Recovering passwords from stolen hashes, offline |
| T1110.003 | Password spraying | A few common passwords against many accounts |
| T1110.004 | Credential stuffing | Leaked username/password pairs tried on other services |
The first, third and fourth are online attacks (against a live login). Cracking is offline (against stolen data), so lockout and rate limits do not apply.
2. Brute force (password guessing)
A brute force attack tries many passwords against one account (or one at a time) until one works. MITRE's description of password guessing: adversaries test "a list of common passwords" using "a repetitive or iterative mechanism" without prior knowledge of the credentials. Targets include remote management services on standard ports such as SSH, FTP, RDP, LDAP, Kerberos and databases.
In its pure form, brute force tries every possible combination up to a certain length. According to NIST's testing guide, theoretically, any password can be cracked this way given enough time and processing power, but it can take many years. The guide adds that brute force usually takes far less time than most password policies allow before a required change, so passwords found this way are "still too weak" (NIST SP 800-115, section 5.1). In practice most attackers use lists of likely passwords (a dictionary attack) and variations of them (a "hybrid" attack), not every combination.
Weakness for the attacker: many failed attempts on one account is noisy. MITRE notes guessing "could cause numerous authentication failures and account lockouts, depending on the organization's login failure policies."
3. Password spraying
Password spraying turns the idea around. MITRE: adversaries use "a single or small list of commonly used passwords" against many accounts. This avoids the lockouts that traditional brute force would trigger, because each account receives only one or two failed attempts.
| Brute force | Password spraying | |
|---|---|---|
| Accounts targeted | One (or a few) | Many |
| Passwords tried | Many | One or a few common ones |
| Failed attempts per account | Many | Very few |
| Triggers account lockout? | Likely | Designed to avoid it |
| Strength | Works on a known account with a weak password | Works wherever someone uses an easy password |
| How it looks in logs | Repeated failures on one account | One failure each across many accounts, often from the same source |
An example of the reasoning: with 1,000 accounts and the password "Winter2026!", if even a small number of users picked something similar, the attacker succeeds on those, and no single account looks attacked.
MITRE lists typical targets: SSH, RDP, SMB, LDAP and "externally facing email applications, such as Office 365," plus cloud applications with federated authentication (T1110.003).
4. Credential stuffing
Credential stuffing uses real credentials stolen elsewhere. MITRE: "Adversaries may use credentials obtained from breach dumps of unrelated accounts to gain access to target accounts through credential overlap," exploiting "the tendency for users to use the same passwords across personal and business accounts" (T1110.004).
| Spraying | Stuffing | |
|---|---|---|
| What is tried | Common passwords | Known username and password pairs from breaches |
| Why it works | Many people choose weak passwords | Many people reuse passwords |
| Defence that targets it | Blocklists of common passwords | Checking against breached passwords, unique passwords per site |
The OWASP Top 10:2025 describes both in the Authentication Failures category (A07): attackers use "known username-password combinations" or modify leaked ones (for example "Winter2025" to "Winter2026"), and applications without automated threat defences become "password oracles" for the attacker's guesses.
5. Password cracking (offline)
If attackers steal a database of password hashes, they can try guesses against the hashes on their own machines, with no lockout and no rate limits. NIST's guide describes the methods:
| Method | Description |
|---|---|
| Dictionary attack | Uses all words in a dictionary or text file |
| Hybrid attack | Builds on the dictionary with numbers and symbols, such as common substitutions (p@ssword) or additions (password99) |
| Brute force | Generates all possible passwords up to a certain length |
| Rainbow tables | Pre-computed lookup tables of hashes, which "may be ineffective against password hashing that uses salting" |
Salting is adding random data to each password before hashing, so identical passwords do not give identical hashes and pre-computed tables do not work. OWASP recommends slow, salted password hashing (Argon2 or yescrypt in the A04 category). See the CIA triad post for what makes a good hash.
For defenders, this means the real protection against cracking is: strong, unique, long passwords; slow salted hashing on the server; and protecting the hash database in the first place.
6. Spotting these attacks
| Attack | Signs in logs |
|---|---|
| Brute force / guessing | MITRE: a "series of authentication failures (Event ID 4625) targeting the same or similar user accounts over time from one or more remote IPs"; repeated failed SSH logins followed by a possible success from the same host |
| Password spraying | A "high volume of authentication failures using a single password (or small set) across many different user accounts within a defined time window"; sign-in failures across enterprise SSO applications from the same IP address |
| Credential stuffing | Multiple failed authentications using distinct credentials from a single IP address in a short time, across services such as RDP, SSH, cloud applications and email |
| After success | A successful login after a long run of failures, or a login from an unexpected place |
Your own SSH log script from the Linux post (counting failed logins per IP) is a simple way to see this on a lab machine. Spraying is harder to see by looking at one account, so look at failures across accounts.
7. Defence
These defences work against all of them.
1. Multi-factor authentication (MFA)
The strongest single control. NCSC: "even if an attacker discovers a password, they won't be able to access the associated account without also compromising the other factor." MITRE recommends MFA, especially on externally facing services. Prefer phishing-resistant forms where possible (see the phishing post).
2. Throttling and lockout, used carefully
| Approach | Notes |
|---|---|
| Throttling (slowing down repeated attempts) | NCSC prefers throttling: "account lockout can leave legitimate users unable to access their accounts, and requires access to an account recovery method" |
| Lockout | If used, NCSC suggests allowing "between 5 and 10 login attempts before the account is frozen, to avoid accidental lockout." NCSC also warns lockout can give an attacker "an easy way to launch a denial of service attack" by deliberately locking out users |
| Remember spraying | Per-account limits do not stop spraying, because each account sees few attempts. Add controls that look across accounts: per-source IP limits, monitoring and alerts |
3. Block weak and breached passwords
NCSC recommends password deny lists "to prevent the most common (and therefore easily guessed) passwords being used", either when passwords are created or by checking existing passwords. NIST's password guidance likewise recommends blocklists of compromised passwords and advises against composition rules, because users respond to them predictably (making passwords like "Password1!").
4. Make passwords long and unique
Use a password manager to give every service its own long password. This defeats credential stuffing, and makes guessing impractical. NIST emphasizes that length is a primary factor of password strength.
5. Monitor and respond
NCSC recommends security monitoring for "brute-forcing of account passwords, including password spraying" and login attempts from unexpected geographical areas. Alert on spraying patterns across accounts, and proactively reset accounts known to appear in breaches (MITRE's user account management mitigation).
6. Reduce exposure
- Do not expose management services (SSH, RDP, database ports) to the whole internet. Use a VPN, allowlists or a gateway.
- Disable accounts that are not needed, and change default passwords.
- Use key-based login for SSH (see the hardening step in the Linux post).
- Protect password hash stores and use slow, salted hashing.
Quick checklist
- MFA on every external service and admin account
- Throttling or sensible lockout, plus per-IP controls
- Deny list of common and breached passwords
- Unique passwords via a password manager
- Alerts for failures across many accounts
- Management services not exposed to the internet
- Salted, slow password hashing on servers you build
8. Common mistakes
| Myth | The facts |
|---|---|
| "Account lockout stops password attacks" | It stops simple guessing on one account, but spraying is designed to stay under the limit, and lockout can be abused for denial of service |
| "Complex rules (symbols, capitals) make passwords safe" | Users apply them predictably. Length, uniqueness and blocklists work better |
| "Spraying needs a lot of attempts" | It needs very few per account |
| "Credential stuffing is guessing" | It uses real stolen credentials. The failure is password reuse |
| "Brute force is old-fashioned" | Offline cracking and online guessing remain common, especially against weak passwords |
| "Only admin accounts matter" | Any foothold helps the attacker, as the privilege escalation post shows |
| "Strong passwords make MFA unnecessary" | A strong password can still be phished, reused or stolen |
Closing
Brute force, password spraying and credential stuffing all aim to log in as someone. They differ in what they try and where they hide: brute force hammers one account, spraying tries a few common passwords on many accounts to avoid lockout, and stuffing replays leaked credentials from other sites.
Keep these points:
- Brute force = many passwords, one account. Spraying = few passwords, many accounts. Stuffing = leaked pairs.
- Spraying is built to evade per-account lockout. Look across accounts.
- MFA is the most effective control against all of them.
- Block common and breached passwords, and use unique long ones.
- Throttle, monitor and keep management services off the open internet.