Online vs offline attacks
🌐 Online guessing
Trying passwords against the live sign-in page. Slow and noisy: rate limits, lockouts, CAPTCHAs and alerts all get in the way. Attackers make few guesses per account, so they use the most likely passwords.
💾 Offline cracking
Guessing against a stolen hash database on the attacker's own hardware. No lockouts and no logs, so the only limit is how fast the hash is (Chapter 03). Fast, unsalted hashes allow billions of guesses per second.
How cracking tools guess
Tools like Hashcat and John the Ripper don't start by trying every combination. They work through increasingly broad strategies:
- Wordlists: leaked passwords (RockYou and its successors), dictionaries, names, sports teams.
- Rules (hybrid attacks): apply the changes people make: capitalise the first letter, add
1,123,!or a year, swapa→@,o→0,s→$. - Combinator: join two words together.
- Masks: patterns such as "capital letter, 6 lower case, 2 digits".
- Brute force: every combination, only practical for short passwords.
Eight accounts leaked from a site that stored unsalted SHA-256 hashes. Run each attack stage and watch which ones fall. The hashing happens here, in your browser.
Credential stuffing and password spraying
These two online attacks cause most real account takeovers, and they look quite different:
| Attack | How it works | What stops it |
|---|---|---|
| Credential stuffing | Username and password pairs leaked from one site are tried on many others, automatically and at scale. | Unique passwords for every site (a password manager), MFA, breached-password checks, bot detection. |
| Password spraying | One or two common passwords (Winter2026!) tried against every account in an organisation, slowly, to stay under lockout limits. | Banning common passwords, MFA, smart lockout and alerting on many accounts failing from one source. |
| Brute force (online) | Many guesses against one account. | Rate limiting and lockout. Rare today because it's so easy to detect. |
Why guess when you can steal?
🎣 Phishing
A fake sign-in page collects the password. Modern kits relay it to the real site in real time to capture MFA codes too (Chapter 05). See the toolkit's phishing scenarios for practice.
🦠 Infostealer malware
Malware, often hidden in cracked software or fake downloads, copies saved browser passwords and session cookies and sells them in bulk. A stolen session cookie can skip both the password and MFA.
⌨️ Keyloggers
Record everything typed. Passkeys and password-manager autofill don't involve typing the password.
📞 Helpdesk social engineering
The attacker calls IT pretending to be a locked-out employee and asks for a reset. Strong identity checks for resets are essential.
👀 Shoulder surfing
Watching someone type, or reading a password on a sticky note.
🏭 Default passwords
Routers, cameras and IoT devices shipped with admin/admin. UK law (the PSTI Act, in force since April 2024) now bans universal default passwords on consumer connectable products.