# How are passwords cracked?

Source: https://passwordgeneratorlab.com/guides/how-are-passwords-cracked/

> How attackers really get passwords: phishing, credential stuffing, online guessing and offline cracking of stolen hashes, and what length and randomness change.

Updated 9 November 2026 · 7 min read

## Key takeaways

- Phishing and credential stuffing steal or reuse a password as it is, so strength doesn't help; unique passwords and phishing-resistant 2FA do.
- Online guessing is slow: NIST SP 800-63B-4 requires services to limit failed attempts on an account to no more than 100.
- Offline cracking of a stolen hash database tries leaked passwords, rules and masks first, so human-made patterns fall long before brute force would find them.
- Fast hashes like MD5 reach about 164 billion guesses per second on one RTX 4090; OWASP recommends slow, salted hashes such as Argon2id instead.
- At 10 billion guesses per second, 8 random characters fall in about 3½ days on average, while 16 or more random characters are out of reach whatever hash the site uses.

Last reviewed 9 November 2026

"Password cracking" sounds like one technique, but attackers actually get passwords in several very different ways. Some of them no password can resist, and some of them only a long, random password can. Knowing which is which tells you where length and randomness matter, and where you need something else.

## Four ways attackers get in

Broadly, a password is either stolen as it is, or guessed:

- **Phishing and malware** steal the password itself. A convincing fake login page or a keylogger captures whatever you type, whether it has 8 characters or 80.
- **Credential stuffing** takes username-and-password pairs leaked from one site and tries them on others. OWASP defines it as "testing username/password pairs obtained from the breach of another site." It only works when a password is reused, and strength is irrelevant.
- **Online guessing** types guesses into a real login form, either many guesses against one account or one popular password ("password spraying") against many accounts.
- **Offline cracking** happens after a service's password database is stolen. The attacker guesses against the stored hashes on their own hardware, with no rate limit and no lockout.

The first two are defeated by habits, not by strength: never reuse a password, and use a sign-in method that a fake site can't replay. The last two are where length and randomness matter.

## Online guessing: slow, if the site does its job

Every online guess is a real login attempt, so the website sets the pace. NIST SP 800-63B-4 requires services to limit consecutive failed attempts on an account to no more than 100, and OWASP recommends extra measures such as CAPTCHAs, IP-based throttling and multi-factor authentication for suspicious logins.

Under limits like that, an attacker gets only a few hundred guesses per account, so online guessing works against the most common passwords and very little else. That is why NIST also requires services to check new passwords against a blocklist of "commonly used, expected, or compromised" passwords: those are exactly the ones that get guessed. A poorly protected login without rate limiting is much faster to attack, but still slow compared with offline cracking.

## Offline cracking: where the real speed is

Services shouldn't store passwords at all, only a *hash*: the output of a one-way function. At login, the service hashes what you type and compares. A stolen database therefore doesn't contain passwords directly, but an attacker can hash candidate passwords and look for matches. Each candidate costs one hash calculation, so the guessing speed depends on the hardware and on how expensive the hash is.

Cracking tools such as hashcat don't try candidates in alphabetical order. They try the likeliest first:

- **Dictionary attacks** try lists of real passwords leaked in earlier breaches, plus words, names and phrases.
- **Rules (mangling)** transform each dictionary word the way people do: capitalize the first letter, swap `a` for `@`, append a year or an exclamation mark.
- **Mask attacks** search only the shapes people tend to use. Hashcat's documentation gives an example where a 9-character password would take over 4 years to brute-force at 100 million guesses per second, but about 40 minutes with a mask assuming a capital first letter and digits at the end.
- **Brute force** tries every combination of a character set. It is the attacker's last resort, and the only attack that works against a password with no pattern to exploit.

This is why a human-invented password can be far weaker than its length suggests: `Summer2024!` is found by a dictionary word plus a rule, long before brute force would reach it. A password from a [random password generator](https://passwordgeneratorlab.com/) has no pattern, so the attacker is left with brute force. To see how a particular password fares against pattern-aware guessing, try the [password strength checker](https://passwordgeneratorlab.com/password-strength-checker/), which runs entirely in your browser.

## Why the hash algorithm matters

General-purpose hashes like MD5, SHA-1 and SHA-256 were designed to be fast, and the OWASP Password Storage Cheat Sheet says plainly that fast hashes "are not suitable for password storage." For scale, a published hashcat 6.2.6 benchmark of a single NVIDIA GeForce RTX 4090 gaming GPU measured about:

- 164 billion MD5 hashes per second,
- 50.6 billion SHA-1 hashes per second,
- 288 billion NTLM hashes per second (the hash Windows uses for local and domain passwords),
- 184,000 bcrypt hashes per second at a deliberately low work factor of 5 (32 iterations).

Password hashing algorithms are slow on purpose, and their work factor is adjustable. OWASP recommends Argon2id (at least 19 MiB of memory, 2 iterations), then scrypt, then bcrypt with a work factor of 10 or more for legacy systems, or PBKDF2-HMAC-SHA256 with at least 600,000 iterations where FIPS-140 compliance is required. Each step of bcrypt's work factor doubles the cost, so at OWASP's minimum of 10 the same GPU would manage roughly 5,700 guesses per second instead of 184,000 (an estimate scaled from the benchmark, not a separate measurement). That is tens of millions of times slower than MD5.

Each stored password should also have its own random **salt**. Salts don't slow down a single guess, but they stop precomputed "rainbow tables" and force the attacker to attack each account separately rather than all at once.

You can't see or choose how a website stores your password. That is the strongest argument for making it random and long enough to survive the worst case: a fast, poorly chosen hash.

## What it means in numbers

For a randomly generated password, the attacker's best option is brute force, and the average time to find it is half the number of possibilities divided by the guessing rate. The table uses the same round illustrative rates as our [entropy calculator](https://passwordgeneratorlab.com/password-entropy-calculator/):

- **Online, rate-limited:** 100 guesses per hour.
- **Offline, slow hash:** 10,000 guesses per second — about one GPU against bcrypt at OWASP's minimum work factor.
- **Offline, fast hash:** 10 billion guesses per second. A single RTX 4090 is already faster than this against MD5 or NTLM, so treat it as conservative.
- **Large cluster, fast hash:** 1 trillion guesses per second — roughly six RTX 4090s against MD5.

| Random secret | Entropy | Online, rate-limited | Offline, slow hash | Offline, fast hash | Large cluster |
| --- | --- | --- | --- | --- | --- |
| 8 characters (94-character set) | ≈ 52 bits | ≈ 3.5 billion years | about 9,700 years | about 3½ days | about 51 minutes |
| 6 random EFF words | ≈ 77.5 bits | ≈ 10^(17) years | ≈ 350 billion years | about 350,000 years | about 3,500 years |
| 16 characters (94-character set) | ≈ 105 bits | ≈ 10^(25) years | ≈ 10^(19) years | ≈ 10^(13) years | ≈ 10^(11) years |

Read across a row to see how much the attack scenario matters for one secret. For every length from 8 to 20 characters side by side, see the table in the [password length guide](https://passwordgeneratorlab.com/guides/password-length/).

Three things stand out. Online, even 8 random characters are out of reach, which is why breaches of weak hashes, not login forms, are the real threat to random passwords. Offline, an 8-character password is only safe if the site used a slow hash, which you can't check. And from 16 random characters upward, the hash choice stops mattering: no realistic hardware gets close. Our generator defaults to 20 characters for that margin.

These figures apply only to passwords chosen uniformly at random. A human-chosen password of the same length is usually found by dictionary, rules or masks long before brute force would get there.

## What actually protects you

- **Use a different password everywhere.** This alone defeats credential stuffing, and limits a cracked password to the one site that leaked it.
- **Make it random and long.** Use a generator, not your imagination: 16–20 random characters for accounts in a password manager, or at least 6 random words for one you must remember (7 for a password manager master password).
- **Keep them in a password manager**, so unique random passwords are practical. See [do you need a password manager?](https://passwordgeneratorlab.com/guides/do-you-need-a-password-manager/)
- **Turn on two-factor authentication**, ideally a passkey or security key. OWASP calls MFA the best defense against most password attacks, and phishing-resistant methods stop fake login pages from replaying what you enter. See the [two-factor authentication guide](https://passwordgeneratorlab.com/guides/two-factor-authentication/).
- **Change a password when a service reports a breach**, especially if you ever reused it.

If you run a service, the OWASP Password Storage Cheat Sheet is the practical reference: Argon2id or another slow, salted password hash, rate limiting, a breached-password blocklist, and support for long passwords.

[Generate a strong password](https://passwordgeneratorlab.com/) · [Try the entropy calculator](https://passwordgeneratorlab.com/password-entropy-calculator/)

*Correction, 9 November 2026: an earlier version of this page overstated the “offline, slow hash” times by a factor of 1,000. The table above has been corrected.*

## Sources

- [OWASP Password Storage Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html)
- [OWASP Credential Stuffing Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Credential_Stuffing_Prevention_Cheat_Sheet.html)
- [NIST SP 800-63B-4, Digital Identity Guidelines: Authentication and Authenticator Management (2025)](https://pages.nist.gov/800-63-4/sp800-63b.html)
- [hashcat wiki: Mask attack](https://hashcat.net/wiki/doku.php?id=mask_attack)
- [Chick3nman: hashcat v6.2.6 benchmark, NVIDIA GeForce RTX 4090 (stock clocks, CUDA 11.8)](https://gist.github.com/Chick3nman/32e662a5bb63bc4f51b847bb422222fd)
- [CISA: Implementing Phishing-Resistant MFA (fact sheet)](https://www.cisa.gov/sites/default/files/publications/fact-sheet-implementing-phishing-resistant-mfa-508c.pdf)
- [EFF Dice-Generated Passphrases](https://www.eff.org/dice)

## Keep reading

- [Are online password generators safe?](https://passwordgeneratorlab.com/guides/are-online-password-generators-safe/) — When an online password generator is safe to use, the red flags that mean it isn't, and three ways to check for yourself in under a minute.
- [Has my password been leaked? How to check safely](https://passwordgeneratorlab.com/guides/has-my-password-been-leaked/) — How to check if your email or password appeared in a data breach without exposing it, what a “not found” result really means, and what to do if it leaked.
- [WPA2 vs WPA3: which Wi-Fi security to choose](https://passwordgeneratorlab.com/guides/wpa2-vs-wpa3/) — WPA2-Personal vs WPA3-Personal explained: offline guessing, SAE, forward secrecy, mixed mode's downgrade risk, and the router settings to pick.
- [Diceware: make a passphrase with real dice](https://passwordgeneratorlab.com/guides/diceware-passphrase/) — How to roll a Diceware passphrase with five dice and the EFF wordlist, how many words you need, how to avoid bias, and when a generator does the same job.
