Lack of Clarity Costed me $500
The recovery codes for multi-factor authentication were only six digits long, making them guessable by brute force. An attacker who already had the victim's username and password could try all possible codes, and if successful, bypass MFA and take over the account.
medium.com
Published on medium.com
Hello fellow readers, I’m back with another interesting story with something to learn. At least you can enjoy this read, while I’m still regretting 🥲.
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
Impact
An attacker with valid credentials could brute-force a recovery code and bypass MFA, leading to account takeover; the rate limiting only slowed the attack, which could take up to 24 days but often less.
What the attacker needed
Attacker has victim's username and password; victim has MFA enabled; attacker can make many requests over time
How it was found
- The attacker obtains the victim's username and password.
- The attacker logs in with those credentials and is prompted for an MFA code.
- The attacker selects the option to use a recovery code.
- The attacker submits guesses for the recovery code, waiting 60 seconds after every 30 attempts due to rate limiting.
- The attacker continues until a correct recovery code is found, gaining access.
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.
Multi-factor authentication (MFA) adds a second step to logging in, like a code from an app. Recovery codes are backup codes you can use if you lose your phone. Here, these backup codes were just six-digit numbers, so someone could try every possible number until they found the right one, especially since the site only slowed down attempts rather than blocking them.
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.