News for hackers. Stuff that matters.
Re:Yahoo discloses hack of 1B accounts by Arubis on Wednesday December 14, 2016 @06:32PM (#13180785)
Fittingly, attempting to change my password to a 32-character random string generated by 1Password returns an error that the password "cannot contain my email or username", regardless of the contents of that random string (I tried several).

It does, however, _happily_ accept `passwordpassword` and cheerily move along to confirming that my recovery email account from 2003 is still valid.

Re:Yahoo discloses hack of 1B accounts by duaneb on Wednesday December 14, 2016 @06:50PM (#13180911)
Gonna guess that's a bad message for a password length violation or something else.

Not that it's much better. Is it so hard to allow 50 character passwords?

Re:Yahoo discloses hack of 1B accounts by bagacrap on Wednesday December 14, 2016 @07:34PM (#13181195)
I'm guessing it detected an @ symbol?
Re:Yahoo discloses hack of 1B accounts by divanvisagie on Thursday December 15, 2016 @12:07AM (#13182583)
has anyone tried password@password ?
Re:Yahoo discloses hack of 1B accounts by AsyncAwait on Wednesday December 14, 2016 @08:16PM (#13181459)
if the password is stored properly, (i.e. bcrypt), the number of characters shouldn't matter at all, be it 50 or 5000.
Re:Yahoo discloses hack of 1B accounts by sk5t on Wednesday December 14, 2016 @08:28PM (#13181541)
It sort of does matter for bcrypt, surprisingly: http://security.stackexchange.com/questions/39849/does-bcryp...

In the interests of hewing closest to cryptographic reality, I design not to allow a password longer than the algorithm can usefully use.

Re:Yahoo discloses hack of 1B accounts by dlubarov on Wednesday December 14, 2016 @09:23PM (#13181829)
I think it's best to allow longer passwords for those who use long phrases. It's easier to remember the full phrase than a truncated version. You could show a warning that the extra chars beyond 50-55 will be ignored.
Re:Yahoo discloses hack of 1B accounts by kijin on Thursday December 15, 2016 @12:02AM (#13182564)
Or you could SHA256 the original password and feed the hash to bcrypt. Remember to use the 64-byte hexadecimal hash, not the 32-byte binary because bcrypt chokes on null bytes.

Everyone's been saying "just use bcrypt", but bcrypt has too many gotchas to be the default choice. We really need to work on getting scrypt and argon2 into the most popular programming languages and frameworks a.s.a.p.

Re:Yahoo discloses hack of 1B accounts by blowski on Thursday December 15, 2016 @04:29AM (#13183432)
> Everyone's been saying "just use bcrypt", but bcrypt has too many gotchas to be the default choice

This has got to be the underlying problem of modern security. By the time a best practice is well known, it's no longer best practice.

Re:Yahoo discloses hack of 1B accounts by dajohnson89 on Thursday December 15, 2016 @10:14AM (#13185094)
I think that's a good observation. The implication seems to be that we're not iterating fast enough, or not sufficiently fast in implementing changes/improvements.

On the flipside, isn't there a risk of moving too quickly? There's a certain culture of caution because there's something to be said for "if it aint broke, don't fix it." and even if something is broke, how certain are we that cool new encryption algorithm is better or safer?

Re:Yahoo discloses hack of 1B accounts by kaeluka on Friday December 16, 2016 @03:52AM (#13191974)
Like nutrition!
Re:Yahoo discloses hack of 1B accounts by paulmd on Thursday December 15, 2016 @11:50AM (#13185940)
You would probably want to use PBKDF2 as a key-stretching function rather than just naive SHA256. Otherwise you're clipping your bcrypt input from "56 arbitrary bytes" down to "56 hexadecimal characters".

I haven't looked deeply at this, but using "key stretching" that clips your output characters to such a small space smells very suspect to me.

Remember: there is only 32 bytes of actual output there, regardless of whether you represent it as hex or binary. And since bcrypt can't take more than 56 bytes of input, you are clipping that down to the equivalent of 23 bytes.

Re:Yahoo discloses hack of 1B accounts by bschwindHN on Thursday December 15, 2016 @02:15AM (#13183014)
Is "just use scrypt" an acceptable answer then? I'm not a security expert and I don't know the advantages of one over the other.
Re:Yahoo discloses hack of 1B accounts by amenghra on Thursday December 15, 2016 @04:08AM (#13183375)
Yes, scrypt is a perfectly fine password hash.

If you are currently using something else (say salted md5 or even just plain md5), you can migrate your passwords to scrpyt(current_hash()) without having to change everyone's password and/or wait for everyone to log in.

See also this comment thread: https://news.ycombinator.com/item?id=12549110

Re:Yahoo discloses hack of 1B accounts by aaronbasssett on Thursday December 15, 2016 @05:16AM (#13183594)
Don't do that. You've essentially just turned the old hashes into plain-text passwords, and how sure are you that those hashes don't exist in backups anywhere?
Re:Yahoo discloses hack of 1B accounts by rietta on Thursday December 15, 2016 @08:34AM (#13184437)
No, not exactly. An adversary who has the old hash, but not the plaintext that it represents cannot login because scrypt(H(H(value))) != scrypt(H(value)). This is not considering the offline crackability of a compromised hash. But there are legitimate situations where upgrading the password backing to a modern slow hash is preferable to continuing to use the old hash or worse storing the old hash as a field for a long time so that when a breach happens both the new and old hashes are available.

There are user experience battles when talking about forcing a million users to change their passwords in a real system. Hashing the hash may be vastly preferable to management nixing the security upgrade. A password updating schema that changes the hash as users login and eventually locking the accounts of users who have not logged in for an extended period of time can accomplish rolling the hashes without having to tell users to change their passwords.

Re:Yahoo discloses hack of 1B accounts by StavrosK on Thursday December 15, 2016 @06:34AM (#13183885)
Not if you mark the converted versions and try scrypt(oldhash()) on users authenticating with them.
Re:Yahoo discloses hack of 1B accounts by fractal618 on Thursday December 15, 2016 @06:37AM (#13183892)
Woah! Very good point!
Re:Yahoo discloses hack of 1B accounts by kijin on Thursday December 15, 2016 @05:33AM (#13183649)
scrypt is okay if you use it correctly. It's too easy to use it incorrectly, though, because scrypt is a low-level algorithm that wasn't specifically designed for password storage. [1]

http://blog.ircmaxell.com/2014/03/why-i-dont-recommend-scryp...

In order to be able to tell people to "just use scrypt", we would need to have a sort of standard wrapper that uses the correct parameters by default and produces identical results in every common programming language.

Re:Yahoo discloses hack of 1B accounts by zeveb on Thursday December 15, 2016 @04:32AM (#13183450)
> You could show a warning that the extra chars beyond 50-55 will be ignored.

Or you could use a better KDF, e.g. scrypt (even PBKDF2 is better on this metric). Artificial password-length restrictions are symptomatic of poor design.

Re:Yahoo discloses hack of 1B accounts by baby on Wednesday December 14, 2016 @09:54PM (#13181993)
This is surprising, do you know how Argon2 behaves compared to this?
Re:Yahoo discloses hack of 1B accounts by pjscott on Wednesday December 14, 2016 @11:59PM (#13182554)
Argon2 does the right thing. No silly upper bounds.
Re:Yahoo discloses hack of 1B accounts by KMag on Thursday December 15, 2016 @09:34AM (#13184766)
That depends on how silly you consider 2^32 - 1 bytes, if I recall correctly.
Re:Yahoo discloses hack of 1B accounts by Dylan16807 on Thursday December 15, 2016 @06:43AM (#13183918)
That's just a bug. Truncation invalidates the 'stored properly' part of the statement.
Re:Yahoo discloses hack of 1B accounts by mannykannot on Thursday December 15, 2016 @07:30AM (#13184112)
Could you expand on that? I did not think bcrypt was responsible for storing the resultant hash. The limit appears to be in calculating the hash.
Re:Yahoo discloses hack of 1B accounts by Dylan16807 on Thursday December 15, 2016 @02:09PM (#13187221)
The original phrasing was "stored properly, (i.e. bcrypt)". That's including the hashing as part of the 'storing'. Bcrypt has a size limit, but a size limit is not the same thing as truncating. It's broken code on the front end that truncates instead of doing something like sha512.
Re:Yahoo discloses hack of 1B accounts by sk5t on Thursday December 15, 2016 @11:06AM (#13185508)
Bcrypt spits out a string, that the caller must store, somewhere. I presume the parent post means that Bcrypt "stores" in its output string a value that, for all practical purposes, varies reliably with the same salt but different plaintext.
Re:Yahoo discloses hack of 1B accounts by drodgers on Wednesday December 14, 2016 @08:19PM (#13181480)
If the password is stored properly, (i.e. bcrypt) then there does need to be some length limit or it becomes too easy to DoS a service by sending it hundreds of megabytes of password to bcrypt. There's no reason for that length limit to be less than 100 characters though.
Re:Yahoo discloses hack of 1B accounts by dogma1138 on Wednesday December 14, 2016 @08:26PM (#13181527)
You are going to be limited by the max http request size way before that.

To upload 100s or even more than a few megs you need a multipart message, a password form won't accept MP http requests.

Re:Yahoo discloses hack of 1B accounts by patates on Thursday December 15, 2016 @04:13AM (#13183393)
On the back-end there usually is a naive POST handler which happily accepts anything it can parse, unless a mature framework with sane defaults is used.
Re:Yahoo discloses hack of 1B accounts by cookiecaper on Wednesday December 14, 2016 @08:57PM (#13181703)
Yep, people who've run marginally popular sites have dealt with this before. Give someone a text box and watch them try to stuff 4GB of content in it. There has to be a cutoff somewhere, but as you note, it should be well outside of the realm of reasonable password lengths (hundreds of characters).
Re:Yahoo discloses hack of 1B accounts by jsjohnst on Wednesday December 14, 2016 @09:11PM (#13181761)
GitHub is the only website I can think of off the top of my head that doesn't limit to an arbitrarily small number (aka <100). Do you name any other "major" websites that allow 100 character passwords?
Re:Yahoo discloses hack of 1B accounts by snowpanda on Thursday December 15, 2016 @01:45AM (#13182914)
Re:Yahoo discloses hack of 1B accounts by amichal on Thursday December 15, 2016 @12:21PM (#13186248)
Anything built with the popular rails gem devise allows 128 by default [1]

https://github.com/plataformatec/devise/blob/88724e10adaf9ff...

Re:Yahoo discloses hack of 1B accounts by XorNot on Wednesday December 14, 2016 @11:09PM (#13182325)
Hash the password locally (you are serving JavaScript over SSL right?) and only send the SHA256.
Re:Yahoo discloses hack of 1B accounts by zeveb on Thursday December 15, 2016 @04:34AM (#13183454)
That would lock out anyone who chooses not to execute your JavaScript.

Requiring me to trust your code in order for you to decide whether or not to trust me is asking too much.

Re:Yahoo discloses hack of 1B accounts by 0xfeba on Thursday December 15, 2016 @09:10AM (#13184621)
How would you know that the hash is of a password of sufficient entropy?
Re:Yahoo discloses hack of 1B accounts by jensvdh on Thursday December 15, 2016 @12:43AM (#13182716)
Never trust the client.
Re:Yahoo discloses hack of 1B accounts by XorNot on Thursday December 15, 2016 @01:40AM (#13182891)
This isn't about trusting the client: it's about your endpoint being able to only accept a SHA256 hash sum from the client (thus: length limited) while allowing the user to input arbitrarily long passwords.

They hash in the browser: the only way they can mess with it by producing silly outputs, but that only hurts them.

Re:Yahoo discloses hack of 1B accounts by libeclipse on Thursday December 15, 2016 @04:08AM (#13183376)
I can't think of any security implications of hashing on the client-side. What's your thinking?
Re:Yahoo discloses hack of 1B accounts by fnordsensei on Thursday December 15, 2016 @05:26AM (#13183625)
Does salting work if you hash in the browser?
Re:Yahoo discloses hack of 1B accounts by libeclipse on Thursday December 15, 2016 @05:36AM (#13183664)
Well in this case the hash would be passed to Bcrypt or Scrypt, which have built in salt support, so client side salting wouldn't matter.
Re:Yahoo discloses hack of 1B accounts by shawnz on Thursday December 15, 2016 @09:30AM (#13184729)
If the hashes are leaked, you could log in with them.
Re:Yahoo discloses hack of 1B accounts by XorNot on Thursday December 15, 2016 @07:43PM (#13190122)
Well serverside you store them as plaintext equivalents - i.e. salt+hash the hash. So a leak doesn't leak the user-side.
Re:Yahoo discloses hack of 1B accounts by chrischen on Thursday December 15, 2016 @04:25AM (#13183425)
It's probably a naive substring detection check.
Re:Yahoo discloses hack of 1B accounts by dmckeon on Wednesday December 14, 2016 @09:22PM (#13181827)
I hit this on the last Yahoo hack go-round, and it seemed that having a name in the form 'F Lastname' (for example) disallowed use of the letter F in the password.

I say "seemed" as I did not go through the exercise of testing with multiple combinations of name, initial, and password.

Re:Yahoo discloses hack of 1B accounts by dbg31415 on Wednesday December 14, 2016 @07:20PM (#13181098)
* Defending Against Hackers Took a Back Seat at Yahoo, Insiders Say - The New York Times || http://www.nytimes.com/2016/09/29/technology/yahoo-data-brea...

Time to update that article from September. Hooray for Yahoo, they made it 76 days without a 500M+ user security breach.

(No, I don't know the actual dates... just making a joke.)

Re:Yahoo discloses hack of 1B accounts by johnchristopher on Thursday December 15, 2016 @03:44AM (#13183310)
Last time I tried changing my Yahoo password it took me days before it accepted something (and I had password generator scripts and my brain). Now it's back to something along the lines of `letmein`.
Re:Yahoo discloses hack of 1B accounts by raverbashing on Wednesday December 14, 2016 @06:58PM (#13180974)
Just leave it at passwordpassword, it will be leaked eventually anyway

Strong passwords that need to be memorized shouldn't be wasted on security bozos

Re:Yahoo discloses hack of 1B accounts by rovr138 on Wednesday December 14, 2016 @07:07PM (#13181014)
He doesn't need to memorize it. He mentioned he used 1Password to generate it. I'd assume he's storing it there too.
Re:Yahoo discloses hack of 1B accounts by _ao789 on Thursday December 15, 2016 @06:55AM (#13183963)
I've always wondered when 1Password is going to get hacked..
Re:Yahoo discloses hack of 1B accounts by oddevan on Thursday December 15, 2016 @10:33AM (#13185224)
Won't do much; AFAIK everything is encrypted client-side with your master password. So a hacker could, in theory, get my encrypted database, but by the time they crack my strong password, I will, at the very least, have changed all those passwords.
Re:Yahoo discloses hack of 1B accounts by developer2 on Friday December 16, 2016 @09:51AM (#13193575)
That's not what a hack against 1Password, LastPass, or similar product will look like. When it happens, it will be because someone manages to commit to the VCS repository of one or more of their client applications (iOS, Android, desktop, etc.). All it takes is a few lines of code to dump the unencrypted contents on the device itself, and post them to some API endpoint or email address.

One commit to a VCS by a disgruntled employee, or an attacker who social engineers credentials to the VCS, and the client applications themselves - which must be trusted to decrypt the contents locally - will be compromised.

This is the problem with proprietary password managers, where the client applications are provided by the company. You cannot vet that software which is running on your device today, let alone all the app updates coming down the pipeline.

Re:Yahoo discloses hack of 1B accounts by SnacksOnAPlane on Friday December 16, 2016 @11:39AM (#13194455)
Thank you for writing this. I use a password manager, and whenever I see someone say "it's unhackable because of the encryption" I want to tell them this, exactly. All someone needs to do is to surreptitiously send your password to their own server and all your passwords are owned. It's not difficult.
Re:Yahoo discloses hack of 1B accounts by hcurtiss on Friday December 16, 2016 @11:58AM (#13194654)
I've often wondered about this. Is there a preferable alternative?
Re:Yahoo discloses hack of 1B accounts by raverbashing on Wednesday December 14, 2016 @07:09PM (#13181031)
At the very least you need to memorize the 1pw password, but I do memorize some others as well
Re:Yahoo discloses hack of 1B accounts by contravariant on Wednesday December 14, 2016 @07:06PM (#13181005)
I can kind of understand that reasoning, but one of the nicer things about strong passwords is that there are a lot of them. In some sense that's what makes them strong passwords.
Re:Yahoo discloses hack of 1B accounts by Buge on Wednesday December 14, 2016 @10:50PM (#13182236)
Why do you assume the password would be leaked eventually? Usually hashes are leaked (as in this case), not passwords.
Re:Yahoo discloses hack of 1B accounts by throwaway729 on Thursday December 15, 2016 @12:00AM (#13182558)
leaking unsalted md5 passwords == leaking passwords
Re:Yahoo discloses hack of 1B accounts by Buge on Thursday December 15, 2016 @01:48AM (#13182930)
Not if it's my password. I use ~100 bits of entropy.
Re:Yahoo discloses hack of 1B accounts by throwaway729 on Saturday December 17, 2016 @05:49PM (#13203187)
Hence "Strong passwords that need to be memorized" in OP's comment. Or else your memory is way better than mine (or I care way less, or probably both).
Re:Yahoo discloses hack of 1B accounts by Buge on Saturday December 17, 2016 @06:01PM (#13203235)
Whether they need to be memorized or not does not make the statement "it will be leaked eventually anyway" more true.

I use a password database so I don't memorize most of my passwords.

Re:Yahoo discloses hack of 1B accounts by throwaway729 on Sunday December 18, 2016 @06:33PM (#13208383)
Well, it does, because memory puts some limitations on length and complexity...
Re:Yahoo discloses hack of 1B accounts by Buge on Monday December 19, 2016 @01:02AM (#13209745)
It is possible to memorize a 100 bit password. I once had a 1000 word poem memorized, and could write it down flawlessly from memory.

I agree that it's not worth memorizing, you should instead use a password database. But I still maintain my original point that there's no reason to assume that your password will be leaked eventually if you use a strong password.

Re:Yahoo discloses hack of 1B accounts by supergreg on Thursday December 15, 2016 @06:44AM (#13183922)
Could the attacker find an easier to find string that matches the same md5 hash?
Re:Yahoo discloses hack of 1B accounts by Dylan16807 on Thursday December 15, 2016 @07:04AM (#13183997)
The current best attack wrt matching an existing hash brings MD5's 128 bits of security down to 123. So no, that's not going to happen.
Re:Yahoo discloses hack of 1B accounts by Dylan16807 on Thursday December 15, 2016 @06:59AM (#13183982)
MD5 is terrible for human passwords because it's fast. But md5 is not actually broken for password storage purposes. If you use a long random password, md5 is enough.
Re:Yahoo discloses hack of 1B accounts by raverbashing on Thursday December 15, 2016 @11:18AM (#13185640)
Yes, if you add a (long - at least 32 bit) salt and something like at least 10^9 rounds of MD5 then, yeah, it's probably ok
Re:Yahoo discloses hack of 1B accounts by Dylan16807 on Thursday December 15, 2016 @02:00PM (#13187142)
No. I mean single unsalted MD5. You will not crack a 20-random-char password. You cannot process 2^120 guesses, and MD5 is not broken for this use.
Re:Yahoo discloses hack of 1B accounts by late2part on Wednesday December 14, 2016 @10:00PM (#13182027)
Just follow NIST guidelines and never change it. That way when the servers in Utah crack your password, they don't have to recrack it later.
Re:Yahoo discloses hack of 1B accounts by syntheticnature on Wednesday December 14, 2016 @10:51PM (#13182237)
I've run into off-by-one issues in password length requirements in the past, so if 32 characters is the stated maximum it might only be capable of 31 on the validation side.
Re:Yahoo discloses hack of 1B accounts by KMag on Friday December 16, 2016 @11:01PM (#13199117)
That asymmetry in length support strongly suggests they're storing passwords in plain text.
Re:Yahoo discloses hack of 1B accounts by ajanuary on Thursday December 15, 2016 @07:42AM (#13184176)
I tried to change it to a 64 character random 1Password string with numbers, characters and symbols. It complained it was too easy to guess. I submitted the exact same password and it accepted it.