Sub topic 4
Why SMS codes are a weak second factor
This chapter assumes you know what a password and two-factor authentication are, and that you have used a centralized exchange account. It explains how SMS one-time codes fail, which attacks hit them, and what to use instead. The following chapters cover the stronger options.
What an SMS code actually proves
An SMS code is a short number that the exchange sends to your phone number as a text message. You type it back to prove you are the account owner. The exchange is checking one thing: whether you can receive messages sent to a phone number.
That is weaker than it sounds. The code proves control of a phone number, not possession of a particular phone. A phone number is a record in a carrier's database that points to a SIM card, an eSIM profile, or a forwarding rule. Anyone who can change that record can receive your codes.
SMS is still better than a password alone. It stops attackers who only have a leaked password and cannot touch your number. The problem is that exchange accounts are targeted by people who can do more than that.
How SMS codes are attacked
SIM swapping
In a SIM swap, an attacker convinces your mobile carrier to move your phone number to a SIM card or eSIM that the attacker controls. The attacker may impersonate you with personal data from past breaches. They may also bribe or trick a carrier employee, or use a weak carrier process. Once the swap is done, your phone loses service and the attacker's device receives your calls and texts.
The usual sequence on an exchange account is:
- The attacker gathers your email address, phone number and personal details.
- The attacker triggers a password reset or login on the exchange.
- The attacker swaps your SIM and receives the SMS code.
- The attacker logs in, and may withdraw funds or change security settings.
An early warning sign is sudden loss of mobile signal with no explanation. Treat that as an emergency and contact your carrier from another device.
Number porting and carrier account takeover
Porting is a related attack. The attacker asks a different carrier to take over your number, or takes over your account at your current carrier and changes where the number points. The result is the same: texts go to the attacker. Carrier account takeover also lets them set up call or message forwarding without any SIM change.
Interception in the network
SMS was not designed to be confidential. Messages pass through carrier systems and signaling networks. The SS7 protocol, which carriers use to route calls and texts between networks, has known weaknesses that allow message redirection by parties with access to those networks. This attack is less common than SIM swapping and needs more resources. It still matters because you cannot detect or prevent it from your side.
Phishing and relay of the code
A code that you type into a web page can be stolen by a fake web page. The attacker sets up a site that looks like the exchange and sends your input to the real site at the same moment. You enter your password and then the SMS code, and the attacker uses both on the real site within the code's lifetime. This is called a real-time relay or adversary-in-the-middle attack. SMS gives no protection here, because the code is valid for whoever submits it first.
Malware and message exposure
Some malware reads incoming SMS messages. Codes also show up as previews on a lock screen, in notification mirrors on a laptop, and in synced message history across devices. Anyone who sees the screen or the synced copy sees the code.
Social engineering of the user
Attackers phone victims and claim to be exchange support or a bank fraud team. They say they are sending a verification code and ask the victim to read it out. The victim is reading a real code to the attacker. The message from the exchange often even says not to share the code, but a convincing caller can override that.
Comparing SMS with other factors
The table shows which attacks each method resists. "Partly" means it helps in some cases but can be bypassed.
| Attack | Password only | SMS code | Authenticator app (TOTP) | Passkey or security key |
|---|---|---|---|---|
| Credential stuffing with reused passwords | No | Yes | Yes | Yes |
| SIM swap or number port | No | No | Yes | Yes |
| SS7 or carrier interception | No | No | Yes | Yes |
| Real-time phishing relay | No | No | Partly | Yes |
| Malware reading texts | No | No | Yes | Yes |
| Caller talks you into reading out a code | No | No | Partly | Yes |
TOTP codes (time-based one-time passwords) come from an app on your device and do not travel over the phone network. That removes the SIM swap and interception problems. TOTP codes can still be typed into a phishing page, which is why passkeys are stronger. Passkeys are covered in later chapters.
Where SMS shows up on an exchange
SMS is often used in more places than the login screen. When you review your account, look for each of these:
- Login second factor. The most visible use.
- Withdrawal confirmation. Some exchanges send a code for each withdrawal. If SMS is the only factor there, a SIM swap is enough to empty the account.
- Password reset. If a reset needs only email and SMS, then control of your email and number is control of your account.
- Recovery and support. A phone number on file can be used by support staff, or by social engineers, as proof of identity.
- Alerts. Using SMS only for notifications is lower risk than using it for authentication, because a stolen alert text gives no access.
The weakest link sets your actual security. If you enable an authenticator app for login but leave SMS as an accepted fallback for resets, an attacker simply chooses the SMS path.
Reducing the risk if you must keep SMS
Some exchanges still require a phone number, or offer no better factor for certain actions. If you cannot remove SMS, make it harder to abuse:
- Ask your carrier to add a port-out PIN or number lock, and a account passcode that is not your birth date or a number guessable from public data.
- Do not use the same phone number for the exchange that you publish on social media, in data-broker listings, or on your business card. A number used only for security is harder to target.
- Consider a dedicated number from a provider that supports app-based login and strong account protection. Treat it as a security credential, not a general line.
- Hide message previews on your lock screen and turn off message syncing to other devices.
- Never read a code to anyone who calls you. Exchange staff will not ask for it.
- Use a unique email password and strong email protection, because email is the other half of most reset flows.
These steps lower the odds but do not close the underlying gap. The number is still a pointer that someone else controls.
Moving off SMS safely
Replace SMS in this order, so you never leave a gap:
- Enroll an authenticator app and confirm that a login with it works.
- Enroll a passkey or hardware security key if the exchange supports one.
- Store the backup material for each, as described in the recovery chapter.
- Only then remove SMS as a login factor, and check whether the exchange still allows it for withdrawals or reset.
- Test by signing out and signing in again with the new factors.
Removing SMS before the new factor works is a common cause of lockout. Complete the enrollment and test it first.
Common mistakes
- Assuming 2FA means safe. SMS 2FA stops casual password reuse attacks. It does not stop a targeted attack on a high-value account.
- Leaving SMS enabled as a fallback. An attacker uses the weakest method that still works.
- Using a number tied to public information. If your number appears in breaches or on public profiles, targeting is easy.
- Ignoring signal loss. A phone that suddenly shows "No service" may mean a SIM swap in progress.
- Disabling SMS before testing replacements. This can lock you out of the account.
Exercise
An exchange account uses a strong, unique password and an authenticator app for login, but the "forgot password" flow still accepts an SMS code plus email confirmation. Explain why this setup is still exposed to a SIM swap, and name two steps that would close the gap.
Show answer
The attacker does not need to pass the login screen. They start a password reset, take the SMS code by swapping the SIM, and (if they also control or can reach the email) complete the reset. The reset path is weaker than the login path, so it sets the real security level. To close the gap, remove SMS as a reset method and require the authenticator app or a passkey for resets, and protect the email account with its own strong factor. Adding a carrier port-out PIN lowers the risk further but does not remove it.
Exercise
Your phone suddenly shows "No service" in a place where you normally have coverage, and you receive an email from your exchange saying a new login was attempted. What do you do, in order?
Show answer
First, use another device or network to contact your carrier and ask whether your number was moved or ported, and have it blocked or restored. Second, sign in to the exchange from a trusted device if you still can, and change the password, remove SMS as a factor, and review active sessions and withdrawal addresses. Third, secure your email account, since attackers often reset it as well. Finally, contact exchange support through the official app or website and report the incident.