421 points · by joshwa · 15y ago · 170 comments
The danger of having an insecure password is not that someone will bombard the server with login requests. That can easily be detected and stopped by even the most cursory of server security. The danger is that they crack the server and get the list of password hashes, at which point the time to crack a password is dictated by the hardware at their disposal and the hashing algorithm. Your server capacity or timeout protocols are irrelevant.
So, the 100 attempts/sec number is essentially a fiction. It applies only to a manufactured threat. The real threat is much worse, which means that a password like "this is fun" is not reasonably secure.
Say you have something like a straight md5/sha256/etc. It's fairly likely that there exist rainbow tables that will insta(for some reasonable value of insta) crack any reasonable password.
On the other hand, if you use a salted hash you arn't vulnerable to rainbow tables, but an attacker can still try an altogether silly number of passwords per second given enough hardware. (or again, more specifically GPUS against most common salted hashes).
On the other other hand, if you use a memory hard key derivation function (scrypt/etc.), you can quite easily set things up such that even with a ridiculous amount of hardware it is infeasible to launch any sort of attack. The problem then, is that the harder you make it for attackers to attack your passwords, the slower normal logins are for you, affecting scaling.
So at the end of the day you need to weight off how much of a problem this is in the specific circumstances you are in which will then dictate the solution you can provide.
I think bcrypt is probably still more secure? Or maybe the best would be to combine both.
The problem is that by using a unique salt per user, you can't simply create one salted hash and use it on every user hash simultaneously, however you can still check one password each hash you generate. Bcrypt/scrypt are more secure as it requires much more effort to check each password.
even though "this is fun" isn't secure in your scenario, its still more secure than the "j63<2a" password in the same scenario.
The proper solution to passwords isn't to come up with a slightly longer phrase that can still be cracked in a reasonable amount of time, it's to use a 30-character randomly generated password for each login, and keep them in a privately encrypted password safe of some sort.
I aim to use a short phrase that includes punctuation and a number if required, and to have the sentence be thematically linked slightly to the system I'm logging in to. This produces a long string that meets the criteria and is memorable by following the original train of thought from that led me to form the sentence. This I believe is "good enough" in all scenarios, since I should be able to type it quickly, and never write it down or share it.
The only remaining issues are max-length password fields and keyloggers (apparently a parabolic microphone can be used as a keylogger!)
This isn't an argument either way. The service poorly handling passwords is even more culpable than the user with poor password complexity. Passwords should never be stored as plain hashes.
If you include a serious delay (like, "10 attempts to guess a user's password and we lock the account for an hour" or if you lock accounts & require admin unlocking), this is a great way to set yourself up for a quiet DoS. I don't have to bring your server to its knees -- I can lock our any user with only 10 requests, ha ha...
If you save the limit in the browser session, well, it's easy to start a new session for each attempt (just don't send in any established cookie). Limiting per IP is a bit stronger, but with large NATs this is still as risk of DoSing.
If you use just a small timeout -- like 5 seconds -- that means any individual attempt will take 5 seconds to return. Let's say I submit 100 requests in 100 threads. Will it take 500 seconds to return? Nope -- each thread will take 5 seconds, concurrently, and I'll have the results back in request tine + 5 seconds.
Also don't forget that an attacker is not required to choose a single email address and try to brute-force passwords. In fact, it's probably more efficient to take one common password at a time and try likely usernames.
http://grimboy.co.uk/blawg/in-the-uk-being-told-youre-alread...
While I think this post is rather optimistic in its calculations — using maximum entropy distributions, for instance — it does bring up a good point: Personally memorable nonsense sentences are rather high entropy.
Actual practical guessing is not pure distribution entropy but instead closer to the KL divergence since an intelligent brute force guesser has to make assumptions about the password distribution in order to reap benefits. If your password comes from an expected distribution (letters in English words, words in English sentences) you're losing a whole lot of potential entropy, traded for particular memorability.
If you can hedge between those bets, though, you're in a good place. "this is fun" is not actually terribly secure compared to "J4fS!2" unless you're actually attacked by a uniform dictionary brute force search. "slurping radicals debilitate enzymatically" is super high entropy and quite likely easier to remember than "J4fS!2".
1. Take a 100x100 binary matrix, initialized to 0.
2. Change some bits to 1, in a pattern that I memorized. It was just something simple, like my initials in dot-matrix form.
3. Apply Conway's Life cellular automata rules to the matrix, with no wrap, doing 108 iterations.
4. Read out the final state of each cell row by row, as a an ASCII representation of a binary string of 10000 bits.
5. Run that through MD5. Iterate this 1960 times.
6. The final MD5, as an ASCII representation of a 128-bit hex number, was my password.
I did NOT have any of the software for this on any computer. Whenever I needed this password, I'd write a Life program, enter my memorized pattern, run it, do the MD5 stuff, and then delete the program.
Effectively, my password was the combination of the Life algorithm, the size of the input, the input pattern, the number of iterations to run of Life, and the algorithm for converting the final Life state into an ASCII password string.
There seems to be a lot of entropy here. Yet it was pretty easy to remember.
If the attacker doesn't have a clue what the generating distribution is, then his attacks will be mis-encoded to a penalty up to the KL divergence between the his guess and the true generating distribution. You can fool people more simply than by your scheme.
Moreover, if it became common to use GoL and MD5 to generate passwords, then you've actually got a relatively small number of parameters leading to an insecure code space. I suggest you at least draw an easily remembered picture in the 100x100 grid.
Actually, that's a pretty fair principle of how to abuse the properties of our brains to make better passwords. Make the password depend on doing something that humans can do well but computers haven't mastered, and then do it slightly "off" in the even that computers do someday master it. The space of "almost intelligible" sentences or "poorly photoshopped images" are both way larger than the space of English sentences or recognizable images.
I don't see how you (incorrectly) guessed Libra. If you took the 108 as the 108th day of the year and assumed that was my birthday, that would be April 18th, which would be Aries. If you took it as meaning January 8th, that would be Capricorn. Did you assume it was 10/8? That would give Libra.
Anyway, the 108 is not a date. It refers to Math 108, an undergraduate math course at Caltech that bestows a curse upon those who take it. Forever afterward, the number 108 starts appearing in their lives more than normal.
One girl I knew there went so far as to build a digital clock that held 1:07 for two minutes so that she would stop seeing 1:08 on her clock.
The latter is, of course, unnecessary when you can do hypercomputation in your head.
[1]http://singinst.org/blog/2007/06/25/solomonoff-induction/
OTOH, you said "hex value". If you encoded your number as hex, you would get a 32 character long password (good if the target form allows for such LNG passwords), but only 16 possible characters which is way too little and defeats the purpose of all your elaborate setup
A sentence is the only way you'll get normal users to memorize a password > 6 chars. I think a sentence is much better than what most people end using, which is a personally significant word (like a child, spouse, or pet's name) + a brief personally significant numeric suffix (like birth year).
Let's say the suggestion "use an easy to remember sentence, rather than a short password" gets around.
The actual set of easy-to-remember sentences for a large set of users will include some very good ones, but mostly a small set of simple ones, like "To be or not to be", "Seize the day" and so on.
The cracking programs don't need to figure out what those are -- they just need ONE password dump from a site with poor security (easy to find, unfortunately), and the analysis is trivial.
The other downside of sentences, though, is that even when the average person picks an easy-to-remember sentence, it's still hard to remember exactly how they wrote it last time (upper-case, all lower, what punctuation?), and for poor typists, think about the chances of making a typo (or just forgetting where they were) while typing out all those little stars....
leetify:
1eetify 13etify 133tify 1337ify 133y!fy ... leetif/
You've added about 100 new words for that one old word. Of course you can do this programmatically, so your actual dictionary stays the same size, but your search is still 100x or more longer.
Or you use all the characters ?
cucumber of our discontent pot calls kettle soapy
Still relatively easy to remember but with less chance of being in some dictionary.
"apple" has 3 characters (2^3 = 8 variations) for easy leetspeak. "apples" has 2^4 = 16. "applestastegreat" has 2^12 = 4,096. Assuming you don't totally fubar your entropy in the underlying passphrase, you'll end up with something both memorable and infeasible to brute force.
Likewise, if dictionaries (and the permutation rules) lack a non-standard character, using that character will defeat the dictionary attack.
If you use a straight brute force then there's a trade off between the characters you use and the amount of time it'll take to exhaust a particular set of characters. It's only if the attacker is determined (and has usually exhausted alphanumeric character set brute forces) that you'll start to see other characters being added to the brute force. The great thing of course is that the attacker has to pretty much start from scratch with another set of permutations for each additional character.
Furthermore, like Richard Feynman discovered in Los Alamos, you could narrow down the possibilities of combinations if you know something about a person. You could probably build profiled dictionary attacks and reduce possibilities a lot.
So, is it more secure? No, it's maybe equally secure, but it would completely depend on the attack. A combination of capital letters would probably be more secure though.
82 billion may sound like a lot but it is not. Suppose you had a few multi-core machines that could collectively get up to 1 million crack attempts per second. Now you can crack that password in 82,000 seconds, or under one day.
Ditto for when someone has a visual glimpse of your password which is only a few seconds long. (e.g. someone looked at your laptop screen while you got an email with your password from an irresponsible website.)
A while back I wrote a small piece of JS to demonstrate to some people the complexity growth in passwords. Some people didn't believe me that asdfasdfasdf was more complex than Fc34!j_, and this was the end result. Feel free to play with it. The source is rather simple as well:
I think what he is trying to show is that is that the lower security of using multiple common words on a password with 11 characters is still greater security than a random 6 character password, and still quite acceptable.
A full 16-bit unicode 2 character password has 65 536^2 or 4,294,967,296 permutations to work through.
A lowercase alphabetic password of 6 characters in length has 26^6 = 308,915,776 permutations.
Of course there's a tradeoff involved, and that tradeoff is what IT departments try to manage, with mixed success. It's easier for the software to determine whether or not the password contains methods of increasing the keyspace than whether or not the user has typed out a 200 character long series of 'A' characters, so that's what they use. I don't know whether or not increased length has a higher risk of collisions for some algorithms (that's tptacek territory, not mine). Over time, software products have been guided by best practice standards from organisations like COBIT that define and mandate complex passwords based on keyspace rather than length alone.
Secondly, there is a difference between an online brute force and an offline brute force. Depending on the algorithm, with the right kit (or Amazon EC2 instances) you can get billions of hashes per second to crack a password hash offline. At that point your increased length only matters if the attacker doesn't know about the complexity. The samples provided are terrible as they're all lower case with a space at most. This is the poor end of the trade-off. To brute force a SHA-1 hash of the word 'sum' on my 2 year old laptop takes less than a second.
Online brute forcing (e.g. brute forcing a web form) is generally something you're not going to do if you're looking to compromise a web account, unless it is a specifically targeted attack (e.g. the user is an admin or a specific person of interest). In these situations your brute force rate is dependent on your network throughput, the application's ability to respond to concurrent requests and any other factors that may affect it (such as any monitoring system). Your web application on a linode slice will probably choke out between 40 and a hundred attempts per second (and you'll notice it unless you're blind or have no performance reporting). If you can get past the automation detection in larger sites, like Amazon, Google, Twitter etc. you'll probably be able to go much, much higher. For this reason, web site brute forces tend to be dictionary based, or at most on dictionaries and a number.
Ultimately when choosing a password you need to consider what you're defending against. If you own the box or the app, chances are you trust the defences. If you're going to change the password every few months then maybe you will choose a weaker password. If you don't own the kit and you're not intending to use the password, then use a tool such as Keepass[1] and generate the passwords yourself. That way it doesn't matter what J Arthur Random says on the Internet, you won't need to remember the passwords at all.
[1] - http://keepass.info/
27 possible chars * 16 length gives 27^16 combinations, or about 8.0 * 10^22 combinations. (Although much, much less in practice because you're using common english words separated by spaces.)
Printable characters, including punctuation like { } | & etc, gives you 95 characters, for 4.4 * 10^31 combinations - about fifty million (50,000,000) times larger.
Also, the main attack (which the article misses) happens offline, where the bad guys have compromised a system and downloaded all of the password hashes. In that case, they're only limited by the hardware that they can throw at it - FPGAs and high end graphics cards can check stupid numbers of hashes per second. http://nsa.unaligned.org/ is from 2007, and will check 800 passwords * 64 chars * 8 length in about a day.
a) check length of password. Length < 6 = fail. Length < 10 = complexity requirement. Length < 15 = less complexity requirement. Length > 15 = secure.
b) ALWAYS do a dictionary lookup on the password. A dic lookup vs a dic attack is cheap. Hell the dic can be stored in memory in a hash map... even with misspellings, we don't even need to be 100% accurate either. Once you have that, basically check complexity: 1 word = no good. 2 words = ok, add a special character in there and a caps. 3 words = great. 3 words + special characters = awesome. etc.
Anyone can make one of these in a few hrs. and give error messages like:
"Your password is too short"
"your password is too simple for it's length, either make it longer or add special characters, numbers, and capitol letters"
"your password is made up of a single word or easily obtainable information about you based on information we have in our system, please change the words used or add more of them"
This means: (a) people understand why password is rejected and (b) people have choices and (c) increases probability that people won't forget their password.
Oh and any system that limits passwords to < 50 characters can fo fk themselves. Too bad ADP (paystub) has a policy of 6-12 characters. Thats right limitations, and I have to use that crap. Is a 4000 byte database column that expansive nowdays?
Furthermore... Changing password every 1-3-6 months is also bad. WHY? Simple, very very simple: 99% of the time you will have one of the following situations:
- The same password is used + an extra 1 or 2 characters.
- The same password is used + different capitalizations.
- A different password is used + post-it note.
- The user will forget their password immediately.
The TRUE answer to the reason why it policies are the way they are is because people don't want to think. "Tom did it this way, it must be secure." "I don't really understand it, so whatever, its the standard, it must work."
To make passwords secure they need to enact the policies I stated + a second factor for authentication. If you log in from an "unknown" location (a new one) just send them an email, or sms, or something that gives some key to enter to authorize. This will work in letting people know there is a breach, change pw on need, don't make ppl change passwords nonestop. Lots of advantages.
Wow writing this I feel like we need a startup that provides this exact solution. One question for the fellas who know more... how hard is it to spoof someone's ip without them knowing (internal network or external)
You must be fun at parties.
You do realise that a password of AAAAAAAAAAAAAAAA would be considered completely secure by your system, right?
For your second point your dictionary checking algorithm is only as good as your dictionary. If your dictionary is too small then you're not going to do much. It won't do much good for multilingual users either.
<snip rant about changing passwords every now and again>
So are you proposing that people don't periodically change their passwords?
As for spoofing the IP, it depends on where you are and where the target is. If for example you're both on the same internal network, are NATted and your system's on the Internet then it won't distinguish between the two IP addresses. The same applies if both your and the spoofer are going through a proxy, or the spoofer is between you and them (although it is harder to do than just sitting behind the same NAT gateway it is doable).
This always gets me thinking.
Why is it "good" to change your password periodically? The only reason I can come up with is that, if someone gets your password, you prevent them from being able to use it if they sit on it for X months until your routine change comes through. To which I say "What?! Why would they wait that long?". It's a ridiculous assumption.
There's also that forcing changes (kind of) ensures system A doesn't use system B's password, so you don't lose everything if one account is compromised. But people get around that by having several that they cycle through, on all sites - mostly negating that argument. If they got in once, they can get in again, and (as below) each of those multiple passwords is more likely to be weaker.
Meanwhile, on the flip-side, we have that more frequent changes create weaker passwords, as they all have to be remembered, or trivially-guessable changes. Which means every password is easier to guess, or if the attacker sits on it for a few months, they can probably guess the one of a few hundred likely changes you made, and it really makes no difference that you changed it. Or they wrote it down and stuck it up somewhere, which means it's wide open to social hacking if you have any coworkers.
So the solution is to use a unique random value for each password, stored in a keychain somehow. At which point: why would changing it help? You would only lose the password if someone got your keychain, or hacked the system the password is used on and retrieved it. Either way, it's gone for good, immediately, and it wouldn't matter if you had changed it last week. And all you lost is that single account, which was lost the moment you lost the password anyway.
One of those little meters that warns you if your password is weak is fine, but in my experience they aren't very accurate.
Complexity requirements aren't targeted for you. You're making a conscious decision about what risks you're willing to assume. Most people aren't aware of the risks, even if told their password is weak. That is who complexity requirements target. (But the requirements probably aren't altruistic: they're really there to help protect the application and its developers from the perception of insecurity.)
This is one reason why application developers should get out of the business of building authentication systems. At least then the problems belong to someone else who we'll trust to have dealt with them.
I have never heard of dictionary be referred to as "dic"..... sometimes "dict" though.
http://research.microsoft.com/pubs/132859/popularityISeveryt...
Therefore, you should be pessimistic, and consider the password "this is fun" less safe than passwords in the shape [a-zA-Z]{3}, like "tsP", of which there are 140608.
Assume attackers know the algorithm (e.g. three common words, one 7-letter word in l33tspeak, a 6-letter string of random ascii characters) but not the parameters.
- support very long passwords, so that users can use pass-phrases if they like.
- use bcrypt or the like for storage
- do not create easily cracked side channels, like a fixed set of "security questions" for forgotten passwords
"Do these jeans make me look fat?
"Why is everyone staring at me?"
"Is there something in my teeth?"
"Are they talking about me?"
... yes I jest, but that would be cute (and serve no practical purpose).Bank of America, for example, foils 1Password by spreading login across two forms and using a custom, non-machine-discoverable "submit" button in one of them.
Time between events should be limited by either the app's login function or a suitably expensive hashing function (whose algorithm will have to be known in the case of a DB dump)
There are roughly 32 billion of google 4-grams.
Summing up, a meaningful 4-word phrase, is, in the terminology of the article, "risky".
My advice: use generated passwords, and apps like 1password to remember them.
I guess these systems do get hammered by so many improper attempts and you'd risk blocking the actual account owner. But if a billion attempts are made from the same ip in an hour, shouldn't that be considered suspicious?
Personally, I like what Google's doing with the two-step verification. That's probably where security should be going.
Because people aren't random when they choose words to remember (e.g. "beavisandbuthead" is also on that list), a better set of password-choosing directions would provide instructions one how to add some additional (pseudo-)randomness to passwords that are being created. The classic "pick a phrase, take the first letters + punctuation" method is one way to do that ("pap,ttfl+p" is a somewhat strong password), and it's not hard to think of other password generation schemes that also create strong passwords.
I recommend to use a password manager, KeePass is quite good.
Good password manager should be able to easily generate a new strong and complex password every time.
Remembering only one password and getting rid of the laziness of choosing always the same password is another advantage too.
Even if a website that stored your password in clear text and someone hacks the website, you shouldn't have to worry about other applications or services you may have used with the same password.
My personal rule is to choose unique strong passwords (alphanumeric and symbols) with at least 9 chars.
Brute forcing a password with 8 chars was with my 5870 no big deal at all, but cracking a password with 9 chars is too expensive (ec2 gpu) or takes to long for the usual hacker.
If someone really brute forces my password, with gpu and a cluster support, damn, than he really deserve it.
But that's just my two cents.
We use PGP Whole Disk Encryption at my company. The passphrase strength requirements are quite strict. It took me about two dozen attempts before I found a password that it would accept. The password was something along the lines of what the article is proposing, five short English words arranged in a sentence (about 25 characters long). This was acceptable to PGP because the software prefers longer passphrases with less entropy per character over short passphrases.
The problem is that it's quite hard to type this long passphrase in when all you can see on the screen is stars or dots. The longer a passphrase is, the higher chance there is of introducing a typo. A shorter passphrase, mixed case and with symbols, is, at least for a programmer, easier to type, especially with muscle memory.
In the case of PGP Whole Disk Encryption, they obviously realized this since you can press the tab key to enable showing the password in plaintext as you type it. I always do this because it increases the success rate of my password acceptance quite a bit.
On an unrelated note, it seems that a far bigger security risk on the Internet is the use of the same password on multiple web sites. If you use "this is cool" on ten different sites, then you are opening yourself up to serious vulnerability if one of the sites is compromised. Using a hash of a common password with the domain name provides a lot more security, but the simple implementations available today produce passwords that are short with mixed case and symbols versus long strings of words. But since the only sane way to use this approach is with a password manager, extension, or bookmarklet anyway, this doesn't seem to be a major limitation.
But having to create and remember short three to five word passphrases for dozens of web sites would be a daunting challenge!
My password system is detailed here: http://news.ycombinator.com/item?id=2431480
It's secure, passwords are never stored, and it's not based on any false premises.
You'd actually break most people's common words passwords using smaller word lists, say the 4096 most common words. Three words from the top 4096 chosen at random gives a password equivalent to a little under 6 characters of mixed case/digits/punctuation.
Also, as stated in his The Usability of Passwords - FAQ (http://www.baekdal.com/tips/the-usability-of-passwords-faq):
Q: So, are you saying we should use "this is fun" as our password?
A: No, I'm saying that you should use a 3+ word pass phrase as your password. Something that isn't linked directly to you or your immediate interests. So don't choose the names of your three kids.
Try signing up there. You will find that the passphrase suggestions are quite nice. To obtain them, I took three random words, searched yahoo news for those words, and for each result, chose 3 contiguous words and presented it as a passphrase suggestion.
In the event that Yahoo is unreachable, our server generates one of 50 million unique phrases from ADJECTIVE NOUN VERB NOUN. I would say this produces greater entropy than if you left people to choose their own passphrases, even if they don't copy our passphrases exactly.
Someone scanning a keylogger file might not even notice "this is fun". It doesn't look like a password.
The only time someone has gotten my password was actually from a keylogger when I logged into Facebook at a hostel while traveling.
Pro tip: Another way to defeat those is using the virtual keyboard in windows to "click" your password in. I do this while traveling now. http://www.microsoft.com/enable/training/windowsxp/oskturnon...
2. Make an algorithm based on the URL. E.g. news.ycombinator.com a) Take the last 4 characters in the URL, excluded the domain suffix: ator b) Shuffle the letters based on your algorithm: orat
3. Combine the password key and the output of your algorithm: orat-Kr/2.pq4
4. Always enjoy individual, secure and easy to remember passwords for any services.
The algorithm you use can be more complex, e.g. adding characters in between, but the basic idea should be explained.
That's bullcrap. Few will remember this password, but most can if they try. My work domain password is over 8 characters in this level of complexity and it took me about 10 minutes to get used to typing it, a day to fully get it into muscle memory. If you ask me what my password is, I'd have to type it out.
But the other thing, use UTF8 high value characters. Or simply learn Russian and use a password from russian words.
{login(url='google.com',user='meric',password='sun');}This article is misleading in the sens the results it gives are only applicable for very narrow cases, and fast reading it can give the impression that "J4fS<2" is a "secure" password and that "this is fun" is even more secure. While this can be true under those very restrictive hypotheses he used, the fact that it was not prominently warned that those hypothesis should not be blindly used for basing password choice for random online web sites or other things makes this article dangerous.
A Comparative Study of Three Random Password Generators
http://tamale.net/pub/2007/pwdgen/pwdgen.eit2007.proceedings...
"Hey Hey Mama Said The Way You Move Gonna Make You Sweat Gonna Make You Groove"
and turn it into the password hhmstwymgmysgmyg!8
or "The woods are lovely, dark and deep. But I have promises to keep"
to become: twaldadbihptk$9
Easy to remember, relatively high entropy, pretty good compromise.
Since I already had a song-lyric dictionary (that prioritized complete phrases like you used there, "HHMSTWYMGMYSGMYG" being FAR more likely than just "HHMSTW") it didn't take long for my program to just grab the first letter of each song lyric word, stick them together, and then add every possible combination of symbol->number to the dictionary.
Now everyone you've told to do that will be very quickly cracked if I ever get their hash.
This is security through obscurity and you just gave away your obscurity by posting your algorithm on the internet...
Personally, I like diceware passphrases, written down. The Sign Up screen on this site rolls a random passphrase:
Let x be a three word pass-phrase of 11 characters and y be a 6 character standard complex password.
The argument is: x is more secure than y.
You've pointed out a special case where x is also a COMMON phrase, and demonstrated a counter example to the assertion.
So rephrasing the argument:
Let x be a three word uncommon / nonsense phrase and y be a standard complex password.
x is more secure than y (and a hell of a lot more user friendly)
I think with that modification the argument stands, and the specific case of 'this is fun' is a mundane distraction from the real point the author was making.
If you use 3 uncommon words with no logical connection ("masquerade nefarious pulchritudinous") you are probably safe, but if two of your words are among the language's 100 most common, and your password is a sentence... bad idea.
A cracker faced with a 20-character password space is going to choose "this is fun" before "J4fS!2". It's only with a 6-character password space (which is pathetically small) that "J4fS!2" is likely to be hit.