Guessable Password Reset Questions
Often, web applications authenticate users who have lost their passwords by requesting that they answer one or multiple security questions.
e.g
- ”
What is your mother's maiden name?
" - "
What city were you born in?
”
For instance, assuming a web application uses a security question like What city were you born in?
, we can attempt to bruteforce the answer to this question.
This CSV file contains a list of more than 25,000 cities with more than 15,000 inhabitants from all over the world.
Since the CSV file contains the city name in the first field, we can create our wordlist containing only the city name on each line using the following command:
Now let’s use ffuf
to bruteforce security response:
After obtaining the security response, we can reset the admin user’s password and entirely take over the account.
For instance, if we knew that our target user was from Germany, we could create a wordlist containing only German cities, reducing the number to about a thousand cities:
Manipulate the Reset Request
Let’s say password reset request comes with a username as such:
We can manipulate the request and change the admin user’s password instead: