News for hackers. Stuff that matters.
Re:Project Euler Humble Return by krapp on Friday August 07, 2015 @06:29PM (#10025403)

    Usernames cannot contain more than 32 characters 
    and they may only contain upper/lower case
    alphanumeric characters (A-Z, a-z, 0-9), dot (.), 
    hyphen (-), and underscore (_). 
    Passwords must contain between 8 and 32 characters.
My money is on "ineptly."
Re:Project Euler Humble Return by terminado on Friday August 07, 2015 @06:53PM (#10025474)
There's really not much rational for capping passwords at anything beneath 256 characters.

256 characters makes for a fairly sizable passphrase, and doesn't represent a substantial hit on storage space. In reality, even if they were stored as encrypted binary/base64 in a nosql file system of structured data files, 4096 is pretty much the de-facto floor for disk space occupied by non-zero-byte individual files on most modern file systems.

...variable data size being a concern in cases where the transformed value is encrypted rather than hashed.

Re:Project Euler Humble Return by gherkin0 on Friday August 07, 2015 @07:22PM (#10025586)
> 256 characters makes for a fairly sizable passphrase, and doesn't represent a substantial hit on storage space.

They shouldn't be storing passwords at all so storage space should be a non-issue. My 20 meg password should hash down to the same small(er) value as your 15 character one.

Re:Project Euler Humble Return by 0942v8653 on Friday August 07, 2015 @07:35PM (#10025644)
On the other hand, you might not want to be hashing a 20meg password. It is fast on my computer but it's fair to limit at something more reasonable.

    $ python -c 'print "8 bytes\n" * (20 * 1024 * 1024 / 8)' > 20meg.txt; time shasum -a 512 20meg.txt 
    59cb7f88ad8d6229e6d3a74ee422dff57e17f168c6e6fa44ef32c3f07a73a6e455d8b55c1265d5212b9ed5475b6d9364286645200dada59aa16905a9ce748561  20meg.txt

    real	0m0.289s
    user	0m0.284s
    sys	0m0.004s

    $ python -c 'print "8 bytes\n" * (16 / 8)' > 16byte.txt; time shasum -a 512 16byte.txt
    b6043d3a520424d5ec17dc0c23ba3b591d74517e2b9faa0df2d69d13c89a5f372d6dc35f95836687ee05be18433277e1c4b67393eb2771b475d655a832b16654  16byte.txt

    real	0m0.045s
    user	0m0.040s
    sys	0m0.004s
Re:Project Euler Humble Return by thaumaturgy on Friday August 07, 2015 @07:43PM (#10025681)
Fast password hashing is bad anyway. Slow schemes are better (assuming they come from a thoroughly tested library written by someone that actually knows what they're doing).
Re:Project Euler Humble Return by rev_bird on Saturday August 08, 2015 @01:31AM (#10026451)
I'm admittedly not familiar with the details of the hashing process, but it could be done client-side, no? Then the compute power required falls on the user, PLUS the 20 megs never gets sent over the wire.
Re:Project Euler Humble Return by mkagenius on Saturday August 08, 2015 @02:33AM (#10026538)
No. Actually we would not want the hashing technique to be exposed in the source code.
Re:Project Euler Humble Return by ColinWright on Saturday August 08, 2015 @07:16AM (#10026943)
That turns out not to be the whole story.

Hiding the technique to compute the hash is relying on security by obscurity. Ideally you want a system that is secure even if potential attackers know what methods you're using.

Re:Project Euler Humble Return by GlennS on Saturday August 08, 2015 @06:56AM (#10026912)
If you do the hashing on the client side, then the hash itself effectively becomes the password.
Re:Project Euler Humble Return by roblabla on Saturday August 08, 2015 @02:37AM (#10026544)
That would assume your users have JS enabled. I've seen something like that done before, but always with a fallback in case user has JS disabled.
Re:Project Euler Humble Return by Retra on Saturday August 08, 2015 @02:25AM (#10026523)
If you're not sending 20 megs of data, you're not getting 20 megs of security. So why allow it if it doesn't add anything?
Re:Project Euler Humble Return by ColinWright on Saturday August 08, 2015 @07:14AM (#10026935)
It doesn't add to the security, but I might find it easier to remember 20 MB of redundant and meaningful stuff than to remember 384 bits of literally random stuff. The entropy might be the same, but my memory is not a computer. I can remember vast amounts of material that is meaningful and use it as a password. I can't remember 384 bits that have no meaning.

The benefit isn't in the entropy, it's in the abilities of your users to remember their passwords/passphrases in the first place.

Re:Project Euler Humble Return by 0942v8653 on Saturday August 08, 2015 @07:44AM (#10026990)
Maybe 1 or 2 KB, max. 20 million characters is a ridiculous password to remember.
Re:Project Euler Humble Return by ColinWright on Saturday August 08, 2015 @08:02AM (#10027024)
That's not the point - the difference between 2 KB and 20 MB is purely a detail. You said:

  > If you're not sending 20 megs of data,
  > you're not getting 20 megs of security.
  > So why allow it if it doesn't add anything?
You could just as equally say:

  > If you're not sending 2 KB of data,
  > you're not getting 2 KB of security.
  > So why allow it if it doesn't add anything?
Your point is the same, and it's still wrong. What you're getting is not the security - that's only half the story. My point is that is does add something, it's just that the something it adds isn't the entropy for the purpose of security.
Re:Project Euler Humble Return by a_t48 on Friday August 07, 2015 @07:25PM (#10025602)
When there will be multiple shorter passwords that hash to the same value, is there a point to a 20mb pass?
Re:Project Euler Humble Return by ColinWright on Saturday August 08, 2015 @07:18AM (#10026946)
Yes. Ideally you want users to be able to remember their pass-phrases. To do so usually implies significant internal structure and/or correlations, so to get the necessary entropy they will be large. The fact that they hash to the same value as other things is effectively irrelevant.
Re:Project Euler Humble Return by gherkin0 on Saturday August 08, 2015 @01:11AM (#10026413)
I misspoke, I meant size.
Re:Project Euler Humble Return by elektromekatron on Friday August 07, 2015 @08:51PM (#10025885)
Depends. Can you guess them?
Re:Project Euler Humble Return by a_t48 on Saturday August 08, 2015 @01:00PM (#10027881)
If I'm an attacker who is running through hashes...yes. Faster than the 20mb one.
Re:Project Euler Humble Return by bosdev on Friday August 07, 2015 @08:06PM (#10025754)
There is a slight exception to this. If they are using an older statically typed language like C, it might make sense for them to have a limit on the buffer ready to store your unhashed password. Yes it seems crazy these days, but it might apply to some of the older systems which have password length limits.
Re:Project Euler Humble Return by h0w412d on Friday August 07, 2015 @07:28PM (#10025611)
BCrypt has a character limit of 72.
Re:Project Euler Humble Return by Freaky on Friday August 07, 2015 @07:47PM (#10025695)
Hard limit of 72, beyond which many implementations will silently truncate, and reduced entropy from each character beyond 55 bytes.

Probably a good idea to pre-hash. Or use scrypt.

Re:Project Euler Humble Return by chucksmash on Saturday August 08, 2015 @11:06AM (#10027412)
I can't find it now but I seem to remember this came up in response to another breach ~24 months ago. At that time they made an announcement to the effect that from then on you'd no longer be able to have your password sent to you if you forgot it, but that you would instead need to use an account recovery key.

I took that to mean that prior to being pwnd they had been storing passwords cleartext and would no longer be doing so.

Also, the wording about allowed special characters seems to be incorrect. I personally have a non ./-/_ special character in mine. Unless they are doing something terribad like silently discarding noncompliant parts of the password.

Re: password length - at least 32 characters is respectable. I believe last time I used outlook.com they had a max length of 12-16!

Re:Project Euler Humble Return by chucksmash on Saturday August 08, 2015 @11:16AM (#10027461)
Oh and on the topic of silently discarding portions of passwords, another outlook.com password deficiency (circa 2011, doubt it still exists):

When setting the password, max length was only enforced by a text input with a max length attribute. You could happily type more characters and everything would work as expected....until you went to log in. The max length on the password field on the login form was greater so those characters that were silently dropped when setting the password suddenly weren't.

Re:Project Euler Humble Return by uxcn on Friday August 07, 2015 @06:46PM (#10025456)
It used to be a salted MD5 hash, but it may have changed.
Re:Project Euler Humble Return by krapp on Friday August 07, 2015 @07:56PM (#10025722)
I would have assumed of course that the size limits were because the passwords were being stored in plaintext in fixed-length fields, but I guess they wanted to make sure they were 'complicated' enough? I guess salted md5 is literally better than nothing.

The character limits for usernames, though... smells like a SQL injection issue. Which is an obvious and completely naive thing to assert but they're using PHP so my immediate thought is that they're passing raw userdata into the database as strings.

Re:Project Euler Humble Return by uxcn on Friday August 07, 2015 @08:05PM (#10025750)
my immediate thought is that they're passing raw userdata into the database as strings

That was my first thought too. I'd guess that it's a vulnerability somewhere in the code for handling the forums.

I would be willing to bet that they could get rid of a lot of the attack surface just by using standard services for certain things.

Re:Project Euler Humble Return by krapp on Friday August 07, 2015 @08:44PM (#10025862)
Probably. If they're not using PDO then that needs to be their first priority, dead stop. After that, maybe looking at their captcha script, because those sometimes have issues if they're not well designed. I don't know where theirs comes from but it doesn't seem to use much obfuscation so it's probably old. After that, Twig.

Although judging by a screenshot of the recent hack[0] posted here[1] escaping (and XSS) may not be an issue.

[0]https://i.imgur.com/pl22srz.png

[1]https://news.ycombinator.com/item?id=9990221

Re:Project Euler Humble Return by ProjectEuler on Friday August 07, 2015 @09:29PM (#10025973)
Admin from PE here.

We've already been using PDO. As for overall privacy/security, please see https://projecteuler.net/privacy

Re:Project Euler Humble Return by krapp on Friday August 07, 2015 @09:33PM (#10025985)
And PHPass as well, fair enough.

Thank you for showing up and addressing my armchair criticisms. I appear to stand corrected.

Re:Project Euler Humble Return by uxcn on Saturday August 08, 2015 @12:12AM (#10026295)
I genuinely hope the security hole is findable/fixable. Thank you guys for continuing to run an awesome service, despite asshats repeatedly trying to abuse it.
Re:Project Euler Humble Return by sfrank2147 on Friday August 07, 2015 @10:24PM (#10026102)
Thanks for the response!