First, getting malware doesn’t necessarily mean you’ve done anything bad. Unfortunately, it happens. People let their guard down.
USB thumb drives and flash drives absolutely can transfer viruses. From the situation you’re describing, yes, you may have passed one on to a computer you used.
Become a Patron of Ask Leo! and go ad-free!
Malware and flash drives
Malware can be written to use USB drives to transfer themselves to other computers. It’s a common mechanism some forms of malware use to infect other machines.
It’s important to understand that when you transfer a flash drive from one machine to another, it can carry malware with it.
To avoid this in the future, I suggest you do two things.
- Make sure any machine into which you plug your flash drive into has up-to-date security software and is running periodic scans.
- Turn off Autoplay or Autorun. This is the function that causes programs to run automatically when you insert a drive. While it’s convenient for some things, it can be a simple way malware is allowed to propagate.
Turning off “auto” features may make things a little inconvenient. You’ll have to manually start playing your CDs or DVDs, or running whatever program you intended to get from the USB stick.
But you won’t have to worry about flash drives automatically infecting you.
But you still have to worry.
Always be on the lookout for malware
Flash drives can still carry malware.
In many ways, they’re similar to email attachments: they’re a way for files, both legitimate and malicious, to make their way to your computer.
You need to take the same level of precautions as you do for other file transfer methods: don’t attach thumb drives from unknown origins, don’t open files from thumb drives you don’t know are legitimate, don’t even copy files from a thumb drive unless you know the files are safe.
If your security software allows you to do so, run a scan on the thumb drive before you do anything else with its contents.
It’s all an important part of keeping your flash drives, and your computer, safe.