LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Will switching to linux make virus stop working (http://www.linuxquestions.org/questions/linux-general-1/will-switching-to-linux-make-virus-stop-working-877706/)

Firefox54 04-28-2011 06:45 PM

Will switching to linux make virus stop working
 
I have a windows computer that has a virus on it. This computer isn't worth much so I don't want to get a virus program to clear it. I know the virus probably won't be able to crash the linux OS, but will it be able to transfer itself to flash drives if I am running linux?

MS3FGX 04-28-2011 06:52 PM

Linux is not susceptible to Window's viruses, it will have no effect.

Firefox54 04-28-2011 06:57 PM

I know the virus won't be able to crash the computer is it has linux on it. But since both windows and linux are both written in C, and lots of windows programs are linux compatible, will it be able to move itself to an external drive?

TobiSGD 04-28-2011 07:00 PM

No, it won't be able to do that. Regardless of the programming language, Windows and Linux are not compatible. Windows programs, and a virus written for Windows is a Windows program, are not running natively under Linux. You need an emulation layer, like wine to run Windows programs, and not all programs will run.

By the way, you don't need to spend money to get an antivirus program for Windows, there are many free versions out there.

jschiwal 04-28-2011 07:18 PM

You need to be careful about not transferring infected files from Linux to Windows.

For example, a pdf file, containing an exploit against windows, saved on a samba share, could infect a windows box if a Windows user opened it.

Don't repeat bad windows habits in Linux. Don't run as root for example. The system directories in Linux aren't user writable, and programs are designed assuming that. Don't share your entire system. Only have shares for directories you want to share.

Keep your system updated.

Use strong passwords, including for devices such as modems.

Some exploits have nothing to do with your OS. For example, if you use the same password for GMail and Facebook, an exploit of one, will lead to an exploit of another.

Firefox54 04-28-2011 07:40 PM

Thank y'all for clarifying

MTK358 04-29-2011 09:49 AM

The fact that they're written in C doesn't matter at all. No matter what language you write it in, it's all the same kind of machine code once you compile it.

It's the system calls that matter. Windows programs CANNOT run in Linux, the system calls are not compatible in any way whatsoever. Also, Linux uses a different file format to store executables.

smeezekitty 04-30-2011 01:20 PM

Quote:

Don't repeat bad windows habits in Linux. Don't run as root for example. The system directories in Linux aren't user writable, and programs are designed assuming that. Don't share your entire system. Only have shares for directories you want to share.

Keep your system updated.

Use strong passwords, including for devices such as modems.
LOL I always run my system as root, seldom update and use weak passwords on many things.
Never have been security minded though nothing bad has happened yet on Windows or Linux.

@the OP
There is practically no way a windows virus with windows system calls will run on linux without emulation or call translation.

Arcane 04-30-2011 03:24 PM

Quote:

Will switching to linux make virus stop working?
Answer is - NO. Windows virus will still work(if you will activate it giving proper environment) but won't affect Linux system(unless it's Linux virus). Btw: If you won't execute it in windows it won't work there either. Viruses need PEBKAC approoval to work(crackers who brake in system just force give that permission but even they can't do crap without giving permission to file they want to use).
Linux is safe because
1)It's unpopular so far so people don't have interest making viruses for it that much - please don't tell me story that it's 100% safe. Even openBSD had those 2 and MAC was hacked and would be more proof if someone really really wanted or needed. Anything one person has made other can brake(hack).
2)It comes with limited user by default - if you use limited(or guest) on windows they won't affect system even if you executed them just maybe mess your documents and thats it(thats why backups are important). Please try using root on Linux and then tell how it's safe..

jefro 04-30-2011 06:20 PM

One of the problems is the you are getting virus's in the first place. Until you correct that you may be as subject to data loss in linux as you are in windows. A lot of people feel their data is secure in linux because they don't have what seems to be a virus. Basically no OS is secure.

In either case you need to learn and use as many "best practices" as possible to help secure your system.

smeezekitty 04-30-2011 06:42 PM

And backup your data.


All times are GMT -5. The time now is 10:44 AM.