How I Take Over The Managers Account In Bus Booking Website
The bus booking website used a 4-digit OTP for login without rate limiting, allowing an attacker to brute-force the OTP. The author also found a manager's phone number and discovered that entering it revealed the manager's email and user ID, potentially enabling account takeover.
Published on infosecwriteups.com
At February 1, I booked a bus to go to my friend's home on redbus.com. After some time, I thought about how many websites there are for booking the buses.
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 lack of rate limiting on OTP verification allowed repeated guesses, and the OTP length was only 4 digits.
Impact
An attacker could brute-force the OTP to log in as any user, including a manager, and also obtain a manager's email and user ID by entering their phone number, potentially leading to account takeover.
What the attacker needed
Access to the login page; victim's phone number
The fix
The website should implement rate limiting on OTP verification and use longer OTPs, and should not disclose user details based on phone number alone.
How it was found
- The author visited the bus booking website and saw a login form asking for a mobile number.
- After entering a mobile number, an OTP was sent to the phone.
- The author noticed the OTP was 4 digits and attempted to brute-force it.
- Using Turbo Intruder, the author found no rate limiting and could brute-force the OTP.
- The author searched online for contact numbers of employees working at the target company.
- The author found a Senior Manager's contact number and tried to contact it, which disclosed the manager's email ID and user ID.
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.
When you log in with a phone number, the website sends a short numeric code (OTP) to prove it's you. If the site doesn't limit how many times you can guess that code, an attacker can try all possible codes until they get in. Here, the code was only 4 digits, making it easy to guess.
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.