in reply to Re^4: Password strength calculation
in thread Password strength calculation

Once passwords are hashed, (and no one stores unhashed passwords right!), the stored hashes all end up the same length regardless of the length of the input. So any reduction in the possibilities just makes things quicker. And quicker, just means cheaper...

Here we have a (single) gpu cracking 8-character hashed (NTLM) passwords that would take 1 year using a fast cpu, in 18 hours. At a rate of 3.334 billion passwords per second!

Here we have clusterable twin-GPU AWS instances for $2.10 per hour. So for less that $20 you can crack 8-char passwords, from their hashes in an hour.

And the proof it's possible: German 'hacker' uses rented computing to crack hashing algorithm - Brute force PAYG hack attack cracks SHA1 hashes – for $2

The only effective defence is increasing the possibilities.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

Replies are listed 'Best First'.
Re^6: Password strength calculation
by mbethke (Hermit) on Jan 21, 2012 at 01:54 UTC
    Once passwords are hashed, (and no one stores unhashed passwords right!), the stored hashes all end up the same length regardless of the length of the input. So any reduction in the possibilities just makes things quicker. And quicker, just means cheaper... Here we have a (single) gpu cracking 8-character hashed (NTLM) passwords that would take 1 year using a fast cpu, in 18 hours. At a rate of 3.334 billion passwords per second!

    I'm well aware of current cracking capabilities (and the relative ease of calculating NTLM hashes BTW). But to do that, an attacker has to get at the hashes first, which assumes he's hacked your application already. Only in that case do make his work easier and cheaper: if we assume the conditions of your example and only allow 7- or 8-character passes, it's not 0.000000002% but 0.025%. So on his 1-hour cracking session he's saved 0.9s or 0.5 cents.

    If however our hashes have not been disclosed, all of that is hypothetical. In that case, network bandwidth and the overhead of your application is the limiting factor when bruteforcing. In that case, only simple dictionary attacks have a chance of succeeding. And that's what is actually going on---just watch auth.log on any internet-facing server with SSH enabled!

    To guard against GPU bruteforcing of disclosed hashes, the only practical solution (as people can hardly be convinced to use different 20+ character passphrases everywhere) is key stretching. If you use so many hashing rounds your machine takes 100 ms to calculate a hash, that doesn't hurt you much. A GPU may do it it 100 µs or whatever then but that's still impractically slow for bruteforcing.

      If however our hashes have not been disclosed, all of that is hypothetical. In that case, network bandwidth and the overhead of your application is the limiting factor when bruteforcing.

      There are many well-known mechanisms for defeating front-of-house attacks that are far, far more effective than password rules:

      • Insert an obligatory 5 second delay between accepting the password and the acceptance/rejection.

        Even with 1000 concurrent attack vectors, a minimal 4-char password of upper-case-alpha only will require 2 weeks on average to crack.

      • Start with a 1 second delay and double it after each failure.

        Even a single character password will take an average of 1 year to find.

      • Require email contact after 3 failed attempts.

        Possibly the most effective.

      To guard against GPU bruteforcing of disclosed hashes, the only practical solution (as people can hardly be convinced to use different 20+ character passphrases everywhere) is key stretching. If you use so many hashing rounds your machine takes 100 ms to calculate a hash, that doesn't hurt you much

      (To the emboldened bit): Actually, they can.

      The simple fact is that using the same 20-char pass-phrase everywhere is far more secure than using a different 8 character passwords at each site. And far easier to remember than multiple passwords.

      And, if the information was out there and people would take notice, coming up with a single, memorable pass-phrase is actually quite easy:

      'the quick brown fox', 'every good boy deserves favour', 'nine eleven two thousand and one'. 'marge, bart, and lisa', 'red orange yellow green blue indigo violet', ...

      Even if the hash of your one passphrase is disclosed somewhere, cracking will take so long you'll be dead before you are vulnerable on other sites.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

        There are many well-known mechanisms for defeating front-of-house attacks that are far, far more effective than password rules:

        How so? Finding any password at all over the net if a dictionary attack doesn't work is a matter of sheer luck with astronomical odds against the attacker. At an utterly negligible disadvantage upon hash disclosure.

        • Insert an obligatory 5 second delay between accepting the password and the acceptance/rejection.

        Even with 1000 concurrent attack vectors, a minimal 4-char password of upper-case-alpha only will require 2 weeks on average to crack.

        As the connections aren't doing anything else but wait for the response most of the time, it's not a problem for even a tiny botnet to open a lot more. And 26^4 is already about twice as much as my /usr/share/dict/words that includes a lot of rather obscure words---remember we're talking about dictionary attacks, not searching a whole keyspace of random combinations.
        • Start with a 1 second delay and double it after each failure.
          Even a single character password will take an average of 1 year to find.
        • Require email contact after 3 failed attempts.
          Possibly the most effective.
        Effective for getting people DOSed out of their accounts, yes. And your company getting DOSed by a stampede of users on the support hotline.

        Of course all of these are pretty pointless if the number of accounts to try is big enough so the attacker can just invert the game: instead of trying to find one particular account's password, use a spammer's address list and try to find the ones who've used one of the top 10 most frequent passwords.

        Actually, they can (be convinced to use 20+ character passphrases)

        The simple fact is that using the same 20-char pass-phrase everywhere is far more secure than using a different 8 character passwords at each site. And far easier to remember than multiple passwords.

        And, if the information was out there and people would take notice, coming up with a single, memorable pass-phrase is actually quite easy:

        Yes, I read this XKCD when it came out. The only problem is you got your grammatical moods mixed up: the information is out there (realis) so if people would take notice (conditional) they could be convinced, which sounds like conditional but as they don't take notice it's actually irrealis :)

        All your passphrase examples are of course perfectly alright by Cracklib's criteria.

        I think you really nailed this one on the head, the "natural language" password idea (using a long phrase as your password) is a great, and solid, idea. I hadn't thought of the incremental delay after a password attempt, that's brilliant as well.

        As for password encryption, I think I like bcrypt the best (checkout Crypt::Eksblowfish::Bcrypt).

        Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past