Autorun malware abuses automatic launch behaviour to start malicious software from removable media. However, not every USB infection happens as soon as a drive is connected. Modern Windows systems restrict traditional USB AutoRun, while other attacks exploit software vulnerabilities, impersonate keyboards, or persuade someone to open a disguised file. Understanding that distinction matters: disabling AutoRun closes one route, not every route. Effective USB protection must address what a device contains, how it behaves, and what the receiving computer allows it to do.

What Is Autorun Malware?
Autorun malware is malicious software that exploits the Windows AutoRun mechanism to launch or spread. Often called an autorun virus, it may actually be a worm, which copies itself between systems, or a component that starts another malicious program.
Historically, attackers placed malicious software alongside an autorun.inf file on removable storage. This small configuration file could tell Windows which program to start when the media was accessed, subject to the operating system and its settings. The filename alone does not prove infection: legitimate software also uses autorun.inf. The risk comes from the instructions it contains and the program those instructions reference.
AutoRun vs AutoPlay: What Has Changed?
AutoRun and AutoPlay are related Windows features, but they are not interchangeable. AutoRun provides a mechanism for launching software from media. AutoPlay identifies connected media and offers relevant actions, such as opening a folder or importing photographs. Historically, attackers could abuse the relationship between them to present malicious launch options as something harmless.
Microsoft changed this behaviour with Windows 7, removing AutoRun tasks from AutoPlay for ordinary non-optical removable media, including standard USB flash drives. Consequently, an infected USB stick does not automatically gain permission to run a program on a modern Windows computer simply because autorun.inf exists. Optical media, devices presenting themselves as optical drives, older systems and administrative settings require separate consideration. This is why blanket claims that every infected USB self-executes are misleading.
How a USB threat can execute
How USB Threats Execute
A USB device is a delivery route, not a single attack technique. The important question is what causes malicious instructions to run. Different mechanisms require different safeguards.
Traditional AutoRun Infection
Media handling on a susceptible system launches malware copied to the removable drive.
Malicious Shortcuts And Disguised Files
A person opens something that appears to be a familiar folder, document or maintenance utility.
Software Vulnerability Exploitation
Vulnerable software processes crafted content and code runs without a deliberate executable launch.
BadUSB Keyboard Impersonation
The computer accepts a modified device as a keyboard and receives pre-programmed keystrokes.
| Attack Method | What Starts The Attack? | Does Disabling AutoRun Stop It? |
|---|---|---|
| Traditional AutoRun Abuse | Media handling on a susceptible system | Addresses this specific launch route |
| Malicious Shortcut Or Executable | Someone opens the disguised file | No |
| Software Vulnerability | Vulnerable software processes crafted content | Not necessarily |
| BadUSB Keyboard Impersonation | The host accepts a malicious input device | No |
Traditional AutoRun Infection
An infected computer can copy a worm and associated launch instructions onto connected removable drives. When that drive reaches another susceptible computer, its media-handling behaviour can start the copied malware.
The exact trigger varies. Some historical attacks relied on automatic execution; others used a deceptive AutoPlay option or altered what happened when somebody opened the drive. Microsoft identified AutoRun abuse as one of Conficker’s spreading mechanisms. Crucially, the presence of infected files and successful execution are separate events: malware cannot spread successfully unless a launch mechanism works.
Malicious Shortcuts And Disguised Files
Many USB threats need a person to open something first. A shortcut might resemble a familiar folder, while an executable could be presented as a document or maintenance utility. Once opened, it can start a sequence of malicious actions that requires no further clicks.
Mandiant’s 2023 investigation of SNOWYDRIVE documented victims being lured into opening a malicious file on a USB drive. The resulting infection could create a backdoor and copy malicious components onto additional removable drives. This is automated activity after user interaction, rather than proof that inserting any USB automatically causes infection.
Exploiting Software Vulnerabilities
Some attacks do not require somebody to deliberately launch an executable. Instead, they exploit a flaw in software that processes the device or its contents.
Microsoft’s MS10-046 bulletin described a Windows Shell vulnerability that could execute code when a specially crafted shortcut icon was displayed. Microsoft patched that vulnerability in 2010, so it should not be presented as an unpatched feature of modern Windows. Its significance is the mechanism: displaying content can trigger an exploit on a vulnerable system, independently of traditional AutoRun commands.
BadUSB And Keyboard Impersonation
BadUSB targets a different security weakness. A modified device can identify itself as a keyboard rather than merely as storage. If the computer accepts that interface, the device can send pre-programmed keystrokes that attempt to launch commands.
The behaviour originates in the device’s controller or firmware, not necessarily in a visible file. Ordinary file scanning therefore cannot establish that every aspect of the hardware is trustworthy. Successful execution still depends on conditions such as the session state, permitted applications and security controls. BadUSB does not automatically grant administrator rights, but disabling AutoRun does not stop keyboard impersonation.

USB Malware In Air-Gapped Systems
An air gap separates systems from external network connections. It does not inspect the physical media carried between them. Where engineers transfer updates, configuration files or diagnostic logs by USB, removable storage remains a potential route across that separation.
For industrial control system cybersecurity, the challenge is operational as well as technical. A maintenance device may move between supplier laptops, engineering workstations and production equipment. Some legacy systems cannot readily accommodate new security software or unscheduled updates. Consider a contractor arriving with an apparently routine update: trusting the contractor’s identity does not establish that their device is clean. The transfer needs its own verification process, with controls appropriate to the receiving system and the consequences of disruption.
How removable media can cross an air gap
Preventing Autorun And USB Threats
Protection works best when it prevents unnecessary connections, checks permitted transfers and restricts execution. No single setting covers every mechanism described above.
Disable Unnecessary AutoRun And AutoPlay
Apply settings centrally rather than relying on individual users. Within Group Policy’s AutoPlay Policies, enable Turn off AutoPlay for all drives. Configure Set the default behavior for AutoRun as enabled, choosing Do not execute any autorun commands.
Administrators should verify that policies actually reach the relevant computers, including shared workstations and disconnected assets. Where central management is unavailable, maintain an equivalent local configuration and audit process. These settings are useful hardening measures, but they do not scan files, block every USB device or prevent someone from manually launching malicious content.
Restrict Unapproved Devices And Software
Define which people need removable media, which systems may accept it and which device types are permitted. A storage-only restriction should not be assumed to cover a USB device presenting itself as a keyboard. Apply controls that recognise different device interfaces wherever the risk requires them.
Combine device restrictions with application control and appropriate user permissions. Microsoft Defender also provides an attack surface reduction rule for blocking untrusted and unsigned processes running from USB, where supported. Test the rule against legitimate engineering tools before enforcement, and do not treat a digital signature as proof that every associated file is safe. Enterprise USB security needs to govern both connection and execution.
Scan Before Connecting To Sensitive Systems
The inspection point matters. Connecting an unknown device to a production computer and then requesting a scan exposes that computer before the assessment is complete. A dedicated scanning station provides a separate checkpoint for examining permitted media.
A safer route for removable media
Keep Systems And Scanning Engines Updated
Patching addresses vulnerabilities that AutoRun settings cannot fix. Maintain supported operating systems and applications, and keep endpoint protection and scanning engines current. In isolated environments, include security updates in an approved offline maintenance process rather than treating disconnection as a replacement for updating.
For operational technology, test changes with the relevant equipment owner or supplier before deployment. Where immediate patching is not feasible, assess additional restrictions, tighter transfer procedures and monitoring. The aim is to manage the remaining exposure explicitly, not assume an older system is safe because its network access is limited.
Make Approved Transfers Easy
A removable media security policy should tell staff what to do before they reach a USB port. Provide approved devices, an accessible scanning route and a clear process for contractors. Nobody should need to improvise because the authorised method is unavailable.
- Record the device, user, destination and scan outcome where appropriate.
- Recheck media after it returns from an uncontrolled environment.
- Keep sensitive transfers separate from personal use.
- Make reporting unexpected shortcuts or scan warnings easier than bypassing controls.
Monitor Connections And Test The Process
Keep records of removable-device connections alongside endpoint security alerts. Investigators should be able to connect an inserted drive with subsequent file execution or suspicious processes, rather than see these as unrelated events.
Test the approved process with harmless test files and representative devices, not live malware on production systems. Check whether blocked connections generate useful alerts, whether exceptions expire and whether contractors can complete legitimate work without bypassing controls. Review the results with both IT and operational teams so that gaps have a named owner and a practical fix.
If You Suspect A USB Infection
Stop using the device and report the incident to your IT or security team. Do not move it to another ordinary computer to investigate. Record when it was connected, which machine was involved and whether any files were opened. Unexpected command windows, unfamiliar shortcuts or security alerts warrant investigation, but their absence does not prove that the computer is clean.
If a USB device looks suspicious
Do not keep using or reconnecting the device.
Tell the IT or security team what happened.
Note the system, time and files involved.
Avoid formatting or deleting evidence before assessment.
Follow the organisation’s incident-response procedure for containment and evidence preservation. In an industrial environment, involve the operational owner before disconnecting equipment or interrupting a process. Avoid deleting files or formatting the USB before responders have assessed the evidence. Recovery must address both the media and any potentially compromised computers: removing a suspicious autorun.inf file does not establish that an infection has been eradicated.
Autorun Malware FAQs
Can A USB Infect A Computer Without Opening Files?
Yes, in some circumstances. Device impersonation or exploitation of vulnerable software may avoid the need to open a malicious file deliberately. However, many USB infections still depend on user interaction. The outcome depends on the attack mechanism, computer configuration and protections in place.
Does Formatting A USB Remove Autorun Malware?
Formatting can remove ordinary files, but it is not a complete incident-response process. It does not clean a computer that has already been compromised and does not reliably address malicious controller firmware. An infected host may also contaminate the drive again. Have suspicious devices assessed before returning them to use.
Is Disabling AutoRun Enough?
No. It addresses a specific execution mechanism, not malicious shortcuts, vulnerable applications or keyboard impersonation. Use it alongside device restrictions, file inspection, application controls and updates. A layered approach reduces reliance on any one safeguard working perfectly.
Strengthen USB Protection
Autorun malware illustrates why convenient file transfers need clear security boundaries. Modern Windows restrictions have reduced traditional USB AutoRun exposure, but other routes still require attention. Tyrex helps organisations introduce a controlled checkpoint for removable media before it reaches sensitive systems. Our stations support online and offline deployment options, allowing inspection to fit different operating environments.