LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I got a question about viruses and the linux filesystem ext4... (https://www.linuxquestions.org/questions/linux-newbie-8/i-got-a-question-about-viruses-and-the-linux-filesystem-ext4-773521/)

trist007 12-04-2009 03:20 PM

I got a question about viruses and the linux filesystem ext4...
 
1. If there was a file that had a virus/trojan embedded within it that was made to attack ntfs windows operating systems and you downloaded that file onto a linux ext4 filesystem, there would be no effect?

2. Does downloading the file onto an ext4 hard drive clear up the virus? What would happen if you downloaded the virus file onto a linux ext4 hard drive and then onto a windows ntfs partition. Would it then attack the windows ntfs partition?

rweaver 12-04-2009 03:27 PM

Viruses do nothing by simple existence in any operating system.

You can download 100,000 viruses into a folder on your hard drive and so long as they're never executed or loaded by whatever means they use to begin execution they are 'safe'.

In the example you give of "If there was a file that had a virus/trojan embedded within it that was made to attack ntfs windows operating systems and you downloaded that file onto a Linux ext4 file system, there would be no effect?" the same virus would have no effect if downloaded onto a ntfs file system until the file it was embedded in was loaded in the correct manner. Simple existence isn't execution. It would likely have no effect in linux for a combination of reasons but none of them have anything to do with the underlying file system and have everything to do with lack of binary compatibility and means of execution.

To the second part of your question, no. Although different file systems store information in a different formats (blocks, extents, etc.) it is still the same data.

(In retrospect there are a few exceptions to that, but they would result in complete corruption of the file and would be rare.)

trist007 12-04-2009 03:30 PM

So what would happen in my question 2 where u then execute it on a windows box?

pintodragon 12-04-2009 04:00 PM

Quote:

Originally Posted by trist007 (Post 3780099)
So what would happen in my question 2 where u then execute it on a windows box?

The virus would affect ntfs file systems on the windows box if it was run in the architecture it was created for.

In other words if you are in windows and run the virus off of an ext4 file system then yes you would get the virus and it would do its dirty work. If you are in linux and the virus was written for windows then you probably can't execute it without using wine, in which case if you have your ntfs file systems mounted so wine can see them then there is a chance it will affect them.

Bottom line is scan the file and don't run it if you are suspicious of it having a virus.

resetreset 12-06-2009 09:46 AM

A virus is a *program*. A program that's made EITHER for Windoze OR for Linux. If you took Windoze code, you couldn't run it on Linux as obviously, the system calls are different, they're 2 different OSes. The main thing I don't know is whether it's possible to access ext4 partitions from Windoze, if so, then if you're running 'doze and it can read the virus code off of the ext4 partition, you could be at risk. Otherwise you're OK (barring Wine).


All times are GMT -5. The time now is 11:13 PM.