Sub topic 11
Brute force, dictionary, spraying and credential stuffing
This chapter assumes you know what a username, password and account lockout are, and that you have met the idea of a password hash. Four password attacks appear on the A+ Core 2 exam. They differ in what the attacker tries and how many accounts they target, and that difference is how you tell them apart in a scenario.
The four attacks
- Brute force tries every possible combination of characters until one works. It is slow against long passwords, but it will eventually succeed given enough time.
- Dictionary attack tries words from a list of common passwords and real words, such as
password1orsunshine. It is faster than brute force because it only tries likely guesses. - Password spraying tries one or a few common passwords against many accounts. The attacker moves on to the next account before a single account fails often enough to lock.
- Credential stuffing takes username and password pairs leaked from one breach and tries them on other sites. It works because people reuse passwords.
| Attack | Accounts targeted | Guesses per account | Source of guesses |
|---|---|---|---|
| Brute force | One | Very many | Every combination |
| Dictionary | One | Many | Wordlist |
| Spraying | Many | One or a few | Common passwords |
| Credential stuffing | Many | One pair each | Leaked real credentials |
Reading the clues in a scenario
Look at the log pattern. Thousands of failed logins against one account point to brute force or a dictionary attack. A single failed login on each of 500 accounts, all using Winter2026!, points to spraying. Successful logins with valid passwords on accounts that were never attacked directly point to credential stuffing, and a recent breach at another company is the usual hint.
Spraying is built to avoid lockouts, so a lockout policy alone does not stop it. Credential stuffing uses real passwords, so strong complexity rules do not stop it either if the user reused that password elsewhere.
Countermeasures
- Use multi-factor authentication (MFA), which blocks a login even when the password is correct.
- Set an account lockout threshold and add delays between attempts. This slows brute force and dictionary attacks.
- Require long passwords and block commonly used ones.
- Tell users not to reuse passwords. A password manager makes unique passwords practical.
- Review logs for many failed logins from one source or across many accounts.
Exercise
A technician sees one failed login on each of 300 user accounts overnight. Every attempt used the same password, and no account was locked. Which attack is this, and which control helps most?
Show answer
Password spraying, because one common password was tried across many accounts, staying under the lockout threshold. MFA helps most. Blocking common passwords also helps.
Exercise
A user's work account is accessed with the correct password. The user says that password was used only on a shopping site that recently reported a data breach. Which attack is this?
Show answer
Credential stuffing. The attacker used credentials leaked from the breach on another service, relying on password reuse.