The movie version of hacking — a hooded figure furiously typing to guess your password character by character — almost never happens. Real password theft is industrial, automated, and built around a handful of repeatable techniques. The encouraging part is that once you understand how each one works, the defense becomes obvious. This guide walks through the methods attackers actually use, ranked roughly by how many accounts they compromise, and the concrete countermeasure for each.

1. Phishing: tricking you into handing it over

The most successful attacks do not break your password at all — they convince you to type it into a fake login page. A message that looks like it is from your bank, your employer, or a delivery service creates urgency (your account is locked, a payment failed) and links to a page that is a pixel-perfect copy of the real one. Whatever you type is captured and replayed against the genuine site.

Modern phishing kits can even relay your two-factor code in real time, so a one-time SMS code alone does not always save you.

Defense: let a password manager autofill your credentials — it refuses to fill on the wrong domain, which is an instant phishing alarm. Better still, use phishing-resistant logins like passkeys or a hardware security key, which are cryptographically bound to the real site and cannot be relayed to a fake one.

2. Data breaches and credential stuffing

When a company is breached, attackers walk away with millions of email-and-password pairs. They then feed those pairs into automated tools that try the same combination against hundreds of other services. This is credential stuffing, and it works for one reason only: people reuse passwords. A breach of a site you barely remember becomes a key to accounts that matter.

Tools like OpenBullet automate this with proxy rotation and captcha solving, testing stolen credentials against thousands of targets per minute.

Defense: a unique password per account contains the blast radius — one breach exposes exactly one account and no more. Check whether your credentials are already circulating with our guide to checking if your password was leaked in a data breach.

3. Offline cracking: brute force and dictionaries

When attackers steal a database, the passwords are usually stored as hashes rather than plaintext. So they crack them offline, on their own hardware, with no rate limit to slow them down. A consumer GPU can compute hundreds of billions of hash guesses per second. They start with leaked wordlists like rockyou.txt (14 million real passwords), apply transformation rules, and only then fall back to pure brute force.

This is why short or pattern-based passwords fall instantly while long random ones survive. The math is laid out in how long it takes to crack a password, and the underlying concept is explained in what password entropy actually measures.

Defense: maximize entropy with length and randomness. A 16-character random password or a six-word passphrase pushes offline cracking beyond the lifetime of the universe at current hardware speeds.

4. Malware and keyloggers

If an attacker can run code on your device, no password is safe — a keylogger records every keystroke, and infostealer malware scrapes saved credentials, session cookies, and password-manager data directly from your machine. Infostealers are now one of the largest sources of fresh stolen credentials.

Defense: keep your operating system and browser patched, install software only from trusted sources, and be ruthless about suspicious attachments and downloads. Two-factor authentication and hardware keys add a layer even if a password is captured, and session-cookie theft is blunted by signing out of sensitive accounts on shared or untrusted devices.

5. Network interception and fake Wi-Fi

On an open or attacker-controlled network, traffic can be intercepted or redirected. While HTTPS encrypts almost all modern logins, attackers set up rogue hotspots and downgrade or spoof pages to capture credentials from the unwary.

Defense: confirm sites use HTTPS, be cautious on public Wi-Fi, and use a reputable VPN on untrusted networks. As with phishing, autofill and passkeys help because they will not engage with an impostor domain.

6. Social engineering and SIM swapping

Sometimes the target is not you but the people around your account. An attacker calls your mobile carrier, impersonates you, and convinces them to move your number to a SIM they control — a SIM swap. Every SMS code now goes to the attacker. Similar tactics target customer-support agents to trigger account resets.

Defense: move away from SMS-based two-factor where you can. An authenticator app or hardware key is not tied to your phone number and cannot be SIM-swapped. Add a port-out PIN with your carrier for extra protection.

7. Shoulder surfing and physical access

Low-tech but real: someone watching you type, a password on a sticky note, or an unlocked device left unattended. Physical access defeats most digital protections.

Defense: lock your devices, never write passwords where they can be seen, and store everything in an encrypted manager rather than on paper or in a notes app — a habit covered in our roundup of common password mistakes.

The threat-to-defense map

AttackPrimary defense
PhishingPassword-manager autofill, passkeys, hardware keys
Credential stuffingUnique password per account
Offline crackingLength and randomness (high entropy)
Malware / keyloggersPatching, safe downloads, 2FA, hardware keys
Network interceptionHTTPS, caution on public Wi-Fi, VPN
SIM swapApp-based 2FA, carrier port-out PIN
Physical / shoulder surfingDevice locks, encrypted manager

The pattern behind every defense

Notice how few habits cover the whole list. Three changes neutralize the overwhelming majority of real-world attacks:

  • Unique, high-entropy passwords stored in a manager defeat credential stuffing and offline cracking.
  • Two-factor authentication, ideally an app or hardware key, defeats most phishing, malware, and SIM-swap outcomes.
  • Phishing-resistant logins like passkeys close the gap that even a strong password leaves open.

Start by generating a strong, unique password or passphrase for your most important accounts with our free password generator, store each one in a password manager, and switch on two-factor authentication. Those three steps move you out of reach of the techniques that compromise nearly everyone else.