In films, a hacker “cracks” a password in a minute while characters scroll across the screen. In reality, most passwords aren’t cracked at all — they are guessed, stolen or phished. Once you understand how attackers work, it’s easy to see which defences really matter.
Online and offline
An online attack means trying to sign in on the real site. The service limits attempts, shows CAPTCHAs and locks accounts, so only a few thousand of the most common passwords can be tried this way.
An offline attack becomes possible when a database of hashes is stolen. The attacker tests candidates on their own GPUs with no limits: billions per second for fast hashes such as MD5 or NTLM. That is why it matters how a site stores passwords, and why passwords need to be long.
The main guessing techniques
- Dictionaries. Lists of hundreds of millions of real passwords from past breaches, plus words, names, sports teams and cities.
- Rules. Typical tweaks applied to dictionary words: a capital first letter, digits and “!” at the end, “a → @”, “o → 0”, a year on the end. “Pa$$w0rd2024!” is just “password” with a few rules.
- Masks. Guessing by pattern, such as “capital, five lowercase, two digits”. Human-made passwords fall into a small number of such patterns.
- Brute force. Every combination in turn. It only works for short passwords: 8 characters can be exhausted; 16 random ones cannot.
Attacks that need no guessing
- Credential stuffing. Username–password pairs from one breach are automatically tried on hundreds of other sites. It works whenever a password was reused.
- Password spraying. One popular password such as “Qwerty123!” is tried against thousands of accounts to avoid lockouts.
- Phishing. A fake sign-in page, a “verify your account” email, a call “from the security team”.
- Infostealers. Malware that steals passwords saved in the browser and session cookies, often bundled with cracked software and games.
- Shoulder surfing and social engineering. A sticky note on the monitor, a password sent in chat, a “security question” answered on social media.
What defends against each
| Attack | Defence |
|---|---|
| Dictionaries and rules | A random password from a generator, not an invented one |
| Brute force | Length: 16+ characters or 6 random words |
| Credential stuffing | A unique password per site and a password manager |
| Phishing | A password manager (won’t fill on a fake site), passkeys, hardware keys |
| Infostealers | Updates, software from official sources only, a second factor |
| Any password leak | Two-factor authentication |
Test yourself
See how an attacker would rate your password with the password checker: it looks for dictionary words, dates and patterns and shows the time to crack for different scenarios. If the password is weak, create a new one — for example a 16-character password — and read what to do if a password has already leaked.