How it works
Credential stuffing replays username and password pairs that were captured somewhere else. A breach of an unrelated website, or an infostealer running on someone's home computer, yields pairs such as alice@example.com and a password. The attacker tries each pair against the victim organization. It works whenever the person used the same password for the corporate account, which makes it an identity-based attack that needs no vulnerability at all: only a valid pair and a place that accepts a password.
Enterprise identifiers are usually email addresses, so mapping a leaked identity to a corporate account is easy. That is why stuffing is aimed at single sign-on, webmail, VPN and remote access portals rather than at one internal application. Against Active Directory the same pairs can be tested directly on a domain controller by anyone on the internal network.
Four related techniques are easy to confuse:
| Technique | Input | Shape | Success means |
|---|---|---|---|
| Password guessing | One account, many candidate passwords | Concentrated on one identity | A correct guess |
| Password spraying | One or a few common passwords, many accounts | Broad and shallow | Someone chose that password |
| Credential stuffing | Many known pairs from unrelated breaches | Broad, often distributed over many sources | A reused pair is still valid here |
| Offline cracking | A stolen hash or ticket | Not visible to the target | The password behind the hash |
Two sources feed the lists. Credential markets sell aggregated pairs from many breaches, and infostealer logs contain credentials saved in browsers or typed into applications, often including the corporate ones directly. Freshness matters, because an old pair may have been rotated since.
Acceptance of the password and a completed sign-in are different stages. The identity provider can confirm that the password is correct and still refuse the session because a second factor or a Conditional Access condition is not met. For the attacker that is still a result: the pair is valid, and the next step is to find a protocol that does not enforce the second factor, or to send repeated push requests until the user approves one (MFA fatigue, ATT&CK T1621).
Prerequisites
- A corpus of leaked pairs that includes the organization's users. No account in the target is needed.
- An authentication surface that accepts a password: a VPN gateway, Outlook on the web, AD FS, the Entra ID sign-in endpoints, or from inside the network a domain controller (Kerberos on TCP 88, SMB on TCP 445).
- Users who reused a password, and for a completed sign-in, a path with no enforced second factor: a legacy protocol, an application outside the Conditional Access policies, or an account excluded from MFA.
Attack steps
For authorized security testing and lab use only. Run these steps against systems you own or have written permission to assess.
1. Reduce the corpus to the target's users
Filter the breach data to the organization's mail domains and remove duplicates. Then convert the identifiers to the form the validator expects: the UPN for Entra ID and AD FS, the sAMAccountName for NTLM and Kerberos where the UPN prefix differs.
grep -i '@example.com:' breach-combos.txt | sort -u > corp-combos.txt
# username:password form for Kerberos pre-authentication, without the mail domain
sed 's/@example\.com:/:/I' corp-combos.txt > combos.lst
2. Drop names that do not exist
Testing a pair for an account that does not exist wastes an attempt and adds noise. Kerbrute's userenum checks names against the KDC without a password and prints the valid ones; -o writes its log to a file:
cut -d: -f1 combos.lst | sort -u > candidates.txt
kerbrute userenum -d corp.example.com --dc 192.0.2.10 candidates.txt -o userenum.log
3. Test the pairs against a domain controller
Kerbrute's bruteforce command reads username:password lines from a file or standard input and tries each pair once with Kerberos pre-authentication. A failed pre-authentication counts as a failed logon and can lock accounts. --safe aborts if any account comes back as locked out, and --delay spaces the attempts (in milliseconds, single thread):
kerbrute bruteforce -d corp.example.com --dc 192.0.2.10 --safe combos.lst
cat combos.lst | kerbrute bruteforce -d corp.example.com --dc 192.0.2.10 --safe --delay 500 -
NetExec does the same over SMB when it is given a user file and a password file of equal length with --no-bruteforce: line 1 of one file is tried only with line 1 of the other. --continue-on-success keeps going after the first hit. Use a single target with this option, not a range:
cut -d: -f1 combos.lst > users.txt
cut -d: -f2- combos.lst > passwords.txt
nxc smb 192.0.2.10 -u users.txt -p passwords.txt --no-bruteforce --continue-on-success
4. Test the pairs from outside
From the internet the same pairs are submitted to whatever front end validates domain or Entra ID passwords. The tools are the ones used for spraying, fed with pairs instead of one password; see Entra ID password spraying. Attackers spread the attempts over many source addresses so that no single address touches more than a few accounts, and prefer endpoints that answer differently for "wrong password" and "right password, second factor required".
5. Use what was accepted
For each valid pair the attacker looks for a sign-in that completes: mailbox protocols and other legacy authentication that cannot perform MFA (ROPC and legacy authentication abuse), VPN profiles without a second factor, and internal services once inside. Where a push-based second factor stands in the way, repeated sign-in attempts generate repeated prompts until the user approves one.
Impact
Each reused password gives the attacker a standard user identity: mail, files, chat, and a foothold from which the internal attacks in this library start. For an external attacker this is a common form of initial access, and it comes with real credentials that are valid until the password is changed. This is credential theft that happened somewhere the organization cannot see.
Reuse by an administrator or a service account owner is worse. Service identities rarely have MFA, and privileged users who reuse a password hand over their privileges with it.
OPSEC and artifacts
- One attempt per account. Stuffing never needs a second guess for an identity, so per-account lockout thresholds and per-account failure alerts do not trigger. Each attempt is still recorded: on a domain controller as event 4771 with failure code
0x18for a wrong password over Kerberos, or event 4776 for NTLM validation; on a member host or front end as event 4625. - Tool defaults. Kerbrute's
bruteforceproduces both event 4768 and event 4771 on the domain controller for the pairs it tests, from a single client address, in quick succession unless--delayis set. - Distributed sources. Using many proxy or residential addresses keeps every address below per-source thresholds. What remains visible is the set of targeted accounts, which recurs across addresses, and the application they were tried against.
- Stale pairs. A corpus contains accounts that were disabled or renamed long ago. Attempts against disabled accounts and former employees are a strong sign that the names came from an old external list rather than from a user typing.
- Success looks like the user. An accepted pair writes an ordinary success: event 4624 on premises, or a sign-in record with result 0 in Entra ID. The differences are the device, the client application, the source network and what the session does next.
- Password accepted, sign-in blocked. When MFA or Conditional Access stops the sign-in, the Entra ID record shows a failure, but its authentication details show that the password step succeeded. That record is evidence of a compromised password even though no session exists.
- Lockouts. Event 4740 names the caller computer when an account locks. Stuffing causes few lockouts; a wave of them points to guessing or spraying instead.
- Duplicate records. One authentication through a federated or proxied front end can appear in the cloud sign-in log, the AD FS log, the Exchange or IIS log and the domain controller log. Counting them as four attempts inflates the campaign.
Detection
No log shows the submitted password, so no query can prove that a pair came from a breach. Detection combines shape, aftermath and outside intelligence.
- Broad and shallow from one source. Many distinct identities, fewer than two attempts each, at least one success. The on-premises rules for domain password spraying, password guessing with lockouts and AD FS spraying, and the Entra ID password spraying rules, cover this shape; they do not distinguish stuffing from spraying.
- Same account set from many sources. Group failures by target account over a longer window and look for a population that is hit once each from unrelated addresses against one application.
- Leaked credentials. Entra ID Protection raises the leakedCredentials risk detection when Microsoft finds a user's valid pair in leaked material; see the leaked credentials rules. It reports only a confirmed match against the current password, and for synchronized accounts it needs password hash synchronization. The related passwordSpray detection fires only when a sprayed password was successfully validated.
- After the success. A first sign-in from a new device class or network right after a single failure, a success over a legacy protocol, or many push requests followed by an approval (MFA fatigue rules).
- Attempts on disabled or deleted accounts in volume.
// Sources that touched many identities once or twice in an hour and got at least one success
union isfuzzy=true withsource=SourceTable SigninLogs, AADNonInteractiveUserSignInLogs
| where TimeGenerated > ago(7d)
| where isnotempty(IPAddress) and isnotempty(UserPrincipalName)
| extend Succeeded = (ResultType == "0")
| summarize Attempts=count(), Identities=dcount(tolower(UserPrincipalName)),
Successes=countif(Succeeded), Apps=dcount(AppDisplayName),
Tables=make_set(SourceTable)
by IPAddress, bin(TimeGenerated, 1h)
| where Identities >= 10 and Attempts < Identities * 2 and Successes > 0
| order by Successes desc, Identities desc
// Users whose current password Microsoft found in leaked material
AADUserRiskEvents
| where RiskEventType == "leakedCredentials"
| project TimeGenerated, UserPrincipalName, RiskLevel, IpAddress, Activity
| order by TimeGenerated desc
// Windows: addresses that failed against many accounts and also succeeded in the same hour
let failures = SecurityEvent
| where EventID == 4625 and isnotempty(IpAddress) and IpAddress != "-"
| where isnotempty(TargetUserName) and TargetUserName != "-"
| summarize Failures=count(), FailedUsers=dcount(tolower(strcat(TargetDomainName, "\\", TargetUserName)))
by IpAddress, bin(TimeGenerated, 1h);
let successes = SecurityEvent
| where EventID == 4624 and isnotempty(IpAddress) and IpAddress != "-"
| summarize Successes=count()
by IpAddress, bin(TimeGenerated, 1h);
failures
| join kind=inner successes on IpAddress, TimeGenerated
| where FailedUsers >= 10
| order by Successes desc
The thresholds are starting values. A shared office egress address at shift change, a VPN concentrator, or a help desk reset campaign produces the same shape, so compare against the same source and application at an earlier time. Fixed one-hour bins can split an episode in two. When triaging, do not rank accounts by failure count: in stuffing the account that matters often has exactly one failure and one success, or only a success.
Mitigation
- Require a second factor on every externally reachable sign-in, and prefer phishing-resistant methods. Verify the enforcement for the real client and protocol, not only the browser flow, and block legacy authentication, which cannot satisfy MFA. This is the control that breaks the chain: a reused password alone no longer signs in. In Entra ID this is done with Conditional Access; treat report-only policies as monitoring, not enforcement.
- Turn on leaked credentials detection and act on it. Enable password hash synchronization so that Entra ID Protection can match on-premises passwords, and use a user risk policy that forces a secure password change for a risky user. The Entra ID Protection guide walks through the setup.
- Screen new passwords. NIST SP 800-63B-4 requires comparing a prospective password against a blocklist of compromised and common values, sets a 15-character minimum for single-factor passwords, and rejects composition rules and periodic forced rotation; change is required on evidence of compromise. Microsoft Entra Password Protection applies a global banned list built from Microsoft's telemetry plus a custom list of up to 1,000 terms when users set or change a password. It targets common and organization-specific passwords and is not a breach-corpus screen, so it complements leaked credentials detection.
- Reset and revoke on a confirmed hit. Force a password change and revoke sessions and refresh tokens. Check the affected application sessions separately, because the effect of a reset depends on the path and the token type. A user who changes only the on-premises password still has valid cloud sessions until they are revoked.
- Tune lockout for what it does. A per-account lockout threshold is not a stuffing control, and a very low one lets an attacker lock accounts on purpose. Entra smart lockout keeps separate counters for familiar and unfamiliar locations, with a default of 10 failed attempts and a 60-second initial lockout. In hybrid deployments keep the Entra threshold below the AD DS threshold and the Entra duration longer, so that the cloud lockout stops the attack before the on-premises account locks.
- Remove the password. Passwordless sign-in removes the secret that can be reused.
- Reduce the surfaces. Put Outlook on the web, AD FS and VPN portals behind controls that rate-limit by more than source address, and retire front ends that only do password authentication.
- Tell users at the right moments: after a sign-in that passed the password but failed a control, and after a confirmed leak. Notifying on every failed attempt trains people to ignore the message.
- Audit and measure. Enable Audit Kerberos Authentication Service, Audit Credential Validation, Audit Logon and Audit Account Lockout (audit policy guide), and track blocked attempts, MFA challenge outcomes and sign-ins from new device classes.
Detection rules for this attack
Log events to collect
FAQ
What is the difference between credential stuffing and password spraying?
Spraying tries one or two common passwords against many accounts and hopes someone chose them. Stuffing tries, for each account, the specific password that the same person used on another service that was breached. Both look broad and shallow in the logs: many accounts, one or two attempts each. Stuffing usually has a higher success rate per attempt.
Can credential stuffing be detected from a single failed logon?
No. One failed stuffing attempt looks exactly like a mistyped password, and one success looks like the user. Detection relies on the aggregate shape (many identities from one source, or the same set of identities from many sources), on what happens after a success, and on outside intelligence such as a leaked credentials detection.
Does account lockout stop credential stuffing?
Not really. The attacker makes one attempt per account, far below any lockout threshold. Lockout limits repeated guessing against a single account. What stops stuffing is that the leaked password is not valid here, or that a correct password is not enough because a second factor is required.
Does multifactor authentication make stuffing harmless?
It stops the sign-in, but a correct password is still a finding: the user's password is known to an attacker. It can be used against protocols and applications that do not enforce the second factor, and it invites repeated push requests in the hope that the user approves one. Reset the password and review the account.
References
- Brute Force: Credential Stuffing, T1110.004 (MITRE ATT&CK)
- Credential Stuffing Prevention Cheat Sheet (OWASP)
- NIST SP 800-63B-4: Digital Identity Guidelines, Authentication and Authenticator Management
- What are risk detections? (Microsoft Learn)
- Protect user accounts from attacks with Microsoft Entra smart lockout (Microsoft Learn)
- Eliminate bad passwords using Microsoft Entra Password Protection (Microsoft Learn)
- 4771(F): Kerberos pre-authentication failed (Microsoft Learn)
- Kerbrute (ropnop)
- NetExec wiki: password spraying
Techniques, tactics and threat groups: MITRE ATT&CK® Enterprise v20.1. © The MITRE Corporation. This work is reproduced and distributed with the permission of The MITRE Corporation. Last updated 2026-11-29.