Password Spraying vs Credential Stuffing: Detect and Respond
Skip to content

Password Spraying and Credential Stuffing

Credential stuffing and password spraying are attacks that guess their way into accounts at scale. Credential stuffing tries username and password pairs stolen from other services. Password spraying tries a few common passwords against many accounts.

Both leave a recognizable shape in sign-in data. This guide puts the two side by side, shows what each looks like in the logs, and explains how to read the result of every attempt.

Two Attacks, Side by Side

Password sprayingCredential stuffing
What is triedOne or two likely passwords against every account.Real username and password pairs leaked from other services.
Why it worksIn any large organization someone uses a predictable password.People reuse passwords between personal and work accounts.
Where the list comes fromStaff names from public sources, formatted as email addresses.Breach collections and stealer logs, filtered for the target’s domain.
Attempts per accountOne per round, with long gaps between rounds.One or two in total.
SourcesA small number of addresses, or a rotating pool.Thousands of addresses, often residential proxies.
Lockouts causedAlmost none, by design.Few.
Success rateLow, though one account is enough.Low per attempt, across a very large number of attempts.
First responseReset every account that shares the sprayed password, and ban that password.Reset the accounts whose leaked password worked, and find where it leaked.

Brute force, by contrast, tries many passwords against one account. It triggers lockouts quickly and is easy to see. Spraying and stuffing exist because they avoid that.

Where the Passwords and Usernames Come From

Both attacks run on lists, and the lists are cheap to build, which is why almost every organization is a target, whatever its size.

Usernames

An attacker needs valid usernames before any guessing starts. For most organizations these are easy to produce. Staff names are public on professional networking sites and company pages. The email format, such as first initial and surname, can be read from a single published address. Combining the two gives a list that is mostly right.

Some sign-in pages confirm whether a username exists, through a different error message or response time. Attackers use this to clean their lists before trying any passwords, which is why accounts that do not exist appear early in an attack and disappear later.

Passwords for Spraying

Spraying needs a short list of passwords that someone in the organization is likely to have chosen. The candidates are well known: the season or month with the year, the company name with a number, the name of the local sports team, the word welcome with a digit, and the default the help desk hands out to new hires.

Password rules that force a change every 90 days make this easier. People who must invent a new password four times a year fall back on patterns, and the patterns follow the calendar. Attackers time their rounds to follow expiry dates, when many people have just chosen something easy to remember.

Passwords for Stuffing

Stuffing uses real credentials. Some come from breaches of other services, where email addresses and passwords were stolen and later shared in large compilations. Others come from infostealer malware, which collects saved passwords directly from infected computers, as the infostealer guide describes.

The lists are enormous, traded freely, and updated constantly. An attacker filters one for addresses at the target’s domain and has a ready-made set of username and password pairs. Any employee who used their work email and a favorite password to register for an outside service is on it.

This is why password strength alone is no defense against stuffing. A long, complex password that was used on a breached site is exactly as exposed as a short one.

How the Attacks Are Run

Neither attack is typed by hand. Both are run with automation tools that take a list, a target, and a set of proxy addresses.

Proxy networks

Attackers rent access to pools of addresses, including residential connections that belong to ordinary households. Each attempt can come from a different address in the right country, which defeats blocking by address and makes the traffic look like staff signing in from home.

Pacing

The tools throttle attempts to stay under lockout thresholds and rate limits, and spread a spray across days.

Target selection

Attackers prefer endpoints with the weakest checks: password-only mail protocols where they are still enabled, programmatic interfaces, and sign-in pages for secondary applications that lack the protections of the main portal.

Validation

Successful pairs are logged, checked for a second factor, and sorted by the access they give. Accounts without a second factor are used at once, and the rest are sold or held for a follow-up attack.

A campaign rarely targets one organization. The same tool runs the same list against thousands of tenants. Being hit says nothing about whether an organization was singled out.

What Password Spraying Looks Like

A spray is slow and even. The same source works through the directory, one attempt per account, then waits and starts again with the next password.

TimeAccountSourceResult
02:00:04a.adams198.51.100.24Wrong password
02:00:09a.baker198.51.100.24Wrong password
02:00:15a.chan198.51.100.24Wrong password
02:00:21a.former-employee198.51.100.24Account does not exist
02:00:26b.davies198.51.100.24Correct password, MFA not completed
02:00:32b.evans198.51.100.24Wrong password
02:45:02a.adams198.51.100.24Wrong password
02:45:08a.baker198.51.100.24Wrong password

Several features identify it. Accounts are tried in alphabetical order. Each account fails once per round. Accounts that no longer exist are tried, because the list was built from old public data. The gap between rounds, 45 minutes here, keeps each account under the lockout threshold.

The fifth row matters most. The password for that account was correct, and only the second factor stopped the sign-in.

What Credential Stuffing Looks Like

Stuffing is fast and scattered. Each attempt comes from a different address, and each account is tried with a password its owner really used somewhere.

TimeAccountSourceResult
14:02:11c.fraser203.0.113.8Wrong password
14:02:11d.grant192.0.2.77Wrong password
14:02:12jsmith198.51.100.140Account does not exist
14:02:12e.hughes203.0.113.201Success
14:02:13f.iqbal192.0.2.15Wrong password
14:02:13g.jones198.51.100.63Correct password, blocked by access policy

The sources are spread across many networks, often home broadband addresses rented through proxy services. Addresses in a format the organization does not use for sign-in appear, such as old aliases and departed staff, because the list came from other services’ breaches and not from the directory. Among the failures there are a few successes.

A tenant’s sign-in log holds only attempts against its own domains. The personal addresses in the same breach list are tried against consumer services and never appear in it.

Reading the Result of Each Attempt

Identity platforms record why each sign-in failed. The reasons mean different things, and the correct-password failures are routinely misread as harmless.

ResultWhat it meansWhat to do
Wrong passwordThe guess failed.Count it as part of the pattern.
Account does not existThe attacker’s list is out of date or built from another source.Useful for recognizing the attack. No account is at risk.
Account lockedThe lockout threshold was reached.Check whether the user or the attacker caused it.
Correct password, MFA not completedThe attacker has the password.Treat the password as compromised, and reset it.
Correct password, blocked by access policyThe attacker has the password, and a policy stopped the sign-in.Reset the password. The policy worked this time.
SuccessThe attacker may be in.Start account takeover response.

In Microsoft Entra ID sign-in logs these results carry error codes. A wrong password is 50126, a username that does not exist is 50034, and a smart lockout is 50053. A correct password that stopped at the second factor is 50074 or 50076, and one blocked by an access policy is 53003.

A sign-in that failed at the second factor still proves the password is known. Left alone, that account is the next target for repeated prompts, a help desk call, or a phishing page, and the MFA fatigue guide follows that next step.

How Lockout Shapes the Attack

Attackers design around lockout rules, so it helps to know what those rules do.

Microsoft Entra ID uses smart lockout. By default it locks an account after 10 failed attempts, for one minute at first and longer after further failures. It keeps separate counts for familiar and unfamiliar locations, so an attacker’s failures from a new location lock the attacker out while the real user continues to sign in. It also ignores repeated attempts with the same wrong password.

A spray that tries one password per account every 45 minutes never approaches that threshold, which is why lockout alerts rarely reveal a spray.

On-premises directories use fixed lockout policies. A low threshold stops guessing and also lets an attacker lock out every employee on purpose. Remote access devices that authenticate against the directory inherit the same weakness.

Detection Methods

Distinct accounts per source

One address fails against many different accounts within an hour. This is the core spray detection, because it counts accounts per source where lockout counts failures per account.

Failures spread evenly

Each account shows roughly the same number of failures, which human error never produces.

Nonexistent accounts

A burst of sign-ins arrives for usernames that are not in the directory.

Shared client details

The same user agent or client application appears across attempts for many users.

Many sources, one moment

Failed sign-ins rise suddenly across the tenant from a large number of addresses, which is the shape of stuffing.

Success after the pattern

Any successful sign-in from a source, network, or client seen in the attack needs review.

Correct password without completion

Sign-ins stopped by the second factor or an access policy are listed and reviewed daily.

Password-only protocols

Attempts arrive against SMTP AUTH, on-premises Exchange, or another mail system that accepts a password alone.

Built-in detections

Microsoft Entra ID Protection raises a password spray detection, and flags leaked credentials when it finds a user’s password in breach data.

Beyond the Cloud Sign-In Page

Attention goes to the main cloud portal, which is usually the best protected entry point. The same lists are tried everywhere a directory password is accepted.

VPN and remote access gateways

These often authenticate against the internal directory and may not enforce a second factor for every account. Their logs record failed logons by username and source, and are rarely reviewed.

Remote desktop gateways and virtual desktop portals

These carry the same exposure, with direct access to internal systems on success.

Web applications with their own login

Customer portals, supplier portals, and older internal applications published to the internet keep their own password checks.

Password-only mail protocols

Basic authentication is switched off in Exchange Online for every protocol except SMTP AUTH. The exposure that remains is SMTP AUTH, on-premises Exchange, and non-Microsoft mail systems.

The internal network

An attacker who already has a foothold can spray the directory from inside, where there is no second factor at all.

Spraying Inside the Network

Internal spraying looks different in the logs. Domain controllers record failed Kerberos pre-authentication (event 4771) and failed logons (event 4625). A spray appears as one source machine generating failures for many accounts in a short time, each account failing once.

Attackers on the inside also spray local administrator accounts across workstations, looking for a shared password. One machine attempting to log on to many others with the same account name is the signature.

Customer-Facing Logins

Organizations that run their own customer portal, online store, or member site face credential stuffing from the other side. The accounts at risk belong to customers, and the organization is responsible for protecting them.

The attack is the same. Lists of email addresses and passwords from other breaches are tried against the login page, and the pairs that work are used to take over customer accounts, steal stored payment details or loyalty points, or commit fraud.

Controls for a customer login differ from those for staff, because customers cannot be forced onto managed devices.

Rate limiting

Attempts are restricted per account and per source, and responses slow down after failures.

Detection of automation

Traffic that does not behave like a browser operated by a person is identified and challenged.

Breached password checks

At registration, login, and password change, the password is compared against known breached passwords, and a match requires a change.

A second factor

It is offered to all customers and required again before sensitive actions such as changing payout details or delivery addresses, even within a signed-in session.

Notification

Customers are told about sign-ins from new devices and about changes to their account.

Monitoring

The ratio of failed to successful logins is watched, since a sudden rise in failures across many accounts is the same signal as in a staff tenant.

Where the attacker reaches personal information in customer accounts, the organization has to assess the incident as a data breach, even though the passwords were leaked elsewhere. Regulators have taken the view that an organization should anticipate credential stuffing and defend against it.

Password Policy That Helps

Much traditional password policy makes these attacks easier. Current guidance from the US National Institute of Standards and Technology, in its digital identity guidelines, points the other way.

Length over complexity

Encourage long passwords and passphrases. Rules that demand symbols and mixed case produce predictable substitutions.

No routine expiry

Change passwords when there is evidence of compromise, and drop the calendar.

Screen against known bad passwords

Check new passwords against lists of commonly used and previously breached passwords, and reject matches.

Ban the local favorites

Add the organization’s name, products, locations, and help desk defaults to the blocked list. In Microsoft Entra ID the custom banned password list holds up to 1,000 terms and also blocks common variations of each.

Unique default passwords

New-hire and reset passwords should be random, single-use, and expire on first sign-in.

A password manager for staff

It is the practical way to make unique passwords for outside services achievable.

These measures reduce the hit rate. They do not remove the need for a second factor.

Measuring Your Exposure

These checks show how an attack would go before one happens.

1
Accounts without a second factorList every account that can sign in with a password alone, including service accounts, shared mailboxes, and anyone excluded from policy. This is the list the attacker is looking for.
2
Protocols that skip itConfirm which mailboxes still allow SMTP AUTH, and whether any on-premises or non-Microsoft mail system accepts a password alone.
3
Passwords already circulatingCheck breach data and stealer logs for the organization’s domains. Many identity platforms flag users whose current password appears in known leaks.
4
Passwords that would be guessedCompare password hashes against a list of common and organization-specific passwords, using a tool approved for the purpose. The result usually shows more guessable passwords than expected.

After an Attack

1
List every account where the password was correctInclude successes and attempts stopped by the second factor or a policy.
2
Contain the successes as takeoversBlock sign-in where the attacker is active or the account is privileged, reset the password, revoke sessions, and remove anything the attacker added. The account takeover guide gives the order in full.
3
Reset the passwords that were only confirmedAn account stopped by the second factor still needs a new password, and its recent sign-ins need review, since the attacker may return from a clean address.
4
Ban the password that workedAdd it, and its obvious variants, to the banned password list.
5
Find the source of leaked passwordsFor stuffing, identify which breach or stealer log the working pairs came from, so other staff in the same source can be reset too.
6
Close the gaps the attack usedFix accounts without a second factor, password-only protocols, and exclusions from access policies.
7
Keep the recordsExport sign-in logs for the attack period before they expire.

Multi-factor authentication on every account is the control that turns both attacks from a breach into an alert. Phishing-resistant methods go further where password sign-in is turned off for the account, because there is then no password to guess.

Password Attack Response With ThreatDefence

ThreatDefence watches Microsoft 365 and Entra ID sign-in failures for the patterns in this guide, and for the successful sign-in that follows them. AI agents review each alert against the account’s sign-in history, and our SOC locks a compromised account within minutes of a confirmed sign-in.

The platform also monitors leaked credentials for customer domains, so a password that appears in a breach can be reset early. A free Microsoft 365 forensic review reports password spray activity, MFA coverage, and risky sign-ins over the past six months.

A Microsoft 365 forensic scan in the ThreatDefence portal: six months of activity analyzed, sign-ins by risk, MFA coverage, app consents, findings by severity and the response taken

Experiencing a breach?

Our incident response team answers 24x7, with or without a retainer.

Talk to Our Experts

Ask about a free Microsoft 365 forensic review, covering six months of activity in your tenant.

    I'm an MSP, MSSP, or reseller

    By submitting this form, you accept the terms in our privacy policy.

    Frequently Asked Questions

    What is the difference between credential stuffing and password spraying?

    Credential stuffing tests username and password pairs already exposed at other services, so it succeeds where someone reused a password. Password spraying tries one or two common passwords against every account, so it succeeds where someone chose a predictable one. In the logs, stuffing is fast and comes from thousands of addresses, while a spray is slow, even, and often from a single source.

    What is a brute force attack?

    A brute force attack tries many passwords against one account. It is the loudest of the password attacks: failures pile up on a single account, lockout triggers within minutes, and the pattern is plain in the log. Spraying and stuffing are the quiet alternatives, built to spread attempts across accounts or sources so that no single counter is tripped.

    Why does password spraying avoid account lockout?

    Lockout counts failures per account, and a spray produces one failure per account per round. Smart lockout in Microsoft Entra ID triggers after 10 failed attempts by default, so a spray that tries one password every 45 minutes never reaches it. Detection has to count the other way: one source failing once against many different accounts within an hour.

    Does multi-factor authentication stop credential stuffing?

    It stops the sign-in, and the password is still compromised. The log shows the attempt as a correct password that failed at the second factor, and that account becomes a target for repeated prompts, a help desk call, or a relay phishing page. Reset the password. Check too for routes that skip the second factor, such as SMTP AUTH, a VPN, or accounts excluded from policy.

    How do we know if a password spraying attack succeeded?

    List every sign-in from the attacking sources where the password was accepted. In Microsoft Entra ID that means successes, plus failures with error 50074 or 50076, where the password was right and the second factor stopped it, and 53003, where an access policy did. Then search for later successful sign-ins to those accounts from any new address, since attackers return through a different proxy.

    Should accounts be locked during a password spraying attack?

    No. Disabling every account that received a failed attempt does the attacker’s work, since it stops the business over passwords that were wrong anyway. Act only on accounts where the password was correct: reset them, and block sign-in for any that show a success. Blocking the source addresses helps against a single-source spray and does little against thousands of rotating proxies.

    Is credential stuffing a data breach?

    The attempts alone are not. It becomes a breach question when a sign-in succeeded and the account held or could reach personal information. For staff accounts that means the mailbox and files. For customer portals it means each customer account the attacker opened, and regulators have taken the view that organizations are responsible for those even though the passwords were leaked by another service.

    How do attackers get the passwords used in credential stuffing?

    They come from breach compilations and from infostealer logs. Breach compilations hold email addresses and passwords taken from compromised websites, often years old. Infostealer logs are fresher and more dangerous, because the malware copies every password saved in a browser along with the address of the site it belongs to. An attacker filters either source for the target’s email domain and has a list in minutes.