Brute-force attack
Also known as: brute forcing, exhaustive key search, password guessing attack
Brute-force attack
A brute-force attack is a hacking method that tries huge numbers of possible passwords or keys, one after another, until one works, relying on computing power rather than any flaw in the system.
How Does a Brute-Force Attack Work?
There are two main settings:
- Online attacks guess against a live login page. Rate limits, lockouts and CAPTCHAs slow these down a lot.
- Offline attacks happen after a breach, when attackers have a copy of password hashes. They can guess billions of times per second on their own hardware with no lockouts.
Attackers rarely try every combination in order. Common variations include:
- Dictionary attacks, which try common passwords and words first.
- Hybrid attacks, which add numbers, symbols and letter swaps to dictionary words, such as "Summer2024" or "P@ssw0rd".
- Reverse brute force, which tries one common password against many usernames.
How fast this works depends on the number of possible combinations. Eight lowercase letters give about 209 billion options. Each extra character multiplies that by 26 or more, which is why length matters so much. See Wikipedia for a more technical overview.
The same approach is used against other secrets, not just passwords. Attackers try short PINs, guess one-time codes on sites that do not limit attempts, and test encryption keys. Modern encryption keys, such as 128-bit or 256-bit keys, have so many possible values that trying them all is not practical with any known computer. That is why attackers target the human-chosen password protecting a key instead of the key itself.
Example
A forum is breached and its password hashes are posted online. An attacker runs cracking software against them. Passwords such as "letmein" and "Password1" are found within minutes because they are in every common-password list. A 20-character random password made by a password generator is still uncracked when the attacker gives up.
Brute-Force Attack vs Credential Stuffing
| Brute-force attack | Credential stuffing | |
|---|---|---|
| What is tried | Guessed passwords | Real username and password pairs from earlier leaks |
| Number of attempts per account | Many | Usually one |
| Best defense | Long, random passwords | Unique password for every site |
Credential stuffing does not guess. It reuses passwords that have already leaked.
Why Does It Matter for Your Privacy?
- Short passwords are guessable. Anything short, common or based on personal details can fall quickly offline. Test yours with a password strength checker.
- Length is the best defense. A long random password or a passphrase of several random words puts the search out of reach.
- A second factor limits damage. With two-factor authentication, a correctly guessed password is still not enough to sign in.
- Services share responsibility. Sites should hash passwords with slow algorithms such as bcrypt or Argon2 and limit login attempts.
Related terms
Frequently asked questions
How long does it take to brute-force a password?
It depends on the password's length and randomness, the hashing method the site used and the attacker's hardware. Short or common passwords can fall in seconds. Long random passwords and passphrases can take longer than is practical.
Does two-factor authentication stop brute-force attacks?
It stops a guessed password from being enough to log in. It does not stop attackers from cracking a leaked password hash offline, which is why unique passwords still matter.
What is a dictionary attack?
A dictionary attack is a type of brute-force attack that tries words, common passwords and leaked passwords first, instead of every possible combination. It is faster against human-chosen passwords.
Update history
- : First published