designwithfocus

Website security

Brute Force Attack vs Dictionary Attack on Logins

By Design With Focus Team 7 min read
A login form beside a long character space and a short word list

Short answer

A dictionary attack tries passwords from a word list, while a traditional brute-force attack walks a character class such as letters and digits. OWASP's brute-force page treats both as ways to submit predetermined values. Its authentication cheat sheet uses brute force more broadly for many guesses against one account, including guesses taken from a dictionary. Defenses below come from that cheat sheet.

Last verified against the sources listed below.

Key takeaways

  • OWASP's brute-force page splits a word-list attack from a traditional walk of character classes.
  • The authentication cheat sheet still labels many guesses at one account as brute force, including dictionary guesses.
  • Credential stuffing uses pairs from another site's breach. Spraying tries one weak password on many accounts.
  • OWASP calls multi-factor authentication the strongest defense against most password guessing.
  • Lock the account, not the IP address, and log failures and lockouts.
  • NIST SP 800-63B-4 sets 15 characters for a single-factor password and 8 when the password is only one factor of several.

A brute force attack vs dictionary attack comparison is about what gets tried, not about a data type in a programming language. OWASP’s brute-force page says an attacker sets predetermined values, sends them, and reads the response. For speed, that can be a dictionary attack, with or without mutations, or a traditional brute-force attack over character classes such as alphanumeric, special characters, and case.

NIST’s appendix puts the two names side by side: “Passwords that are too short yield to brute-force attacks and dictionary attacks.” The rest of this article uses OWASP for the login controls and NIST for the length rules OWASP cites.

How does a dictionary attack differ?

A dictionary attack tries a prepared list of words or known passwords, instead of every string a character set can form. OWASP’s brute-force page allows that list to be mutated. The authentication cheat sheet describes the same idea as attackers using common-password dictionaries and password lists.

The space is the list, not the full set of possible strings. A short list finishes quickly, and a list of real words still misses a long passphrase that is not on it.

NIST says length matters here because a passphrase of several words gives the guesser more entries to cover. It also says estimating entropy for passwords people choose is hard, so the publication prefers length and a blocklist over composition math.

That is a login attack. It is not a discussion of any language’s built-in map or key-value collection. Website security covers the wider set of checks. This page stays on guessing.

What is the traditional brute-force case?

The traditional case walks a character class until the values run out or a limit stops the tries. OWASP’s examples of those classes are alphanumeric characters, special characters, and case sensitivity. Each added character multiplies the space. That is why NIST treats a too-short password as exposed to this walk and to a dictionary.

The brute-force page also says the attacker can estimate duration from the method, the number of tries, and how fast each side is. This article does not repeat tool commands or request patterns from that page. The useful distinction is the space: a list you loaded, or the combinations a character class can produce.

The authentication cheat sheet draws a wider circle. Its brute-force row is “testing multiple passwords from a dictionary or other source against a single account.” Under that heading, a word list and a generated space are both brute force if they hit one account.

Where do stuffing and spraying fit?

Stuffing and spraying are different patterns, and the cheat sheet gives each a one-line definition.

Attack, as OWASP labels it What is tried Against whom
Dictionary attack A word list, with or without mutations Often one account, or a hidden path
Traditional brute force A character class, such as letters, digits, and symbols The same kind of target, over a much larger space
Brute force, cheat-sheet sense Many passwords from a dictionary or another source A single account
Credential stuffing Username and password pairs from another site’s breach Accounts reused on this site
Password spraying One weak password A large number of accounts

The cheat sheet says the following controls focus on brute force and can also slow the other rows. It sends stuffing and spraying to a separate sheet. Online guessing, in NIST’s words, is the case where someone tries to log in. Limiting the attempt rate is how that publication says to blunt it.

Which mitigations does OWASP list?

OWASP’s authentication cheat sheet is the source for this list. NIST’s length rules are included only where that sheet points at them and the NIST page states the number.

  • Multi-factor authentication. The cheat sheet calls it the best defense against most password attacks, including brute force, and says to use it wherever you can. It also says some audiences make a hard requirement impractical.
  • Login throttling. Cap how many interactive guesses a person can make. The sheet names a maximum number of attempts.
  • Account lockout. After a certain number of failures, refuse more attempts for a period. Count failures on the account, not the source address. Decide the threshold, the window those attempts must fall in, and the duration.
  • Duration shape. A fixed example on the sheet is ten minutes. An exponential pattern starts very short, the example is one second, and doubles after each failure. A delay after each lockout is listed with a cap of two or three, then a permanent lockout.
  • Lockout abuse. A flood of failures can freeze a real person out. The sheet says one counter is to let the forgotten-password flow still log someone in while the account is locked.
  • CAPTCHA. Treat it as an extra cost for automated tries, not as a preventative. The sheet says many CAPTCHAs can be solved by automation or by a solving service, and that showing one only after a few failures is easier on people.
  • Logging. Record and review authentication failures, password failures, and lockouts.
  • Generic errors. Use the same response whether the user id or the password was wrong, so the message is not an account oracle. The sheet also says the work done on a missing user and a bad password should take a similar amount of time.
  • Password rules the sheet attributes to NIST. With multi-factor authentication, shorter than 8 is weak. Without it, shorter than 15 is weak. Allow at least 64 characters. Do not add composition rules. Check a blocklist of common and breached passwords. Do not require periodic changes.

SP 800-63B-4 is the July 2025 final that the CSRC record says supersedes the March 2, 2020 edition.

Its authenticator section matches the lengths above: 15 characters when the password is the only factor, 8 when it is only part of a multi-factor process, a maximum of at least 64, no other composition rules, a blocklist check of the whole password, and a rate limit on failed attempts.

What should a login page not pretend to do?

A favicon does not stop guessing. The favicon generator builds the icon file for the browser tab. The login limits live in the authentication checks above.

A dictionary hit and a character-space walk do not cost the same number of tries. The list ends when the file ends. The character walk ends when the class is exhausted or the throttle stops it.

A lockout number copied from a blog is not OWASP’s rule. The cheat sheet gives examples, including ten minutes and one second, and leaves the threshold to the application.

NIST’s appendix adds one more caution. Extra length and complexity rules, past the ones it already states, tend to frustrate people, and other controls do more against modern guessing: blocklists, hashed storage, machine-generated passwords, and rate limiting. The publication says no further password requirements are imposed for that reason.

Frequently asked questions

Is a dictionary attack a kind of brute force attack?

On OWASP's brute-force page, yes, it is one efficient form. That page says an attacker may use a dictionary attack, with or without mutations, or a traditional brute-force attack that tries character classes. The authentication cheat sheet then defines brute force as testing multiple passwords from a dictionary or another source against a single account. So the narrow pair is word list versus character space, and the cheat sheet's label covers both when the target is one account.

How is credential stuffing different?

The authentication cheat sheet gives credential stuffing its own row. It is testing username and password pairs taken from the breach of another site, not generating guesses for one account. Password spraying is a third row: one weak password tried against many accounts. The cheat sheet says the brute-force controls can also help against those attacks, and it points to a separate credential-stuffing cheat sheet for the rest. This article does not restate that second sheet.

Does OWASP require a specific lockout number?

No. The cheat sheet says to lock an account after a certain number of failed logins, and it lists the choices you have to make: the threshold, the observation window, and the lockout duration. It gives ten minutes as an example of a fixed duration, and it describes an exponential lockout that can start at one second and double. It also says a delay after each lockout should cap at two or three before a permanent lockout. Those are design notes, not a single mandated setting.

Should the lockout follow the IP address?

The cheat sheet says no. Tie the failed-login counter to the account. An attacker can send guesses from many addresses, so an IP counter misses them. The same section warns that lockout can be abused to freeze other people's accounts. One mitigation it names is to let the forgotten-password path still sign a person in while the account is locked.

What password length does NIST require?

SP 800-63B-4, published in July 2025, says a password used as the only factor shall be at least 15 characters. A password used only as part of multi-factor authentication may be shorter, and shall be at least 8. Verifiers should allow at least 64 characters. Other composition rules shall not be imposed. The whole candidate shall be checked against a blocklist of commonly used, expected, or compromised values. OWASP's cheat sheet points at those same length rules.

Sources