by pavel_lishin · 14y ago · 0 comments
$ /usr/bin/ruby -e "$(/usr/bin/curl -fksSL http://bit.ly/HyK0NG)
That looks terrifying.Are you saying you audit every piece of unsigned code you run?
I admit that putting bit.ly into the chain of trust is quite a bold step, but is it really that different to, say, the rubygems server? Or your wireless router?
EDIT: also, LOL at "mundanes."
You're downloading and running in one go. If someone puts a badfile up for 1 minute, then restore it to normal, and you get hosed, it's pretty hard to check that, because the download link looks fine now. You cannot try to figure out what happened or who did it to try to track down the culprit.
Indeed, using signed code is massively preferable, and it is increasingly common.
I was about to write that you can't operate running only signed code, but if you consider git hashes a form of signing then I suppose you largely can these days. However, running unsigned code is still so common that I don't think you can really single out people who pipe curl into sh.
Imagine your ISP's router gets backdoored.
Imagine if the server you got your bash from gets backdoored.
Imagine if the rails repo gets backdoored.
Imagine if the plant where apple images the macbook HDDs gets backdoored.
Imagine all the people, living for today...
(But yeah, personally, I'd forgo the bit.ly part as its unnecessary.)
What else would you suggest I do to make it less terrifying?