Its well known that popular Linux distros use the PAM default to slightly delay incorrect login attempts, thus mitigating brute-force attacks against a user account (for example, running su
repeatedly with different password input). The PAM delay is 2 seconds, which supposedly puts the chances of success within a certain range for a given password strength, and increasing the delay beyond this default is expected to make the attack's success even less likely.
The problem comes when you run this simple bash code:
time for i in {1..20}; do su -c ls user <<<"wrong_pwd"; done
Run from a single process, it takes a predictable amount of time. But run it from multiple processes at the same time, each instance will show essentially the same run time as the single-process attempt. Oops!
This means an attacker can make a brute force attack geometrically more effective against a PAM-mediated login if they simply run it in parallel.
Therefore, I have two questions:
- Am I missing some detail about mitigating brute-force attempts?
- If not, is there some configuration option that can be used to close this authentication loophole?