4 ms·
Speed is the problem. ocl-hashcat can test in the region of 6 billion MD5 hashes a second on a decent GPU. With a random salt and, say, an 8 character password
by onion2k 11y ago
Speed is the problem. ocl-hashcat can test in the region of 6 billion MD5 hashes a second on a decent GPU. With a random salt and, say, an 8 character password it'd take a long time, but not so long it's impossible. On a site that includes rules like 'Must have an uppercase letter', 'Must include a number', and 'Must include a special character' you actually reduce the size of the space and consequently make the password easier to brute force. With those rules in place there's 159,655,911,367,680 possible passwords[1], so brute forcing at 6 billion hashes a second it'd take just over 7 hours. Maybe double that for the overhead of adding in the salt and managing the list of attempts, etc.
The point is it's achievable. If someone gets a dump of the database it can be turned back in to usable accounts. If you use something much slower they can't. There's no benefit to using MD5. On the other hand, using a better hashing algorithm protects user's passwords from brute force attacks. Why wouldn't you want that?
Quite a good article about cracking a well designed database of bcrypt'd passwords - http://arstechnica.com/security/2015/08/cracking-all-hacked-ashley-madison-passwords-could-take-a-lifetime/ http://arstechnica.com/security/2015/08/cracking-all-hacked-...
[1] From http://math.stackexchange.com/a/410885 http://math.stackexchange.com/a/410885
- mikkom 11y agoOkay I understand this much better now. I was assuming this was about remote access exploit not a local one. Point taken. Use SHA-? instead of MD5.
- onion2k 11y agoYep. SHA-256 is a good bet at the moment, or SHA-3 if it's an option.
- franciscop 11y agoNot really, bcrypt is the only bet, SHA-256 is also too fast
- mudetroit 11y agoIf we are going to be correct about this then let's actually be correct and not just say bcrypt is the only bet. You want a system that manages work rate. Off the top of my head that also includes scrypt and pbkdf2.
- franciscop 11y agoThat's right, I wrote what I used in the past
- PeCaN 11y agoNo! Use a proper key-derivation function (bcrypt, scrypt, pbkdf2), not a hash function. SHA family, including the rather unrelated but exceptionally nifty SHA-3 (Keccak), are still hash functions and are still really fast to compute (good if you need to verify the contents of something, bad if you need to store secure information). A decent GPU can still crack SHA hashes effortlessly, and a dedicated attacker will have some good FPGAs (in which case you'll be cracked in hours). Use a function that is meant for storing passwords.
- mikkom 11y ago:-) Bcrypt it is then.
- oever 11y agoThe password store in Yesod contains nice documentation about how it works. I found it very enlightening and reassuring to read: https://github.com/yesodweb/yesod/blob/master/yesod-auth/Yesod/PasswordStore.hs https://github.com/yesodweb/yesod/blob/master/yesod-auth/Yes...