News for hackers. Stuff that matters.
Re:Show HN: "curl … | sh" is bad. by sandofsky on Friday April 08, 2011 @12:08PM (#2424386)
Go ahead and view the source. Try to spot the hack.

It's harmless to run.

Re:Show HN: "curl … | sh" is bad. by jcapote on Friday April 08, 2011 @12:14PM (#2424419)
The "hack" is when someone roots their server and makes it return "rm -rf ~". Even if it's the most secure server ever, it's still a bad technique, IMO.
Re:Show HN: "curl … | sh" is bad. by michh on Friday April 08, 2011 @01:50PM (#2424889)
If they're distributing .dmgs or .exes and their server gets rooted the result is exactly the same.

And if the download and webpage are hosted on the same machine (like, practically always) the checksum won't help you either.

If you want to run third-party stuff and not willing to look at every little assembly instruction at one point you're going to have to trust somebody.

Of course this can just be Apple (app store) or the Debian/insert-distro-here guys (only run code that's from apt packages from the official repositories).

I'll just take the occasional risk.

Re:Show HN: "curl … | sh" is bad. by tjarratt on Friday April 08, 2011 @12:16PM (#2424434)
Even `sudo rm -Rf /` with the password prompt in terminal would probably catch a few people unaware.
Re:Show HN: "curl … | sh" is bad. by astrodust on Friday April 08, 2011 @01:25PM (#2424773)
This is not a counter-argument. You can't read every line of code that this will run every single time you go to run it. Unless you're very skilled and focused, you may miss a hack that's been cleverly disguised.

Executing a `rm -rf /` is not hard to do, and you wouldn't even see that text in a program. Basically you're depending on the statistical probability that if there is a hack, someone else will get hit before you and it can be identified and resolved before everyone is affected. Someone has to take one for the herd.