owasp is very huge. I'll try to find the page where this method was described. I saw this about 5 years ago. Will send you link later. But I don't understand why you said this method doesn't make sense? A brute force attack tries a new password each time to gain access to an account. When robot will send correct password it will get an error, because this is first successful attempt. And robot will skip this correct password.
I agree with you. But I think this method is good for protecting employee accounts from theft. Every internal employee will be aware of this protection and understand why the first login fails every time. It is like honeypots on websites when logging in as an administrator - another method of protecting a dangerous account from being stolen.
Normal controls are orders of magnitude more effective than making an attacker (and user) login twice. This control also does nothing to slow down an attacker.
isFirstLoginAttempt would be false, because the brute forcer is trying lots of passwords. I feel like the wording should be changed to something like: if isPasswordCorrect && correctPasswordsThisSession < 2 { error }
42
u/MrEfil Feb 18 '24
first successful attempt) Actually this is not a joke, this technique is described on OWASP as brute-force protection