Pandora doesn't hash their passwords
plus.google.com
plus.google.com
Okay, I just did a simple test of what happens when I change my Pandora password. There is a record of HTML local storage keyed on "jStorage" which appears to be a giant JSON blob. A specific attribute whose name appears to be a randomly generated (encrypted) is updated.
Assuming that is password, stored encrypted, the exposure here may not be what people think. It certainly would mean the password need not be stored at all on Pandora's server. They could just have an HMAC. The password value could be simple extracted from local storage. Has anyone checked to see if this is the case?
Follow up: Okay, I further confirmed that if I set the password back to a prior value, that field in jStorage flips back to the prior value. So, it looks like it is stored encrypted, locally on the system. I haven't traced through all the JavaScript, but it seems likely that the security issue here is different than perceived, and might even be non-existant.
The real, major issue here is the fact that passwords are loaded into an HTTP-served page and displayed back to the user. It doesn't matter how it happens behind the scenes - the fact that someone can do either of the following is still majorly problematic:
1. Walk up to a computer you're logged into and read your plaintext password.
2. Inject scripts into the main (non-HTTPS) Pandora page and read it out of the DOM.
If they did go to the trouble of saving the password into local storage with encryption, one has to wonder what they were thinking, given that it's a lot of effort for a solution that's far less secure than the trivial effort of just storing hashed passwords.
If they used an HMAC and the secret is stored locally, aside some some sort of JavaScript/browser exploit, it's more secure than a non-MAC cryptographically hashed password, and much more secure than the plaintext password you submit in your browser to log into almost every website in the entire world.
This Pandora password is just visible to you on your computer. If you're worried about that, please don't have a heart attack, but they have these things called malware now ...
For users that use the same few passwords everywhere, it could well be a problem.
All this shit started because someone who does not understand security thought it was horrible that a local program might store a password locally in plain text. There are a billion local programs that store passwords in a reversible way. Know why? Because sending a non-mac password is the same if it's hashed or not.
Blame whoever you want to blame, I don't care. But don't tell me Pandora is responsible for the total security of every moron on the internet, either.
Real security needs to work, even without the education and cooperation of "every moron on the internet" or it isn't going to work. Implementing systems that don't work in the face of this is just failing, then pointing fingers.
2) I think there is a very real risk there, but of course, unless they use HSTS (and therefore always HTTPS) everywhere, there is a risk of this. Even if they use HSTS (which isn't broadly supported in browsers yet), almost no-one checks TLS certificates for man-in-the-middle attacks. In short: the man-in-the-middle attack risk is always a risk unless the user takes extraordinary efforts. They could do more to mitigate it, but it'd undoubtedly have some seriously negative user experience consequences. It seems like a very high bar to hold Pandora to given the nature of their service. If you are going to hold them to that standard, you might want to start with a more significant target like say.... the Apple Store.
Re #2: Again, it's a difference of degree. Invalid TLS certs will at least give a browser warning that a user isn't used to seeing (in modern browsers), cluing them in that something might be up. Sure, some users might bypass it anyway, but there's at least some tip-off. Furthermore, there's no reason why the password needs to be in the DOM past the login page, which can easily be served over full HTTPS with no user experience impact. Yes, that can still fall prey to session hijacking if you don't use HTTPS for the rest of the site, but session hijacking doesn't give you passwords that you can use to go break into other sites.
#2: It needn't be an invalid TLS cert. It could be a valid TLS cert pointing to another domain. The browser provides no warning and you only notice it if the check the domain is different from the one you expect. Watch out for domains that are only different because they use a funky character that looks like the one you are expecting.
#2 - which is something that browser vendors are working to address (e.g. by displaying non-ascii characters in slightly different ways, e.g. punycode, and by blacklisting domains used for phishing, etc).
#2: Right. So there is a possibility that some day in the future, if you are really careful and check your TLS certificate every time you do something with your password, Pandora will be exposing you to a huge gaping hole, that you would otherwise only be exposed to if you used the Apple Store, Amazon, Ebay....
#2: Answer: this many times.
So anyway, everyone change your Pandora password and be done with it. You can't buy anything with a Pandora account except to be able to listen to Pandora. That is not worth stealing, even if it is a great service. I pay for it, and I'm not going to stop because of Apple. They may have the library, but they don't have the years of experience that Pandora has in its market. I do think Apple will own the high-end home entertainment market eventually.
Malorie goes to the coffee shop/train station/airport terminal and sets up a public wifi network. The network--be it provided by a laptop hotspot or a router with custom software--is programmed to intercept request/response cycles as follows.
Every response, except those that are part of Malorie's attack, is replaced with a redirect to Pandora's settings page. Some fraction of users will have a Pandora login cookie, which means they'll see the page.
Further, every response for the Pandora settings page gets a <script> tag of Malorie's creation. The JS reads the value attributes of the password and email fields and sends them to Malorie's server.
Malorie then has a bunch of email/password combos. A lot of users will have reused that same combination on many different sites. Quite possibly their email accounts too, which would facilitate even more account takeovers via password reset emails.
So now Malorie can steal entire online identities. From people who reuse passwords, anyway.
To protect against this and many other attacks, everyone should avoid reusing passwords. A password manager, such as the excellent 1 Password, is the most practical solution.
Which means that even after logging out of pandora, the password would remain in the HTML local storage, and could be de-obfuscated, and log back into pandora.
I am currently working on reverse-engineering the obfuscation algorithm...
Here's the thing: if someone has this kind of access to your browser, wouldn't it be simpler to install a simple browser plug-in that scrapes off any data typed in to a password input field?
It's just sad seeing Pandora raked over the coals for this when they clearly have put in a lot of thought and done things as right as possible given their constraints.
I am 99% sure I am right, all the fields/values are merely obfuscated with a constant key. Not proper encryption at all.
Yes, this is what I was saying.
> I am 99% sure I am right, all the fields/values are merely obfuscated with a constant key. Not proper encryption at all.
Okay, so if I tell you my key for the field is: bc673ea54a2b7153aaafbf178e9b0892e1f2e56be5aaa5a7, can you discern my key? I'm betting not.
First, this is indeed obfuscation. There undoubtedly is a constant key. The point is merely to make it difficult for an attacker to automate an attack with "grab the attribute with key X". It's possible these attributes are HMAC's of the attribute name + a randomly generated secret, which is actually a pretty good use of encryption under the circumstances. It's certainly miles beyond what most other sites use, and makes attacks against the HTML5 a waste of time (way better to go after the elements in the DOM, which have constant names).
The state of typical security in software projects of the 1990's: sad, sad... Any improvement in 2012: such a piddling little improvement. The trend is clear as is the conclusion: the average dev can't be trusted to do security. It doesn't work!
Actually, it is the thing that I was referring to. Doing things with the key names is another thing -- wily and probably benefits them a little, but it isn't real security.
And I was right: the JSON object that it stores in the HTML local storage is merely obfuscated with static keys, not encrypted. I was able to decrypt the full object, including my Pandora password:
lastUserId: "xxxxxxxxx"
storedUserIds: ["xxxxxxxxx"]
Uxxxxxxxxx.StationSortOrderAlpha: false
Uxxxxxxxxx.isAnonymous: false
Uxxxxxxxxx.Username: "xxx@xxx.com"
Uxxxxxxxxx.Password: "myCleartextPassword"
hasLoggedIn: true
(xxxxxxxxx) is the numeric Pandora user ID.
I will publish an tool for decryption as a proof-of-concept, in the next hour.What were Pandora's developers thinking? This is not a huge flaw, but they should certainly not store sensitive data like the user's password in the local storage.
Good job!
> This is not a huge flaw, but they should certainly not store sensitive data like the user's password in the local storage.
Well, if it was properly encrypted, I'd disagree with you, but since it isn't, I'm not going to quibble.
Out of curiosity, how do you know the key is static, and not per account? Did you test with two accounts?
Pandorhack: Stealing Pandora Passwords http://news.ycombinator.com/item?id=4553184
Unless, of course, they use this local data for actual security purposes. In which case this is a huge gaping security hole and I wouldn't trust them with a bit of my data.
I too would hate for anyone to know I have a Maroon 5 station.
[EDIT] I don't.
It should now be assumed that every hacker on the planet knows about this vulnerability, and Pandora will see attacks against their database very soon. What we don't know is if Pandora is storing users' passwords in plaintext. It is possible that Pandora remembers your password server-side for your session. I hope that this is the case. If it turns out to be anything else--plaintext passwords in database, etc.--then Pandora is worse than LinkedIn.
So there's the chance of gaining access to other accounts as a result of the data leak... such as their bank accounts, etc.
Also, since it's vanilla http, you could sniff these passwords at a coffee shop's wifi all day and just wait for someone to log in to Pandora.
On top of that, how does getting access to someone's bank account even help you? You have to transfer the money to another account, which leaves a trail...
In that case, E*Trade detected the activity as fraudulent, so the damage was minimal.
The more password databases are hacked, the better password cracking becomes, and the more sites black hats get access to. It's a vicious cycle. Yes, people sometimes do get large amounts withdrawn from bank accounts.
http://arstechnica.com/security/2012/08/passwords-under-assa...
The simplified version: Every time a password is cracked it is added to a database of hashes used to hack other databases. Essentially crowdsourced cracking.
http://www.theregister.co.uk/2012/06/07/linkedin_admits_data...
However, encryption is the the same as hashing, and it can be decrypted. It is possible that they are not hashing your password, but encrypting it, before they put it into the database.
That said, when I said the title was edited, I was not referring to myself editing it.
UPDATE: http://news.ycombinator.com/item?id=4552358
If mrb is right, it looks like they are storing it locally without encryption, which is indeed bad.
What I had written before seeing that:
======================================
Yes it is not. As a consequence, they are not mutually exclusive.
The title would be correct if it said, "Pandora stores encrypted passwords locally". Guess how much less interesting your post would be with that title? ;-)
They hash their passwords. They encrypt their passwords.
I'd prefer they only did the former, but the fact that they do the former at all is NOT what most people commenting on this thread understand.
"Hey CEO, your site doesn't hash passwords. Here's why it's bad. Here's how it got other companies in hot water. Here's how simple it is to fix. Forward this to your tech guy. Oh, and until you do, we'll put your company on this wall of shame."
Every time I receive a welcome email showing my password in plain-text, I'd gladly spend 5 minutes finding the email of an exec, or simply sending the link to support. Why? If the service is valuable to me, it's probably worth 5 minutes to protect my account and others'.
Would pair up with someone here if you want to knock it out.
However, in Pandora's case, this isn't what is happening, and it appears they've taken pretty extensive security measures given their constraints.
Telling a non-technical higher-up there is a problem, is also a good way to get a technical person in to trouble. If it is merited, no problem, but if you are wrong, you've just rewarded good work with a load of crap. It is much more appropriate to follow up with the appropriate party and at least give them a chance to respond before sounding the klaxon.
Here is a list http://plaintextoffenders.com/
I would have expected Pandora to know better. Anytime a website shows you your password or emails it to you, it's a bad sign. It means it is stored in plain text.
The websites that do it right cannot tell you your password (because they don't know it); they can only let you reset it.
No it doesn't. They could be using the strongest encryption known to man and still show you your password or e-mail it to you by simply decrypting it when needed.
However, it is still safer from a straight db dump type of attack. The concern for me, though, is if a company can reverse my password, I have no faith they are doing anything correctly WRT security.
Well, not necessarily, since they could be using asymmetric encryption (encrypt the password received from login, compare the result with the stored ciphertext), and keep the decryption key offline.
That said, very few of them do, because if the application can't access the passwords anyway, then there's usually no point in encrypting vs hashing them. An exception would be a manually operated password recovery system.
In this case, your passwords should be private to begin with. If they are accidentally exposed, it's likely that the key is also exposed, so you gain little. You can't hide the key because you need to use it to e.g. authenticate people logging in.
It's a bit like a business keeping all of their cash in a safe to protect it, but because they have so many people who need to access the safe, they basically have to write the combination on the door.
Hashing passwords is like a sealed black box where you can go up to it and say, "Bob is here and claims his password is X, is that right?" and the box will give you a yes or no, but it's extremely difficult to crack it open and get at the actual passwords. Much more secure than the safe, which really does little in this case.
I understand that passwords are better hashed I just don't nderstand why encrypted is no better than plain text (according to some).
This is a case where you can't have your ciphertext and decrypt it too. If you encrypt the user's password, you can't store the decryption key in the same place.
Well, you can, but it's just pushing the problem around with no security benefit.
<input type="password" value="hunter2">
But I guess that's a minor issue compared to exposing your password. Either way, the whole programming dept. at Pandora needs a lesson in passwords.
There is also OpenID, but not many sites are using it unfortunately.
It's still trivial to automate account takeover though. Here's a PoC to take over pandora accounts on your network using MITMProxy and Tornado: https://github.com/JackWink/Pandora-Account-Takeover-Tool
I am now in an odd situation where I cannot login to change my password, or delete my account (not that I trust any delete account functions these days anyway).
Is there anyone here working for Pandora that could help me?
From there you can say you have forgot your password: http://www.pandora.com/forgot.vm?target=
Completing this form sends a forgotten password email to your registered email address.
That link provided allows to you reset your password.
That is, unless I'm actually seeing this after they've patched the issue?
I have a feeling that they just put a bandaid on an issue that is going to get cracked open eventually.
It's just ASTOUNDING to me that in the year 2012 — one of the largest and most well-known companies on the internet (listed on NYSE, Alexa Rank 306, $100 Billion+ in revenue) could allow such a stupid vulnerability to persist.
You would figure companies out there would have learned a lesson or two by now.
Wow.
Some companies just do not give a shit about (your) security,
Honestly, what are you worried about? So they have your plaintext password. You didn't reuse it for any other service, right? So what use is it to anybody other than logging into your Pandora account and fucking with your stations? (And why the hell would anyone do that?)
People need to be more realistic about security.
The cost/benefit of implementing this functionality makes it a rule of thumb for front facing web pages.
Assuming every web developer implemented a crappy password hash and then checked off the 'security' box on their compliance form. Are users more secure? No, because they didn't consider exactly how secure it needed to be.
Are you using a sha1 hash? Great. Is it salted? Oh shit, forgot that, let's salt it. Ok, now I just cracked it. Oh shit, let's use pbkdf2. Uh oh, it's cpu expensive and not very strong, let's use bcrypt. Shit, it's easy to crack with a big FPGA array, let's use scrypt. Shit, now it can be used for replay attacks, let's add a MAC. Password hashing is easy, right?
Europeans have chip-and-pin credit/debit cards. Are they more secure than Americans without chips in the cards? Yes. They probably feel they're more secure. Yet it's been known for a decade that you can intercept the communication, and millions of dollars/euros have been lost because customers and companies believed in the blind faith of their perceived security.
"oh, i have an anti-virus, i'm secure now."
"oh, i have a vpn, i'm secure now."
"oh, i have tls, i'm secure now."
"oh, i have a password hash, i'm secure now."
I'm not saying you should not apply strong password hashes. I'm saying there is a time and a place to be outraged about a lack of security practices. If you knew how incredibly, horribly, terribly insecure the world around you is, the world that matters, you wouldn't care about your Pandora password either.Except, oh wait, even people on HN don't always follow best practices because they can be fucking hard sometimes. And that's before we get into the support email I got from a 90-year old user that consisted entirely of the subject line "WHAT IS PASSWORD".
I will guarantee you that somebody with access to every Pandora user's username and password will be able to access multiple bank accounts (or worse) within a short time period even though Pandora itself is a key example of a minimum-damages service.
But that is bullshit and we both know it.
There will always be a bad implementation, or a mistake, or an insider, or a man in the middle. If all their 100 accounts are the same creds, it only takes one time and they're fucked.
It is completely impossible to have perfect security on all these accounts. It is inevitable that one will get cracked. At that point, blaming anyone but the user is lunacy.
It is Pandora's ethical duty to do their part. And it is the ethical duty of other sites to do their part.
It is the user's duty to do their part.
Any one of these parties slacking does not excuse slacking on the part of others.
This is not a perfect world. We all know there are people who use the same password everywhere. Since we know that, it is our responsibility to do our part.
But, seriously, whether they should be or not the fact is Pandora is hosting sensitive information and they need to act like it. They shouldn't need to lock it down like Fort Knox, sure, but password hashing is considered a bare minimum these days.
Always assume they're doing it wrong, because usually they are.
The default most of us have to use is to assume when we use websites is that they are doing things right, so seeing no problem in one area (login passwords) doesn't change anything about our confidence in the rest of the site (credit cards). It stays at default.