A new bug discovered in IRCTC website allows attackers to gain access to the lakhs of users private information and alter the sensitive data include cancelling the booked ticket.
IRCTC (Indian Railway Catering and Tourism Corporation) is a part of Indian Railway and one of the busiest Railway booking system in the world that manages around 15 to 16 lakh tickets every day.
An Indian Security researcher Ronnie T Baby who discovered this critical vulnerability in the password reset option that used in IRCTC.
During the process of login, When input the user id, an OTP gets automatically sent to the registered mobile number of the account.
In this case, Ronnie said, “Though there was captcha enabled to prevent brute-forcing of the OTP’s, it surprisingly allowed the reuse of captchas for unlimited requests.”
Cancelling IRCTC Booked Tickets
Initially targetted user ID is required to exploit the bug and it is not a big deal to found the variety of user ID online, here you can see some of Top 100 common names in India.
If any users try to reset their password, 6 random character OTP gets generated and send it the users registered mobile number.
Researcher said, “After a little observation I found that, there is indeed rate limiting to the amount of OTP being sent (it will say that your account has exceeded the OTP limits for the day…). But here the issue was the reuse of valid captchas”
Since the OTP contains a 6 digit corrector, attackers can easily validate the OTP using a variety of brute force tools available online for the maximum checking count of 999999.
During the process of OTP Validation, a parameter called “seqAns ” helps to validates if the OTP matches the one sent on mobile number.
Ronnie said to “GBHackers on Security” via Email, I could have hacked lakhs of IRCTC accounts and get access to all your private info including easily cancelling booked tickets by repeated request while changing the value of seqAns to reset the password and login to IRCTC user account after observing that correct OTP.”
Here you can see the Proof of concept video that was published online.
Ronnie reported this vulnerability to IRCTC and the bug was fixed by proper captcha verification.