LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-24-2020, 12:46 AM   #1
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Rep: Reputation: Disabled
Can malware on comp get onto mounted read-only media when using livedvd?


PURPOSE: check if my understanding is correct.

Malware on an infected computer can & usually will get onto a livedvd in use, though removed upon a restart since only temporarily in RAM.

Thus, malware should easily be able to get onto any media (hdd/pendrive) mounted through the livedvd (unless media is write-protected).

Malware has to "write" to the disk to get onto it.


QUESTION: when mounting an external hdd (to an infected computer) as READ-ONLY, does this mean that malware from the computer will not be able to get onto the external hdd anywhere?

My question stems from thinking that maybe the malware can get onto the ext hdd in somewhat of a ‘dormant’ form, but not write to files until a later time when the hdd is NOT in read-only mode.

At the same time, I’m wondering if the files are the only part of the media that is in ‘read-only’ mode, or, conversely, if the “entire hdd” is in read-only mode.

Lastly, my guess is that the "livedvd" is completely irrelevant, and that malware can not get onto the disk (anywhere) b/c it would have to write to the disk to do so and it can not in 'read-only' mode.

Knowing this for certain is very important to me. Thanks.

Last edited by duupunisher2x; 08-24-2020 at 12:54 AM.
 
Old 08-24-2020, 02:02 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
At the same time, I’m wondering if the files are the only part of the media that is in ‘read-only’ mode, or, conversely, if the “entire hdd” is in read-only mode.
Yes, this is precisely the problem.

When you mount a disk read-only, this means that you can't write to the files and directories on the filesystem that resides on the disk.

However, you can still write to the disk device, for example by writing to /dev/sdb1. So, yes it is possible for a program to alter the content of a disk that is mounted read-only. It won't be dormant; the effect would be immediate.

A DVD is different. DVD-R's can't be written at all, I would think (but I may be wrong). DVD-RW's can be written in principle, but I don't think it works the same as an HDD. SD-cards have a read-only switch, and some USB drives might enable you to make them readonly as well. When set to readonly, software should be unable to write to them at all.
 
1 members found this post helpful.
Old 08-24-2020, 06:54 AM   #3
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
Thanks BDB - I really needed to find this out!!


So, if the malware writes to a partition while read-only - what happens once disk is 'no longer' in read-only mode? My guess is that the malware can move onto the files and directory at that point, infecting them or sort of 'sit on the files' waiting for the files to opened at which point only THEN will the file(s) will become infected (unless reading in read-only)......?

thanks again

Last edited by duupunisher2x; 08-24-2020 at 06:57 AM.
 
Old 08-24-2020, 06:59 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Code, including malware, can only do something when it is executed. Copying malware to some file is not enough - it must be a file that is executed.

I guess I repeat what you said
 
1 members found this post helpful.
Old 08-24-2020, 07:08 AM   #5
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
Thanks.

As a sidenote, is it fair to say that when files are in a directory, and malware is present, that the directory acts as a "preventitive wall" thereby preventing the malware from getting on the files themselves - until the directory is executed?

thx
 
Old 08-24-2020, 07:10 AM   #6
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
duplicate here....

Last edited by duupunisher2x; 08-24-2020 at 07:13 AM. Reason: duplicate.
 
Old 08-24-2020, 09:20 AM   #7
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by duupunisher2x View Post
Thanks.

As a sidenote, is it fair to say that when files are in a directory, and malware is present, that the directory acts as a "preventitive wall" thereby preventing the malware from getting on the files themselves - until the directory is executed?
A directory doesn't protect files, it just contains them. And you can't execute a directory.
 
1 members found this post helpful.
Old 08-24-2020, 09:24 AM   #8
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,573
Blog Entries: 19

Rep: Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452Reputation: 4452
Directories don't get executed. They have an "execute" bit which, when set, allows their contents to be accessed, but no code is actually run when this happens because all a directory file can contain is filenames and their corresponding inodes.
 
1 members found this post helpful.
Old 08-24-2020, 09:25 AM   #9
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
Thanks BDB.

I was equating "executing" with "opening".

Last edited by duupunisher2x; 08-24-2020 at 09:26 AM.
 
  


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
[SOLVED] Files rescued from Windows malware crash to old i386 Ubuntu 7.04 now locked as read only media Gyroman Linux - Newbie 8 01-17-2018 07:19 PM
is there a way to an xp home comp see a linux suse comp in a network rayclnz SUSE / openSUSE 1 01-03-2007 02:30 AM
how to do: using a linux comp to act as router for a windows comp grimhammer Linux - Networking 8 02-10-2005 09:56 PM
New comp v's old comp SirLaughAlot General 12 12-21-2003 11:39 AM
couldn't ping a WinXp comp from Fedora Comp tanbetien Fedora 5 12-04-2003 06:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05: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