Some of the more complicated password/hacking blocking tools will do the following..
Keep a running database of:
IP -> Username good auth
IP -> Username bad authUsername -> Current session list
With these three time stamped pieces of information you can do the following:
Test for repeated usernames with bad auths from one IP, and tag the IP as
a cracker for X minutes (you have to have a rolling target for this so you
can set the weight limit high enough to get few false blocks -- meaning 5 bad
user/pass combos with unique users in 30 seconds triggers a block while 5 bad
auths over 5 minutes does not.)
Many same user bad auths with the same IP (or different as most password
cracking software will use huge proxy lists to hide the source of the attack)
can trigger a administrative lockout of the account --
You should give the user the ability to easily unlockout their account once
every
X minutes
via
another
form or
via customer support.
Test for multiple good auths from different IP addresses with unique session
ids. This should take into account that the end user may have a few different
computers live on the site at once -- but there is no reason to see 15 active
sessions from 15 different IP addresses.
Just make these test flexible enough to allow for normal allowed use of the
site while catching blatant cracking attempts.
-Waswas
EDITED: Spelling mistakes fixed gogo dyslexia.