Free online courseInteractive · No sign-up · Works offline once loaded
Account security: passkeys, 2FA & password managers
How accounts really get taken over, and how to lock yours so a leaked password, a fake login page or a stolen phone number gets nobody in. With real crypto running in your browser.
The course as text
Everything from the lessons in 8 short chapters, to read or to look something up later.
How accounts get taken over
Almost every account takeover starts in one of four ways. Reused passwords: attackers take email and password pairs from old leaks and try them on other sites, automatically. This is called credential stuffing. At 23andMe in 2023, about 14,000 accounts were opened this way, and through a family-matching feature the data of about 6.9 million people leaked. Phishing: a fake login page or a caller collects your password and codes. Stolen sessions: malware copies the cookie that keeps you signed in, so the attacker needs neither password nor second factor. Recovery tricks: attackers take over your phone number (SIM swap) or talk a support agent into resetting your account.
None of this needs a genius. It is automated and cheap. The defences are simple too: a different password for every site (chapter 2), a second factor (chapter 3), a factor that can't be phished (chapters 4 and 5), and a recovery that only you can use (chapter 7).
Session theft is the newest front. Since spring 2026, Chrome 146 on Windows binds sessions to a key in the device (Device Bound Session Credentials) on websites that support it. A copied cookie then expires within minutes and can't be renewed elsewhere.
Password managers
A password manager creates and remembers a different random password for every site. You remember only one: the master password. Random means made by the computer, not by you: 20 characters from about 70 symbols give more than 120 bits of randomness, far beyond what any attacker can guess.
The vault leaves your device only encrypted. From the master password, the app derives a key, slowly on purpose: Bitwarden uses PBKDF2-HMAC-SHA256 with 600,000 rounds by default, or Argon2id; 1Password uses 650,000 rounds and mixes in a 128-bit Secret Key that never leaves your devices. The provider stores only the encrypted vault. It can't read it and can't reset your master password. This is called zero-knowledge or end-to-end encryption.
A password manager is also a phishing filter: it fills in a login only on the exact address it was saved for. Lookalike domains with letters from other alphabets (shown as Punycode, xn--…) or the real name at the start of a foreign domain don't fool it.
What if the provider is hacked? In 2022 attackers stole encrypted vault backups from LastPass and could guess master passwords offline. Later, crypto thefts of about 35 million dollars were traced to cracked vaults, mostly of long-time customers with weak master passwords and older, lower round counts. The lesson: a long, random master password, and an app that uses current key stretching. To choose one, see our password manager comparison.
Second factors
Two-factor authentication (2FA) combines two different kinds of proof: something you know (password, PIN), something you have (phone, security key) and something you are (fingerprint, face). A password plus a security question is still one kind: both are knowledge.
SMS codes are much better than nothing: in a 2019 Google study, an SMS code to a recovery phone blocked 100% of automated bots and 96% of bulk phishing. But a phone number can be stolen: in a SIM swap, the attacker gets your number moved to his SIM. The FBI received 982 such complaints in 2024. NIST's guidelines (SP 800-63B-4, 2025) treat SMS and voice codes as a restricted, weaker option.
Authenticator apps compute a six-digit code from a shared secret and the time (TOTP, RFC 6238): every 30 seconds, an HMAC-SHA1 of the time step, cut down to six digits. Nothing travels over the phone network. Push prompts are convenient but invite MFA fatigue: in 2022 an attacker flooded an Uber contractor with prompts and then posed as IT support on WhatsApp until one was accepted. Microsoft has enforced number matching in Authenticator since 8 May 2023: you type the number shown on the login screen, so blind approvals no longer work.
Why codes can be phished
Modern phishing pages don't just collect passwords. They sit as a proxy between you and the real site (adversary-in-the-middle, AiTM): what you type is passed on in real time, what the real site answers is shown to you. You enter your password and your code, the real site logs you in, and the attacker keeps the session cookie. Microsoft described such a campaign that targeted more than 10,000 organisations from September 2021 and led to business email fraud. It is not a flaw in the codes: any factor that you can read and type can be relayed.
Phishing-resistant methods don't give you anything to type. A security key or a passkey signs a challenge together with the address the browser is really on. On a fake address, the passkey for the real site isn't even offered, and a signature made there would name the wrong origin. That's why CISA and NIST recommend phishing-resistant MFA, and why the 2019 Google study found that security keys stopped all of the targeted attacks it looked at.
Habits still matter: open important sites from a bookmark or the app, never read a code to a caller, and treat an empty autofill as a warning sign.
Passkeys
A passkey replaces the password with a key pair. When you create one, your device makes a private key that never leaves it (or your password manager) and gives the website only the public key. To sign in, the website sends a random challenge; your device asks for your fingerprint, face or PIN and signs the challenge together with the address the browser is really on. The website checks the signature with the public key. There is nothing to type, nothing to forget and nothing worth stealing on the server: a leaked list of public keys opens no account.
Passkeys are bound to the site they were made for (the relying party). On a lookalike address the browser doesn't offer them, and a signature from the wrong origin fails the check. That is what makes them phishing-resistant. The standard behind them is WebAuthn (W3C) with FIDO2.
Synced passkeys live in a password manager such as iCloud Keychain, Google Password Manager, 1Password or Bitwarden and come back on a new phone; NIST SP 800-63B-4 accepts them at assurance level 2. Device-bound passkeys on a security key can't be copied at all; they're the choice for the highest level (AAL3) and for admins. Since 2025 and 2026, passkeys can also move between password managers with the FIDO Credential Exchange standard (CXP), on iOS 26 and on Android with Google Password Manager since June 2026. By October 2026 the FIDO Alliance estimated 7 billion passkeys in use.
On someone else's computer you can sign in with the passkey on your phone: the computer shows a QR code, your phone scans it, Bluetooth checks that the phone is really nearby, and the phone signs. For accounts with only one device-bound key, register a second one as a spare.
“Sign in with Google, Apple & Co.”
“Sign in with Google” or “Sign in with Apple” uses OAuth and OpenID Connect: the app never sees your password. Your account provider asks you to agree, then hands the app a token with exactly the permissions you agreed to, the scopes. Name and email address are harmless; “read all your email” or “see all your files” are not. Some attackers build apps only to collect such permissions: consent phishing. Read the consent screen like a contract, and remove apps you no longer use in your account’s security settings.
Apple can hand the app a relay address instead of your real email (Hide My Email); Google and Microsoft share the address of your account. The upside of signing in this way: one strong account with a passkey protects many apps, and no app stores a password of yours. The downside: that one account becomes the key to everything. Secure it first, with a passkey and recovery options (chapter 7). How it works for developers and companies: OAuth, OpenID Connect & SAML.
Recovery and sessions
Every lock has a back door: “forgot password”. Attackers know that, which is why SIM swaps and fake support calls aim at recovery. Close the door for everyone but you: save the backup codes when you turn on 2FA, on paper or in your password manager, not as a photo or an email. Keep your recovery email and phone current. Apple lets you name up to five recovery contacts who can give you a code, without access to your account.
Look at where you are signed in now and then. Most services list your sessions with device and place, and offer “sign out everywhere”. If an account was taken over, the order matters: first a clean device (otherwise malware steals the new password too), then a new password, then sign out all sessions, then check 2FA methods, recovery details, forwarding rules and connected apps, which attackers like to add.
And think one step further. Apple's Legacy Contact and Google's Inactive Account Manager let you decide who gets access when you can't anymore; Google deletes personal accounts after two years without activity. Password managers offer emergency access for family. In Germany, the state EUDI wallet is due in early 2027: it proves who you are, for example to a bank, but doesn't replace your logins.
Your plan and final check
You don't need to fix everything today. Start where a takeover would hurt most: your main email account, because it resets all others. Then the account you sign in with everywhere (Apple, Google or Microsoft), then banking and payment, then the rest. For each: a passkey if offered, otherwise a unique password from your manager plus an authenticator app; backup codes saved; recovery details current. Once a year, look at your sessions and connected apps.
To try the building blocks from this course on your own: the Hashing & password security course shows how websites store passwords and how leaked hashes are cracked; the HMAC generator computes the function inside every authenticator code; and our comparison helps you pick a password manager.
Words you will meet
- 2FA / MFA
- Signing in with two (or more) different kinds of proof: knowledge, possession, being.
- AiTM phishing
- A fake site that relays everything to the real site in real time and keeps the session.
- Backup codes
- One-time codes that open your account if your second factor is lost.
- Consent screen
- The page where you allow an app to use your account, with a list of permissions (scopes).
- Credential stuffing
- Trying leaked email and password pairs on other sites, automatically.
- Device-bound passkey
- A passkey that can’t leave its security key or device.
- Infostealer
- Malware that copies saved passwords and session cookies from a computer.
- MFA fatigue
- Flooding someone with push prompts until they approve one.
- Number matching
- You type the number shown on the login screen into the app to approve.
- Passkey
- A key pair that replaces the password. The private key stays on your devices.
- Phishing-resistant
- A method that checks the real address itself, so nothing can be relayed.
- Session cookie
- A random value that tells a website you are already signed in.
- SIM swap
- Moving your phone number to the attacker’s SIM card.
- TOTP
- Time-based one-time password: an HMAC of the time and a shared secret.
- Zero knowledge
- The provider stores only encrypted data it can’t read.
Read the consent screen
With “Sign in with Google” or Apple, the app never sees your password. Your account asks you to agree, then gives the app a token with exactly these permissions, called scopes.
Name and email are harmless. “Read all your email” is not. Some apps exist only to collect such permissions: consent phishing.
Try itPrintPal prints photos you pick. Untick everything it doesn’t need.
PPrintPal wants to access your accountyou@mail.example