News for hackers. Stuff that matters.
Re:Proxy server for Siri by icebraining on Sunday November 20, 2011 @11:00AM (#3258323)
Uhm, running a Ruby script as root? No...

If you're running it on Linux, use iptables to redirect the port to something you can use without root: http://www.cyberciti.biz/faq/linux-port-redirection-with-ipt...

Re:Proxy server for Siri by btucker on Sunday November 20, 2011 @11:57AM (#3258460)
I'm all for avoiding running things as root, but what does it being written in Ruby have to do with it?
Re:Proxy server for Siri by xtacy on Sunday November 20, 2011 @12:17PM (#3258504)
It probably has a greater attack surface that can be exploited. The advantage of iptables is that it does the barest minimum at a high privilege level: http://en.wikipedia.org/wiki/Principle_of_least_privilege
Re:Proxy server for Siri by igorhvr on Sunday November 20, 2011 @02:42PM (#3258826)
Beware that there is no consensus that this is a good thing.

From Daniel Bernstein(qmail creator) at http://cr.yp.to/qmail/qmailsec-20071101.pdf

"I have become convinced that this “principle of least privilege” is fundamentally wrong. Minimizing privilege might reduce the damage done by some security holes but almost never fixes the holes. Minimizing privilege is not the same as minimizing the amount of trusted code, does not have the same benefits as minimizing the amount of trusted code, and does not move us any closer to a secure computer system."

Re:Proxy server for Siri by russelldavis on Sunday November 20, 2011 @05:09PM (#3259151)
There's no consensus that "reducing the damage done by some security holes" is a good thing? Bernstein mentions it as a distraction (which may be true), but it's better than doing nothing.
Re:Proxy server for Siri by xtacy on Sunday November 20, 2011 @11:57PM (#3260038)
I feel that fixing the security holes has little to do with reducing the damage done due to increased attack surface.

If you're a software developer who is not doing security research, and who is mainly interested in some functionality offered by a module, you'd be better off giving the module exactly the privileges it needs, not more and not less. If not, wouldn't OS's run all user-space programs in ring-0? (Maybe I am stretching it a bit)

If Bernstein meant that this principle has been misquoted/abused/understood in all wrong ways (like most of the "premature optimization" quotes), then perhaps it makes some sense. :)

Re:Proxy server for Siri by icebraining on Sunday November 20, 2011 @12:18PM (#3258505)
Nothing against Ruby specifically, 'though I guess I do have a prejudice (in terms of security) against interpreted languages in general compared to something written in C.
Re:Proxy server for Siri by revetkn on Sunday November 20, 2011 @02:17PM (#3258765)
Dumb question: wouldn't it be more secure to use languages that are immune to C issues like buffer overflows?
Re:Proxy server for Siri by mustpax on Sunday November 20, 2011 @02:46PM (#3258833)
That's actually a good question. The lack of buffer overflow vulnerabilities does make interpreted languages safer to a point. Still anything that listens on an open port shouldn't run as root, there are still plenty of vulnerabilities besides buffer overflows out there.
Re:Proxy server for Siri by cosgroveb on Sunday November 20, 2011 @01:52PM (#3258703)
At least they didn't provide a one-line install from a non-https server, too.

Just use "curl http://www.example.com/install_this.sh | sudo sh"!

Re:Proxy server for Siri by slug on Sunday November 20, 2011 @11:04AM (#3258334)
or start as root, bind to the port and then drop privileges, but it's easier said that done properly. i'm no ruby expert either.