MFA methods compared
| Method | How it works | Weak spots | Phishing-resistant? |
|---|---|---|---|
| SMS or voice code | A one-time code is texted or read out to your phone number. | SIM swapping, number porting, interception, and you can be tricked into reading it out. | no |
| Email code or link | A code or magic link sent to your inbox. | Only as strong as your email account. | no |
| Authenticator app (TOTP) | An app calculates a new 6-digit code every 30 seconds from a shared secret. | Codes can be phished and relayed in real time. | no |
| Push notification | Approve a prompt in an app (Microsoft Authenticator, Duo, Okta Verify). | "MFA fatigue": spamming prompts until someone taps Approve. Number matching reduces this. | partly |
| Security key / passkey (FIDO2) | The device signs a challenge that's tied to the real website's address. | Losing the key (keep a backup); account recovery processes. | yes |
| Smart card / certificate | A certificate on a card or device proves identity (PIV, CAC). | Cost and management overhead. | yes |
How authenticator app codes work
When you scan the QR code to set up an authenticator app, you're saving a shared secret key. The app and the website then each compute the same code independently, with no network connection, using TOTP (Time-based One-Time Password, RFC 6238):
- Take the current time and count how many 30-second steps have passed since 1 January 1970.
- Compute HMAC-SHA1(secret, step count): a keyed hash (Chapter 05 of the crypto primer).
- "Dynamically truncate" the 20-byte result down to a 6-digit number.
Try it: in Google or Microsoft Authenticator, choose to add an account by entering a setup key, paste the secret above, and the app shows the same code as this page. Delete the entry afterwards.
Adversary-in-the-middle phishing
Modern phishing kits (Evilginx, Tycoon 2FA and others) don't just copy a login page. They sit between you and the real site as a reverse proxy, so you see the genuine pages and complete real MFA, while the attacker captures the result.
micros0ft-365.com. More in Chapter 06.Other ways attackers get around MFA
📲 MFA fatigue (push bombing)
The attacker has the password and triggers dozens of push prompts, often late at night, until the user taps Approve. Used in the 2022 Uber breach. Fix: number matching (type the number shown on screen), limits on prompts, and reporting unexpected prompts.
🔁 SIM swapping
The attacker convinces your mobile network to move your number to their SIM, then receives your SMS codes. Fix: avoid SMS for important accounts and add a PIN or port-out protection with your network.
🍪 Session cookie theft
After you sign in, the site gives your browser a session cookie. Infostealer malware or an AiTM proxy that steals it skips MFA entirely. Fix: device-bound sessions, short session lifetimes, and checking device health.
☎️ Helpdesk resets
"I've lost my phone, please reset my MFA." Attackers impersonating staff caused the 2023 MGM Resorts breach. Fix: strong identity verification before any reset.
🗣️ "Read me the code"
A caller pretending to be your bank asks for "the code we just sent to verify you". Fix: never share a one-time code. Genuine organisations won't ask for it.
🚪 Legacy protocols
Old email protocols (IMAP, POP, basic auth) may not support MFA at all, leaving a side door open. Fix: disable legacy authentication.