Login watch
6 answers
Catching password spraying, not just brute force.
Looking for something specific
The searchable index covers all 326 answers at once and filters as you type.
234 Detect password spraying
- Open the site, Login watch tab, tick it on.
- Put in the login paths, one per line.
- Set which methods count, usually POST.
- Set which status codes mean a failure. This is the one to get right.
- Leave the thresholds at their defaults to start, then save.
Spraying is one password tried once against a hundred accounts from a hundred addresses. No lockout fires and no rate limit fires, which is exactly why it works.
235 Work out which status code means a failed login
There is no universal answer. A form that re-renders with "wrong password" answers 200 and answers 302 when it worked, so for that application 200 is the failure. An API answers 401.
Press Look at the log now, sign in wrongly once, and see exactly which code your application produced. Get it backwards and every successful login is reported as an attack, which is worse than no detection because people learn to ignore the alerts.
236 Why does login watch not tell me which accounts were hit?
It reads the access log, so it sees the address, the path, the method and the status. It never sees a username and it never sees a password.
Seeing usernames would mean reading request bodies, which is where the passwords are, and a security feature that starts reading passwords has become the problem it was supposed to prevent.
237 Tune the spray thresholds
All three spray rules have to hold at once, because any one alone is an ordinary Monday morning. A busy login page has plenty of failures. A large office has plenty of addresses. Everybody typing their password wrong once is exactly "few per address".
If you get false alarms, raise the minimum number of addresses first. That is the number that separates a spray from a bad morning.
238 What is the slow window for?
The same test run over hours instead of minutes, because somebody who knows detectors use five minute windows simply waits six. It costs nothing to run both.
239 Block an address that login watch flagged
Login watch reports rather than blocks, because a false positive would lock out a whole office. Once you know the shape is real, add the addresses to an access list or tighten the rate limit on the login path.