RestingOwl owl logo RestingOwl

Dictionary Attack Explained:How It Works and Defences

Quick Answer: A dictionary attack tries to guess a password using a prepared list of likely passwords, called a wordlist, instead of trying every possible combination. The wordlist holds common passwords, leaked passwords, dictionary words, and predictable patterns like Summer2026!. It is far faster than pure brute force because it only tries passwords people actually use. The defences are the same ones that stop other password attacks: block breached and common passwords, add rate limiting and MFA, and store passwords with a slow hash.

Most password guessing you read about in the news is really a dictionary attack. Pure brute force, which tries every possible character combination, is far too slow against a decent password. So attackers work smarter: they guess from lists of passwords that real people choose. This guide explains how a dictionary attack works, how it differs from brute force and password spraying, and how to stop it. It pairs with our overview of the three password attacks compared.

What Is a Dictionary Attack?

A dictionary attack is a password guessing method that works through a wordlist: a file of likely passwords prepared in advance. Rather than trying aaaa, aaab, aaac and so on, it tries password, 123456, qwerty, and millions of other passwords that people have actually used. The name comes from the original idea of using a language dictionary, but modern wordlists are far more than dictionaries. They are built from real breaches, so they contain the exact passwords humans pick, including ones with numbers and symbols added.

How Does a Dictionary Attack Work?

The attack has three simple stages, and it can run either against a live login page (online) or against a stolen password database (offline).

  1. Build or download a wordlist. Attackers use ready-made lists such as rockyou.txt, or lists of passwords from recent breaches, often millions of entries long.
  2. Apply mangling rules. Tools automatically transform each word: adding a year, swapping a for @, capitalising the first letter, appending !. This turns password into thousands of realistic variants.
  3. Try each candidate. Online, the attacker sends guesses to the login form. Offline, they hash each candidate and compare it to the stolen hashes, which is extremely fast if the passwords were stored with a weak hash.

# A wordlist plus mangling rules, not every combination
password   -> Password1, P@ssw0rd, password2026, Password!
summer     -> Summer2026!, summer123, $ummer
qwerty     -> Qwerty1, qwerty!, qwerty2026
# Only realistic guesses are tried, so it is fast

How Is a Dictionary Attack Different From Brute Force?

People often use the two terms as if they mean the same thing, but there is a clear difference in strategy.

MethodWhat It TriesSpeedWeakness It Exploits
Dictionary attackA prepared list of likely passwords, plus variationsFast: only realistic guessesPeople choose common, predictable passwords
Pure brute forceEvery possible character combination in orderVery slow against long passwordsShort or simple passwords only
Password sprayingA few common passwords across many accountsLow and slow per accountWeak passwords plus per-account lockout gaps

In practice, pure brute force is rare because it cannot finish against a strong password in any reasonable time. A dictionary attack is the practical version: it skips the impossible combinations and spends its effort on the passwords people really use. Password spraying is essentially a dictionary attack spread thinly across many accounts to dodge lockout, and credential stuffing is the extreme case where the wordlist is real username and password pairs.

Why Are Dictionary Attacks So Effective?

  • People reuse a small set of passwords. A wordlist of the few million most common passwords covers a large share of real accounts.
  • Mangling rules mirror human habits. The tricks people use to feel secure, like adding a year or a !, are exactly what the rules generate.
  • Offline cracking is fast with weak hashes. If a leaked database used MD5 or SHA-256, an attacker can test billions of dictionary candidates per second.
  • Breaches keep the lists fresh. Every new breach adds real passwords to the wordlists, so the guesses get better over time.

How Do You Defend Against a Dictionary Attack?

Because a dictionary attack targets predictable passwords, the strongest defence is to make sure no account uses one, and then to slow down and block automated guessing.

Dictionary Attack Defence Checklist
  1. 1Block breached and common passwords at signup and password change using the HaveIBeenPwned Pwned Passwords API, so wordlist entries can never be set as passwords.
  2. 2Encourage long passphrases and screen new passwords with a strength library such as zxcvbn.
  3. 3Enforce multi-factor authentication, so a guessed password alone cannot complete a login.
  4. 4Add rate limiting and account lockout to slow online guessing to a crawl.
  5. 5Store passwords with a slow, salted hash such as Argon2id or bcrypt, so an offline dictionary attack on a stolen database is not practical.
  6. 6Log and alert on repeated failed logins so you can spot an online attack in progress.
  7. 7Ban predictable patterns like season plus year and company name plus digits, which mangling rules generate first.

Two of these controls do most of the work. Blocking breached passwords removes the wordlist targets from your system entirely, and storing passwords with a slow salted hash makes offline cracking too expensive to be worth it. For the hashing side, see our guide on password hashing with bcrypt and Argon2.

What Does OWASP Say About Dictionary Attacks?

OWASP treats dictionary attacks as a form of brute force and addresses them in the Authentication Cheat Sheet and the ASVS authentication controls. The guidance is to block common and breached passwords, rate limit authentication endpoints, offer multi-factor authentication, and store passwords with a strong adaptive hashing function. OWASP and NIST both recommend checking new passwords against known breach corpora rather than forcing complex character rules, because complexity rules push users toward exactly the predictable patterns that dictionary attacks try first.

Related reading: A dictionary attack is one of a family of password attacks. See how it compares in brute force vs credential stuffing vs password spraying, and add the shared defences from multi-factor authentication, rate limiting and account lockout, and breached-password blocking. OwlAuth ships breached-password blocking out of the box.

References

  1. 1OWASP Authentication Cheat Sheet
  2. 2MITRE ATT&CK: Password Cracking (T1110.002)
  3. 3NIST SP 800-63B: Digital Identity Guidelines

Q&A Section

A dictionary attack is when someone tries to guess a password using a prepared list of likely passwords, called a wordlist, instead of trying every possible combination. The list holds common passwords, leaked passwords, and predictable patterns. Because it only tries passwords people actually use, it is much faster than pure brute force and cracks weak passwords quickly.
A pure brute force attack tries every possible character combination in order, which is far too slow against a strong password. A dictionary attack is the smart version: it tries only a prepared list of likely passwords and their common variations. In everyday security writing, most attacks called brute force are really dictionary attacks, because attackers rarely try every combination.
A wordlist is the file of candidate passwords a dictionary attack works through. Popular examples like rockyou.txt come from real breaches and contain millions of passwords people have actually used. Attackers combine a wordlist with mangling rules that add years, symbols, and capital letters to produce realistic variations, so the list covers far more than plain dictionary words.
Block breached and common passwords at signup so wordlist entries can never be used, enforce multi-factor authentication so a guessed password is not enough, and add rate limiting and account lockout to slow online guessing. Store passwords with a slow salted hash such as Argon2id or bcrypt so that even a stolen database cannot be cracked cheaply offline.
Both. An online dictionary attack sends guesses to a live login page, where rate limiting, lockout, and MFA can stop it. An offline dictionary attack runs against a stolen password database, hashing each candidate and comparing it to the leaked hashes. Offline attacks are only fast if the passwords were stored with a weak hash, which is why a slow salted hash matters so much.
Copied!