What is the best Distributed Brute Force countermeasure?

前端 未结 16 1827
逝去的感伤
逝去的感伤 2020-11-28 16:55

First, a little background: It is no secret that I am implementing an auth+auth system for CodeIgniter, and so far I\'m winning (so to speak). But I\'ve run into a pretty no

相关标签:
16条回答
  • 2020-11-28 17:39

    My highest recommendation is to simply make sure that you keep users informed of bad login attempts to their accounts-- Users will likely take the strength of their password much more seriously if they are presented with evidence that somebody is actually trying to get into their account.

    I actually caught somebody that hacked into my brother's myspace account because they had tried to get into the gmail account I setup for him and used the 'reset my password by email' feature... which went to my inbox.

    0 讨论(0)
  • 2020-11-28 17:39
    1. What about requiring a one-time-password before entering their normal password? That would make it very obvious that someone was attacking before they got many opportunities to guess the main password?

    2. Keep a global count/rate of login failures - this is the indicator for an attack - during an attack be stricter about login failures e.g. ban IPs more rapidly.

    0 讨论(0)
  • 2020-11-28 17:41

    Looks like you are trying to defend against slow distributed brute force. Not that much you can do about it. We are using a PKI and no password logins. It helps, but if your clients chance workstations every once in a while, this is not very applicable.

    0 讨论(0)
  • 2020-11-28 17:42

    Disclaimer: I work for a two-factor company, but am not here to plug it. Here're some observations.

    Cookies can be stolen with XSS and browser vulns. Users commonly change browsers or clear their cookies.

    Source IP addresses are simultaneously dynamically variable and spoofable.

    Captcha is useful, but doesn't authenticate a specific human.

    Multiple methods can be combined successfully, but good taste is certainly in order.

    Password complexity is good, anything password-based critically depends on passwords having sufficient entropy. IMHO, a strong password written down in a secure physical location is better than a weak password in memory. People know how to evaluate the security of paper documents much better than they know how to figure the effective entropy in their dog's name when used as a password for three different websites. Consider giving users the ability to print out a big or small page full of one-time use pass codes.

    Security questions like "what was your high-school mascot" are mostly another lousy form of "something you know", most of them are easily guessable or outright in the public domain.

    As you noted, throttling back failed login attempts is a trade-off between preventing brute-force attacks and ease of DoSing an account. Aggressive lockout policies may reflect a lack of confidence in password entropy.

    I personally don't see the the benefit to enforcing password expiration on a website anyway. Attacker gets your password once, he can change it then and comply with that policy just as easily as you can. Perhaps one benefit is that the user might notice sooner if the attacker changes the account password. Even better would be if the the user were somehow notified before the attacker gained access. Messages like "N failed attempts since last login" are useful in this respect.

    The best security comes from a second factor of authentication which is out-of-band relative to the first. Like you said, hardware tokens in the "something you have" are great, but many (not all) have real admin overhead associated with their distribution. I don't know of any biometric "something you are" solutions good for websites. Some two-factor solutions work with openid providers, some have PHP/Perl/Python SDKs.

    0 讨论(0)
  • 2020-11-28 17:46

    I have to ask whether you've done cost-benefit analysis of this problem; it sounds like you're trying to protect yourself from an attacker who has enough web presence to guess a number of passwords, sending maybe 3-5 requests per IP (since you've dismissed IP throttling). How much (roughly) would that kind of attack cost? Is it more expensive than the value of the accounts you're trying to protect? How many gargantuan botnets want what you've got?

    The answer might be no -- but if it is, I hope you're getting help from a security professional of some sort; programming skill (and StackOverflow score) do not correlate strongly to security know-how.

    0 讨论(0)
  • 2020-11-28 17:47

    To summarize Jens' scheme into a pseudo state transition diagram/rulebase:

    1. user + password -> entry
    2. user + !password -> denied
    3. user + known_IP(user) -> front door, // never throttle
    4. user + unknown_IP(user) -> catflap
    5. (#denied > n) via catflaps(site) -> throttle catflaps(site) // slow the bots
    6. catflap + throttle + password + captcha -> entry // humans still welcome
    7. catflap + throttle + password + !captcha -> denied // a correct guess from a bot

    Observations:

    • Never throttle the front door. The Elbonian state police have your computer, in your house, but are unable to interrogate you. Brute force is a viable approach from your computer.
    • If you provide a "Forgetten your password?" link, then your email account becomes part of the attack surface.

    These observations cover a different type of attack to the ones you are trying to counter.

    0 讨论(0)
提交回复
热议问题