Linux Is Linux immune to viruses?

~HeadShot~

Skilled
Mar 15, 2005
1,863
27
111
33
This interesting piece of information is taken from another forum:

Question:
"I am wondering about Linux and viruses. I have an acquaintence who claims to be very knowledgable on Linux (I am not...at all), make the statement that "there are no Linux viruses. You do not require protection for them. It is just a windows thing. No Linux system has ever had a virus. That is because Linux is not a bootable program. You can actually boot Linux from a floppy disk. Every time you boot it up it is sanitary. The biggest problem with Linux though from what I have heard is there is no compatibility with Windows at all unless you partition your hard drive and use half of it on Linux and the other half breed with Windows. You can not use modems, even simple dial up programs do not work. You have to script your own."

So is this guy full of it or is he right? I would really appreciate some input here, and some examples if possible.

Answer 1:
"You're both wrong. Linux is not immune to verii, unless you use a "Live CD version, but it is easier to protect. And there isn't a "floppy" version except for some old 386 or 486 versions. With a "Live CD" you can often connect to a dialup modem and almost always to a BroadBand connection. The purpose of using the "Live CD" is that you can "surf the web" in COMPLETE safety. Why? Because the CD can't be written to and your HD can only be accessed if you intentionally activate it with a TYPED command. (Unintentional Clicking won't do it.)

As to all of the other things you claimed Linux can't do, you are several years behind the curve. About the only thing you can't do in Linux that you can in Windows is access web sites that REQUIRE ActiveX. That's because ActiveX is proprietary M$ software. But it is also inherently dangerous. And as time goes by, fewer and fewer sites want to be M$ only."

Answer 2:
"Linux is quite easy to secure. It also secures at a deep level so that you will never have to worry much about hackers or virus. Running Linux and Windows is a mistake. You will need to stick with Linus as your only OS for a substantial ammount of time or your Linux skills will suck.

If you use a cable modem Linux will hook up and run with zero effort on your part. If you use dial up it will be similar to setting up a modem in Windows. You will need to enter a couple of phone numbers and other trivial tasks.

Your best bet might be to use a live cd version of one of the Debian derived distros. Kanotix, Knoppix and Mepis are excellent and you need not install anything at all."

Source: Extreme Tech Forum.
 

chip_0

Adept
Mar 15, 2005
524
34
91
35
One of the main reasons linux can be said to be nearly free from virii is file system permissions. If you are logged in as a normal user, you will not have write access to any directory on the filesystem except your personal home directory, and the tmp one which is emptied on reboot.

This is why everyone is advised not to use their system as root, and be root only while admintering the system.
 

reef_d

Disciple
Apr 2, 2005
267
0
0
38
i think active x components are responsible for lot of the malicious code written that attacks windows systems
 

Josh

Skilled
Mar 24, 2006
1,179
24
101
40
www.mobguru.com
"there are no Linux viruses. You do not require protection for them. It is just a windows thing. No Linux system has ever had a virus.
This is crap. There are viruses in Linux and there are anti viruses also. Linux is a bit more secure system coz it has hierarchial directory structure with file/ directory permissions based on users and groups. And this is what Linux started with not like Windows in which most of the sec mesures have been built on afterwards. Also Linux has been made by a community of people all over the world, so the code ultimately goes through a through check unlike windows wherein 200 people built Win98.
Also Linux can be locked down hard if wanted, but that would reduce functionality also. File permissions like Stickbit and UID , GID are very Linux centric and have added to its security.
Most of the Viruses come due to some part of mistake on Users part ( not talking of worms ) like checking and infected CD or Network. Firewalls have been a part of linux since long time unlike WinXP. I could go on and on but the point is Linux has been built by keeping Unix/Minix in mind which were mostly Server Os. So security is very tight.Also since its open source the code has been reviewed by lots of comp geeks so that makes it pretty much free of coding errors, unlike windows ( closed Source ) which has bad memory coding and 50 % of vulnerabilities in Windows have been due to buffer overflow / dll problems.
Linux is secure but if you know how to secure it.
"Root is a State of Mind" - as someone said :eek:hyeah:
 

Hacker

Skilled
Apr 1, 2005
1,694
11
51
Pune
ujjwal said:
This is why everyone is advised not to use their system as root, and be root only while admintering the system.

Agree but its also frustratin to put your password everytime u change a small seting like changing the clock.

I mean if you know wat ur doin then its ok to be logged in as root all the time.
 

Josh

Skilled
Mar 24, 2006
1,179
24
101
40
www.mobguru.com
Hacker said:
Agree but its also frustratin to put your password everytime u change a small seting like changing the clock.

I mean if you know wat ur doin then its ok to be logged in as root all the time.
This is what i meant when. You can lock down linux system very hard, but that would remove the functionality for which it is there. Also it is advisable to not run essential services at Root.
 

felicis_1985

Disciple
Feb 4, 2006
62
0
0
Linux is never free from viruses.

the only difference is there are not many viruses for linux.
once there are more linux systems in use viruses wil appear in linux too.
one more thing is u will know of a virus in system only if u detect it.
most people who are novice in linux feel taht it is free from virus since they cannot detect the virus in first case.

as some one has correctly pinted ut before viruses exist for linus and even antivirus solutions are also available.
 

shirish

Skilled
Feb 3, 2006
1,374
77
136
48
Lemme see if I get this right :-

1. There are supposed to be around 100 viruses in labs. In the wild, either they exist or not, nobody knows. AFA anti-virus solutions go, Central Command as well as AVG both are paid products for companies running GNU/Linux server farms/workstations. AVG also has a free standalone product AVGFree for Linux for desktops.
The only thing I didn't like in AVG Free there's no port to a .deb then debian itself is much more secure.
2. Now if one is to compare with Windows then lots of things come in the picture. For e.g. when one is installing windows then the 1st user is made as an administrator having full rights to the system which is not good. While installing any GNU/Linux distro. one has to make a user & his domain is only his /home partition.
3. Also most of the GNU/Linux systems follow a beautiful system where the OS, the application data, system data, the libraries, the shells all have their own seperate partitions with their own set of permissions so lots of things are off-limits by default.
4. Most of the GNU/Linux distros are run on multiple architectures. Some of the popular ones are an i386 version, an i686 version, an AMD64 version. There is also a PPC as well as some other ones which I can't remember outright.
5. Then there is a multiplicity of applications to do the same job. For e.g. for mailing (from a virus writer point of view) there is KMail, Mozilla Mail, Evolution, pine, mutt, emacs etc. which don't make the virus writer's job easier. Also almost all of these mail programs don't show either ActiveX, html or any of the attachments by default which is a good thing. On Windows by default most people use Outlook or Outlook Express & their ills I'm sure I don't need to discuss.
6. There is also no dearth of package management systems right from the source to packages like .deb & .rpm & package mgrs like apt, apt-rpm, yast & yum (of course these are not exhaustive by any means).
7. Lastly there are variad ways to set up a machine. Everybody is different.
Now look at the permutations & combos of all the things which in itself limits what can be achieved by a virus writer. I'm not saying that's its an impossibility but its a very remote chance. On the off-chance even if u do get it transferring the same to some comp. is not easy. So if u wanna use an anti-virus do it if u're running something like an NFS news servers, web servers or something (SMB's, Education) which has MS stuff which needs to be run (executables) otherwise for a user he can live without one. If one wants to really secure the machine then one can use always use SELinux which has a modified kernel & applications having mandatory acces controls built into it. This is for specific usage though.

Hope this sets the record straight & is clear to the noobs/newbies also. :)
 

Josh

Skilled
Mar 24, 2006
1,179
24
101
40
www.mobguru.com
Good one there.....

shirish said:
The only thing I didn't like in AVG Free there's no port to a .deb then debian itself is much more secure.
U can do it urself.. Not all companies give .deb package

Now if one is to compare with Windows then lots of things come in the picture. For e.g. when one is installing windows then the 1st user is made as an administrator having full rights to the system which is not good. While installing any GNU/Linux distro. one has to make a user & his domain is only his /home partition.
Administrator = Root Period.
On any linux system root user is the first one created, as in windows.

Also most of the GNU/Linux systems follow a beautiful system where the OS, the application data, system data, the libraries, the shells all have their own seperate partitions
Not necessarily seperate partitions but ya seperate permissions for each dir.

I'm not saying that's its an impossibility but its a very remote chance.
That remote chance is not that remote... There are viruses for linux and pretty good ones.

On the off-chance even if u do get it transferring the same to some comp. is not easy.
There are viruses that affect ELF binaries of linux executable files. Plus having different setups does not mean much.

So if u wanna use an anti-virus do it if u're running something like an NFS news servers, web servers or something (SMB's, Education) which has MS stuff which needs to be run (executables) otherwise for a user he can live without one.
Webserver on linux using MS stuff ?? MS stuff needing to be run on Linux servers ?? I didnt get that.. SMB has nothing to do with MS stuff, its implementation of CIFS.

SELinux which has a modified kernel & applications having mandatory acces controls built into it. This is for specific usage though.
SELinux is used to harden linux kernels. Its support in included in 2.6.

The short life and hard times of a Linux virus is a good article. But nice work shirish.
 

shirish

Skilled
Feb 3, 2006
1,374
77
136
48
Josh said:
Good one there.....
U can do it urself.. Not all companies give .deb package

Agreed but then u need the source packages. There are ways to convert rpms to debs & vice-versa but wouldn't use the same with an anti-virus.

Josh said:
Administrator = Root Period.
On any linux system root user is the first one created, as in windows.

True. But most of the GNU/Linux systems make it compulsory to have a user & he doesn't have all the rights. This is good practice atleast in my book.
Josh said:
Not necessarily seperate partitions but ya seperate permissions for each dir.

I have done both ways so again it depends how one wants to set it up.

Josh said:
That remote chance is not that remote... There are viruses for linux and pretty good ones.

There are viruses that affect ELF binaries of linux executable files. Plus having different setups does not mean much.

The point is these are binaries & one will have to give execute permissions. Otherwise the virus can't penetrate. Unlike viruses on windows which can at any point compromise the .dll unknowingly as things are being always run as root.

Josh said:
Webserver on linux using MS stuff ?? MS stuff needing to be run on Linux servers ?? I didnt get that.. SMB has nothing to do with MS stuff, its implementation of CIFS.

SMB I meant by small medium businesses. I'm thinking of Web servers which use Samba but give some sort of MS-based services (authentication & what not). What the heck even MS used GNU/Linux or BSD (don't remember) for its hotmail services

Josh said:
SELinux is used to harden linux kernels. Its support in included in 2.6.

The short life and hard times of a Linux virus is a good article. But nice work shirish.

I know about the support in the newer 2.6 kernels. Would be looking up the article for sure. Anytime mate :)
 

KingKrool

Skilled
Mar 16, 2005
3,556
71
136
FreeBSD was used by hotmail, before MS took it over. They then waited until they had managed to get w2k datacenter edition out the door and switched.

Once of the reasons you need an antivirus on linux servers is that the clients are windows. Suppose you run a mail, samba or other such server as mentioned by shirish. Well, don't all mail and file servers on the web have antivirus scanning facilities?
 

shirish

Skilled
Feb 3, 2006
1,374
77
136
48
KingKrool said:
FreeBSD was used by hotmail, before MS took it over. They then waited until they had managed to get w2k datacenter edition out the door and switched.
Once of the reasons you need an antivirus on linux servers is that the clients are windows. Suppose you run a mail, samba or other such server as mentioned by shirish. Well, don't all mail and file servers on the web have antivirus scanning facilities?

What doesn't get published is how many crashes datacenter might be having :bleh: & the elaborate fail-safe measures they would be doing to ensure that things don't come to stand-still. More so for the premium services that people take from MS :(
 

Josh

Skilled
Mar 24, 2006
1,179
24
101
40
www.mobguru.com
KingKrool said:
Once of the reasons you need an antivirus on linux servers is that the clients are windows. Suppose you run a mail, samba or other such server as mentioned by shirish. Well, don't all mail and file servers on the web have antivirus scanning facilities?
Well all mail servers dont have anti viral facility. They most probably only scan attachments. Mail servers make more use of anti spam softwares. But ya that is a very good reason and i completely forgot about that.. I mean yahoo mails say something about scanning email attachments...
About file servers i dont know.
But reasons are very solid and true... :hap2: Good post this king.....
 

Josh

Skilled
Mar 24, 2006
1,179
24
101
40
www.mobguru.com
shirish said:
What doesn't get published is how many crashes datacenter might be having :bleh: & the elaborate fail-safe measures they would be doing to ensure that things don't come to stand-still. More so for the premium services that people take from MS :(
Well actually MS servers are not all that crap. Some people do swear by their Exchange servers, Win2003 servers, IIS etc. Though they have their share of issues but ultimately MS does build good products, maybe not effective in resource utilization but more in user friendliness/interoperatilibity with other technologies.
 

shirish

Skilled
Feb 3, 2006
1,374
77
136
48
I have to agree on the last point of user friendliness although these guys are also picking up quite decent speed in the user friendliness regard.