Never plug a USB drive (also called a thumb drive or flash drive) into your computer unless you bought it yourself or got it directly from someone you trust. If you find one on the ground or receive an unexpected one in the mail, leave it unplugged.
Even a drive that looks completely normal on the outside can carry harmful software that installs itself the moment you connect it.
Why it matters
When you find a lost USB drive in a parking lot, library, or coffee shop, your first thought might be to plug it in and look for the owner’s name. Or you might receive a free drive in the mail that looks like a gift or promotion from a well-known store.
Attackers count on this helpfulness and curiosity. Leaving infected drives in public places is known as a USB drop attack1. Criminals have also sent harmful drives through the mail disguised as health warnings or store gift cards.
Plugging in an unknown drive gives harmful software—called malware—a direct physical path into your computer. This bypasses the safety filters in your email and web browser. Once connected, a rigged drive can harm your computer in a few ways:
Disguised files: The drive may hold files with tempting names like “Photos,” “Payroll,” or “Return to owner.” These look like ordinary documents or folders, but they are actually shortcuts that quietly install malware when you double-click them. Some malware can even spread to clean USB drives you plug in later2.
Hidden keyboard commands: A computer cannot tell the difference between a storage drive and a keyboard until you plug it in. A specially modified drive can trick your computer into thinking it is a keyboard. As soon as you connect it, it types rapid commands into tools like PowerShell on Windows to download harmful programs in seconds, often without your security software noticing.
Stolen passwords or locked files: Depending on what the drive installs, it could put an infostealer on your machine to copy your saved passwords and bank details, or ransomware that locks your personal files until you pay a fee.
The bait is left out
Someone leaves a USB drive in a public place or mails it in a package that looks like a store promotion.
You plug it in
Wanting to return the lost drive or see what is on it, you connect it to your computer.
The drive runs hidden commands
The drive either shows fake files to get you to click, or pretends to be a keyboard and types hidden commands on its own.
Harmful software installs
The computer quietly downloads programs that can copy your passwords, lock your files, or infect other drives.
What to do
Avoiding unknown flash drives is one part of keeping your phone and computer safe.
If you find or receive an unknown USB drive
Leave it unplugged. Do not connect it to your computer, phone, or tablet, even just to look at the file names.
Turn it in where you found it. If you picked it up at a library, hotel, store, or office building, hand it to the front desk or lost‑and-found staff. Let them handle it.
Throw it away if it came in the mail. If an unexpected USB drive arrives in your mailbox—even if the letter has the logo of a government agency or a store you know—put it straight in the trash.
If you already plugged one in
If you connected an unknown drive before reading this, take these steps in order to protect your computer and accounts:
Unplug the USB drive right away. Pull it straight out of the computer.
Disconnect from the internet. Turn off your computer’s Wi‑Fi or unplug the network cable. This stops any harmful program from sending your information out or downloading more tools.
Stop signing in to accounts on that computer. Do not type your passwords or open your bank or shopping sites on that machine until it has been checked3.
Run a security scan. Open your computer’s built-in security tool (such as Windows Security on a PC) or your antivirus program, make sure it is updated, and run a full scan.
Change your important passwords from another device. Using a clean device—like your phone or tablet—change the passwords for your email, bank, and other sensitive accounts, and turn on two‑step verification if it is available.
To protect your personal files before anything ever goes wrong with your computer, make sure you regularly back up your photos and files to a cloud service or a drive that you bought yourself.