Live data from Hacker News

Why GNU/Linux Viruses Are Fairly Uncommon

gnu.org

21–30 of 117 posts

Re: Why GNU/Linux Viruses Are Fairly Uncommon

#21
post #10
post #4

Earlier quoted context omitted.

I think the real answer is that relatively few people use GNU/Linux

Yea, probably 1% or less of desktop users. However, I bet those targets would be extremely high value (dev environments, server access). I am sure advanced groups heavily invest in gaining access to servers.

Yeah, a lot of high-value secure systems run Linux and GNU. Web services, government systems, the vast majority (edit: it's now all) of the TOP500 supercomputers etc. I suspect at least part of it is that these systems get much more targeted attacks because of their high value, whereas viruses are to an extent un-targeted shotgun attacks. I suspect the economics of virus writing dictate that most of the effort is put towards the most popular platform, i.e. Windows.

Re: Why GNU/Linux Viruses Are Fairly Uncommon

#22
post #12
post #8

Earlier quoted context omitted.

That's about 95% of it. There are other things that give Linux a bit more of an edge in this space as well. For example, every time I use Windows, it feels like every app is asking to run as administrator. Admittedly, I haven't used Windows for about a year, but in Linux, it's pretty rare that I ever do admin/sudo outside of the command line, and I only ever use it when I know what I'm doing. Obviously this isn't som…

As if a virus really needed administrator access for anything... Maybe to fuck up your machine... but if they want to snoop on your passwords, encrypt your files, mine bitcoin, participate in a DoS attack... they can do that without elevating

[deleted]

Re: Why GNU/Linux Viruses Are Fairly Uncommon

#23
post #12
post #8

Earlier quoted context omitted.

That's about 95% of it. There are other things that give Linux a bit more of an edge in this space as well. For example, every time I use Windows, it feels like every app is asking to run as administrator. Admittedly, I haven't used Windows for about a year, but in Linux, it's pretty rare that I ever do admin/sudo outside of the command line, and I only ever use it when I know what I'm doing. Obviously this isn't som…

As if a virus really needed administrator access for anything... Maybe to fuck up your machine... but if they want to snoop on your passwords, encrypt your files, mine bitcoin, participate in a DoS attack... they can do that without elevating

You could even replace every command I run with a malware version simply by altering the $PATH in ~/.bashrc. If you manage to replace, say, apt-get with a malware version, you'll get admin permissions every time I run `sudo apt-get ...`.

Re: Why GNU/Linux Viruses Are Fairly Uncommon

#24
Its a pet peeve of mine that the GNU/Linux world is 99% of the way to an incredible degree of security but distros are totally disinterested in going the last mile, often because its a lot of boring work.

Mandatory Access Control should have been game changing in the security sphere, especially in the era of cgroups. Fine grained permissions controls in the kernel and filesystem would stomp out almost all potential malware vectors - both exploited software and injected binaries. GUI desktops could have provided UI to prompt users for unknown programs trying to access specific things and then send reports upstream of programs allowed for review. It would practically be a self-building database of program file access if done right.

But that isn't the only avenue to it. You could pressure upstream to include discriptor files in git repos of a standardized format of file access for each binary that can be used to generate selinux / apparmor / tomoyo rules. You could do it the really hard way and just have a sprint to surface test every program in official repos and generate such files yourself. Programs should almost never be accessing anything outside their XDG conf file and data dir - they should be linking libraries to provide access to other stuff (input, gui, etc) and file access should go through the system wide file picker.

As it is right now though pretty much every executed binary on most Linux systems is allowed to do whatever it wants that it has user access privilege to. Especially because most maintainers don't want to have to bother with the complaints of malcontent software breaking constantly trying to read arbitrary files. The Apparmor profiles of SUSE / Ubuntu or SELinux of Fedora are largely written for a few specific programs, usually web browsers and file sharing daemons, rather than be comprehensive. Its such a shame that all the technologies exist and are in place to make this work (even Arch has Apparmor support in its official repos now!) but there is no willpower / capital / interest in going the last step and trying to be all encompassing in your MAC profile and then lock down unknown programs appropriately. Android pretty much does this already, its a shame desktop Linux totally skipped over this avenue towards secure desktops.

There is of course an argument that if you lock down programs with network access then thats all you need to secure your desktop but that position falters in the face of arbitrary programs being run at random that can include network access. The goal should be a default restricted profile - one where arbitrary binaries cannot do whatever they want to your system, in the context of having a comprehensive profile database of software being used that covers 99% of real world program usage and thus doesn't impose a sizable UX burden of constant usage prompts for common applications.

Re: Why GNU/Linux Viruses Are Fairly Uncommon

#25
post #16
post #13

Earlier quoted context omitted.

I've definitely seen plenty of `curl | bash` installations suggested before (and can honestly say that I've run some, despite knowing the risks), but _sudo_? Is that a thing that people actually do?

https://github.com/nodesource/distributions#installation-ins... I'm sure there are plenty of others.

At the risk of appearing ignorant.. what exactly is the problem here? Do we trust the nodesource deb repo but we do not trust the bash script which is coming from the nodesource domain?

Re: Why GNU/Linux Viruses Are Fairly Uncommon

#26
post #4
post #2

It's a joke, not analysis. Was hoping for the latter.

I think the real answer is that relatively few people use GNU/Linux

> I think the real answer is that relatively few people use GNU/Linux

95% of the server market, though. Which is a huge proportion of attack space. Why steal one sod's credit card numbers when you can steal 100s of them at the same time.

Re: Why GNU/Linux Viruses Are Fairly Uncommon

#27
post #8
post #4

Earlier quoted context omitted.

I think the real answer is that relatively few people use GNU/Linux

That's about 95% of it. There are other things that give Linux a bit more of an edge in this space as well. For example, every time I use Windows, it feels like every app is asking to run as administrator. Admittedly, I haven't used Windows for about a year, but in Linux, it's pretty rare that I ever do admin/sudo outside of the command line, and I only ever use it when I know what I'm doing. Obviously this isn't som…

> and maybe it already has been.

Not completely, but I think it's mostly OK. I only see UAC prompts rarely, usually in one of these 3 cases.

1. Some software that I've written has good reasons to require elevation, I sometimes work on low level system software which uses weird WinAPI calls.

2. When installing software. The default location of installed programs, C:\Program Files, is read only unless running elevated. Probably done for extra security.

3. When using very old software, or bad quality ports from other OSes. UAC was introduced in Vista, some software which was written for WinXP or older versions requires elevation for no good reason.

Re: Why GNU/Linux Viruses Are Fairly Uncommon

#28
post #20
post #8

Earlier quoted context omitted.

That's about 95% of it. There are other things that give Linux a bit more of an edge in this space as well. For example, every time I use Windows, it feels like every app is asking to run as administrator. Admittedly, I haven't used Windows for about a year, but in Linux, it's pretty rare that I ever do admin/sudo outside of the command line, and I only ever use it when I know what I'm doing. Obviously this isn't som…

>Obviously this isn't something that could not be fixed in Windows, and maybe it already has been. There is nothing even remotely obvious about that statement. If it was anything near possible it wouldn't an ongoing problem, unsolved for the last 12 years, since the introduction of UAC in Windows Vista. Now I wouldn't say that Microsoft didn't progress. Far from it. Almost no one I knew kept Vista UAC enabled, as it…

The main flaws with UAC is that you don't know what application is asking for it (This actually ties into a deeper problem which is, you don't know where application binaries reside, and applications are less predictable on Linux). Instead you have to correlate with what you've done recently, which might not align with the process that requested permission.

Re: Why GNU/Linux Viruses Are Fairly Uncommon

#29
It's conceivable that this is the real reason. Maybe Windows is a "dragon king" statistical outlier in terms of malware. As an example, every once in a while a file "type" that previously nobody knew could be executed causes problems because someone finally figures out that it could be executed. MacOS certainly has problems with malware, but not even to the same order of magnitude as Windows.

Re: Why GNU/Linux Viruses Are Fairly Uncommon

#30
post #26
post #4

Earlier quoted context omitted.

I think the real answer is that relatively few people use GNU/Linux

> I think the real answer is that relatively few people use GNU/Linux 95% of the server market, though. Which is a huge proportion of attack space. Why steal one sod's credit card numbers when you can steal 100s of them at the same time.

When you attack a server, you don't use a virus, you use a phish or something else to gain access to it to do your dirty bidding.

What people call "viruses" usually refer only to attacks that work by getting people to execute random crap on their computer with their privileges. Servers are set up and administered in a way such that it is far harder to get somebody to run the payload containing the virus in the first place, so viruses target machines that are administered by end users (which would include home computers and smartphones!). The 95% market share for servers is irrelevant since viruses don't target servers in the first place.

Post reply on HN