What Is a Brute Force Attack?
A brute force attack is a cyberattack that systematically tries many combinations of passwords or encryption keys until the correct one is found. A brute force attack relies on automated guessing rather than on a flaw in the software, so its success depends on the strength of the password or key. The National Institute of Standards and Technology (NIST) sets the password and authentication guidance that defends against brute force.
This article defines a brute force attack, explains how it works, names the main types including dictionary attacks, credential stuffing, password spraying, and rainbow tables, explains why weak and reused passwords fail, and sets out the defenses including long unique passwords, two-factor authentication, rate limiting, account lockout, and salted hashing. Each section states one part of the topic and connects it to the systematic guessing at the center of the definition. The result is a complete account of what a brute force attack is, the forms it takes, and how strong passwords and additional controls stop it.
What Is a Brute Force Attack?
A brute force attack is a cyberattack that systematically tries many combinations of passwords or keys until the correct one is found. A brute force attack uses automation to test guesses at high speed, succeeding against weak or short credentials. The defining traits of a brute force attack are listed below:
- Systematic guessing tries combinations in sequence or from a list rather than exploiting a flaw.
- Automation uses software to submit guesses far faster than a person could.
- Credential or key target aims at passwords, PINs, or encryption keys.
- Strength dependence means success rises sharply against short or common credentials.
A brute force attack is one of the most common access attacks within the overview of what a cyberattack is. The same guessing technique appears among the common network attacks that target network logins.
How Does a Brute Force Attack Work?
A brute force attack works by using automated software to submit large numbers of password or key guesses against a target until one succeeds. A brute force attack tests guesses against a login, a hash, or an encrypted file. The mechanism is listed below:
- Target selection identifies a login form, a captured password hash, or an encrypted file.
- Guess generation produces candidates from sequences, wordlists, or leaked credential databases.
- Automated submission tests each candidate rapidly until one matches.
- Success occurs when a guess equals the password or key, granting access.
A brute force attack tests guesses until one matches, so the number of possible combinations determines the time required, according to NIST. Longer and more complex credentials raise the combination count beyond what an attacker can test in a practical time.
What Are the Types of Brute Force Attacks?
The main types of brute force attacks are simple brute force, dictionary attacks, credential stuffing, password spraying, and rainbow table attacks. A brute force attack type describes how the attacker generates and applies guesses. The types are listed below:
- Simple brute force tries every possible character combination in sequence.
- Dictionary attack tries words and common passwords from a prepared list.
- Credential stuffing reuses username and password pairs leaked from other breaches.
- Password spraying tries a few common passwords across many accounts to avoid lockouts.
- Rainbow table attack uses precomputed hash tables to reverse stored password hashes.
Credential stuffing and password spraying exploit reused and common passwords rather than testing every combination, according to NIST. Credential stuffing depends on leaked data, which often originates from a data breach at another service.
Why Do Weak and Reused Passwords Fail?
Weak and reused passwords fail because short or common passwords have few combinations to test, and reused passwords let one breach unlock many accounts. A brute force attack succeeds fastest against low-entropy credentials. The reasons are listed below:

- Short passwords have few possible combinations, which automated guessing tests quickly.
- Common passwords appear in wordlists, so a dictionary attack finds them early.
- Reused passwords let a single leaked credential unlock every account that shares it.
- Predictable patterns such as names and dates narrow the guesses an attacker must try.
Password length and uniqueness raise the work an attacker must do, which is why NIST recommends long passphrases. Building credentials that resist guessing is the subject of the steps to create a strong password.
How Do You Defend Against a Brute Force Attack?
Defense against a brute force attack uses long unique passwords, two-factor authentication, rate limiting, account lockout, and salted password hashing. These controls raise the cost of guessing and limit the value of a correct guess. The defenses are listed below:
- Long unique passwords increase the combinations an attacker must test beyond a practical limit.
- Two-factor authentication requires a second factor, so a guessed password alone does not grant access.
- Rate limiting slows repeated login attempts, reducing the guesses an attacker can submit.
- Account lockout blocks an account after a set number of failed attempts.
- Salted hashing stores passwords with a unique salt, defeating precomputed rainbow tables.
Two-factor authentication defeats a brute force attack even when a password is guessed, since the second factor remains required, the protection explained in the steps to set up two-factor authentication. Rate limiting and lockout reduce the guesses an attacker can attempt against a login.
How Does Two-Factor Authentication Stop Brute Force Attacks?
Two-factor authentication stops brute force attacks by requiring a second verification factor, so a correctly guessed password alone does not grant access. Two-factor authentication adds a barrier that guessing cannot cross. The protections are listed below:

- Second factor requirement demands a code, key, or biometric in addition to the password.
- Guessed-password resistance blocks access even after a brute force attack finds the password.
- Phishing-resistant options such as hardware security keys resist interception of the second factor.
- Alert generation can notify a user when a second factor is requested unexpectedly.
Two-factor authentication makes a guessed password insufficient, which is why NIST recommends it for accounts holding sensitive data. Combining it with a strong unique password raises both the guessing cost and the barrier after a successful guess.
How Does Password Hashing and Salting Defend Against Brute Force?
Password hashing and salting defend against brute force by storing passwords as irreversible hashes with a unique salt, so stolen hashes resist precomputed and reused attacks. Hashing and salting protect stored credentials even after a breach. The protections are listed below:
- Hashing converts a password into a fixed irreversible value that hides the original.
- Salting adds a unique random value to each password before hashing, so identical passwords differ.
- Rainbow table defense follows because a unique salt makes precomputed tables useless.
- Slow hash functions such as bcrypt and Argon2 increase the time each guess requires.
Salting defeats rainbow tables, and slow hash functions raise the cost of each guess, according to NIST password storage guidance. Storing credentials as salted slow hashes limits the damage when a password database is stolen.
How Long Does a Brute Force Attack Take?
The time a brute force attack takes depends on password length, character variety, and the attacker’s computing power, ranging from seconds for short passwords to centuries for long ones. Each added character multiplies the combinations to test. The factors are listed below:
- Password length raises the combination count exponentially, the strongest factor in resistance.
- Character variety adds uppercase, numbers, and symbols, widening the pool for each position.
- Computing power sets how many guesses an attacker tests per second.
- Hashing speed matters for offline attacks, since slow hash functions limit guesses per second.
A short common password falls in seconds, while a long random passphrase resists guessing far beyond a practical timeframe, according to NIST entropy guidance. Length contributes more resistance than complexity, which is why passphrases are recommended.
What Is the Difference Between Online and Offline Brute Force Attacks?
An online brute force attack guesses against a live login system, while an offline brute force attack guesses against a stolen password hash without contacting the service. The setting determines the defenses that apply. The differences are listed below:
- Online attacks submit guesses to a running login, where rate limiting and lockout slow the attacker.
- Offline attacks test guesses against a captured hash at full speed with no service to slow them.
- Online defenses rely on lockout, rate limiting, and detection of repeated failures.
- Offline defenses rely on slow salted hashing, which raises the cost of each guess.
Online attacks are slowed by lockout and rate limiting, while offline attacks are slowed by salted slow hashing, according to NIST. A long unique password defends both settings, the subject of the steps to create a strong password.
Can a Brute Force Attack Break Encryption?
A brute force attack can break encryption only when the key is short or weak, because modern key lengths create more combinations than any attacker can test in a practical time. Key length determines whether brute force is feasible against encrypted data. The facts are listed below:
- Key length sets the number of possible keys, and longer keys raise that count exponentially.
- AES-256 creates a key space far beyond the reach of current computing power.
- Short or outdated keys such as broken legacy ciphers fall to brute force.
- Weak passwords protecting an encrypted file remain the practical weak point, not the cipher itself.
Strong encryption with a sufficient key length resists brute force, so attackers target the password protecting the key instead, according to NIST. Encryption tools that derive keys from weak passwords stay vulnerable, which is why the encryption software guide stresses strong passphrases.
Key Takeaways
- A brute force attack systematically tries combinations until a password or key matches.
- The mechanism uses automated guessing rather than a software flaw.
- The types include simple, dictionary, credential stuffing, password spraying, and rainbow tables.
- Weak and reused passwords fail because they have few combinations or unlock many accounts.
- Defense uses long unique passwords, two-factor authentication, rate limiting, and lockout.
- Salted hashing protects stored passwords against precomputed and reused attacks.
What is a brute force attack in simple terms?
A brute force attack is a cyberattack that systematically tries many combinations of passwords or keys until the correct one is found. It uses automated guessing rather than exploiting a software flaw.
What are the types of brute force attacks?
The types include simple brute force, dictionary attacks, credential stuffing, password spraying, and rainbow table attacks. Each generates and applies guesses in a different way to find valid credentials.
How do you stop a brute force attack?
Stop a brute force attack with long unique passwords, two-factor authentication, rate limiting, account lockout, and salted password hashing. These controls raise the guessing cost and limit a correct guess.
Does two-factor authentication stop brute force attacks?
Yes. Two-factor authentication requires a second factor, so a guessed password alone does not grant access. Even after a brute force attack finds the password, the second factor remains required.
What is credential stuffing?
Credential stuffing is a brute force type that reuses username and password pairs leaked from other breaches. It succeeds when people reuse the same password across multiple accounts.
Why do strong passwords resist brute force?
Strong passwords resist brute force because length and complexity raise the number of possible combinations beyond what an attacker can test in a practical time, especially when the password is unique.
Last Thoughts on Brute Force Attacks
A brute force attack systematically tries many combinations of passwords or keys until one succeeds, relying on automated guessing rather than a software flaw. Simple, dictionary, credential stuffing, password spraying, and rainbow table attacks each generate guesses differently, and weak or reused passwords fail fastest.
Long unique passwords, two-factor authentication, rate limiting, account lockout, and salted hashing raise the cost of guessing and limit the value of a correct guess. Readers can continue with the steps to create a strong password, the guide to set up two-factor authentication, the overview of what a cyberattack is, or the introduction to cybersecurity.

