I bought a laptop around 2012 and used it to store songs, movies, and other files. I was told at the time that it might have had a virus, so I stopped using it around 2015. I sold the laptop recently, but the hard drive still contains very important photos. The buyer offered to connect the old drive to my current laptop with a USB adapter and copy the pictures over. I'm worried that malware on the old drive could infect my new computer. What is the safest way to recover the photos without putting my current laptop at risk?
3 Answers
You can also have the old drive scanned thoroughly before copying anything. Modern security software is likely to recognize malware that is a decade old, and simply connecting a drive does not automatically execute every program stored on it. The main risks come from running unknown files or allowing automatic execution, so copy only the photos and avoid executables, installers, scripts, and shortcuts.
A hard drive does not become infected while sitting unused, and malware usually needs to be executed to do anything. Since the drive has been dormant for years, the original concern may have been mistaken. Still, treat it cautiously: use a separate machine or live operating system, scan the recovered files, and keep a backup of the photos.
The safest approach is to boot the computer from a Linux live USB, such as an Ubuntu “Try” session, rather than starting Windows from your current laptop. Connect the old drive, copy only the files that are clearly photos to a separate USB drive, then scan that USB drive with up-to-date antivirus software before opening anything on your normal system. Disable USB autoplay and do not run programs from the old drive. Malware hidden inside image files is possible, but it is very uncommon.

I’m not certain it was actually infected—I was a kid at the time and was relying on what my dad told me. I’d rather use the cautious recovery method anyway since the photos are important.