Skip to content
Account takeover Disclosed report Beginner

Email Verification Bypass by bruteforcing when setting up 2FA

The email verification code for setting up two-factor authentication was only six digits and could be brute-forced without rate limiting. An attacker could verify a victim's email, bind their own phone for 2FA, and lock the victim out of their account.

cyberworlcload Follow

Originally disclosed on HackerOne

Bounty$150 Low View original
  • Triaged in 9 days
  • Fixed in 5 months
  • Paid in 29 days
  • Disclosed after 6 months

Summary:

Hello team, I hope you are fine and doing well

when a user set ups his 2 Factor Authentication in his account and verify his email ,i was able to bruteforce the email verification process .

The confirmationCode is used for authentication of user's email and it can be brute forced. The code is only 6 digits long ,so it will not take much time to crack . (https://cloudnine.com/wp-content/uploads/2020/02/CrackPassword2.png)

After the victim's email confirmation code gets verified , the user can then set up his personal phone to victim's email and the victim will never be able to sign inside his account as he does not get the otp received in the attakers phone.(due to 2 fa)

Steps To Reproduce:

  1. Request a confirmationCode in your email , enter any code
  2. Send this request to burpsuite intruder , and bruteforce the confirmationCode with any number of requests
  3. Out of all the response , one response will have a length around 373 (only response whose length is lesser than others), thus proving that was the correct confirmation code.

Attackers Scenario:

Attacker creates a account using victim's email [email protected] , Now attacker setups the 2FA using brute force . Victim wants to join evernote , so he resets his password but he is unable to join since he does not have the 2FA codes . Thus he user is permanently unable to access evernote . It is a pre account takeover .

Impact

The victim who wants to log inside or use forget password to recover his/her account in evernote will be locked out forever. Attacker did a pre account takeover.

Attachments

brute.png
brute.png From the original on HackerOne

The original report as published on HackerOne, by cyberworlcload. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

Evernote's web application at www.evernote.com lets a user protect their account with two-factor authentication. Setting up 2FA requires the user to confirm ownership of an email address: the application sends a six-digit confirmationCode to that address, and the user types it back into the setup flow. The code is the only thing that ties the email address to the person completing the setup.

The report describes what happens when that confirmation step can be guessed at will. The weakness is classified as improper restriction of authentication attempts, and the program rated it low severity with a 150.00 USD bounty. It was disclosed on 2022-05-22.

Setup

The report describes using Burp Suite Intruder to send many candidate codes. The flow under test is the 2FA setup wizard: request a confirmation code by email, then submit it. Burp Suite's Intruder is used to send many candidate codes. The report does not name any software versions.

The report's attacker scenario assumes an account is created using the victim's email address. The report's attacker scenario assumes exactly that: an account is created using the victim's email address, and the 2FA setup is then completed by brute force.

Finding it

The researcher noticed that the confirmationCode used to authenticate a user's email during 2FA setup is only six digits long and that the endpoint accepted repeated attempts. A six-digit space is small enough that guessing it is a matter of time rather than feasibility, and nothing in the flow appeared to limit how many guesses could be made. The report links to an external illustration of password cracking to make the point about how quickly a short numeric code falls.

Exploitation

Step 1: request a code and submit a wrong one

Start the 2FA setup, request a confirmationCode to the email address, and enter any code in the confirmation form. The point is to capture a valid request in the proxy so it can be replayed with different values.

Step 2: send the request to Intruder and brute force

Send the captured confirmation request to Burp Suite Intruder and brute force the confirmationCode parameter with any number of requests. The report gives no upper bound on attempts.

Step 3: read the correct code from the response length

Among all the responses, one has a length of around 373. That response is the only one whose length is smaller than the others, and it identifies the correct confirmation code. The report says one response has a length around 373, lesser than the others, identifying the correct code.

brute.png
brute.png From the original on HackerOne

Once the code is verified, the attacker can attach their own phone number to the victim's email address. From then on the one-time passwords for 2FA go to the attacker's phone, and the victim cannot sign in because they never receive the OTP.

Root cause

The confirmation endpoint does not restrict the number of authentication attempts against a six-digit code. The report says the confirmationCode can be brute forced with any number of requests. The response length also distinguishes the correct code from the others.

Impact

The researcher states the victim is permanently unable to access Evernote. In the attacker scenario, the attacker registers an account with the victim's email address and completes 2FA setup by brute force. When the real owner tries to join Evernote and resets the password, they still cannot get in, because the 2FA codes go to the attacker's phone. The same applies to anyone trying to log in or use the forgot-password flow: without the 2FA codes, recovery does not complete. The researcher describes this as a pre account takeover.

The program treated it as low severity.

Fix

The report does not state what was changed.

Variants to test

Hunting notes

Summary

Item Value
Program Evernote
Asset www.evernote.com
Weakness Improper Restriction of Authentication Attempts
Severity Low
Bounty 150.00 USD
Disclosed 2022-05-22
Source HackerOne

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

What happened, in plain words

Evernote is a note-taking service that you use through a website at www.evernote.com. Like many websites, it lets you add an extra lock to your account called two-factor authentication, or 2FA. With 2FA, signing in needs two things: your password, and a short code that is sent to your phone. Even if someone steals your password, they still cannot get in without that code.

To switch 2FA on, Evernote first has to check that the email address on the account really belongs to you. It does this by sending a six-digit number, called a confirmationCode, to that email address. You read the number in your inbox and type it back into the setup page. If the number matches, Evernote believes the email address is yours and finishes the setup.

The researcher found that this confirmation step would accept as many guesses as you like. A six-digit number has only one million possible values, and a computer can try them all very quickly if nothing stops it. Because the page also gave a subtle clue about which guess was correct, the whole code could be found in a single automated run.

The consequence is serious for the real owner of the email address. An attacker can create an Evernote account using someone else's email address, guess the confirmation code, and attach their own phone to that account. The real owner is then shut out: when they try to sign in or reset their password, the 2FA code goes to the attacker's phone, not theirs. The researcher calls this a pre account takeover, meaning the attacker has taken control of the account before the real owner ever got to use it.

The report was rated low severity, paid a 150.00 USD bounty, and was disclosed on 2022-05-22. The weakness is classified as improper restriction of authentication attempts.

Background ideas you need first

A few everyday ideas make the rest of this easy to follow.

  • A web request is a message your browser sends to a website asking it to do something, such as "show me this page" or "save this change". The website sends a response back. You can think of it like posting a form to an office and getting a reply letter.
  • A proxy is a tool that sits between your browser and the website. Every request and response passes through it, and the proxy lets you read them, change them, and send the same request again and again. Burp Suite is a well-known proxy of this kind.
  • Brute force means trying every possible answer until one works, like working through every combination on a bicycle lock instead of picking it. It only works when the number of possibilities is small and nothing stops you from trying.
  • A rate limit is a rule that says "you may only try this a certain number of times per minute". A lockout is a stronger rule: after too many wrong tries, the account or the step is blocked. Neither was in place here, which is the whole problem.
  • An oracle is any clue the website gives away about whether a guess was right or wrong, even indirectly. Here the clue was the size of the response: the successful answer came back slightly shorter than the failures.
  • An OTP (one-time password) is the short code sent to your phone during 2FA. It changes every time and is only valid briefly.

The setup the researcher used

The report describes using Burp Suite Intruder to send many candidate codes. The part of Evernote under test is the 2FA setup wizard, the series of pages where you switch 2FA on. In that wizard you ask Evernote to email you a confirmation code, then you type the code into a form and submit it.

Burp Suite's Intruder is the part of the proxy that sends the same request many times, each time with a different value in one chosen spot. That is exactly what guessing a code needs: the same form submission, over and over, with a new number each time.

The report does not name any software versions.

The report's attacker scenario assumes an account is created using the victim's email address. The report's attacker scenario assumes precisely that: an account is created using the victim's email address, and the 2FA setup is then completed by brute force.

Finding it

The researcher noticed two things together. First, the confirmationCode used to prove ownership of an email address during 2FA setup is only six digits long. Second, the page that checks the code accepted repeated attempts. A six-digit code has a small enough set of possibilities that guessing it is a matter of time rather than a question of whether it can be done, and nothing in the flow appeared to limit how many guesses could be made.

The report links to an external illustration of password cracking to make the point about how quickly a short numeric code falls.

Exploitation

Step 1: request a code and submit a wrong one

Start the 2FA setup, ask Evernote to send a confirmationCode to the email address, and type any code into the confirmation form. The purpose is not to succeed. It is to capture one valid request in the proxy, so that the same request can be replayed later with different numbers in place of the code.

Step 2: send the request to Intruder and brute force

Send the captured confirmation request to Burp Suite Intruder and brute force the confirmationCode parameter with any number of requests. The report gives no upper bound on attempts.

Step 3: read the correct code from the response length

Among all the responses, one has a length of around 373. That response is the only one whose length is smaller than the others, and it identifies the correct confirmation code. The report says one response has a length around 373, lesser than the others, identifying the correct code.

brute.png
brute.png From the original on HackerOne

Once the code is verified, the attacker can attach their own phone number to the victim's email address. From then on the one-time passwords for 2FA go to the attacker's phone, and the victim cannot sign in because they never receive the OTP.

Why it works

The confirmation page does not restrict the number of authentication attempts against a six-digit code. The report says the confirmationCode can be brute forced with any number of requests. The response length also distinguishes the correct code from the others.

Impact

The researcher states the victim is permanently unable to access Evernote. In the attacker scenario, the attacker registers an account with the victim's email address and completes 2FA setup by brute force. When the real owner tries to join Evernote and resets the password, they still cannot get in, because the 2FA codes go to the attacker's phone. The same applies to anyone trying to log in or use the forgot-password flow: without the 2FA codes, recovery does not complete. The researcher describes this as a pre account takeover.

The program treated it as low severity.

How it should be fixed

The report does not state what was changed.

Other places to look for the same bug

Notes for hunting

Summary

Item Value
Program Evernote
Asset www.evernote.com
Weakness Improper Restriction of Authentication Attempts
Severity Low
Bounty 150.00 USD
Disclosed 2022-05-22
Source HackerOne

Glossary

  • 2FA (two-factor authentication): a second check at sign-in, usually a short code sent to your phone, on top of your password.
  • API: the set of addresses and rules a website uses to receive requests and send answers back; here it is simply the pages and forms your browser talks to.
  • Brute force: trying every possible value of a secret until one is accepted.
  • Burp Suite: a tool that sits between your browser and a website so you can read, change and repeat requests.
  • Confirmation code: the six-digit number Evernote emails you during 2FA setup to prove the email address is yours.
  • Endpoint: a specific address on a website that accepts a particular request, such as the page that checks a confirmation code.
  • Intruder: the part of Burp Suite that sends the same request many times with a different value each time.
  • Keyspace: the full set of possible values a secret can take; for six digits, one million combinations.
  • Lockout: blocking an account or step after too many failed attempts.
  • Oracle: any indirect clue a website gives about whether a guess was correct, such as a different response length.
  • OTP (one-time password): the short code sent to your phone during 2FA, valid only briefly.
  • Pre account takeover: taking control of an account before its real owner has ever used it.
  • Proxy: an intermediary that all traffic between your browser and a website passes through.
  • Rate limit: a cap on how many requests or attempts are allowed in a period of time.
  • Response: the reply a website sends back to a request.
  • Response length: the size of that reply; a difference in size can reveal whether a guess succeeded.
  • Severity: the rating a program gives a bug to express how serious it is.
  • Status code: the three-digit number a website returns with each response to say broadly what happened, such as success or not found.
  • Vulnerability class: the category a bug belongs to, here improper restriction of authentication attempts.

More from Evernote

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.