News for hackers. Stuff that matters.
Re:Let them paste passwords by joshvm on Thursday May 18, 2017 @10:27AM (#14367471)
We had a gem at my last university (UCL): you must rotate your password every few months, your password can't be anything like any of the previous ones (i.e. previous ones are stored, and they're not hashed), your password must contain special characters etc.

Except.. it can only be 8 characters long. Anything else gets truncated (they explicitly said so). The mind boggles.

I have no idea where this limitation comes from, do people just set an 8 character field in their database? Was this a problem decades ago that they figured they'd save a few megabytes of storage space?

I think they've finally changed it so that the reset period is determined on your password complexity, no length limitations, and you can have 2FA (or at least mobile password reset).

Re:Let them paste passwords by jameshart on Thursday May 18, 2017 @10:30AM (#14367499)
> your password can't be anything like any of the previous ones (i.e. they're not stored hashed)

That's... not necessarily the case. You can implement that check by only storing hashes of previous passwords, or of patterns derived form them that are also forbidden (e.g. store a bcrypt of every previous password converted to all lowercase and with numbers and symbols removed).

Re:Let them paste passwords by kbenson on Thursday May 18, 2017 @02:59PM (#14370036)
Manager: We need to ensure people aren't using similar passwords on reset, but we can't store the password unhashed.

Developer: Similar passwords? Or Same passwords. Similar is hard.

M: Similar. Can't let people be lazy with their passwords.

D: Well, if we really have to do it, I guess we could store a bunch of hashed variations of the password, but...

M: Good! Let's do that.

D: ...but that could be a massive amount of space for long passwords.

M: Okay, we'll just enforce short passwords then.

D: ...doesn't that more than negate all the benefit of preventing similar passwords when rotating them?

M: Doesn't matter, the CEO said he wants this. Hop to it!

Developer laments the stupidity of their life

Re:Let them paste passwords by cm2187 on Friday May 19, 2017 @03:11AM (#14373547)
It's funny because "DecemberSixteen" is very different from "MarchSeventeen" as a password from a characters point of view but is trivial to extrapolate if you know the guy has to change password every 3 months.
Re:Let them paste passwords by spinsser on Thursday May 18, 2017 @06:34PM (#14371640)
Why would they need to store the hash for all the combinations?

Why not generate a list of similar passwords to the new password, hash them all using the same salt of the previous password and then compare them.

Re:Let them paste passwords by kbenson on Thursday May 18, 2017 @06:48PM (#14371708)
Depending on what is considered "similar", every extra password character may exponentially increase the number of similar passwords.
Re:Let them paste passwords by joshvm on Friday May 19, 2017 @05:28AM (#14374022)
Well in my case, there was only an 8 character limit, so there was a least a bound on it. I didn't investigate how far you could deviate from an old password before it was allowed though.
Re:Let them paste passwords by Imagenuity on Thursday May 18, 2017 @03:54PM (#14370537)
Been there, fought that.
Re:Let them paste passwords by gpawl on Thursday May 18, 2017 @03:58PM (#14370581)
longer passwords don't hash to longer values (within any reasonable variation of order of magnitude in input size). That would defeat the purpose of hashing
Re:Let them paste passwords by squeaky-clean on Thursday May 18, 2017 @04:31PM (#14370834)
But a longer password would require more combinations for similarity than a short password.
Re:Let them paste passwords by gpawl on Friday May 19, 2017 @01:19PM (#14377659)
Ah. Thanks for clarifying.

Still, permutations longer hashes don't require substantially more space. Password storage is a completely trivial fraction of total storage -- Compare to a single photo, or a video!

And further still, they don't need to _store_ all the hash variations

https://security.stackexchange.com/questions/53481/does-face...

Re:Let them paste passwords by squeaky-clean on Saturday May 20, 2017 @11:39PM (#14385589)
Wow, it slipped my mind entirely that you could do the permutations when you create the new password but before verifying, rather than after creating a password. That's a great idea, and embarrassingly obvious in retrospect.
Re:Let them paste passwords by kbenson on Thursday May 18, 2017 @04:48PM (#14370970)
Yes, that's the point being made.
Re:Let them paste passwords by Crespyl on Thursday May 18, 2017 @10:47AM (#14367638)
Though I'm pretty sure I've seen "Your password is too similar to a previous password" before, which suggests some kind of plaintext Levenshtein distance check.

"Is the same as" can be fine with a hash, but "Is too similar" is definitely a red flag.

Re:Let them paste passwords by Johnny555 on Thursday May 18, 2017 @11:49AM (#14368249)
When I've seen that "your password is too similar..." warning, it was with a system that required entering my current password to set a new password, so no need to store a previous version in plaintext.

Though another way around it is to apply a set of common transformations to your new password, hash it and see if it matches the previous one. I.e. if your current password is "Password123" and you try to set it to "Password1234", the system could truncate the last digit on the new password and see if it matches the current one.

Re:Let them paste passwords by thewhitetulip on Thursday May 18, 2017 @09:59PM (#14372513)
I think almost every system requires you to put in your current password to change new password.
Re:Let them paste passwords by wapz on Friday May 19, 2017 @12:55AM (#14373123)
Aren't passwords hashed on the client side before sending it across the network? That would make your way around not work (unless that's done on the client side also after verifying from the server that it's correct).
Re:Let them paste passwords by rypskar on Friday May 19, 2017 @06:38AM (#14374319)
Hashing it on the client side will make the hash the password. So the stored hash can be used as password by turning off the client side hashing, for instance by turning off javascript. You use https to avoid sending the password in cleartext over the network
Re:Let them paste passwords by matthewmacleod on Friday May 19, 2017 @03:58AM (#14373683)
I've certainly never encountered a web app that hashes locally before sending. I suppose it could work if this was at the account creation or password management stages, but you couldn't implement it at the login stage for obvious reasons.

I'm having trouble imagining what scenario client-side hashing would protect against.

Re:Let them paste passwords by consp on Friday May 19, 2017 @04:20AM (#14373757)
Man in the middle attacks fetching for plaintext passwords

-- edit: using a KDF would improve it even more.

Re:Let them paste passwords by anonymouz on Friday May 19, 2017 @04:58AM (#14373902)
If the client only sends the hash to the server, a MitM also only needs to capture the hash.
Re:Let them paste passwords by croon on Friday May 19, 2017 @05:04AM (#14373929)
Sure, but if they've MITM:ed your trusted certs, aren't you already boned in so many ways?
Re:Let them paste passwords by Osiris on Thursday May 18, 2017 @08:41PM (#14372244)
That's unnecessarily complex. Just ask for the old password when doing an expiration reset. Validate the old one then compare that against the proposed new one.
Re:Let them paste passwords by joshvm on Friday May 19, 2017 @05:41AM (#14374085)
Actually, that's a very good point - you did indeed have to submit the old and new passwords. I want to say that they checked against older passwords too, but I might be misremembering.
Re:Let them paste passwords by gpawl on Friday May 19, 2017 @01:22PM (#14377684)
That doesn't help. Your new password might be the same as the twice-previous password.
Re:Let them paste passwords by sushid on Thursday May 18, 2017 @02:27PM (#14369744)
You're certainly right (e.g. that's how Facebook can remember so many different variations of you password without storing the actual password itself), but if their engineers are capping the password field at 8 chars, I HIGHLY DOUBT that is what's going on.
Re:Let them paste passwords by jlg23 on Thursday May 18, 2017 @05:24PM (#14371218)
If you really want to annoy me, use soundex[1] as a final normalization step.

[1] https://en.wikipedia.org/wiki/Soundex

Re:Let them paste passwords by makmanalp on Thursday May 18, 2017 @10:41AM (#14367588)
Doesn't that decrease the benefit of storing a hash? You probably know the process through which the derivative hashes are generated, which is not known-plaintext but seems kinda iffy still.
Re:Let them paste passwords by SamBam on Thursday May 18, 2017 @11:16AM (#14367928)
I think it would decrease the benefit, yes.

If you store the hash of the password, plus the hash of a hundred "similar" passwords, then the hacker only has to brute-force one to find that they are on the right track, and then brute-force "similar" combinations.

Re:Let them paste passwords by MikeTV on Thursday May 18, 2017 @11:25AM (#14368000)
Unless you do it the other way around: Generate a list of all passwords similar to the one the user just entered and see if that matches any previous hashes. This is how Facebook's password check works [0]

[0] https://security.stackexchange.com/a/53483

Re:Let them paste passwords by dainichi on Thursday May 18, 2017 @11:08PM (#14372757)
Supposedly, you'd only be able to get feedback about the similarity of a password in a state where you're already authenticated. So I guess this would help an attacker get the password when they've already gained access in some other way. But that's a big assumption.
Re:Let them paste passwords by joshvm on Thursday May 18, 2017 @10:49AM (#14367668)
Yeah, they probably stored old hashes, but I find it hard to believe they stored variations of old ones as well. Maybe they did though!
Re:Let them paste passwords by pmontra on Thursday May 18, 2017 @10:39AM (#14367563)
I guess it comes from old UNIX passwords (80s and before). They were limited to 8 characters if my memory doesn't fail me. But they were already stored with one way encryption.
Re:Let them paste passwords by isometry on Thursday May 18, 2017 @06:26PM (#14371597)
Your memory's fine.

man 3 crypt => https://linux.die.net/man/3/crypt

Re:Let them paste passwords by pmontra on Friday May 19, 2017 @03:52AM (#14373666)
Thanks.

That prompted me to google up a summary of the password length limits of various operating systems https://security.stackexchange.com/questions/22721/password-...

Re:Let them paste passwords by idonotknowwhy on Thursday May 18, 2017 @09:39PM (#14372458)
I have seen my online password for Australia's biggest Telco, in plaintext on a computer screen in the shop while buying a new phone...
Re:Let them paste passwords by ajanuary on Friday May 19, 2017 @04:52AM (#14373878)
My University also had an 8 character restriction. When I asked them about it, they said it was because they wanted a single password across all of the systems, and some of them were really old and had an 8 character restriction, so that had to propagate up to everything else.
Re:Let them paste passwords by qb45 on Thursday May 18, 2017 @11:10AM (#14367879)
I once had similar problem in some ancient LDAP installation and it turned out that adding random 9th character was enough to pass the check while keeping the password effectively the same :)
Re:Let them paste passwords by kolinko on Thursday May 18, 2017 @11:36AM (#14368128)
Theoretically, using homomorphic encryption you can both store passwords securely and check them for similarity. :)
Re:Let them paste passwords by dainichi on Thursday May 18, 2017 @11:35PM (#14372845)
If the similarity of ciphertexts reveals information about the similarity of the cleartexts, then given you have the encrypted password and the encryption algorithm, couldn't you guess the cleartext password by performing search? The point about hashes is that nobody can decrypt, although everybody knows the "encryption" algorithm. So not sure that homomorphic encryption would help in this case. Or am I missing something?
Re:Let them paste passwords by amelius on Thursday May 18, 2017 @11:42AM (#14368170)
Comparing the hash values would also work (if done right, hash collisions are extremely rare).
Re:Let them paste passwords by Gustomaximus on Friday May 19, 2017 @03:45AM (#14373650)
I worked at a bank that still has online banking password requirement of 6 characters... though must contain a number so totally secure.

Internally they still use Lotus notes 7.? last I heard. And storage limit was something like 100Mb if I recall correctly.

Re:Let them paste passwords by robk on Thursday May 18, 2017 @12:55PM (#14368853)
Britain and the Commonwealth feel especially bad with onerous and arbitrary requirements on passwords and such.
Re:Let them paste passwords by nippoo on Thursday May 18, 2017 @11:54AM (#14368299)
The most odd bit about that UCL password policy is that it said "your password change has been submitted and may take up to 24 hours to take effect." To this day I'm not sure if they were just displayed in cleartext and someone just typed them in by hand
Re:Let them paste passwords by roywiggins on Thursday May 18, 2017 @12:04PM (#14368389)
I think some SSO systems actually have to sync the password up with all the crappy computer systems that use it (rather than using actual SSO) and that syncing is done on a cron job at 3am.