I have a hard drive used for years, there are windows and many personal files on it. What I called "files" are images, musics, documents (pdf or docx), but not programs. All the "files" were not initially infected. As I said in the title, the hard drive may be infected by malware (I did not safely use it).

My question is : can I extract these personal files on a safe computer without risk of contamination ? In other words, may these files be infected and spread malware ?


It depends on the nature of the malware.

A "classic" malware would be a single executable, usually spread by a third party via email attachment and not autonomously spreading itself by piggy-backing on files (it might spread itself through disk shares or the filesystem, but making copies of its executable, not altering other files); so, while it might destroy (or encrypt, which is often the same thing in this business) your documents, it would not infect them.

A computer virus or worm could infect Office documents with macros and PDFs with malicious Javascript as a means of spreading itself. With a very, very low probability it could also conceivably hide malicious code in certain types of images and videos.

In the first case, the disk is safe as long as you never execute any binary file it contains and limit yourself to copying documents, images, video, music; never programs.

In the second case (the virus), the disk is not safe, any document it contains is potentially suspect, and actually even plugging it into a clean computer might compromise the latter; this is because there might be an AutoPlay exploit (you can make it so every time you plug a flash drive or other media into a PC, a specific file on that media is executed; the same can be done, with more difficulty, with a specially crafted icon file usually used to associate the device with a recognizable or branded image).

However, scanning the disk with a reliable antivirus (from a system designed to be safe against AutoPlay and icon exploits) should clear any doubt. Another possibility is to use an antivirus bootable CD-ROM (e.g. ESET or Kaspersky), that will start an antivirus environment designed not to contaminate the primary hard disk.

  • 2
    I agree with your answer... but for the last line. – Ángel Sep 15 '20 at 23:48
  • Thanks for your response. I used "malware" because I thought it is the more general term for any malicious program. – Tindera Sep 16 '20 at 8:19
  • @Ángel yes, I think I understand your meaning. I tried to amend the answer. – LSerni Sep 16 '20 at 17:21
  • A huge thanks ! That is exactly what I wonder. You help me a lot ! – Tindera Sep 16 '20 at 19:22
  • In that case, be sure to accept the answer (there is a mark to do so under its score) – LSerni Sep 17 '20 at 5:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.