Ah, passwords. Love ‘em or hate ‘em, they’re a necessary evil of the digital age. The reality is we all end up with an alphabet soup of passwords spread over dozens of various sites and services across the internet. Whilst we might not always practice it, we all know the theory of creating a good password; uniqueness, randomness and length. The more of each, the better.
Of course we frequently don’t do this because of all sorts of human factors such as convenience, memory or simple unawareness of the risks. Still, when it’s a case of individuals electing not to create secure passwords, they really only have themselves to blame.
But what happens when the website won’t allow you to create a secure password? Or at least when they severely constrain your ability to create long, random, unique passwords? And what about when they don’t allow you to send it between your computer and their server securely?
Even worse, what happens when our most “secure” institutions implement lazy password policies? Unfortunately, all of this is pretty rampant practice.
Why bother?
Recently I went on a bit of a binge. The whole Gawker situation got me a bit worried and whilst I didn’t exactly reuse the same weak password in every location, I was taking some risks I really shouldn’t have been. Call it old habits.
So I coughed up a few dollars and got my hands on 1Password. The theory is simple; create one secure password you can remember then protect all your other long, random unique ones that you can’t remember with it. The beauty of this approach is that once you let go of the “I must be able to remember and easily type my password” mentality, you can start creating really, really secure passwords. 1Password will even help you generate them:

All that was left was to go through each and every site where I had a password and replace the old one with a seriously secure version. Couldn’t be easier than that right? Wrong, oh so very wrong…
No SSL
In my password reset travels, the most frequent bad practice was SSL. Well actually, it was not having SSL and this practice is everywhere.
Last week I got a bit righteous about the whole thing when I wrote about Why your app’s security design could affect sales of Acai berries, effectively saying that we, as developers, have a responsibility to secure all credentials, even the ones securing content we may not deem as sensitive.
If you weren’t living under a rock last October you would have heard about Firesheep. This little tool showed just how easy it to capture unencrypted network traffic. Actually, Firesheep was sophisticated enough to steal sessions even if the logon occurred over SSL. It’s a very stark reminder of just how vulnerable unencrypted HTTP traffic is and by all accounts, it’s rather popular (and most likely prevalent):
The worst culprits are clearly forums. I can only assume it’s that old “security not that important concept” raising its ugly head again but almost without exception, SSL is nowhere to be seen. Now keep in mind also that SSL is cheap; you’re talking in the tens of dollars per year to get a foot in the transport layer security door.
So who are the culprits? They literally wouldn’t all fit in one post so perhaps some of the various industries. Automotive, for example, in the form of 6 Speed Online:

How about investment? You know, the industry that deals with heaps of money and probably should have a bit of an idea about how to protect customers. Not something PropertyInvesting.com is aware of, obviously:

But Simple Talk? From the very fantastic guys at Red Gate? This one is pretty surprising:

I mean it’s not like they write about security or anything, right?!
Update: No, none of these post to HTTPS either. More info in “Update 1” below.
Length matters (and so does complexity)
Firstly, a little bit of combinations and permutations 101; the more characters with the greater range of values, the more possible combinations you can have. As these increase, so does the uncertainty – or entropy – of the password. This is a good thing.
A four digit password has 10^4 or 10,000 combinations.
Make it a four character password allowing letters and numbers and you’re up to 36^4 (10 numbers plus 26 letters) or 1,679,616 combinations.
Make it four case sensitive characters and you’re up to 62^4 (10 numbers plus 26 lowercase letters plus 26 uppercase letters) and we’re at 14,776,336 combinations.
Make it 10 case sensitive characters including numbers and suddenly we’re up to a huge 839,299,365,868,340,000 combinations. And so on and so forth.
From a brute force attack perspective, this is a very good thing indeed. And just in case this is starting to sound a bit excessive, how about being able to test 400,000 passwords a second for only 28 cents a minute? Things are starting to get very, very interesting.
Sidenote: yes, yes, there should always maximum failed attempts before lockout and all of that sort of thing but that assumption only works when you’re talking about authenticating through the intended channels. It’s a whole different ballgame when your database is disclosed and someone starts working their way through encrypted passwords…
Moving on, LinkedIn starts out ok; min length, recommendation for different character types even SSL, but then goes and chops you off at 16 chars:

What’s going on here? I mean, how many bytes are they honestly saving here? What drove them to say “I think 16 is just fine”? And how long should a password be allowed to be? Sure, you’re got to cut it somewhere but passwords of this length (and less), are clearly the exception. At least based on my experiences recently.
But it gets worse. How about TomTom:

I know GPSs can make you do pretty stupid things, but does it have to extend to their password policy?!
Still, I think we can do better. Or is that “worse”?

Ok, the twelve character limit isn’t good but it’s also no worse than TomTom (although shouldn’t a bank be significantly better than a mere GPS manufacturer?). But no spaces! Really?! And what the hell is a “special character”? No, really, I have no idea. Is it a punctuation character? Or something else? They didn’t tell me I couldn’t use one before I entered it then they didn’t tell me which one it was after I entered it!
Surely this is an exceptional example within the financial industry? Uh, unfortunately not:

Ok, Amex gets some marks for at least being upfront about what you can and can’t do but not case sensitive! Mixing upper and lower case characters is something everyone knows they should do and Amex throws that right out the window. Regardless of how secure you want to make your password, they’re not going to let you implement some of the most basic strong password naming practices.
But the good news is that Amex is aware of it and as it turns out, this is a security feature:
I would like to inform you that our website has a 128 bit encryption. With this base, passwords that comprise only of letters and alphabets create an algorithm that is difficult to crack. We discourage the use of special characters because hacking softwares can recognize them very easily.
The length of the password is limited to 8 characters to reduce keyboard contact. Some softwares can decipher a password based on the information of "most common keys pressed".
Therefore, lesser keys punched in a given frame of time lessen the possibility of the password being cracked.
I think I actually feel dumber for having read that.
So why is this happening? Why keep passwords short and rule out a whole bunch of characters? Inevitably there are various touch-points where length needs to be declared (input field max length, data type size, etc.) but why only 12 or 16 chars? Is the difference between that and, say, 50 chars really an issue?
As for the character types, I suspect it’s more of an escaping and possibly an XSS concern or maybe even worries about injection, but are these really an issue in this day and age? Most frameworks either implement the required escaping natively or have easy access to libraries which can take care of this, is it really a problem that someone wants to use a quote or an angle bracket?
After all that, you reckon those short, simple passwords were bad? Wait until you see who’s using PINs…
PINs
Let’s move on to a frankly ridiculous practice that totally goes against the grain of the good password entropy concepts of length and randomness concepts; PINs.
Right off the bat, a personal identification number is going to be a, uh, number i.e. each character has 10 possible values. That’s pretty bad on its own but what about really short PINs? Who would do such a thing?!
Singapore Airlines for starters:

No amount of smiling Singapore girls is going to make me feel better about the fact that it only takes six little numbers (and no SSL) to jump in and look at my travel history and book flights with my points. And the KrisFlyer number? The one readily shared with travel agents and even printed on luggage tags? Don’t bank on that one being secure!
Thank that’s bad? Those guys were generous allowing a whole six digit PIN! Qantas reckons four is just fine:

Saving valuable database storage bytes so they can channel the funds back into engine maintenance perhaps?
Update: SIA and Qantas do actually post to HTTPS but of course, that’s only part of the SSL value proposition. More info below in “Update 1”.Airlines screwing up basic security measures is one thing, but banks?! Surely not, I mean these guys are the pinnacle of security right? The driving force behind such initiatives as PCI; they should be beyond reproach. But are they?
But probably the worst offender is ING Direct:

This is a freakin’ four digit PIN! On a bank account! It’s exactly the same length and randomness that I use to protect my undies when I fly:

But wait! They’re aware of the issue and are upping the ante on security:

I asked why my bank needed to have a less secure password than my Twitter but then everything went a bit quiet.
Look, I get the history with PINs; in days gone by they were the password de jour. They secured your bike lock, you could enter them into a touch-tone telephone, heck, you could even pull money out of the hole in the wall with a four digit PIN. But of course all of these interfaces needed nothing more complex than a PIN. There’s a reason you don’t see bike locks with QWERTY keyboards!
But of course these devices weren’t all connected to the world like the websites of today are. Sure, having a PIN means you can easily enter into the phone as well as the internet but seriously, when you’ve got a selection of characters like this right in front of your customers:

Why the hell do you give them this?!

Just plain weird and stupid security
And now the worst of the worst; the ones that just failed catastrophically at some real fundamentals. These are the sites which have done simply unexplainable things well beyond my comprehension. And I don’t think that’s just a problem with my understanding of app security!
Let’s start with realestate.com.au, Australia’s premier property website, and try to change the password on an existing account:

Ok, no SSL, that’s not real good but so far it’s simply a “dumb” security practice. Let’s change the password to something secure:

Uh, what just happened? And why does this happen every single time I change my password to something secure? What is plainly not obvious is that my password contained a “>”. Nowhere am I told I can’t use one before creating my password and nowhere am I told what went wrong what I did use one. It took trial and error before I could figure out what password I was even allowed to use! Ah well, everything went ok after that, right? Uh, no:

C’mon, seriously?! I create a beautiful, strong password and then you turn around and automatically email the damn thing to me in plain text? Clearly they’re not aware of this and it was the work of some rogue developer somewhere, right?

Oh cool, they’re working on it. When was that tweet again? The really ridiculous thing is that there’s a legitimate password reset function which will email a newly generated one so there appears to be some cognisance of how password management should occur (although a single use reset URL would be preferable), but that also kind of makes the experience above all that much stranger.
As bad as realestate.com.au is, they don’t have a monopoly on the bad / weird stuff. How about DotNetKicks:

So let me get this straight; I use my stubby fingers to enter many characters of different case and type which appear only as obfuscated dots and I only have to do this once? There’s zero verification that I actually got it right and that’s just plain unusual.
Here’s another one from the “weird file” courtesy of GoDaddy:

What, exactly, is a “typeable” character? It sounds like an obvious question but I suspect it means “typeable on a western keyboard”. But what if I’m in Istanbul? Can I use a “ç”? Or if I’m in Kyoto, can I use Kanji and type “??”? I honestly have no idea!
Update (2 Apr 11): It turns out GoDaddy does have a bit of info on allowable password characters, they just don’t make it accessible when you really need it i.e. on the password change screen (GoFigure?) This page also goes on to espouse the virtues of phrase generated passwords which as I’ve said before, is totally infeasible if you actually want to make them unique across all your accounts.And while we’re talking about weird practices, what’s going on at TPG?!

It all started out looking so good; SSL, a minimum requirement of 2 letters and 2 numbers and even a max reset per day setting. But eight characters – I mean exactly eight characters – what’s that about?! Why so short? And why not 7, or 9? And why is my current password not exactly eight characters? It’s all very strange.
Mind you, at least I could actually change my password to something on these sites. Now maybe I’m missing something obvious and I’m just in a password induced stupor lately, but I have absolutely no idea how to change my DZone password:

Yes, I’ve drilled into “Edit your settings” and it’s not there. No, it’s not under “Your Account” – this is that page already so there’s nothing there. I just simply can’t find it! I’ll actually be surprised if there’s not a password change facility but the fact I can’t easily find one is a usability problem in itself.
Speaking of usability, what the hell is going on at Medicare?!

I think I know what they’re getting at but it’s like they’re missing some brackets somewhere. Is it card and ref number or IHI number and DOB and password? Or is it card and ref number or IHI number and DOB and password? Who knows, all I know for sure is that authentication is not the place to be having usability problems.
What does password management done right look like?
Of course we all have very little idea about how passwords and security in general is handled behind the facade of the web UI. Maybe realestate.com.au does a fantastic job of the important bits we don’t see and some of the sites I really trust do a terrible job. All we have to go by is what we can directly observe.
So just looking at the obvious things which are readily disclosed through the user experience, take a look at myOpenID:

SSL? Check.
Long password? Check.
No character restrictions? Check.
It’s really that simple. In fact the elegance of the approach myOpenID has taken is more about what they don’t ask you to do rather than what they do ask you to do.
The myOpenID example is actually pretty apt because it kind of holds what could be the key to the whole password dilemma; federated identities. Jeff Atwood is virtually the self-appointed messiah of the “don’t create your own authentication service” movement and he makes a very good case, particularly well-illustrated in his latest post about The Dirty Truth About Web Passwords. Of course he also has the success story to back it up.
Open ID or OAuth or Facebook Connect or Live ID or whatever aren’t perfect, indeed there are some good arguments against them (Rob Connery sums up the privacy issues pretty well in DotNetRocks #626). But compared to some of the examples above? I know who I’d trust.
Summary
I’m not setting out to say each of the sites above is “insecure”. Observing one small part of an application as complex as a banking system doesn’t give anyone enough information to say that with any fairness.
But security is one of those things to be approached in layers. There’s no silver bullet that suddenly makes everything alright, rather it’s an orchestration of many different practices. Those practices should include transport layer security and they should allow customers to create long, random passwords. Even Vodaphone, who let’s face it, have a pretty laissez-faire approach to security, can still get these basics right:

Anyway, the point I wanted to make with all this is that too many sites are doing passwords stupidly. The lack of consistency and downright odd requirements then not securing them when they’re floating around the wires is not doing customers any favours and the ridiculous thing about it is that the solution should be easy – it’s mostly about just taking stuff away.
Take way the short limits, take away the restrictions on typeable characters, on spaces, on angle brackets – just get rid of them! In fact the only thing they really need to add is SSL – and that’s a no-brainer in this day and age. Or alternatively, just acknowledge they can’t get authentication right and leave it to Open ID. I’d be happy with that.
Update 1
A couple of commenters have left some feedback below which I think deserves an update. You can see the comment for yourself, but the bit I want to address is that websites loaded over HTTP can still legitimately post to HTTPS and criticising a site for doing elsewise is fear mongering. I want to illustrate the response visually hence the update to the post:
The big problem you’ve got with the HTTP to HTTPS post situation is that the purpose of SSL is not purely to encrypt data over transport. It’s also there to create confidence and certainty of the identity of the site you’re posting to which is not apparent without visibly loading the certificate into the browser before posting. Wikipedia summarises it nicely:
A web browser validates that an SSL (Transport Layer Security) web server is authentic, so that the user can feel secure that their interaction with the web site has no eavesdroppers and that the web site is who it claims to be.
The ramifications of practices like DNS poisoning on this should be clear. Keep this in mind when looking at logging on to a page loaded over HTTPS on the left versus HTTP on the right:


When I logon to ANZ, I have certainty that my credentials are being sent to www.anz.com. When I logon to Qantas, I have nothing more to go by than the address in the URL bar. If I’m sitting in an airport on the other side of the world using the free wifi, what confidence do I have that the real www.qanatss.com.au has been loaded?
Of course the certificate is also there to assure the customer their data is encrypted. Without the ubiquitous browser padlock, the customer has no certainty of this and must trust – without assurance – that their credentials are safe. Definitely not ideal.






Software architect and Microsoft MVP, you’ll usually find me writing about security concepts and process improvement in software delivery.





28 comments:
Troy, you propogate fear and misunderstanding. It doesn't matter if the page that allows me to type my password is SSL-Protected. It only matters whether the site references when I hit "login" is SSL-Protected. You're libel to scare people with completely inaccurate information...
I'm agree with most of the points in the article, but the one about SSL is not totally true:
- SSL cost is not only the certificate itself. If your site has very high traffic, you also need to add the infraestructure cost. For each SSL request, you'll add an expensive and non-cacheable computation. The overall CPU increase might be very significant and too much for your current infraestructure. (I'm not saying that HTTPS should not be used, just pointing the hidden costs)
- Although the main web page could use HTTP (it starts with http://www...), the login form itself can be sent to the server using HTTPS. Check http://www.tuenti.com (I'm not saying that those sites use HTTPS, just that checking the main page address is not enough)
I should have been clearer on the SSL position and have added an update accordingly. However, none of the examples I cited as not supporting SSL in the “No SSL” section post over HTTPS (Fiddler trace tells all). Every single one of those usernames and passwords is sent over the wire in plain text. SIA and Qantas, however, are actually posting from HTTP to HTTPS and I’ve added an update accordingly. But of course SSL is not purely about encryption, is it?
@Anonymous, as for the fear mongering bit, perhaps consider that in the context of certainty of identity. It certainly does matter that I am not able to establish the legitimacy of either SIA or Qantas before I give them my credentials and frankly, people should be concerned about this. The irony of those two is that they’re probably more likely to be accessed from public locations where identity assurance is more important!
@Segio, it’s an interesting point about overhead and it seems to be hotly debated too. The Google folks seem pretty convinced moving Gmail to SSL only meant “no additional machines and no special hardware” and that “SSL/TLS accounts for less than 1% of the CPU load”: http://troy.hn/farQlG
Granted, Google has some pretty serious resources behind them (in terms of brains), but it’s an interesting counter-argument. Of course there are also many, many sites most likely running very small CPU footprints and even if SSL was just employed for logon, the overhead would obviously be very small and I suspect in the vast majority of cases would not require additional infrastructure investment.
I am curious about any other potential pitfalls or limitations of enabling SSL site-wide by default?
For example, how does SSL impact on caching at various levels (server, proxy, browser, etc)?
@Simon here's a few good posts on the topic:
What are the pros and cons of site wide SSL (IT Security Stack Exchange Site) http://troy.hn/fFzjtb
How much overhead does SSL impose (Stack Overflow): http://troy.hn/fN4elu
HTTP vs HTTPS performance (Stack Overflow): http://troy.hn/iiPFYV
Although there's some robust debate, some of the clear issues are:
1) Potential server overhead (see my previous comment on that)
2) Increased latency (albeit very small)
3) Challenge on CDNs
4) Possible mixed-mode warnings
In relation to point 4, one of the big problems is that there's no Google AdSense support for SSL so sites relying on advertising revenue either need to serve it up over HTTP only or present their users with some pretty nasty warnings.
As for browser caching, you can still cache the usual content (with the normal expires header dependency), it's just a question of whether they cache it to disk or not. Some good commentary on that one here: http://troy.hn/eqcKFM
It's obviously very case specific, but for sites that aren't maxing out their infrastructure, don't use a CDN and don't have mixed-mode decadencies, I'm not aware of any real show stoppers.
Not nearly as bad as Bendigo Bank:
'Your new PIN should be exactly 8 characters long and contain at least one Alphabetic character (A to Z. Alphabetic characters are not case-sensitive) and at least one Numeric character (0 to 9). No other special characters are allowed. Please note that this new 8 character PIN can only be used to access your accounts via the Internet.'
Their only saving grace is they offer OTP keyfobs as well
Good article. I switched over to using Keepass about 5-6 years ago - and as you say, once you have the ability to use 30 char passwords, it gets frustrating when sites won't let you. I found the most bothersome to be sites where they don't tell you that there is a limit on the length of the password, but also accepts your long password (but truncates it to an indeterminate length). You only find out about this when you try and log in again and need a password reset, and then it's sometimes not that obvious. I think this particualr example I'm thinking of was when I bought a game from Stardock. I did email them to say their password system was crackers, and got a response, but never followed it up. I just eventually worked out how many chars you were allowed to use
Actually, the American Express problem was even worse just a short while ago when they had the rules you showed, but, at the time they didn't even allow special characters! I posted about it on CodeProject, and even sent AmEx a long letter. They responded by saying that complex passwords are even less secure, if you can believe it.
It was a short time later after my complaint that they finally added in the special characters. I don't want to say that my complaint was the reason, as I imagine they likely received other complaints besides mine.
In case you are wondering, this was their response:
"I can understand your concern regarding the security of your password.
I would like to inform you that our website has a 128 bit encryption. With this base, passwords that comprise only of letters and alphabets create an algorithm that is difficult to crack. We discourage the use of special characters because hacking softwares can recognize them very easily.
The length of the password is limited to eight characters to reduce keyboard contact. Some softwares can decipher a password based on the information of "most common keys pressed".
Therefore, lesser keys punched in a given frame of time lessens the possibility of the password being cracked."
I think one the biggest challenges relating to site-wide SSL for forums and many other sites which allow user generated content is when you start embedding 3rd party content into your pages, particularly multimedia content.
It is quite common on some of the forums I run for users to embed images, video and audio from 3rd party sites, almost always linked via HTTP rather than HTTPS. This will of course, cause warning messages about mixed content and is effectively unavoidable - assuming delivery via HTTPS is never going to be available for that content, or unless you explicitly disallow such linking.
I am very surprised that Google don't yet allow SSL for Adsense or Google Ad Manager - that's another show stopper for many sites.
I used to be interested in picking locks as a kid, but passwords seem much more intriguing as I get older. I think your article really hits on points that I never even thought of, however, when too much information is given to set up a password, it provides an absorbent of information to the person trying to hack a PIN.
I can't believe that some of the greatest sites on the web have some of the worst security procedures.
Thanks for sharing.
Important article. I use a self written bookmarklet, that calculates passwords from 2 basic passwords hashes. I will release it in a few days after more testing.
Maybe interesting for some of you, you can test the security of your passwords at
https://secure.anonsphere.com/files/passwords.php?en
It's pure javascript, so you do not have to send your data anywhere. The most anoying thing about password restrictions for me is, that in most cases, there is no hashing in the database. If you use hashing, there is no need to restrict your input.
@PINs totally agree with you on that one, the less information, the better when it comes to exclusions. However, there's a case to made for communicating a minimum standard and that can be done without throwing the whole UX out the window.
@Oliver love the site you've put together and the 1M attempts per second default is entirely feasible for the under-funded hacker these days. Watching the "Time to crack this password" increase by a large order of magnitude based on very small changes says it all.
If password storage is done right (stored as a salted hash) it should not matter how long a password is - it will always be no longer than the hash value. I really wonder how these passwords are stored internally. I bet at least 50% are stored as plaintext.
Over the summer, I took the following screenshot at a .gov websites FAQ http://www.screencast.com/users/MrGlass/folders/Jing/media/65b4b584-7a22-43c3-a057-1cf81fb340b4
Thankfully, they have since changed their policy.
If password storage is done right (stored as a salted hash) it should not matter how long a password is - it will always be no longer than the hash value. I really wonder how these passwords are stored internally. I bet at least 50% are stored as plaintext.
Important article. I use a self written bookmarklet, that calculates passwords from 2 basic passwords hashes. I will release it in a few days after more testing.
Maybe interesting for some of you, you can test the security of your passwords at
https://secure.anonsphere.com/files/passwords.php?en
It's pure javascript, so you do not have to send your data anywhere. The most anoying thing about password restrictions for me is, that in most cases, there is no hashing in the database. If you use hashing, there is no need to restrict your input.
I used to be interested in picking locks as a kid, but passwords seem much more intriguing as I get older. I think your article really hits on points that I never even thought of, however, when too much information is given to set up a password, it provides an absorbent of information to the person trying to hack a PIN.
I can't believe that some of the greatest sites on the web have some of the worst security procedures.
Thanks for sharing.
I wish I knew how various sites store their customers' passwords.
I would like to inform you that our website has a 128 bit encryption.
>> http://demolition-perth.com.au/
In the ING Example, it looks like they have implemented a floating virtual keypad for PIN input with the sequence of numbers changing each time you log into the site. Therefore it's my understanding that clicking the "3" which might be in the top left position actually reports a different value to the authentication engine than clicking on the "3" which at a subsequent login might be in the bottom right corner.
Does anyone else have experience or knowledge of the floating virtual keypad concept?
That's correct. It also blanks out the number on mouse-press so screen-grabbers can't identify the key (assuming they're only capturing on mouse / key events). You can see it online here: https://www.ingdirect.com.au/client/index.aspx
But it's still a lousy 4 digit PIN!
The Spanish original Company for O2, Telefónica has one of the most hillarious rules I've ever seen. The password must be 4 letters and 3 numbers. Exactly that. In that order. I guess how many abcd123 must be in the database.
For me, having to remember this exact pattern for an account that I login once per month or less meant that the normal login process started by "I forgot my password..."
123-reg.co.uk: My personal favourite. I emailed them about this, never got a reply, but, you set up your password, and put in fancy characters. They're all just ignored. For example, if your password is bob*123, then put in "bob123", and there you go, logged in. Great stuff.
I trust you mean "liable"
10^4 = 10,000 not 1,000
That is one massive typo on my part. Thanks very much - fixed now.
The other problem with HTTP to HTTPS is with a man in the middle attack. If he can position himself between you and a remote site, he sure as hell can maniuplate that HTML to, say, http://stupidsite.com/login.php instead of https://, right?
Absolutely, in fact the post I put out last night talks about exactly that: OWASP Top 10 for .NET developers part 9: Insufficient Transport Layer Protection
Post a Comment