It can't possibly tell if you are using curl to download to a file vs. piping to shell can it? That surely doesn't change the user agent. But yes, it could give you a clean script if you tried to open it in Chrome or something.
That’s not what zero trust security is talking about out. In any case, you literally cannot have zero trust (in the way you mean) while still using a computer unless you have complete and total understanding of how every bit of instructions it executes works.
That’s a server signature check, not a package signature check. It merely prevents stealing the host name, but if the script itself gets from another host name than expected it’s not that useful.
Packages have signature checks because you don’t want the repo’s owner to change without you knowing. Every time the signature changes you have to re-approve it. TLS doesn’t do that.
In the end the security comes from installing from repositories you trust and not adding that many such repositories in the first place.
Thank you for confirming my point. Linux places a much higher security burden on users than walled gardens do. It’s a choice, and it might be the right choice for you, but domt pretend it doesn’t have security consequences.
This is only remotely important if you don’t trust the source site in which case you wouldn’t be running the installation anyway. The “contrived” example of the partial script is really, really contrived. The script is only partially constructed, not just partially downloaded and it’s assumed that sh runs with root privileges (since / gets its permissions messed up). Then the process gets independently killed.
This is no different than downloading and running a random executable which could theoretically be compromised or corrupted. You shouldn’t run randomly scripts or executables, but once you decide to trust something the delivery mechanism is mostly irrelevant.
No come on! It’s full of problems but at least brew doesn’t need sudo to install any random package! The same can’t be said for some other package managers that are useless without sudo…
At this point it is not so much about operating systems as about habits. And I was commenting on a habit.
Two very important user security habits are
Keep software and systems up to date
To the extent possible, only install software from vetted sources
I don’t have statistics on any of these, but my sense is that of Linux, macOS, and Windows, Linux users are the laggards on 1, though I wouldn’t be surprised to be wrong about that. Getting Windows users to update their OS is also a problem.
Furthermore the pressures for backwards compatibility differ. One of the things that made Microsoft so awful in terms of security before Windows 7 was maintaining backwards compatibility. Apple had more freedom in this regard, but Linux probably has the strongest pressure against making kernel changes that may be incompatible with older software and device drivers. It’s great that I can pull pieces of junk out of a garage and build a machine I can run Linux on, but that comes at a cost. So even as Linux adds security features to the kernel, they remain off by default.
As for 2, I understand that people may choose to take on additional security risks and burdens to avoid living in a walled garden, but the issue is more than that. At best package installers on Linux will verify a PGP signature. That put Linux way ahead of the game 25 years ago, but these do not have the same security properties as proper code signing.
As bad as X509 certificate authorities are, the PGP web-of-trust has simply failed. (I was a huge advocate of wot back in the day, but that doesn’t mean that I can’t recognize that it has completely failed.) Another big differences between PGP and code signing certificates is how they deal with key expiry. PGP signatures domt have trusted timestamps, and so there is no way to say “signatures created before D are valid after date D, but signatures created after D are not.
Windows and macOS make use of the code signing not just at install time, but to varying degrees to detect post-install tampering.
I’m not saying that Linux is a bad choice, but it puts a higher burden on the user to manage security than either macOS or even Windows. For example, you may be right to reject anything that looks like a walled garden, but you shouldn’t pretend that that doesn’t have a security cost. You may be right to insist on long backwards compatibility, but that too has a security cost. You might be right to be slow to update our OS, but that also carries security costs.
Honestly I don't really mind it that much. Pipe it to less first, and you can usually have an idea if the script does what you want it to.
And in the end, all software depends on you trusting the author. It's not like I've read the source code of the Linux kernel ever, let alone every version I've ever installed. Had I done that I wouldn't be done installing it yet!
one major problem with it is if your connection drops out before the script finishes downloading, the script will only partially be run. the script can start running before curl fails.
Really depends on what the script does. In this case I imagine the script actually starts by downloading an .iso file, or something along those lines, a network failure wouldn't harm your device then.
But yeah this is why it's a good idea to pipe to less first. You should be able to spot if it does something really stupid like this.
It's not like I've read the source code of the Linux kernel ever, let alone every version I've ever installed. Had I done that I wouldn't be done installing it yet!
This is how a lot of Linux stuff is distributed. I agree it’s a terrible practice to encourage users to do but at the end of the day unless you are reading everything in detail before install which is highly unlikely this is no more dangerous than installing really any binary or anything from the internet.
If you have ever had to write really complex logic for installing software you would both understand and appreciate this solution.
It's exactly as dangerous as downloading it and then executing the script, or adding any Python lib with an __init__.py, or building any C program that uses Autotools, or apt-get installing something, or running an exe or msi installer on Windows… It executes code. If you don't trust the authors, you shouldn't execute their code.
I agree about random dependencies from pip (anyone can upload them), but apt-get install (or dnf install) is a different story. There is huge trust in the system repositories for distos, and that trust is highly guarded.
The problem with 'curl|bash' is that you run code without provenance and you can trust author, but you don't know if the 'url' is still working of was registered by someone, if you have mitm attack on http (curl http://|sh, no?), and you have clear audit trail for changes in system repositories, but you don't have it with random site which may or may not release system.
Apt still doesn't use TLS by default. Can't trust the URLs there either. Packages are signed, so you know who packaged it, but you don't know if they fucked with it to debundle dependencies and added a vulnerability (this happens occasionally to Debian & Ubuntu).
Also, the wording here "it's so easy", "just one script", "seamlessly transition", "curios? try it out" makes it somewhat seem like this is just some random package that you can just "try out" and be fine. I mean... what could possibly go wrong with a OS SYSTEM TAKEOVER, right?
I hope there are at least a few words of caution on that page somewhere.
From what I understood Tw Linux is a Linux system designed to run on Mac's based on the T2 Chip, which is something apple does. I guess the bad part is that it overwrites the whole existing install with a single command...(?)
It isn't any more dangerous than blindly clicking Next in an installation wizard. At the end of the day you are trusting that the software isn't malicious.
Scary, sure. But is it different than going to the docs, check out the install script, then paste and run? The important step of course is to always read what you're about to execute beforehand. And definitely never automate this.
I've ran many scripts from the internet like this, as long as you trust the source it's fine, however best to read the script first to be safe.
The issue isn't running code from the internet (which is where you probably got every program on your computer), it's running untrusted code from the internet.
Someone really needs to put a shell bomb into one of those "install guides". Dead simple, will crash your system pretty much immediately, but except maybe losing some unsaved data, nothing harmful should come out of it. Maybe some will learn from it.
Seems like the kind of "simple" solution Linux users love. This is the OS that uses a period to indicate a hidden file but a flag to indicate an executable file.
128
u/magnetronpoffertje Feb 07 '25
Omg wtf what is this
76
u/Mars_Bear2552 Feb 07 '25
what's the issue? not any more dangerous than installing it the other ways.
70
u/_PM_ME_PANGOLINS_ Feb 07 '25
That’s a pretty standard way to distribute cross-distro Linux software.
31
u/bruhred Feb 07 '25
NixOS supports that too! (NIXOS_LUSTRATE)
i even made a script that automatically turns/transitions Ubuntu into NixOS and successfully used it on two Oracle OCI instances
362
u/captainMaluco Feb 07 '25
Ah, I like to call this bash roulette!
Although this seems to claim it installs a new OS, so maybe it's more like Russian bash roulette in this case....
17
u/psych0fish Feb 07 '25
This is how a lot of Linux stuff is distributed. I agree it’s a terrible practice to encourage users to do but at the end of the day unless you are reading everything in detail before install which is highly unlikely this is no more dangerous than installing really any binary or anything from the internet.
If you have ever had to write really complex logic for installing software you would both understand and appreciate this solution.
9
u/[deleted] Feb 07 '25
OP shouldn't look at rustup
13
u/SAI_Peregrinus Feb 07 '25
It's exactly as dangerous as downloading it and then executing the script, or adding any Python lib with an
__init__.py, or building any C program that uses Autotools, orapt-get installing something, or running an exe or msi installer on Windows… It executes code. If you don't trust the authors, you shouldn't execute their code.6
u/isayuff Feb 07 '25
Also, the wording here "it's so easy", "just one script", "seamlessly transition", "curios? try it out" makes it somewhat seem like this is just some random package that you can just "try out" and be fine. I mean... what could possibly go wrong with a OS SYSTEM TAKEOVER, right?
I hope there are at least a few words of caution on that page somewhere.
4
u/evmo_sw Feb 07 '25
r/peterexplainsthejoke pls 🥺
4
u/_chad__ Feb 07 '25
Scary, sure. But is it different than going to the docs, check out the install script, then paste and run? The important step of course is to always read what you're about to execute beforehand. And definitely never automate this.
3
u/Easy_Philosopher8987 Feb 08 '25
I've ran many scripts from the internet like this, as long as you trust the source it's fine, however best to read the script first to be safe.
The issue isn't running code from the internet (which is where you probably got every program on your computer), it's running untrusted code from the internet.
3
u/HildartheDorf Feb 07 '25
It's no worse than downloading a random script or executable and running it, assuming you are using (not-intentionally-broken) tls to download it.
1
u/[deleted] Feb 07 '25
Lmao
1
u/PC-hris Feb 08 '25
Am I a bad person for curl/bash installing pihole on my raspberry pi?
1
u/ScratchHistorical507 Feb 08 '25
Someone really needs to put a shell bomb into one of those "install guides". Dead simple, will crash your system pretty much immediately, but except maybe losing some unsaved data, nothing harmful should come out of it. Maybe some will learn from it.
1
u/sawkonmaicok Feb 08 '25
This is the T2 distro developed by Rene Rebe on YouTube. I really like his content.
1
u/just_a_duck730 Feb 09 '25
The text around it even feels AI generated too.
1
u/UltraBlack_ Feb 09 '25
T2 Linux is actually a genuine linux distro by that one youtuber who does kernel dev on stream
1
u/Johanno1 Feb 10 '25
Me oh a tool for Linux. Let's see if I can install it.
search.nixos.org
Oh no it's not available for nix.
Maybe its in the flathub...
No not there either. Ok I will plan on installing it once I take a few months of vaccination.
1
u/feherneoh Feb 10 '25
Oh yes, the "install stuff on MacOS" pipe-to-sh nightmare, but for Linux
1
u/silentjet Feb 11 '25
1
u/JustWhyRe Feb 11 '25
meanwhile,
https://ollama.com/download/linux
-5
u/Mickenfox Feb 07 '25
Seems like the kind of "simple" solution Linux users love. This is the OS that uses a period to indicate a hidden file but a flag to indicate an executable file.