LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-10-2008, 09:16 AM   #1
SHENGTON
Member
 
Registered: Sep 2008
Posts: 93

Rep: Reputation: 15
Is this the reason why Linux is virus free?


In Windows, we have partitions and inside those partitions are folders and files. And we know that the partitions are detected at boot and assigned as drive letters. So that's why we can immediately access the drive because it's already mounted.

In Linux, all the partitions are under the root directory and before we can access the drives we have to mount first. So is this the reason why Linux don't have viruses or we considered as free virus?

Thanks and God bless.
 
Old 09-10-2008, 09:23 AM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
No, the filesystem has very little to do with viruses. It's rather the strict execute permission system, not allowing users to mess with system files and things like that. Also, the diversity of Linux distributions creates some compatibility problems for viruses.
 
Old 09-10-2008, 09:29 AM   #3
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 32
Quote:
Originally Posted by SHENGTON View Post
In Windows, we have partitions and inside those partitions are folders and files. And we know that the partitions are detected at boot and assigned as drive letters. So that's why we can immediately access the drive because it's already mounted.

In Linux, all the partitions are under the root directory and before we can access the drives we have to mount first. So is this the reason why Linux don't have viruses or we considered as free virus?

Thanks and God bless.
Partitions are all located under the / directory but that doesn't mean they must be mounted manually. Mount points for various disk partitions can be specified in the /etc/fstab file and then they will be mounted at boot time.

I am no 'virus' expert, but I am a software engineer and I do know that the structures of Windows and Linux are drastically different. For a virus to do harm, it must know something about its environment and what it has available to itself to use. An executable in windows will simply not run on Linux and vice versa. So executable based viruses must be targeted at a particular system and cannot be designed to work on more than 1 system (windows or linux etc). Since Windows have the largest market share by a landslide, virus makers target windows since there is a higher probability that the computer they get their virus onto is windows.

That's one reason, but there are also web based viruses that will run on Linux through the browser. However, Linux file system is different than windows so the info they want is not in the same place on both. Once again, they target Windows because someone viewing the infected web page is much more likely to be a windows user than a Linux user.
 
Old 09-10-2008, 10:42 AM   #4
SHENGTON
Member
 
Registered: Sep 2008
Posts: 93

Original Poster
Rep: Reputation: 15
Thanks guys. Your posts are big help.
 
Old 09-10-2008, 10:56 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Still too many windows users run as root. Also, in windows, if a file has any number of extensions, that file is executable. In Linux, a file has to have the executable bit set. In windows, a com unit in a document will run an executable. If it only exists on a different machine, it is downloaded from that machine. A virus has many places it can enter itself in the registry so that it starts when you boot.

Viruses are so named because of the way they spread. Just like real viruses, if they can't spread to other hosts, they die off.

In Linux, you still have to take precautions. While automated attacks through viruses may not be successful, you still need to worry about attacks from people looking for exploits. If they can get in and be promoted to root, then it's game over. They may be able to install a hacked kernel module. There are programs like rkhunter to check your system.

There was a consecwest competition in Canada where participants tried to hack into three fully patched computers. A vista machine, a Mac OS 10 and an Ubuntu machine. It was the Mac that fell first. Vista, the next day. Ubuntu was left standing. The Mac fell because of an exploit in webkit. The same exploit had been patched months earlier in Linux but not in the Mac. Even though the Mac is inherently secure, because Apple didn't take security seriously enough. There is a lesson there that Linux users need to take to heart.
 
Old 09-10-2008, 10:58 AM   #6
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
The reason why viruses are much more of a problem for Windows than for Linux is because there are hundreds of millions more Windows users than Linux users. Most modern viruses and malware are written by, or distributed by, organized crime cartels for profit. Why attack a few million users when you could attack hundreds of millions? It wouldn't make business sense.
 
Old 09-17-2008, 10:54 AM   #7
argh2xxx
LQ Newbie
 
Registered: Nov 2006
Posts: 18

Rep: Reputation: 0
I heard it's possible for virus creators to write cross platforms viruses or worms that can attack Linux and Windows at the same time. Is this true or just fiction? If this is possible, then I think Linux users need to be paranoid about virus too, and don't be too overly confident with Linux's myth that Linux fears no virus.
 
Old 09-17-2008, 12:19 PM   #8
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by argh2xxx View Post
I heard it's possible for virus creators to write cross platforms viruses or worms that can attack Linux and Windows at the same time. Is this true or just fiction?
It's not fiction.

Quote:
If this is possible, then I think Linux users need to be paranoid about virus too, and don't be too overly confident with Linux's myth that Linux fears no virus.
IMHO the reason you don't see GNU/Linux users being as paranoid about viruses as Windows users isn't because GNU/Linux is virus-proof, it's because the virus threat to GNU/Linux is a million times smaller than the virus threat for Windows. GNU/Linux malware paranoia is better suited for things which are a higher threat to us (such as rootkits, for example).

Last edited by win32sux; 09-17-2008 at 12:28 PM.
 
Old 09-17-2008, 12:28 PM   #9
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 32
Quote:
Originally Posted by argh2xxx View Post
I heard it's possible for virus creators to write cross platforms viruses or worms that can attack Linux and Windows at the same time. Is this true or just fiction? If this is possible, then I think Linux users need to be paranoid about virus too, and don't be too overly confident with Linux's myth that Linux fears no virus.
I would guess it depends on how they write it. If the virus is based on a binary executable, it has to be targeted. A binary for windows won't run on Linux (without wine) and a binary for linux won't run on windows. The possibility for cross platform viruses mainly has to be through the web. Many web programming languages are cross platform in nature (php, java, etc) and these are the languages that a cross platform virus may be written in. However, the piece of code would still not presumably work for both windows and linux, but the programmer can figure out what OS the website is being served to and then run targeted code they have written.

We should all worry about viruses, but I still believe that Linux users are generally more tech savvy, more careful about where they surf and what they click on the web, and most importantly (IMO) that we are a minority when it comes to computer users. The last fact is important because the virus writers will normally ant the biggest impact for the least amount of work, and for that they will simply go after windows users since they are more likely to be infected for various reasons.
 
Old 09-17-2008, 12:52 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by CRC123 View Post
We should all worry about viruses
Given the past and current GNU/Linux threatscape I would disagree with that. We have other realistic things to watch out for and most of them unfortunately are Wetware related.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
is linux virus -free? xyz Red Hat 5 08-24-2008 12:08 AM
WHY LINUX is Virus FREE utkarshrawat General 11 10-03-2007 10:16 AM
why linux is virus free sailu_mvn Linux - Security 8 03-14-2006 10:17 PM
Free Virus Program For Linux andre_bergh Linux - Security 4 03-24-2005 12:28 AM
Boot virus or Anti-Virus? AVG Free Anti-Virus Software problems SparceMatrix Linux - Security 9 08-02-2004 02:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration