Dualbooted pc: would a virus downloaded on linux infect windows?

1

1

Most, if not all Linux and Mac users don't use antivirus.

If you dualboot your pc, and you catch a virus on some website or whatever. Would it affect your windows partition if it's mounted on linux? I'm not talking about viruses only, but all kind of malware.

Lynob

Posted 2013-08-28T14:27:21.540

Reputation: 3 254

Linux, Unix, and OS X installation can download an infected file and transfer it to a Windows installation. Since you will be unable to run the infect file you will be unable to actually infect the Windows installation. Until you run the file on Windows it won't become infected. – Ramhound – 2013-08-28T14:54:10.840

possible duplicate of Is it possible for virus in windows to infect ubuntu?

– Ƭᴇcʜιᴇ007 – 2013-08-28T14:59:41.480

@techie007 NO thats not my question! Is it possible for a WINDOWS virus to infect WINDOWS If i catch it while working on Linux; IF windows partition is mounted while I'm on Linux that's my question... Coz it's almost impossible for a windows virus to infect linux, but since you can mount windows on Linux, I want to know if viruses can spread to that partition – Lynob – 2013-08-28T16:46:44.430

Answers

4

Definitely maybe is about the best answer you can get.

It is certainly possible for a virus that runs on one OS to have a payload that can infect files that will run on another OS. If it finds an entire drive full of files that will run on another OS then it may well do it's work there. Many older viruses spread by searching network drives for various executables and inject their code into them, the theory is no different.

The only thing is that the virus will not properly run until you boot into that OS so you may have a window of opportunity to clean up the infection before it fully entrenches itself in the OS. That's also assuming your virus scanner can see and catch all the various payloads the virus may have.

That's not to say all viruses are written to do this though. You may get lucky and the virus is focused on your current OS.

Either way dual-booting is not an excuse to not have good virus protection on both of the operating systems.

Just because Windows is a much larger target for malware and viruses does not mean that other OSes should not protect themselves appropriately.

Mokubai

Posted 2013-08-28T14:27:21.540

Reputation: 64 434

1Most viruses are focused on one OS, but if they do not properly test that (and why would they build in that quality?) a side effect of e.g. file/macro infections could be that they also infect files on the other OS partitions. – Jan Doggen – 2013-08-28T14:48:43.240

Aye, I was trying to stress it more as a definitely possible rather than certainly going to happen, but cross-platform viruses are certainly not beyond the realms of imagination. – Mokubai – 2013-08-28T14:50:43.717

@JanDoggen Some cross platform malwares are present for e.g consider this hacking tool http://thehackernews.com/2013/08/Cross-platform-malware-java-hacking-tool.html

– BlueBerry - Vignesh4303 – 2013-08-28T14:50:57.870

You may get lucky and the virus is focused on your current OS. but when you mount your windows partition, it becomes a part of the linux OS, doesn't it? – Lynob – 2013-08-28T16:53:01.103

@Fischer Sorry I only just saw your comment. Yes, once you mount it rw in any malware in Linux is free to do whatever it likes, leaving either Linux or Windows payloads behind. I suspect the reason your question was marked as a dupe (though please note it was not closed as one, yet) is because what is true going from Linux to Windows is also true going the other way though the accepted answer there states that it is very improbable I personally feel that given the state of malware I do not see it as being so unlikely. As you say, you may get lucky in your choice of malware or you may not. – Mokubai – 2013-08-29T16:25:06.957

1

Most malware does not target Linux. I suspect that among viruses that do, few are equipped with a payload to infect Windows partitions also, although if such a partition has been mounted with rw access, it would be trivial for installed malware to do so.

Apart from anti-virus software, there are few technical defenses against malware spreading to other operating systems in a dual-boot scenario. So no, it is not safe to assume your Windows partition has not been affected, but it is likely.

Marcks Thomas

Posted 2013-08-28T14:27:21.540

Reputation: 5 749

Y'see, that's where I don't see why not. There are lots of Linux servers out there serving files up to Windows machines (think file hosting sites) and getting a Windows payload onto a Linux machine could potentially be a big win for the virus writer. – Mokubai – 2013-08-28T14:55:11.290

@Mokuabai: Valid point. I imagine a lot of viruses will attempt this. That's not the attack vector I meant though. With sufficient write access, a virus could directly install itself on a mounted Windows partition, without the need to have an infected file executed on the target OS. – Marcks Thomas – 2013-08-28T19:49:02.033

That's essentially what I was trying to get at in my answer but didn't quite reach, yes the virus can infect files and yes they remain dormant but in the end they are there and if they can execute before your virus scanner in Windows then they've already won. – Mokubai – 2013-08-28T21:28:24.647

@Mokubai that was my question, coz i mount my windows partition on linux so i could listen to music and read ebooks coz all of that is stored on windows, so the D: partition is mounted automatically, yes with rw to listen and add music or whatever... I dont know why the hell it was marked as dupe – Lynob – 2013-08-29T14:58:49.563