1Why passwords alone are not enough
A password is something you know. If it leaks in a breach, is reused elsewhere or is typed into a fake login page, the attacker has everything (see password security). Two-factor authentication (2FA) adds a second check — something you have (a phone, a security key) or something you are (a fingerprint, your face). A stolen password on its own is then no longer enough to log in. Multi-factor authentication (MFA) generalises this to two or more factors.
Not all second factors are equal, though. Modern phishing kits can relay one-time codes in real time, so the goal today is not just "any 2FA" but phishing-resistant 2FA wherever possible: passkeys and security keys.
99.9%
Of account-compromise attacks blocked by MFA, according to Microsoft (2019)
< 1 min
To enable 2FA on most major services
3
Factor categories: know, have, are
2The main types of 2FA, ranked
Hardware security key (FIDO2 / WebAuthn) Best
YubiKey, Google Titan Key and similar. The secret is device-bound: it never leaves the physical key and cannot be copied. Phishing-resistant by design, because the key checks the real website address before answering. Ideal for email, banking and admin accounts — register two keys so you have a spare.
Passkeys Best
Now supported by Google, Apple, Microsoft and many large sites. A passkey uses the same FIDO2 technology, unlocked with your fingerprint, face or phone PIN, and replaces the password entirely. Most passkeys are synced through your account (iCloud Keychain, Google Password Manager, or a password manager), so losing one phone does not lock you out. Just as phishing-resistant as a security key; the trade-off is that your cloud account becomes the thing to protect.
TOTP authenticator app Good
Google or Microsoft Authenticator, Aegis, 2FAS… Generates a 6-digit code every 30 seconds, works offline and is much safer than SMS. Weakness: you can still be tricked into typing the code on a fake site.
Push notification OK
Convenient, but exposed to MFA fatigue ("push bombing"): the attacker, who already has your password, triggers dozens of prompts until you tap Approve to make them stop. Number matching — typing the number shown on the login screen into the app — largely defeats this; prefer apps that use it.
SMS or voice codes Weak
Vulnerable to SIM swapping (a criminal convinces your carrier to move your number to their SIM card) and to phishing. Still much better than no 2FA, but switch to an app, passkey or key on high-value accounts, and ask your carrier about a SIM/port-out lock.
Adversary-in-the-middle (AiTM): why codes and pushes are not enough
Phishing kits sold "as a service" now sit invisibly between you and the real site. You click a phishing link, see the genuine Microsoft or Google login page relayed through the attacker's server, type your password and your code (or approve the push) — and the kit steals the resulting session cookie. The attacker is then logged in as you, 2FA already satisfied. Passkeys and security keys resist this: they are cryptographically tied to the real domain, so on a look-alike domain they simply do not respond.
Explore the mlab.sh ecosystem
mlab.sh offers production-grade scanning and cheatsheets you can use daily — see the full toolbox.
Open mlab.sh tools3Common mistakes and red flags
Approving a push or entering a code you did not request
If your phone asks you to approve a login you did not start, deny it — someone has your password. Change it right away and check your account's recent activity.
Reading a code out to someone on the phone
No bank, support desk or IT team will ever ask for your 2FA code or ask you to approve a prompt. A caller doing so is running a social-engineering scam, often right after a burst of push prompts.
Losing backup codes
When you enable 2FA, most services give you one-time recovery codes. Print them or store them somewhere separate from your phone. A lost phone with no backup codes and no second key can mean permanent account loss.
Storing 2FA codes in the same password manager as the password
If the vault is compromised, both factors go with it. A reasonable trade-off for low-value accounts, not for your main email or bank.
Leaving SMS as a fallback
An account is only as strong as its weakest login option. Once a passkey or security key is set up, remove SMS recovery where the service allows it.
2FA & MFA FAQ
Is 2FA and MFA the same thing?
2FA is a special case of MFA with exactly two factors. MFA can mean two, three or more.
Can 2FA be bypassed?
Yes: SMS codes via SIM swap, codes and pushes via adversary-in-the-middle phishing kits that steal your session, and pushes via MFA-fatigue spam. Passkeys and hardware security keys resist all three because they only work on the genuine website.
What are passkeys, and how do they differ from a security key?
Both use FIDO2 and are phishing-resistant. A passkey replaces your password and is usually synced across your devices by Apple, Google or your password manager. A hardware security key keeps a device-bound credential that never leaves the key — the strongest option, but you need a spare.
What if I lose my phone?
Use a backup code, a second security key or a synced passkey on another device to log in, then remove the lost phone from your accounts. That is why you should set up a backup method before you need it.
Related Modules
Password security best practices
Strong passwords, password managers, passphrases: how to build a password strategy that actually works.
What is social engineering?
Social engineering attacks: how scammers hack humans instead of systems, and what to watch for.
Recognizing a phishing link
Techniques for detecting fraudulent URLs that mimic legitimate websites.
Source: mlab Academy — Cybersecurity Awareness Platform
URL: https://academy.mlab.sh//page/two-factor-auth
Module: What is 2FA / MFA? — Digital Hygiene
Disclaimer: This content is for awareness purposes only.