One of the most widely used methods of 2FA is an SMS-based code, where the user needs to enter a code sent to them through the SMS service to verify their identity. Almost every mobile device in the world supports a text messaging service, and developers might prefer it based on its simplicity and availability. Adding text-based 2FA on top of simple user ID- and password-based authentication might be safer than not having one, but it is not the most secure way of implementing multifactor authentication.
So, what makes the SMS service vulnerable, and why is it not considered a secure method of authentication for 2FA? Here are a few vulnerabilities of SMS which make it the most insecure method for two-factor authentication:
SIMJacking, also referred to as a port-out scam or SIM swap scam, is a type of attack where one would gain access to someone’s phone number by switching the service to another carrier. Port-out is a feature offered to users by their telecommunication companies where a customer can switch to different carriers and keep their current phone number. Usually, carriers require some form of identification before they provide a PIN to port out a phone number. Hackers are using sophisticated social engineering attacks and using publicly available information about a victim to gain access to their phone numbers by switching them to another carrier. After getting control over the phone number, the attacker would be able to gain access to 2FA codes.
SMS works through the Signaling System No 7 (SS7) protocol, sending clear text that is not encrypted by any encryption protocol. Because of this weakness, it is easy for hackers to intercept information sent via SMS. Since it doesn't use any encryption and the information is transmitted on a radio frequency, SMS is vulnerable to man-in-the-middle attacks, and third parties can get access to 2FA codes sent via SMS if they use the right tools and codex.
SMS security also depends on the receiving device. If the phone is vulnerable, there is a risk of the 2FA code being stolen. SIM cards are also vulnerable to attack where a hacker could monitor all the conversations by installing malware on them.
As mentioned above, SMS-based 2FA is not the best way to implement multifactor authentication because of the multiple risks as described, and there are other better alternatives. Below we discuss two key alternatives to SMS-based authentication.
Hardware-based authentication uses dedicated physical hardware to generate authentication codes. These devices use time-based codes that expire after a certain time. New codes will be continuously generated based on the configured time. After logging in with a username and password, the user also needs to provide the 2FA code from the device before they are granted access to the application. Since users need to have this device with them physically to get the access code, this eliminates the risk of the code being compromised by an attacker through the internet.
Software-based authentication works similarly to hardware-based, but instead of a physical device, it uses software to generate the 2FA codes. This provides user flexibility as they can install the application on their existing device. Google Authenticator and Microsoft Authenticator are two examples of widely used 2FA applications. Some hardware-based 2FAs also provide software applications that can be used in the same way without the need for hardware. Since the codes are generated locally without information being sent through insecure channels, it is considered more secure than SMS-based 2FA.
Ultimately, SMS is convenient and easy to use, but it comes with risks when used as part of 2FA. Information sent through an unencrypted channel should never be trusted as secure. Physical devices that generate 2FA codes are much more secure than SMS-based solutions. Software-based 2FA codes provide better flexibility and are a much stronger solution than SMS. Since improper authentication could result in data breaches and losses to organizations, it is critical to select a secure multifactor authentication system.