I am new to the field of security. I thought a lot about the following scenario and could not come up with a good solution
Suppose I go to the Instagram "forgot password" page. I enter a person's mobile number whose account I want to hack.
It sends a 6 digit code to that person.
I want to brute force it - around a million combinations.
I get 5000 IPs and send 200 requests per IP and brute force it i.e. sending requests concurrently from all the IPs. There is a race condition here, right? So wouldn't I be able to break in?
As the requests are going concurrently how can you keep a count and block the user after a few failed attempts? That is what this guy did. Can someone explain how this was possible and how to mitigate it?