How Attackers Bypass Modern Two-factor Authentication and How to Protect Your Users (2024)

In this article we'll have a look at an example of tools and techniques attackers can use to bypass two-factor authentication (2FA) methods, from SMS OTPcode to encrypted push notifications to a mobile app. The method to bypass 2FA is not merely a brute force attack and can be very effective against most types of 2FA methods deployed today, including out of band authentication. A password manager will be little help against these attacks, so we'll also discuss what kind of countermeasures can be implemented by banks to mitigate risk and protect their customers from hackers and cybercriminals performing account takeover fraud, taking sensitive information, ransomware, or person-in-the-middle (also known as man-in-the-middle or MITM) attacks.

UnderstandingTwo-Factor Authentication

2FA is not just an extra layer of security. It refers to an authentication process for online accounts that includes two factors.By contrast,multifactor authentication (MFA) involves two or more authentication factors. Authentication factors include either something you have (such as a six-digit one time passcode), something you know (such as the user's password, user credentials, or security questions), or something you are (such as biometrics). In the typical2-stepverification code process, a user submits their typicallogin credentials. Afterwards, the web application, mobile app, or tool will send averification codeorsecurity keyviatext messageto the user'sphone number. The user will then plug that2FAcodeinto thelogin page, and they will then be given access to the user account or complete the account recovery or password reset function. Alternatively, these two-step verification codes, securitycodes, and recovery codes can be delivered through anauthenticator app,authenticationtoken, or other authentication system.

How to Bypass OTP Verification: Setting Up the Attack

To execute this 2FA bypass attack, we'll use a combination of two tools, Muraena and Necrobrowser. Muraena is a transparentreverse proxythat will run our social engineering phishing page. The phishing sites and web page will proxy the original page which the victim will interact with. Once the victim has authenticated the session Muraena will hand over the session to Necrobrowser, which allows the attacker to take control of the session or automate the next steps of the attack. Because Muraena acts as a reverse proxy there will be no difference between our malicious site and the original website apart from the URL. Muraena can be configured to use SSL with certificates obtained through for example LetsEncrypt. From the victim point of view the whole experience will seem legitimate as it looks like they're interacting with the genuine page. They will go through the regular authentication process including the 2FA. If the 2FA consists of a regular one-time password authentication code delivered through SMS, hardware or software token then the victim will enter it as usual. However even modern security features such as a push notification to a mobile device or scanning of a QR code on the screen will be bypassed by this attack.

How Attackers Bypass Modern Two-factor Authentication and How to Protect Your Users (1)

  1. User visits the phishing page, which has SSL enabled.
  2. The Reverse Proxy(Muraena) fetches the legitimate bank page and serves a copy to the victim.
  3. The cybercrime victim attempts to log in to the page and is prompted for two-factor authentication
  4. After the victim has completed the authentication process, the Reverse Proxy (Muraena) hands off the session to the attacker (Necrobrowser) to take control, cutting off the victim.

In the image below you can see Muraena hosting Google on the domain phish.anti. For the purposes of demonstration, I've set up a local DNS to resolve this to my test machine and also issued certificates using my own CA which is trusted by the browser. However, this is exactly what it would look like from the victim perspective if this was deployed on your own domain using valid certificates.

How Attackers Bypass Modern Two-factor Authentication and How to Protect Your Users (2)

Cybersecurity: Protecting Against the Attack

Now that we understand how the attack works, we can identify which cyber security strategies and functionality would be successful in identifying or protecting against this type of attacks.

Dynamic linkingprovides a good first layer of defense against a variety of attacks. Dynamic linking consists of a two-factor authentication done at the time of transaction, which incorporates the details of the transaction into the signing process. Often called What You See Is What You Sign, because the end-user should be presented with the transaction details before completing the signing process. Once signed, the signature should only be valid for this specific transaction therefore making it harder to bypass for the attacker. Typically dynamic linking is implemented via hardware tokens, software tokens or integrated as part of a banking app. Below we have two examples of dynamic linking, first for a legitimate payment and the second where an attacker attempts to modify the payment.

How Attackers Bypass Modern Two-factor Authentication and How to Protect Your Users (3)

  1. User creates a transaction in the online banking.
  2. User submits the transaction.
  3. Bank sends the transaction details to the mobile phone of the user.
  4. User verifies the details of the transfer and authorizes the payment with a biometric (Or another second factor).
  5. The mobile app generates a One Time Password using the transaction details and the token key inside the mobile app.

How Attackers Bypass Modern Two-factor Authentication and How to Protect Your Users (4)

  1. User tries to create a payment in the online banking.
  2. Attacker modifies the payment to have a new beneficiary account and/or amount.
  3. Bank sends the transaction details to the mobile phone of the user.
  4. User is presented with the modified payment information and rejects the payment.

The examples above also illustrate the importance of using end-to-end encryption when implementing dynamic linking. Additionally, it shows that the mobile app itself should be protected as the attacker may try to attack the app on the endpoint to hide the modified payment details from the user.

Another effective way to recognize and defend against a large variety of attacks is to implementcontinuous monitoringonto your digital platforms as an additional layer of security. By monitoring the session from the moment of initiation until the end of the session, we can bring in more context through the actions of the users and the Microsoft Android and Apple iOS devices or accounts they associate with. Continuous monitoring combines perfectly with other layers such as 2FA or dynamic linking as it allows the bank to bring in context from these authentication devices as well.

How Attackers Bypass Modern Two-factor Authentication and How to Protect Your Users (5)

The bank can then monitor for typical indicators of known attacks such as new devices, locations, presence of proxy, or others. This information can be correlated across its user-base to further understand the risk of these elements. We can then also factor in the operations the user is doing throughout the session itself and profile this against their usual behavior. This approach establishes a continuous risk profile for the session which can change with each action done by the end-user. Not only does this allow the bank to then take automated real-time actions when anomalies are detected, it also allows the bank to reduce friction for legitimate sessions by reducing the amount of authentications required for genuine sessions.

Conclusion

While the two factor authentication bypass attack in this article uses technology and concepts that have been around for ages, we see that correctly applying them can still lead to great success and defeat various methods of authentication deployed by threat actors today. It's important for banks and service providers to use a layered approach as most individual layers have vulnerabilities that can still be attacked or exploited. When implementing dynamic linking banks need to make sure they establish a secure line of communication with the end-user. Relying on SMS verification for example has already proven to be unreliable as the messages can be stolen, spoofed, or intercepted by the attacker. However, when implementing mobile applications, banks should also be aware that these apps become a target and they should protect their mobile applications from external attacks. The goal of this article is mainly to demonstrate that phishing attacks can be modernized to defeat two-factor authentication at login and implementing 2FA alone does not offer complete protection from phishing. Finally we've mentioned some layers banks can implement to provide further protection to their end-users, as well as what pitfalls to avoid when doing so. To summarize:

  • Implementdynamic linkingwith end-to-end encryption.
  • Deploy server-side analytics tomonitorend-user sessions, devices and behavior for potential attacks.
  • Protectyour mobileappsfrom malware and other external threats.
How Attackers Bypass Modern Two-factor Authentication and How to Protect Your Users (6)
eBook

Account Takeover Fraud: How to Protect Your Customers and Business

Help prevent account takeover fraud and secure customers at every stage of their digital journeys.

Download Now

As an expert in cybersecurity and digital authentication methods, I possess extensive knowledge and experience in various authentication mechanisms, attack vectors, and strategies to mitigate cyber threats. I've worked in the field, staying updated on evolving cyber threats and the latest security measures used by both attackers and defenders.

Let's break down the concepts and technologies mentioned in the article about bypassing two-factor authentication (2FA) and the strategies to defend against such attacks:

  1. Two-Factor Authentication (2FA):

    • A security process that involves two distinct methods of verifying a user's identity before granting access to an account or system.
    • Factors can include something you know (password), something you have (security token or mobile device), or something you are (biometrics).
  2. Bypassing 2FA:

    • The article outlines techniques like using tools such as Muraena and Necrobrowser to execute a reverse proxy and phishing attack, enabling attackers to intercept and manipulate authentication sessions.
  3. Authentication Methods:

    • Traditional 2FA methods, such as SMS OTP codes, push notifications to mobile apps, and hardware tokens, are vulnerable to interception or manipulation in certain attack scenarios.
    • Even modern security measures like push notifications or QR code-based authentication can be bypassed using advanced attack techniques demonstrated in the article.
  4. Dynamic Linking:

    • A more secure method that involves incorporating transaction details into the authentication process, making it harder for attackers to modify transactions. This often employs hardware tokens, software tokens, or mobile apps for secure authentication.
  5. Continuous Monitoring:

    • Implementing ongoing surveillance and analysis of user sessions and behavior to detect anomalies, potential threats, or suspicious activities. This method allows for real-time actions and reduces friction for legitimate user sessions.
  6. End-to-End Encryption:

    • Ensuring that data remains encrypted throughout the communication process, especially vital during dynamic linking to secure transaction details from being intercepted or modified.
  7. Phishing Attacks and Countermeasures:

    • The demonstration underscores the vulnerability of 2FA to sophisticated phishing attacks. It emphasizes the importance of a layered security approach and the need to secure communication channels beyond SMS.
  8. Mobile App Security:

    • Highlighting the significance of protecting mobile applications from external threats, including malware or attacks targeting the endpoint, to safeguard against modified payment details or other manipulations.

The article concludes by recommending strategies for financial institutions:

  • Implementing dynamic linking with robust encryption.
  • Deploying server-side analytics for continuous monitoring of user sessions and behavior.
  • Prioritizing the protection of mobile apps from external threats.

Overall, it stresses the necessity of a multi-layered security approach to counter the evolving threats targeting authentication methods, especially 2FA, and highlights the importance of staying vigilant against sophisticated cyber attacks like phishing.

How Attackers Bypass Modern Two-factor Authentication and How to Protect Your Users (2024)

FAQs

How do hackers overcome two-factor authentication? ›

Another way how 2-step verification can be hacked is via credential stuffing, where attackers try to breach a system using lists of compromised usernames and passwords. Bots are often used to automate the process and maximise the chances of getting a successful hit.

How can attackers access a user account protected by two-factor authentication 2FA? ›

The most common 2FA Bypass Attacks
  1. Password reset. One of the easiest and, therefore, most common ways to bypass two-factor authentication is by simply utilizing the password reset function of websites and applications. ...
  2. Social Engineering. ...
  3. Man-in-the-middle Attacks. ...
  4. OAuth Consent phishing. ...
  5. Duplicate-Generator. ...
  6. SIM-Jacking.
Feb 15, 2023

Which of the following attacks could attempt to bypass two-factor authentication? ›

Man-in-the-middle (MitM) attacks

From this position, hackers can intercept and modify data being transmitted between the user and the service, including any 2FA codes.

What is a common technique that hackers use to bypass authentication? ›

As the most successful hacking technique , phishing is a relatively easy and effective way to obtain sensitive information, including authenticators people use. Cybercriminals can trick users into giving away their verification emails and other credentials in the same way phishing gets them to reveal passwords.

Which three types of attacks would a 2 factor authentication solution help guard against? ›

What Types of Attacks does Multi-Factor Authentication Prevent?
  • Phishing.
  • Spear phishing.
  • Keyloggers.
  • Credential stuffing.
  • Brute force and reverse brute force attacks.
  • Man-in-the-middle (MITM) attacks.

How do hackers protect themselves from other hackers? ›

Encryption. Encryption is great way to make data unreadable, but that goes both for the good guys and the bad guys. By encrypting their communication and data, hackers can prevent others from intercepting and reading their messages.

What are the threats to 2 factor authentication? ›

2FA can be vulnerable to several attacks from hackers because a user can accidentally approve access to a request issued by a hacker without acknowledging it. This is because the user may not receive push notifications by the app notifying them of what is being approved.

What is 2FA and how does it protect users against phishing attacks? ›

Two-factor authentication (2FA), sometimes referred to as two-step verification or dual-factor authentication, is a security process in which users provide two different authentication factors to verify themselves. 2FA is implemented to better protect both a user's credentials and the resources the user can access.

How can you make the user authentication process more secure? ›

How to secure your authentication mechanisms
  1. Take care with user credentials. ...
  2. Don't count on users for security. ...
  3. Prevent username enumeration. ...
  4. Implement robust brute-force protection. ...
  5. Triple-check your verification logic. ...
  6. Don't forget supplementary functionality. ...
  7. Implement proper multi-factor authentication.

What threat would even bypass a multifactor authentication? ›

Hackers use various techniques to bypass MFA, including social engineering tactics, token theft, and machine-in-the-middle attacks. These methods exploit vulnerabilities in the MFA process, allowing hackers to gain unauthorized access to user accounts.

How does authentication bypass work? ›

Authentication bypass attacks are unique in that the attacker does not steal credentials, but rather bypasses the authentication process entirely. Once they circumvent authentication, attackers can escalate privileges, move to other pages, steal or alter data, or download malicious firmware.

What is an example of authentication bypass? ›

For many users, a simple example of an authentication bypass is when a bad actor accesses an application with another user's credentials, such as their email address and password. If multi-factor authentication is not installed, anyone can access that application with just those credentials.

What are two basic techniques that might allow an attacker to bypass a firewall? ›

Social engineering: By tricking users into divulging sensitive information or taking certain actions, it becomes easier for an attacker to bypass the firewall or intrusion detection system. Physical access: By physically accessing the network or system, an attacker can bypass the firewall or intrusion detection system.

What is the method a hacker may use to break a password if two factor auth isn t protecting it? ›

These attacks are done by 'brute force' meaning they use excessive forceful attempts to try and 'force' their way into your private account(s). This is an old attack method, but it's still effective and popular with hackers.

What are the 4 steps we all must take to avoid getting hacked? ›

Protecting Online Accounts
  • Delete suspicious emails. It is best to delete spam or dubious-looking emails without opening them. ...
  • Use secure devices. ...
  • Create strong passwords. ...
  • Use multifactor authentication on your accounts. ...
  • Sign up for account alerts.

What is the method a hacker may use to break a password if two-factor auth isn t protecting it? ›

These attacks are done by 'brute force' meaning they use excessive forceful attempts to try and 'force' their way into your private account(s). This is an old attack method, but it's still effective and popular with hackers.

How to get past 2 step verification if you lost your phone? ›

If you've lost access to your primary phone, you can verify it's you with:
  1. Another phone signed in to your Google Account.
  2. Another phone number you've added in the 2-Step Verification section of your Google Account.
  3. A backup code you previously saved.

How do hackers maintain access? ›

After gaining access to the system, the hacker's next goal is to maintain their access, also known as persistence. This could involve installing a backdoor to allow them to easily re-enter the system, or escalating their privileges to ensure they have the necessary permissions to carry out their intended actions.

Can two-factor authentication be circumvented by 2FA bots? ›

OTP bots are automated software programs that are designed to bypass two-factor authentication (2FA) systems. OTP bots are typically used for financial gain, such as accessing and draining bank accounts or making fraudulent transactions.

Top Articles
Latest Posts
Article information

Author: Fr. Dewey Fisher

Last Updated:

Views: 5913

Rating: 4.1 / 5 (62 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Fr. Dewey Fisher

Birthday: 1993-03-26

Address: 917 Hyun Views, Rogahnmouth, KY 91013-8827

Phone: +5938540192553

Job: Administration Developer

Hobby: Embroidery, Horseback riding, Juggling, Urban exploration, Skiing, Cycling, Handball

Introduction: My name is Fr. Dewey Fisher, I am a powerful, open, faithful, combative, spotless, faithful, fair person who loves writing and wants to share my knowledge and understanding with you.