Forget the film version: a genius in a dark room, typing furiously until a password appears. In most cases, nobody "cracks" your password at all — you hand it over without realising, reuse it somewhere it leaks, or a computer guesses it millions of times faster than any human could.

1. Brute force: guessing at machine speed

A brute-force attack is software trying password after password until one works. No clever trick, no secret backdoor — just relentless trial and error, automated.

It starts with obvious guesses — "password", "123456" — then works through every possible mix of characters. Tools such as Hashcat can test billions of guesses per second offline against a stolen database.

This is why password length matters more than almost anything else. A six-character lowercase-only password has about 308 million possible combinations, according to IBM — a fast computer chews through that quickly. Add a few characters and the combinations explode.

Variations include dictionary attacks (real words and leaked passwords), hybrid attacks ("sunshine2024!"), and password spraying (one common password tried against thousands of accounts).

How to stop it: use a long password — 14 characters or more — and never use a single dictionary word, name or date. Two-factor authentication also helps enormously, because a guessed password alone is then not enough.

2. Phishing: you hand the password over yourself

Phishing is the most human of all password attacks. Instead of breaking into your account, the attacker tricks you into giving them the keys.

It starts with an urgent-looking email or text — "Your account will be locked", "Unusual sign-in detected" — linking to a login page identical to the real one. You type in your details, the fake page sends them to the attacker, and you may even be redirected to the real site, so nothing feels wrong.

Ready-made phishing kits are now sold as a service, so even unskilled attackers can launch a convincing campaign in minutes — some kits cost as little as about $120 for ten days, according to SOCRadar.

The newest kits are nastier: adversary-in-the-middle kits sit between you and the real service, recording your password, your one-time code and the session cookie created after you pass the check — which can then be replayed to enter your account, even with two-factor authentication on.

How to stop it: never log in by clicking a link in an email or text. Type the address yourself, or use a saved bookmark — and be suspicious of any message that creates urgency.

For the habits that stop most attacks, see our cybersecurity basics.

3. Data breaches and credential stuffing: stolen once, tried everywhere

You can do everything right and still lose a password, because the company holding it gets breached. In a data breach, attackers copy a company's user database, then sell or share those lists online — feeding the next attack.

That next attack is credential stuffing: stolen pairs are automatically tried on other sites — your email, your bank, your shopping accounts. It works because people reuse passwords: one survey cited by Wikipedia found 81% of users reuse a password across two or more sites. A password stolen from a forgotten forum can quietly open your email.

Bots fire off thousands of attempts per minute, so even a tiny success rate means thousands of hijacked accounts. In October 2023, 23andMe disclosed attackers had accessed accounts this way, using passwords reused from earlier breaches. Verizon's 2025 Data Breach Investigations Report found compromised credentials were the way in for 22% of breaches.

How to stop it: never reuse a password. Every account needs its own unique one — which is exactly what a password manager is for. You can also check your email on the free service Have I Been Pwned (haveibeenpwned.com), which listed about 17.8 billion breached accounts as of October 2026.

4. Keyloggers and infostealer malware: spying on your keyboard

A keylogger is software — sometimes a small physical device — that records every key you press and sends the log to an attacker, usually arriving hidden in a dodgy download or malicious attachment.

Their more ambitious cousin, infostealer malware, sweeps your whole device in one pass — saved logins, autofill data, clipboard contents and session cookies. Stolen cookies can let an attacker resume your session without ever knowing your password. In June 2025, researchers revealed a cache of 16 billion records gathered by infostealers — a cumulative compilation of old stolen data, not a single new breach.

How to stop it: keep your system and browser updated, avoid untrusted downloads, and run reputable antivirus software. A password manager also helps, because it fills in your password automatically — so there is nothing for a keylogger to record.

5. The attack methods compared

Method How it works What it needs from you How to stop it
Brute force Software guesses passwords at speed A short, predictable password Long, random, unique passwords
Phishing A fake login page tricks you into typing it One click on a bad link Never log in via email links
Credential stuffing Leaked passwords tried on other sites Reusing the same password A unique password per account
Data breach A company is hacked; its database is copied Nothing — it happens to the company Change breached passwords fast
Keylogger / infostealer Malware records keystrokes or saved logins Installing infected software Updates, antivirus, autofill

How to actually protect yourself

  1. Use a unique password for every account. Start with email, banking, and anywhere your card is saved.
  2. Make passwords long, not clever. A passphrase of four random words beats a short, symbol-filled one. Aim for 14+ characters.
  3. Turn on two-factor authentication (2FA) everywhere it matters. A leaked password alone is then useless.
  4. Never log in from a link in an email or text. Go to the site yourself, or use the app.
  5. Check if you've been breached. Search your email on Have I Been Pwned every few months, and change any exposed password.
  6. Keep devices updated and be picky about downloads. Most keyloggers arrive that way.

If you suspect an account is compromised — a login alert you don't recognise, a password that suddenly doesn't work — change the password from a device you trust, turn on 2FA, and check the account's recent activity.

Takeaway checklist

  • Every important account has its own unique, long password
  • Two-factor authentication is on for email and banking
  • A password manager stores your logins, so you never reuse one
  • You never log in by clicking links in emails or texts
  • Your email has been checked on Have I Been Pwned
  • Your devices and browser are up to date

Passwords rarely get hacked by a mastermind guessing your secret. They fall to short passwords, reused passwords, fake login pages, leaked databases and hidden malware — each with a straightforward defence. Fix the habits, and most attackers will move on to an easier target.

Hamza

Founder & Editor, TechToday

Hamza is the founder and editor of TechToday. Hamza writes about artificial intelligence, computing, security and the technology shaping everyday life, with a focus on explaining complex ideas in plain, honest language — clear answers for curious readers, without the hype.