Check this out: https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-b...
Check this out: https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-b...
> You’re not running some random shell script from a random author, you’re running it from a software vendor who you already trust to run software.
Between custom domain names, TLDs, Let's Encrypt (I love Let's Encrypt, but it provides is encryption, not trust) and cheeky developers using combinations of those, how can I really know that a script coming from (fictional example) https://install.dock.er is actually the Docker company?
If you want to pull this even further. When is the last time you verified the signing keys of your OS distribution repo without relying on the internet?
A lot of install methods that are not curl/sh are like: here copy this bash line to add apt GPG keys for our repo, apt update and install. A lot of people don't bother to check those keys.
This is (currently) not possible to do with scripts downloaded from a web page. Especially when immediately piped into a shell.
I've seen this in other places as well. Vendor makes a comprehensive guide. Some people condense that to a minimum and will even boast they "made" an easier way to do X or Z, whilst ommiting all the caveats. Of course that will become the popular 'standard' people find. And they'll go complain to the vendor if it doesn't work without even reading the original instructions.
Plus you are pushing forward the bad pattern and being part of the problem.
You are encouraging other authors and users to do the same.
https://sysdig.com/blog/friends-dont-let-friends-curl-bash/
https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-b...
These attacks can be mounted on the network side.
Also you can inadvertently execute data from a benign captive portal or a server error page and so on.
Instead of providing justifications, perhaps we should focus on education (or making it simpler to be secure)?
x509 certificates certainly don't provide those assurances.
There’s differing levels of paranoia. I don’t pipe curl to shell at work. I do it at home sometimes, usually via Github.
This is why its safe to download packages from mirrors.
With that having been said, Debian takes an extra step into the absurd by using plain HTTP with no TLS for downloading packages. There’s no obvious security issue with that, but it does feel like a bad decision, since anyone in your request path can see what software you’re installing, and if there ever were a vulnerability it would be much easier to exploit due to the lack of security at the transport layer.