3 ms·
A slightly more detailed answer than the other two you got: It's likely a well-designed password (or similar) validation endpoint will both limit attempts per
by md_ 5y ago
A slightly more detailed answer than the other two you got:
It's likely a well-designed password (or similar) validation endpoint will both limit attempts per IP and per user, to avoid exactly the attack you describe.
This limit probably isn't permanent (though I think the design of Apple's HSM may be different here; too many attempts may lock or delete user data entirely?). Rather, it would be something like "allow 5 attempts per hour per user."
So, first, even if the attacker only exploits concurrency to speed things up--which implies the limits are only per IP--they can conduct attacks which are otherwise infeasible. (E.g. with 10k IPs at 5 attempts per hour per IP, they can brute force a six digit PIN in an average of an hour, as opposed to over a year.)
But second, what I think the attacker is describing is actually worse: he's saying that the quota "counter" is updated with a "read-modify-write pattern that's not safe for concurrent HTTP requests, so that you might have something like:
[request 0] read counter value = 0
[request 1] read counter value = 0
[request 0] set counter value = 1
[request 1] set counter value = 1
In this error, the counter is never incremented at all.
It's easy to imagine people making this mistake when they store the counter in something that does not support transactional updates.
- axiosgunnar 5y ago> a well-designed password (or similar) validation endpoint will both limit attempts per IP and per user I hope you‘ll never have to reset your password then as I‘ll happily send out those 5 requests every hour to lock you out ;-) This is also a kind of attack.
- md_ 5y agoThe rate limit per IP cam be lower than per user to make this more difficult; you can also offer other options (captchas, less brute-forceable auth factors). Not sure your point on “resetting” passwords, though. This applies to any validation flow, i.e. just logging in.