Both try to sign in as someone else. A brute-force attack, which OWASP calls credential cracking (OAT-007), guesses many passwords for one account. Credential stuffing (OAT-008) takes email and password pairs leaked from another site and tries each pair once, across thousands of accounts, betting that people reuse their passwords.
Side by side
| Credential stuffing | Brute force | |
|---|---|---|
| What it tries | Pairs leaked elsewhere, each once | Many passwords for one account |
| Tries per account | One or a few | Hundreds or more |
| What it needs | A list of leaked pairs | A list of likely passwords |
| A limit per account | Rarely reached | Reached quickly |
| What stops it | Telling a script from a person at each attempt, a second factor, refusing leaked passwords | A limit per account, a delay or a lockout, strong passwords |
Why a limit catches one and misses the other
A limit of a few failed attempts per account stops guess after guess at one password. Stuffing never reaches it: each account sees one attempt, and spread over many addresses, a limit per address misses it too. What stays the same across its attempts is that a script, not a person, is typing.
What Bot Protection does
Your server asks before it checks the password, and gets a class for the attempt: human, unknown or bot. Send the account hashed in context, and the visitors trying the same account are linked. In block mode a bot is refused, best with the same "wrong password" a person would see. Keep your limits: they catch the crude attempts. More: account takeover protection.
Sources
OWASP Automated Threats to Web Applications, which names credential cracking OAT-007 and credential stuffing OAT-008.
Questions
Is credential stuffing a brute-force attack?
It is often filed under brute force, since both are automated guessing. OWASP keeps them apart: credential stuffing replays pairs that worked elsewhere, credential cracking guesses.
Does a second factor stop both?
It stops a correct password from being enough, which is what both attacks are after. It does not stop the attempts, which still load your login and can lock accounts out.