Live data from Hacker News

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

rafb.net

121–130 of 136 posts

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

#121
post #116

Earlier quoted context omitted.

That's really not true. I think you're conflating cryptography with security. In crypto, I suppose you could consider algorithms that increase attacker cost as "obstacles", though I think the word loses meaning when the "obstacle" involves summoning more CPU cores than there are atoms in the solar system. In practical security, closing a buffer overflow, sanitizing inputs, and proving code paths are not "obstacles".…

I'm not referring to cryptography, I'm referring to security in the general sense. Security is fundamentally about placing obstacles between your assets and those who you don't want to use/alter/control those assets. When you design software, you have all sorts of assets you'd like to protect, even for the simplest cases. Administrative access, general data, CPU cycles, workflow, network bandwidth, and maybe even pas…

Man, this sucks. This is a stupid semantic argument ("obstacle" versus "control" versus "constraint"), but it's also what's wrong with a lot of crappy security out there today.

An obstacle is something you overcome. I don't think you mean it that way, but that's what a lot of people think. So, for instance, a Javascript hashing scheme backed by a Greasemonkey script that tries to verify that passwords actually make it through the hash function. That's good, because it "adds obstacles". The security of the system is the sum of the value of all the obstacles.

No. The security of the system is inevitably the value of the 1-2 most important controls and constraints. Think of it like the difference between O(log n) and an O(n) algorithms: the constant factors don't mean much. So, you can do all sorts of gymnastics with hashes and nonces and salts (and timestamps and sequence numbers and MACs), but you turn SSL on, and now the only thing that matters is SSL.

The "obstacle" mindset, also known as "defense in depth", is what gets us IPS, web application firewalls, and antivirus. None of these $50,000 products work. But they're defended by managers and purchasers and vendors as "another layer in a defense in depth strategy". What we need is software that works, with defenses that are clear and fundamentally sound. What we get, too often, is band-aids.

Again, I apologize, because I'm turning you into a straw man and I don't mean to. The word "obstacle" sets me off. It shouldn't, because obstacles pay for my consulting team and my development team. I should say, "more obstacles, please!" "Please, build another ActiveX control to implement an AES challenge-response protocol with a compiled-in key!" "Please, build another web filter for which every nonminimal UTF-8 encoding variant is another security advisory for!"

Oh well. I'm old.

By the way, being somewhat close to the drama here, I want to note that the "new Threat Modeling" is a bit controversial, the terms are still up in the air, and if you want to learn more about security, you'd be far better off reading Ferguson's "Practical Cryptography" and McDonald, Dowd, and Schuh's "Art of Software Security Assessment".

Don't build obstacle courses. Design stuff that works.

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

#122
post #116

Earlier quoted context omitted.

I'm not referring to cryptography, I'm referring to security in the general sense. Security is fundamentally about placing obstacles between your assets and those who you don't want to use/alter/control those assets. When you design software, you have all sorts of assets you'd like to protect, even for the simplest cases. Administrative access, general data, CPU cycles, workflow, network bandwidth, and maybe even pas…

Man, this sucks. This is a stupid semantic argument ("obstacle" versus "control" versus "constraint"), but it's also what's wrong with a lot of crappy security out there today. An obstacle is something you overcome. I don't think you mean it that way, but that's what a lot of people think. So, for instance, a Javascript hashing scheme backed by a Greasemonkey script that tries to verify that passwords actually make i…

So, you can do all sorts of gymnastics with hashes and nonces and salts (and timestamps and sequence numbers and MACs), but you turn SSL on, and now the only thing that matters is SSL.

Just as a side note: SSL libraries are big, ugly, and bug-prone. If you use SSL for user logins, your users' login information will be more secure... but your server will be less secure.

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

#123

Earlier quoted context omitted.

Yeah that one's pretty easy to answer. Of course you should get rid of obscure printf(3) format string features, used in fewer places in your codebase than you have fingers on your right hand, if it means saving your users from a similar number of vulnerabilities. Again: unless there are two Colin Percivals working on FreeBSD, you tried to remove Hyperthreading from FreeBSD to "save" your users from a crypto timing c…

obscure printf(3) format string features, used in fewer places in your codebase than you have fingers on your right hand I just did a quick grep of /usr/src and counted 17 places where %n was used in a format string -- fairly equally split between printf and scanf. I don't know what sort of mutant you think I am, but I don't have that many fingers on my right hand. And that's not even counting all of the 3rd party co…

After I worked (very briefly with the project, more extensively out of it) on FreeBSD, I played a minor part in the OpenBSD audit, back when it was mostly Theo and bitblt. You're the FreeBSD Security Officer, you should know all about that.

OpenBSD made vast, sweeping changes to their code to minimize and mitigate security problems. Have you read privsep SSH?

How much third-party code links to your unsafe libc? How could you know? You think it's more sound to rely on every undereducated third-party developer to make the right choices about using your libraries, than to simply scrub out the seventeen (17. really.) places in your own code that use an apocryphal and dangerous printf feature, so you can eliminate it?

You're way out of step with the rest of your peer group, which appears to have learned not to trust random developers to use C libraries safely.

I love that argument. "Bad programming? Use good programming. Not our fault." By that logic, there's no security benefit to writing web apps in Python over C.

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

#124

Earlier quoted context omitted.

obscure printf(3) format string features, used in fewer places in your codebase than you have fingers on your right hand I just did a quick grep of /usr/src and counted 17 places where %n was used in a format string -- fairly equally split between printf and scanf. I don't know what sort of mutant you think I am, but I don't have that many fingers on my right hand. And that's not even counting all of the 3rd party co…

After I worked (very briefly with the project, more extensively out of it) on FreeBSD, I played a minor part in the OpenBSD audit, back when it was mostly Theo and bitblt. You're the FreeBSD Security Officer, you should know all about that. OpenBSD made vast, sweeping changes to their code to minimize and mitigate security problems. Have you read privsep SSH? How much third-party code links to your unsafe libc? How c…

simply scrub out the seventeen (17. really.) places in your own code that use an apocryphal and dangerous printf feature, so you can eliminate it?

Go back and read what I wrote. There are 17 places in the FreeBSD base system where %n is used in a format string. I have no clue how many times it's used in code in the FreeBSD ports tree, or in 3rd party code which isn't in the ports tree -- and I'm not going to go and break lots of perfectly good code just because someone might shoot themself in the foot.

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

#125

Earlier quoted context omitted.

After I worked (very briefly with the project, more extensively out of it) on FreeBSD, I played a minor part in the OpenBSD audit, back when it was mostly Theo and bitblt. You're the FreeBSD Security Officer, you should know all about that. OpenBSD made vast, sweeping changes to their code to minimize and mitigate security problems. Have you read privsep SSH? How much third-party code links to your unsafe libc? How c…

simply scrub out the seventeen (17. really.) places in your own code that use an apocryphal and dangerous printf feature, so you can eliminate it? Go back and read what I wrote. There are 17 places in the FreeBSD base system where %n is used in a format string. I have no clue how many times it's used in code in the FreeBSD ports tree, or in 3rd party code which isn't in the ports tree -- and I'm not going to go and b…

Yes, you've definitely made it clear that you don't think it's your problem. Maybe if you just turn "%n" off by default. That's not the same thing as breaking the code, is it?

Anyways, this is a tangent. It's amusing that you can stick up (in some sense) for clientside Javascript security, which is at least 0.0001% more secure than plaintext, but at the same time conduct protected arguments in the mailing lists about why CPU features should be turned off, lest someone ever figure out a way to make an attack you helped research become feasible.

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

#126
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?

I didn't get this either. The page http://pajhome.org.uk/crypt/md5/auth.html is a good explanation.

Regarding the salt, the page says:

Using a different salt for each user presents an issue: the salt isn't known until the user name is known. For a web application, this would require a two-stage login form - one form asking for the user name and a second asking for the password. Such an arrangement would be quite unfriendly towards users. Fortunately, there is a simple alternative. The salt is generated by concatonating the user name with a "system salt". The system salt is the same for all users on one system.

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

#127

Earlier quoted context omitted.

You really need to calm the fuck down. "if you have to explain to yourself what a "salt" is, or you can't spell "nonce", you shouldn't be designing security systems." No, I don't have to explain to myself what a salt is, though my "Here's how I understand it" introduction probably mislead you into thinking that. The only reason I said "Here's how I understand it" is that initially I wanted to explain both what a salt…

I'm not sure why I'm meant to care how hard you worked over the last 2 years to learn Common Lisp. A huge fraction of the security breaks over the past 15 years --- which cost us billions and billions of dollars --- are traceable to the mindset that says that figuring out security is just like figuring out how to scale a database: "you try and try and try until you get it right". Well, no. I don't have an authenticat…

In other news, I have totally turned in to that fat old guy who bugged me on Usenet when I was 18 and getting started. I'm off to cry into my beer.

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

#128

Earlier quoted context omitted.

Man, this sucks. This is a stupid semantic argument ("obstacle" versus "control" versus "constraint"), but it's also what's wrong with a lot of crappy security out there today. An obstacle is something you overcome. I don't think you mean it that way, but that's what a lot of people think. So, for instance, a Javascript hashing scheme backed by a Greasemonkey script that tries to verify that passwords actually make i…

So, you can do all sorts of gymnastics with hashes and nonces and salts (and timestamps and sequence numbers and MACs), but you turn SSL on, and now the only thing that matters is SSL. Just as a side note: SSL libraries are big, ugly, and bug-prone. If you use SSL for user logins, your users' login information will be more secure... but your server will be less secure.

Wow. I think you should support that claim with evidence.

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

#129

Earlier quoted context omitted.

So, you can do all sorts of gymnastics with hashes and nonces and salts (and timestamps and sequence numbers and MACs), but you turn SSL on, and now the only thing that matters is SSL. Just as a side note: SSL libraries are big, ugly, and bug-prone. If you use SSL for user logins, your users' login information will be more secure... but your server will be less secure.

Wow. I think you should support that claim with evidence.

You want evidence for the fact that SSL libraries have bugs?

http://security.freebsd.org/advisories/FreeBSD-SA-07:08.open... http://security.freebsd.org/advisories/FreeBSD-SA-06:23.open... http://security.freebsd.org/advisories/FreeBSD-SA-06:19.open... http://security.freebsd.org/advisories/FreeBSD-SA-05:21.open... http://security.freebsd.org/advisories/FreeBSD-SA-04:05.open... http://security.freebsd.org/advisories/FreeBSD-SA-03:18.open... http://security.freebsd.org/advisories/FreeBSD-SA-03:06.open... http://security.freebsd.org/advisories/FreeBSD-SA-03:02.open... http://security.freebsd.org/advisories/FreeBSD-SA-02:33.open... http://security.freebsd.org/advisories/FreeBSD-SA-01:51.open...

Is that enough?

OpenSSL and OpenSSH are tied, at 10 advisories each, as the pieces of software which have been responsible for the most FreeBSD Security Advisories -- outdoing Sendmail and BIND (7 advisories each), procfs (6 advisories, and removed from the default system configuration due to its poor record), and tcpdump and cvs (5 advisories each).

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

#130

Earlier quoted context omitted.

Wow. I think you should support that claim with evidence.

You want evidence for the fact that SSL libraries have bugs? http://security.freebsd.org/advisories/FreeBSD-SA-07:08.open... http://security.freebsd.org/advisories/FreeBSD-SA-06:23.open... http://security.freebsd.org/advisories/FreeBSD-SA-06:19.open... http://security.freebsd.org/advisories/FreeBSD-SA-05:21.open... http://security.freebsd.org/advisories/FreeBSD-SA-04:05.open... http://security.freebsd.org/advisories/…

Of the 12 postings you provided, 6 have nothing to do with server security, 2 are dupes, and only two of the remainder date to after 2004. Thanks for making me do that research. I guess I deserve it.

The comparison to Sendmail? Pretty laughable. Why don't you work from the real list of Sendmail vulns, not the ones in your personal database?

Now, I'll respond: under what circumstances would you advise a prospective YC app developer to avoid SSL because of the risk of server vulnerabilities?

Post reply on HN