This story is about a loophole in an Online Banking website which could have allowed an attacker to steal funds from any customer account. After discovering this issue i immediately got in touch with the bank's security team and coordinated till a patched for this loophole was released. In this writeup i can't share the exact technical details about how i exploited the issue on the target website but i can give you a generalized idea of what went wrong and how it could have been exploited.
Abstract:
There was a bug in the forget password module of a netbanking website by exploiting which an attacker could have updated any customer's netbanking account password to his desired value.
To understand the exploit, we first need to understand how password recovery works on the target bank's website.
Here is normal flow of password recovery process which can be initiated by visiting the forget password page:
To recover a forgotten password on the netbanking website a customer has to follow this following process:
Step 1: Identify account using customer id.
Step 2: Submit an OTP( One Time Password) which will be sent via SMS & Email.
Step 3: Set a new password.
After following this process customer's password will be updated.
During my research, I found out that the webpage at "Step 3" was not validating if the customer has completed "Step 2" (OTP Verification).
The Exploit:
After making the post request the customer's netbanking password will be updated. Since the customer ID's on the netbanking website were numerical an attacker could have made an script that will reset every netbanking account's password and transfer funds out of it.
At the end of the day this incident was a good test of my hacker ethics and taught me lessons which i will carry on throught my life.
Thanks for reading & hack for good :)