Cyber Trainer Passwords & Auth
Passwords & Auth · Chapter 04

Password attacks

Attackers rarely "hack" a password in the film sense. They guess it, buy it, trick you into typing it, or steal it from your browser. See how each one works and what stops it.

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:

  1. Wordlists: leaked passwords (RockYou and its successors), dictionaries, names, sports teams.
  2. Rules (hybrid attacks): apply the changes people make: capitalise the first letter, add 1, 123, ! or a year, swap a→@, o→0, s→$.
  3. Combinator: join two words together.
  4. Masks: patterns such as "capital letter, 6 lower case, 2 digits".
  5. Brute force: every combination, only practical for short passwords.
Crack a leaked database

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.

Pick an attack stage.
What survivesGenuinely random passwords, whether random characters from a password manager or several random words from a large list, aren't in any wordlist and are too long to brute force. Clever-looking substitutions and years don't help, because they're the first rules every tool applies.

Credential stuffing and password spraying

These two online attacks cause most real account takeovers, and they look quite different:

Who gets tried with what?
AttackHow it worksWhat stops it
Credential stuffingUsername 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 sprayingOne 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.

Knowledge check