How I Bypassed 2FA and Earned My First Bounty $$
The backup codes for two-factor authentication had no rate limiting, so an attacker who knew a victim's password could brute-force the six-digit backup codes to bypass 2FA. The program fixed this by adding rate limits to the backup codes.
Two-Factor Authentication (2FA) is often seen as a strong defense against unauthorized access. But what if a small oversight could turn this shield into a vulnerability?
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 backup code verification endpoint lacked rate limiting, allowing repeated guesses of the six-digit codes.
Impact
An attacker who knew a victim's password could brute-force the backup codes to bypass 2FA and gain unauthorized access.
What the attacker needed
Knowledge of the victim's password; 2FA enabled with backup codes
The fix
The platform introduced rate limits on the backup codes.
How it was found
- Enable 2FA and obtain the eight backup codes.
- Enter a backup code and intercept the request.
- Set up a payload to try variations of the backup code.
- Launch the attack and observe the server responses.
- Identify the correct backup code by the different status code.
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 (2FA) adds a second step to logging in, such as a code from an app. Backup codes are extra codes you can use if you lose access to that app. Here, the backup codes were short numbers and the system did not limit how many times someone could guess them, so an attacker with the password could try many codes until one worked.
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.