Security quotes of the week
Security quotes of the week
Posted May 1, 2015 6:01 UTC (Fri) by mbunkus (subscriber, #87248)In reply to: Security quotes of the week by angdraug
Parent article: Security quotes of the week
1.
sudo add-apt-repository ppa:user/$random_software
sudo apt-get update
sudo apt-get install $random_software
2.
sudo rpm -Uhv https://web.site/$random_repo.rpm
sudo yum install $random_software
3.
wget https://web.site/$random_software.tar.xz
tar xJf $random_software.tar.xz
cd $random_software
./configure && make && sudo make install
In all three cases you're handing control over to some piece of downloaded software as root, and that piece of software can do anything at that point as both Debian as well as RPM packages allow arbitrary shell scrips/commands to be run during installation. The build system for any piece of software most certainly does, too.
Even if you don't invoke root at this point by running everything as a normal user there's often not a real gain in doing so. On my machines I am the only user, meaning that any piece of valuable information is accessible by my normal user as well. So for me, on those machines, running as $normal_user can be just as damaging as running as root.
So unless you only compile the whole software (not just the installation step) in some kind of sandboxed environment there's not that much to be gained from not running as root.
But even if you do that it comes back to the point that the information accessible with my $normal_user is what I would have to protect. So even if I compile and install in a very safe way, what happens when I run the resulting software as $normal_user? Again I hand over control to some random piece of code. We currently have very little possibilities to sandbox random software in a meaningful and effective way. Things like Docker and the recent initiative borne out of GNOME about sandboxing GUI applications may one day lead to improvements, but where nowhere near that. Things are somewhat different and even better for server-type applications, but not for user apps.
It all boils down to some basic level of trust. Do I trust $random_developer enough not to mess with me and my data? If I don't then I must not run anything from him/her, no matter how. Because I cannot sandbox it effectively. However, if I do have that trust then I can often just as well pipe content from a website directly through a shell because the other at least somewhat convenient methods aren't any more secure.
