Exploitation

Identify the user

Brute force

We can take several approaches during this step. One of the possibilities is brute forcing application users based on the output of forgot passsword function.

Other vulnerability

Sometimes there is likelihood that in the application is present other vulnerability which allows us to get the usernames or emails needed to perform password reset flow.

Calculate time between request and response

We should not base our timer on the our system since the clock on the server can be set to other value.

In the next step we have to send the request to vulnerable function at the server side.

In our case:

start = Thy, 21 Aug 2025 13:58:04 GMT converted to epoch

stop = Thy, 21 Aug 2025 13:58:06 GMT converted to epoch

We can use the following web page in order to swap date to epoch: http://epochconverter.com

Code based on the vulnerable application

Below is the template for generating the tokens in Java (use the language that is being used in the application).

Python alternative

Below you can find python implementation of Java Random class:

Last updated