Bypassing the 2FA /MFA — An Easy win
The login page's two-factor authentication step did not limit how many codes a user could try, so an attacker who knew a victim's password could keep submitting random six-digit codes until one was accepted. The author logged into their own account this way after more than 200 attempts.
Published on medium.com
Hello Readers, Today I am going to tell how was I was to bypass the 2FA protection for a product based company main login page. I hope this blog help you learn something new and apply to your bug hunting techniques.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the second-factor verification endpoint had no rate limit or attempt cap, so repeated wrong codes were never blocked.
Impact
An attacker who already had a victim's password could bypass the second factor by guessing codes repeatedly, though the author only demonstrated this on their own account.
What the attacker needed
Valid password for the account; 2FA enabled with email codes; ability to send many requests
The fix
The code-check step should be fixed by capping failed attempts and rate-limiting or locking the second-factor verification.
How it was found
- Set up two-factor authentication using the email code method and log out.
- Log in again and reach the step that asks for the emailed code.
- Send the code-check request to an interception tool and replace the code with many random six-digit values.
- Observe that after more than 200 attempts the application logs the user in.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Two-factor authentication asks for a second proof after your password, usually a short code sent by email, text or an app. This site never counted failed attempts, so someone with the password could simply guess codes over and over until one worked. Limiting attempts is what makes a short code safe.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.