Live data from Hacker News

Why you shoud never use your favorite password on News.YCombinator.com

rafb.net

31–40 of 136 posts

Re: Why you shoud never use your favorite password on News.YCombinator.com

#31
post #24
post #17

Earlier quoted context omitted.

No. The server stores salted hashes, and serves the salt and a nonce as part of the login page. The client then submits hash(nonce + hash(salt + pass)). This protects against both replay and rainbow attacks.

I'm a bit confused here. If you were to store salted passwords when you create an account: salt = randomstring(4) hashed_pw = salt + ':' + sha1(salt + password) store(hashed_pw, login_name) How do you then verify this? In other words, how do you send the user the salt and the nonce if you don't know who the user is ahead of time?

Here is how it generally works. This method provides a salt along with a nonce. In general, only the actual user knows the password.

Start: User registers for a service and submits a username + password.

The password is salted and hashed in the browser and then sent to the server over a secure connection along with other info. like username etc...

Then when somebody wants to so log in: Server sends a random nonce and keeps track of nonce for all requests when the initial login page is sent to the browser.

Then the user enters username + password to the browser. The browser computes hash(nonce + hash(salt(password))) and sends the result to the server along with username info.

The server looks up the password hash associated with the username and compares hash(nonce + stored-hash) vs. the info. sent by the browser. If there is equality, the user is authenticated and interaction proceeds as normal.

Note that only the user actually knows the password. Even the server only has the hash of a salted version of the password. Next, even this salted hash is never sent directly over the network. A decent implementation will randomize the nonce so that packet sniffing attacks don't work.

Re: Why you shoud never use your favorite password on News.YCombinator.com

#33
post #13

1. Go read up on HTTP vs HTTPS 2. Never use the same login for 2 websites The fact this has been upvoted to top position is more worrying than any security worries.

Never use the same login for 2 websites

Dude, my brain would explode.

Re: Why you shoud never use your favorite password on News.YCombinator.com

#34
post #9
post #8

Earlier quoted context omitted.

Agreed--not news. However, this is a common security problem that doesn't get enough attention. I would guess the easiest way to crack anyone's bank account is to create some flimsy website that requires users to register. Chances are good they will use the same user/password combo that they would use for their bank. Or you could crack one of the thousands of existing login websites to get passwords, which would be a…

I don't want to be liable if one of my servers is hacked and someone's bank account gets accessed because of it. Don't store user passwords in plaintext.

I use a hash. I don't quite know how secure that alone is though. My thoughts are if my server is compromised(and an endless stream of attempts lead me to believe it's not extremely unlikely) having both the scripts with the database could deduce the passwords. Am I wrong?

Re: Why you shoud never use your favorite password on News.YCombinator.com

#36
post #20

Earlier quoted context omitted.

Look at the title of post - i'm not showing you HTTP is plaintext based - I said exactly "Never use the same login for 2 websites"

"Never use the same login for 2 websites" I call BS to that. Fair enough for websites that use your banking or credit card information, but for the rest? I don't think so. For irrelevant sites such as Hacker News, Reddit, whatever other minor web 2 site you can think of, you should ALWAYS use the same password. Why fart around with a ridiculous number of passwords for websites that are nothing more than minor daily d…

[deleted]

Re: Why you shoud never use your favorite password on News.YCombinator.com

#37
post #20

Earlier quoted context omitted.

Look at the title of post - i'm not showing you HTTP is plaintext based - I said exactly "Never use the same login for 2 websites"

"Never use the same login for 2 websites" I call BS to that. Fair enough for websites that use your banking or credit card information, but for the rest? I don't think so. For irrelevant sites such as Hacker News, Reddit, whatever other minor web 2 site you can think of, you should ALWAYS use the same password. Why fart around with a ridiculous number of passwords for websites that are nothing more than minor daily d…

So true. Most websites don't deserve good, distinct logins.

Re: Why you shoud never use your favorite password on News.YCombinator.com

#38
post #34
post #9

Earlier quoted context omitted.

I don't want to be liable if one of my servers is hacked and someone's bank account gets accessed because of it. Don't store user passwords in plaintext.

I use a hash. I don't quite know how secure that alone is though. My thoughts are if my server is compromised(and an endless stream of attempts lead me to believe it's not extremely unlikely) having both the scripts with the database could deduce the passwords. Am I wrong?

You are. One of the defining properties of a cryptographic hash is that you cannot easily deduce the input given the output, nor can you easily construct an input to produce a given output. (see the overview at http://en.wikipedia.org/wiki/Cryptographic_hash)

However, it's still possible to do a dictionary attack on the database of hashes ("is the hash of "password" the same as the user's password hash? yes? Bingo!")

Re: Why you shoud never use your favorite password on News.YCombinator.com

#39
post #20

Earlier quoted context omitted.

Look at the title of post - i'm not showing you HTTP is plaintext based - I said exactly "Never use the same login for 2 websites"

"Never use the same login for 2 websites" I call BS to that. Fair enough for websites that use your banking or credit card information, but for the rest? I don't think so. For irrelevant sites such as Hacker News, Reddit, whatever other minor web 2 site you can think of, you should ALWAYS use the same password. Why fart around with a ridiculous number of passwords for websites that are nothing more than minor daily d…

100% agree. Using "password" as your password will allow you to sign up for twice as many web 2.0 sites in the same amount of time. As an added bonus, you'll always remember your password at the 10% of sites you return to a second time.

Re: Why you shoud never use your favorite password on News.YCombinator.com

#40
post #6
post #3

Of course the password is in plaintext. Logins are done via HTTP, not via HTTPS. You know, there isn't that little yellow lock thingy in the bottom left corner of the window? Is this really news to anyone?

There are still ways to add a little extra security for non-ssl logins. One way is by hashing the password via javascript with a random number provided by the server before posting it via HTTP. (see http://pajhome.org.uk/crypt/md5/auth.html )

That adds no security at all. Security is not an obstacle course.
Post reply on HN