https://portswigger.net/web-security/authentication/multi-factor/lab-2fa-broken-logic
This lab’s two-factor authentication is vulnerable due to its flawed logic. To solve the lab, access Carlos’s account page.
- Your credentials:
wiener:peter - Victim’s username:
carlos
You also have access to the email server to receive your 2FA verification code.
Lab: 2FA broken logic
- Login with your credentials. And the email you get.
- see the
/loginand/login2request in burp-suit. - In
/login2removesessionand send the request. And get no change. - First do with without correct sign and then with correct sign.
- Replace
verify=wienerwithverify=carlosand send the request and do it 4-5 time to check brute-force protection have or not. - There have not any brute-force protection in the otp section so we will brute-force
mfa-code=0533this otp. - We will use Brute forcer, character set 0 to 9 and length 4.
- We will wait for some time then we will find the right OTP and the status code will 302.
- Then click right button and click show response in browser.
- And solve the lab.