DML School of Technology
Menu

Open to everyone Reading, lesson 18 of 100, 2 min read

How passwords are attacked

Ways passwords are stolen or guessed

AttackHow it worksBest defence
PhishingYou type your password into a fake pageTwo-step sign-in; check the address; a password manager that refuses to fill on fake sites
Credential stuffingPasswords leaked from one site are tried on many othersA different password for every account
Password sprayingA few very common passwords are tried against many accounts, slowly, to avoid lockoutsBan common passwords; two-step sign-in
Brute forceEvery possible combination is triedLong passwords; rate limits and lockouts
Dictionary attackWords, names and common patterns are tried firstAvoid real words with simple changes (Password1!, Lagos2026)
Offline crackingStolen password hashes are guessed at huge speed on the attacker's own computersLong passphrases; services that store passwords with slow, salted hashes
Keyloggers and malwareWhat you type is recordedUpdated devices, antivirus, no pirated software
Shoulder surfing and notesSomeone watches or finds your passwordPrivacy screens, password managers

Why length beats complexity

Each extra character multiplies the number of possible passwords. A random 8-character password using letters, numbers and symbols has about 6 × 10^15 possibilities. A passphrase of five random common words has far more, and is easier to remember:

weak:     Adebayo@123
better:   mango-river-kettle-north-salt

Attackers know the tricks people use: capital letter first, number and ! at the end, @ for a. Those make a password feel complex without making it hard to guess.

Has my password leaked?

Data breaches are common. Reputable breach-notification services let you check whether your email address appears in known leaks. If it does, change the password for that account and any account that shared it.

Note

You will see in module 6 how services should store passwords so that a leak of their database does not reveal them.