sodcalculator

10 Tech How-To

Safe USB Drive Use on Windows: Avoid Malware

Guide 10-43555 · Updated · Step by step

Using a USB drive on a Windows PC can expose you to malware if you’re not careful, but with the right steps, you can safely transfer files without risking your system. This guide covers how to inspect, open, and use a USB drive securely, including how to handle unknown or borrowed drives and what to do if you suspect an infection.

What You’ll Need

  • A Windows PC (Windows 10 or 11 recommended)
  • The USB drive you want to use
  • Optional: A second, known-good computer to check the drive if you’re unsure about its safety

Step-by-Step

  1. Enable Windows Security real-time protection. Before plugging in any USB drive, make sure Windows Defender (Windows Security) is active. Go to Settings > Privacy & Security > Windows Security > Virus & threat protection and confirm that real-time protection is on. If it’s off, turn it on before proceeding.
  2. Plug in the USB drive. Insert the drive into a USB port on your PC. Windows will automatically detect it and may show a notification. Do not open any AutoPlay dialog that pops up—you’ll handle that manually in the next steps.
  3. Scan the drive with Windows Security. Open Windows Security (search for it in the Start menu), go to Virus & threat protection, and under Current threats, click Scan options. Select Custom scan, then choose the drive letter of your USB drive (e.g., E:). Click Scan now. Wait for the scan to finish—this can take several minutes for large drives. If threats are found, follow the prompts to remove or quarantine them.
  4. Check the drive’s contents before opening anything. After the scan, open File Explorer (Win + E) and click on the USB drive in the left sidebar. If you see any files or folders you didn’t put there, especially with names like “autorun.inf”, “New Folder.exe”, or random icons, do not double-click them. Right-click on suspicious items and select Scan with Windows Defender (or Scan with Microsoft Defender) to run a quick check.
  5. Enable viewing of file extensions. To spot executable files disguised as documents, make sure file extensions are visible. In File Explorer, click the View tab, then check the File name extensions box. Now you’ll see if a file named “invoice.pdf” is actually “invoice.pdf.exe”—which is a red flag for malware.
  6. Open files in a safe way. If a file looks legitimate (e.g., a Word document or JPEG), open it by double-clicking. If Windows asks for permission or shows a security warning, read it carefully. If you’re not sure, cancel and run a full scan on that specific file.
  7. Eject the drive safely. When you’re done, click the Show hidden icons arrow in the taskbar (near the clock), find the USB icon, right-click it, and select Eject. Wait for the notification that it’s safe to remove the hardware. This prevents data corruption and ensures any write operations are complete.

Common Mistakes

  • Opening AutoPlay dialogs. Clicking “Open folder to view files” in the AutoPlay popup can launch malicious code. Always close the popup and manually open File Explorer.
  • Disabling Windows Defender. Some users turn off real-time protection to speed up transfers, but this leaves you vulnerable. Keep it on.
  • Ignoring file extensions. Malware often hides as a .exe file with a double extension like “photo.jpg.exe”. If you can’t see extensions, you might click it unknowingly.
  • Using the same drive on public computers. A drive used on a public PC (library, school) can pick up malware. Always scan it when you get home.
  • Not ejecting the drive. Yanking the drive out can corrupt files, making them appear as malware or causing errors.

Tips

  • Use a dedicated drive for unknown files. If you regularly handle files from others, keep a separate USB drive for that purpose, and consider using it only on a non-critical computer.
  • Format the drive if you don’t need the contents. If you receive a drive with unknown files and you don’t need them, format it immediately. Right-click the drive in File Explorer, select Format, choose a file system (NTFS for large files, FAT32 for compatibility), and click Start.
  • Keep Windows updated. Regular updates patch security holes that malware might exploit.
  • Use BitLocker for sensitive data. If you store confidential files, enable BitLocker on the drive (right-click the drive, select Turn on BitLocker) to encrypt it. This prevents data theft if the drive is lost.
  • Consider a read-only switch. Some USB drives have a physical write-protect switch. If you only need to read files, enable it to prevent any malware from writing to the drive.

Troubleshooting

  • Windows Security finds malware. If a scan detects threats, click Remove or Quarantine. After removal, rescan the drive to ensure it’s clean. If the malware is persistent, run a full system scan on your PC as well.
  • The drive doesn’t appear in File Explorer. Try a different USB port. If that fails, open Disk Management (right-click Start, select Disk Management) and see if the drive appears there. If it shows as “Unallocated”, you may need to format it, but be aware that formatting erases all data.
  • You accidentally opened a suspicious file. If you double-clicked a file that looks like malware, immediately disconnect the drive (eject if possible) and run a full system scan. Also, check your startup programs (Task Manager > Startup) for anything unfamiliar and disable it.
  • The drive is write-protected. If you can’t copy files to it, check for a physical switch on the drive. If there’s no switch, the drive may have failed or be locked by software. You can try using Diskpart to clear the read-only attribute, but this is advanced—proceed with caution.
  • Autorun.inf keeps reappearing. This file is often a sign of malware. After deleting it, run a full scan. If it reappears, the drive may be reinfected from your PC—scan your system thoroughly.

Frequently Asked Questions

Q: Can I get malware just by plugging in a USB drive?
A: In most cases, no. Simply plugging in a drive doesn’t execute code. However, some advanced attacks (like BadUSB) can exploit firmware, but these are rare. The main risk comes from opening files or using AutoPlay.

Q: Is it safe to use a USB drive found on the street?
A: No. Never plug in a random USB drive. It could contain malware or a hardware exploit. If you must check it, use a disposable computer or a virtual machine with no network access.

Q: How do I know if a USB drive has a virus?
A: Run a scan with Windows Security. Also, look for unusual files (like .exe files disguised as documents) or if the drive appears to have less space than expected. If you see any red flags, don’t open anything.

Q: Can I use a USB drive on both Windows and Mac without getting malware?
A: Yes, but be cautious. Malware can be cross-platform, though less common. Always scan the drive on your Windows PC before opening files, and on a Mac, use similar precautions (though macOS is less targeted).

Q: Should I disable AutoPlay permanently?
A: Yes, it’s a good idea. Go to Control Panel > AutoPlay and uncheck “Use AutoPlay for all media and devices”. This prevents any automatic actions when you plug in a drive.

Q: What’s the difference between a quick scan and a full scan?
A: A quick scan checks common locations where malware hides, while a full scan checks everything on the drive. For a USB drive, a full scan is more thorough and recommended.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →