Can a virus on a flash drive run itself without autorun?
Short answer
No, a file on a drive cannot just run itself. Like all viruses, it needs some sort of initialization. A file does not magically initiate for no reason at all; something has to cause it to load in some way. (Unfortunately the number of ways is bafflingly large and continues to grow.)
Overview
How a virus runs depends largely on the type of file that the virus is in. For example, .exe
files usually require something to actually load their code (simply reading their contents is not enough). Picture or audio files are not supposed to be code at all, so they should not be “running” in the first place.
Technical
What often happens these days, is that there are two main methods that malware runs:
- Trojans
- Exploits
Trojans: With trojans, malware code is inserted into normal files. For example a game or program will have some bad code injected into so that when you (purposely) run the program, the bad code sneaks in (hence the name trojan). This requires placing the code in an executable. Again, this requires the host program to be specifically run somehow.
Exploits: With exploits, what happens is that a file contains incorrect/invalid structures that exploit poor programming. For example, a graphics-viewer program that does not check the picture file may be exploited by crafting a picture file with system code in such a way that when it is read, it overloads the buffer created for the image and tricks the system into passing control to the virus code that was inserted past the buffer (buffer overflows are still fairly popular). This method does not require a file with malware code to be specifically run; it exploits the bad programming and error checking to trick the system into “running” it simply by opening/reading the file.
Application
So how does this apply to a flash (or any other type of) drive? If the drive contains trojans (executable files), then unless the system has AutoPlay enabled or has some sort of autorun/startup entry pointing to the file, then no, it should not run on its own. On the other hand, if there are files that exploit vulnerabilities in the operating system or other program, then simply reading/viewing the file could allow the malware to initiate.
Prevention
A good way to check for vectors by which trojans can run is to check for different kinds of autorun/startup locations. Autoruns is an easy way to check many of them (it’s even easier if you hide the Windows entries to reduce the clutter). A good way to reduce the number of vulnerabilities that exploits can use is to keep your operating system and program up-to-date with the latest versions and patches.
This depends on how the virus is written, and what vulnerabilities exist on the system that you plug the drive into, but the answer is potentially yes.
For example not long ago there was vulnerability inherited way that Windows handled .lnk
files that meant that just having a maliciously created file on your drive could execute the virus embedded within it. This vulnerability was also fixed quite some time ago so no up to date system should be at risk but it does show that there are potential attack vectors that are "silent" and can happen, as your friend suggests, without your consent or awareness.
Keep your antiviral running and up to date and only connect devices from people you trust.
You can see information on this particular attack method on this Microsoft page.
No.
The virus can't run itself in any case. Something else needs to run it.
So now the question is: Can it be run when plugged in? The answer is "no" in the ideal case, but "possibly" in the case of a defect in Explorer (or some other Windows component). However, such a behavior would be a bug in Windows, not by design.