Home Multi-Factor Authentication Bypass
Post
Cancel

Multi-Factor Authentication Bypass

Multi-Factor Authentication Bypass

At times, the implementation of two-factor authentication is flawed to the point where it can be bypassed entirely.

If the user is first prompted to enter a password, and then prompted to enter a verification code on a separate page, the user is effectively in a “logged in” state before they have entered the verification code. In this case, it is worth testing to see if you can directly skip to “logged-in only” pages after completing the first authentication step. Occasionally, you will find that a website doesn’t actually check whether or not you completed the second step before loading the page.

Exploitation

hheada

This lab’s two-factor authentication can be bypassed. We have already obtained a valid username and password carlos:montoya, but we do not have access to the user’s 2FA verification code. We are going to bypass the 2fa to access Carlos’s account page.

Let’s login with his credentials carlos:montoya.

hheada

hheada

As you can see we have been prompted to enter 4 digit code for 2fa. We will refresh the page and then intercept the request in burpsuite.

hheada

We will change the url to the url of user’s profile my-account to see if we can bypass it.

hheada

hheada

Nice!, We have logged in as carlos

References

This post is licensed under CC BY 4.0 by the author.