McGill will double your password if you don’t do it first
mcgill.ca
mcgill.ca
* McGill had a database of everyone's password in plaintext at the time of Heartbleed
* McGill is concerned about mitigating possible security compromises due to Heartbleed, including these plaintext passwords, which if they were compromised were compromised all at once
* Despite this concern, McGill still has a database of everyone's password in plaintext. Oh, and a large proportion of them are still the possibly-compromised ones.
* They're comfortable announcing this fact to the Web, for some reason.
I really hope the first thing they do after doubling the password is put it into a password-hashing function and throw away the plaintext, and then make those users change them anyway, because the doubled passwords are still compromised. It sounds unlikely.
"password123password123".match(/^(.+)\1$/)[1]This approach just seems dumb.
Of course, anyone who has a leak of the original passwords can equally just send a a double of it, so I'm not sure what benefit this is supposed to be offering.
if(userHasUpdatedPw) { checkPw(hash(pw)) }
else{ checkPw(hash(pw+pw)) } if(userHasUpdatedPw) { checkPw(hash(pw)) }
else{ checkPw(hash(assertDoubledAndTakeHalf(pw)))}McGill does some beautiful IT admin stuff. And then it does some scary-ass shit like this.
Another possibility would be that they compute and send both H(a) and H(firsthalf(a)), if fisthalf(a) == secondhalf(a). That would work with any hash function, but I think would not appreciably increase security.
If H is secure then F is not computable. If they can do a trick like this then their hashing is no good.
Another possibility would be
Yeah, you can approach it like a puzzle and figure out what crazy set up they could have, but Occam's Razor has to apply at some point. I'm betting they did the dumb thing, not the strange thing that is mostly pointless.
Can you point to something more than assertion, here?
"Yeah, you can approach it like a puzzle and figure out what crazy set up they could have, but Occam's Razor has to apply at some point. I'm betting they did the dumb thing, not the strange thing that is mostly pointless."
It's mostly pointless, but it's increasingly common knowledge that the dumb thing is dumb. It's more subtle that the pointless thing is pointless. If I had to bet, I'd also bet that they did the dumb thing, I just think it's marginally less conclusive than had been implied.
I'll give a shot at why this implies that H is not a secure hash function, though I could be wrong. The outputs of a secure hash function should be randomly distributed across the set of all possible outputs. If H is a secure hash function that outputs a value in the set {0,1}^128 (a 128 bit output), then H(a) and H(a+a) should both be 128 bit outputs whose mapping are indistinguishable from values chosen truly at random from this set. Although there is a discernable pattern in the two inputs to H (the concatenation), there should be no discernable pattern in the two outputs of H that you could use to reliably map H(a) to H(a+a) for any given a.
I can't count how many times I've seen something that could easily be done at login time and people conclude that the service must be storing plaintext or multiple hashes.
This isn't even a direct security measure in the first place. This is to annoy people into updating their passwords.
I can't figure out any way it makes sense unless they are forbidden by policy from forcing password changes.
Yeah, for that you'd need to know more about the password than we'd like them to know. I imagine they are simply setting the policy to "double" the password if it is older than X days.
Most people in a rush aren't going to do a good job choosing a secure new password; they aren't going to read McGill's recommendations about password managers or whatever; they're not even going to take 30 seconds to think about how to come up with a reasonably secure but memorable password.
They're just going to use their old password with a "1" on the end.
So -- McGill came up with a way to keep nudging students into updating their passwords, without forcing the specific moment they need to do it.
>Most people in a rush aren't going to do a good job choosing a secure new password;
Yup. This happens once per year without fail, and more often if there is some security problem. Often enough, it happens during a busy time of the semester (beginning or end).
>they aren't going to read McGill's recommendations about password managers or whatever; they're not even going to take 30 seconds to think about how to come up with a reasonably secure but memorable password.
My employer's IT department's password advice is... vintage, to be kind. It took a shaming in front of the college president to get them to stop threatening people for writing passwords down. The clunky password rules are at least partly responsible for the typically weak passwords. Another factor is the practice of configuration of machines with timeouts in the 10 to 30 minute range, forcing people to constantly enter their passwords. Yet another is the number of disparate IT systems with different password databases, and different password rules.
If there is an identified potential compromise, then the password change isn't unnecessary.
They just check if the entered password is doubled identically, then compare half of it to the hash.
1) Storing the password in plaintext. 2) Sending the password over the wire in plaintext. 3) Computing two hashes on the same system (presumably) via the same function, with a known relationship between their inputs.
I guess the fourth option is they have a securely stored hash of the password, but that still wouldn't allow them to compute the 2x hash server side so we're looking at another round trip and/or number three above.
Not confidence inspiring.
Yes, you are wrong.
> we basically have three options
Or sending the plaintext password over the wire using SSL?
You are aware that to use a hash the server needs the plain text password right? And not just them, every server needs this?
You are acting like getting the plaintext password is something strange. It's not.
You can send the password encrypted or not, it has nothing to do with the hash on the server.
> but that still wouldn't allow them to compute the 2x hash
As I have said already, they are not computing the 2x hash.
the check was an HTML input limit and there was no backend limit...
I was sad.
CVE-2013-5750 is a Symfony vulnerability, the Django one is CVE-2013-1443.
And of course it was fixed by limiting passwords to 4096 bytes, not 18.
An easy alternative (which has to be applied if you're using bcrypt since it's limited ~50 bytes of input) is applying length reduction through a regular cryptographic hash before applying the KDF[0]. Of course the cryptographic hash might still be DOS'd, but they tend to have a throughput of 100~300MB/s on commodity hardware so that's less likely.
[0] HMAC actually does that internally: if the key (password) is bigger than BLOCKSIZE — 64B for hmac-md5 and hmac-sha1, it will pass it through the hash function once then pad it to BLOCKSIZE before doing its thing.
The pkbdf2 DOS is because PBKDF2-HMAC calls HMAC once per round, so (on passwords longer than BLOCKSIZE) it performs length reduction once per round, and the total input data for length reduction alone is thus rounds * pw_length.
Given pbkdf2 tends to have round counts in the tens of thousands or hundreds of thousands these days, the amount of data going through the hash function literally increases by several orders of magnitude… and for nothing since it's the exact same operation each round.
Thus running e.g. SHA-384 on a password before handing it off to a KDF is probably a good idea in any case
* hash current passwords with a salt, unique to each password entry, and throw away the plaintext entries.
* keep a history of hashes per user, to prevent changing to a past password
* ensure fair complexity of the incoming password
* once the deadline has been reached, force users who have not yet changed their password to do a password reset via an online form
* never, ever again think that doubling a password is a proper way to fix a security issue, ever...
I don't think that's it, I think it's just to annoy people into changing it.
As we all know, a typical password validator formula is a great way to encourage people to choose "Secr3t!", or something else equally bad.
I'd really like to see a password field that auto-generated pass phrases using full english words from a sufficiently large wordset (in the vein of "correct horse battery staple"), possibly even enforcing such phrases as the only valid type of password. Every user gets a strong password they can actually remember. (...although possibly a non-starter for mobile contexts.)
Why not try to generate semi random pronounceable passwords? There's a clear decrease in entropy but brute force cracking against all pronounceable strings less than 20 chars will still be hard. (Of course your definition of pronounceability might differ.)
if not check_password(submitted_password) then
HTTP 401
else if password_last_changed < threshold then
change_password(submitted_password + submitted_password)
HTTP 401
else
log_user_in()
HTTP 200
endif if password_requires_rotation()
p1, p2 = split_in_half(password)
fail unless p1 == p2
verify(p1, ciphertext)
else
verify(password, ciphertext) login():
needsPasswordDoubled = [has user changed password since XX date?]
username = [username post parameter]
password = [password post parameter]
if login successful:
if needsPasswordDoubled:
replace stored password hash with hash(password | password)
else:
return success
return failure
Done. That said, the security of this is a joke: anyone who wants to compromise McGill accounts and (a) has a valid (old) username and password and (b) has seen this public press release is simply going to double all of their compromised passwords. But still, typing a double-password is annoying if you don't want to do it. So this is really just a way to "force" people to change their passwords without forcing a password reset.Seems a heck of a lot better than force-expiring passwords like I'd expect any other company to do.
Blocking login until they've changed their password is too harsh, and it's counter-productive.
A college student who needs to choose a new password now but is under time pressure is definitely not going to take recommended steps like "go install a password manager that'll generate a secure random password for you." They may not even have a piece of paper on hand right now, so they will choose a password that they can remember.
Like -- their previous password, but "2" instead of "1" at the end....
Whereas if you just give them a nudge like this, they will bear the annoyance of typing it twice if they're in a rush, then when time permits they can choose a decent replacement.
The McGill Password length has also been increased from exactly eight
characters to a variable length of eight to 18 characters.
So they're not using bcrypt (usable length 72). Even PBKDF2 would have been acceptable, but my guess is that they were sold a "layer over" on their stack with this. I can already tell this is a hacky patch. Every year, about 1,200 to 1,500 McGill accounts are compromised in
one way or another.
Phishing + guessing. I know someone who gets about 2-3 emails a week asking to enter their login info into some site in Brazil or the Czech Republic.If every site properly salted and hashed passwords, reuse isn't even a problem. But as we know :
- Most people choose crappy passwords.
- Most sites use crappy hashing schemes (if they hash at all)
When other sites are compromised, there's an easy list of ready passwords to try against other potential targets.McGill's problem isn't Heartbleed.
I think it probably has something to do with this.
https://www.mcgill.ca/it/channels/news/email-subject-interna...
http://www.mcgill.ca/it/news/phishing-attack-mcgill-email-11...
Why on earth would you ever need to truncate a username?
If I had a 2,000 character username, this page would look really stupid.
overflow: hidden;
text-overflow: ellipsis;It bothers me less now that I use a good password generator/safe, but still bothers me nonetheless.
Bcrypt is not the ONLY secure solution to securely store passwords (contrarily to what everyone is trying to tell you). See Thomas Pornin's answer on SO:
http://stackoverflow.com/questions/2772014/is-sha-1-secure-f...
Although I suppose this was done to force the users to change their password.
This approach is just a dumb prank.
You never want to convey any information about the usernames, password, or state of the account _ever_. This is true for error messages during login, but can be applied to any messaging.
The only challenge then becomes what constant text to add.
I would suggest something like, ishouldlistentosecurity. :-)
Markers:
* Cookie named site2pstoretoken
* Http header: Oracle-Application-Server-10g/10.1.2.3.0 Oracle-HTTP-Server
* Layouts are still done via <tables> if(hash(password) != passwordHash) return false;
if(passwordUpdateTime < heartBleedTime) {
changePasswordHash(hash(password + password));
return false;
}
return true;Getting users to confirm to good password practices is nearly impossible when they are mature, paid employees with money and valuable IP on the line, and at organizations with legal/regulatory security requirements. Imagine accomplishing that with thousands of college students. (I'm not sure there's a good, cost-effective solution, other than to provide more secure options to users who want them.)
If so, it's pretty clever.
Another possible answer: Many systems can't prompt for password changes, and will just continue to log you in (because, especially for remote-access systems, that's better than denying access and hoping you find another way to get logged in). Probably the lazier of the users also don't use very many of the computing facilities, and may just use a few legacy systems.
Or even better make it forwardssdrawrof though that feels a bit evil. (forwards then reverse)
Hash(pw) + Hash(pw) := Hash(pw + pw)
(NB: Where '+' above is really just a stand-in for any pair of combining functions, not necessarily arithmetic addition or string concatenation.)
But, I agree with many others here that the likelihood of stored plain text passwords is very high.
>Even though our central IT systems are protected against Heartbleed, any accounts that have already been stolen still pose a security risk. Almost 20,000 members of the McGill community did change their McGill Password, but thousands more did not, and so additional actions have become necessary.
So, ff the people who got the passwords read this post then all they need to do is double the passwords they got with HeartBleed to gain access?
Perhaps they should quadruple the password? /s
Easiest is if they store the date of the last password change or otherwise know you haven't changed it. If it's old enough, double the plaintext before handing it to the hashing function.
>There are several ways this can be done without that.
>Easiest is if they store the date of the last password change or otherwise know you haven't changed it. If it's old enough, double the plaintext before handing it to the hashing function.
Not quite. What you'd need to do is halve the user's entered password if it's older than the cutoff date. If the user enters "foobarfoobar" then you'd halve it to "foobar" before hashing and comparing it to what's stored.
If you only have the old hashed password stored then you don't have the hash of the doubled password, nor can you can infer it.
This whole approach is silly of course. They should just force everybody to reset their passwords.