if you have a phone with 4-digit pin and the phone does not get locked no matter how many times you put the wrong pin it makes sense to use 10 or 16 digits as it'll increase the time the attacker needs to crack the pin and make it sounds impossible to crack.

However these-days even simple websites stops the user from trying random passwords after 3 or 5 attempts, to my understanding this kill the entire concept of brute force.

There has to be something wrong with my way of thinking, what am I missing?

  • 3
    If the website database has been compromised, this might help to stop cracking the stored hashed passwords. – Emadeddin Nov 10 '15 at 13:27
  • 2
    @Emadeddin I thought of that but if Google database got compromised then the password is the least of my problems! Also how could they depend on the user to increase the security, shouldn't they use a complicated salt and a very secure hashing function? – Ulkoma Nov 10 '15 at 13:29
  • 1
    If you don't force complicated passwords, people tend to go for simple ones: "password", "qwertyuiop", "stackexchange". Even with brute force protection, there is a good chance that these could be broken - take the top 3 passwords and try against lists of users. Salt/hash doesn't affect that - it's the same if you have BCrypt or if you just store passwords in clear. However, with some complexity rules in place, people tend to come up with slightly better passwords: "Password1!", "Q2w3e4r5t6y?", "$t4ck3xch4ng3" - these vary more, so are less likely to be in common password lists. – Matthew Nov 10 '15 at 13:37
  • @Matthew this makes sense now! So it's not because of the brute force attacks like I thought. – Ulkoma Nov 10 '15 at 13:38
  • Also: The 3 or 5 attempts limit is typically per ip address, so I someone has a botnet of 10.000 computers he can try 30000-50000 passwords. – MTilsted Aug 25 '16 at 17:36

Nowadays, the scenario password policies need to defend against is the theft of the complete password database. This is something which happens with alarming frequency even to very reputed websites.

When the developers of the website follow common best practices, then password databases usually don't contain the plaintext passwords but instead store a hash of every password. An attacker which has access to this data can perform an offline brute-force attack by calculating the hash-values of common weak passwords and compare them to the hashes in the database. To defend against this kind of attack, users need to be motivated to use strong passwords.

  • There are two things that mitigate brute forcing in this scenario: length and complexity of the password, and computing time and resources required to derive a hash. A slow, resource hungry hashing algorithm like PBKDF2 or bcrypt will dramatically decrease the ability to brute force passwords of low-moderate complexity whereas something like (a single round of) SHA-256 will make moderate to highly complex passwords more feasible to crack. – thomasrutter Mar 1 '16 at 3:54

Your password can also be used to derive/protect an encryption key which is used to defeat players like the NSA.

Imagine NSA actually have unrestricted access to the internal networks of popular service provider A but cannot change code running on A's servers. A then encrypts all user data with random keys and the keys are encrypted by the user’s passwords before they’re stored on A’s servers. Now, even though NSA can see all the traffic and server contents, unless they breach inter-process memory barriers on the server, they cannot actually access any secret key or user data. Their only attack here is to brute force the user password against the encrypted key.

Here NSA can also be other national actors or warrant-bearing law enforcement.

  • Apart from the obvious tinfoil-hattery, you've described a case where data is stored in such a way that the server does not have the ability to decrypt it when the user is not logged in. This is sometimes done, usually in the case of a simple file storage service, but in most cases the server needs access to that data for one reason or another, so it's encrypted by some sort of master server key. The NSA doesn't need to "brute force" this key, they can simply ask for through a court-order. – Mike Ounsworth Nov 10 '15 at 19:31
  • A key component of "cloud computing" is just storage with no server-side "computing". There are entirely businesses based on storage service alone (e.g. box.com, lastpass). Also, my answer is more oritented towards the OP's comment about big sites like Google leaking database and indeed we saw that no user data, if no weak password was used, was really compromised in lastpass's leak. – billc.cn Nov 10 '15 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.