Nemesis said:
linux does have viruses...
Wrong there.
Linux does not have any known virus yet. What you have heard about are worms. Worms as you know, are caused because of mis-programming in applications that deal with linux networking.
I wrote this in another thread from General Section:
*www.thinkdigit.com/forum/viewtopic.php?t=12825&start=45
Fact is that its dam easy to create a virus in Windows... you have a wide array of languages and platforms to choose from.... You know VB, then you can write a trojan, or a word macro virus.... You know Assembly, then write a boot sector virus. You know hardcore C++ and are familiar with Win32 API then write a exe/com/dll file infector. Plus that danger of adwares and spywares... There's no such thing in Linux.
See...
In Linux, we have different users. Normal users have read-write access to only their home directories. They just cannot write to the system files directory like /usr/lib, /usr/bin etc... They cannot write because the filesystem has been designed in that way. No write permissions means no write permissions that's all... So if you do happen to accidently execute a file which is a linux based virus, then at maximum you can infect files in your /home/username directory and no where else....Though yes, if you are running that program as the root user then you can infect your whole system.
There's another good feature called
chroot which allows a command or a program to be jailed in a particular directory. The program cannot access any files outside the directory which it has been chrooted (jailed) to. These nifty features are inherently supported in the filesystem and the kernel level.
Yes, Worms are possible in Linux because there's something called
setuid bit in the filesystem which allows a program to be executed with permissions of another user, like say the root user.
But with the technologies like
selinux ... the system admin can move his jobs to more restrictive users who dont have access to any other directory of program which it is supposed to. The NX technology places more information in the program binary and in collaboration with the processor, no executable and bypass this check. Those who have gone through that RedHat's whitepaper can understand this clearly.