T1091

Replication Through Removable Media

Adversaries may move onto systems, possibly those on disconnected or air-gapped networks, by copying malware to removable media and taking advantage of Autorun features when the media is inserted into a system. This technique serves dual purposes: Initial Access (introducing malware into isolated or air-gapped environments) and Lateral Movement (propagating between networked systems via USB). Common implementations include creating autorun.inf files that auto-execute malware on media insertion, copying malicious executables to the drive root disguised as legitimate files, and creating LNK shortcut files that silently execute hidden payloads. Notable threat actors include Stuxnet (targeting air-gapped ICS/SCADA networks via CVE-2010-2568 LNK vulnerability), Flame (modular USB infection framework), Gamaredon Group (LNK files on all removable and network drives via UserAssist persistence), Mustang Panda and APT30 (customized PlugX USB variants), Raspberry Robin (worm spread via infected USB media), HIUPAN (periodic drive polling for propagation), and Aoqin Dragon (removable device dropper for breaching secure network environments).

Microsoft Sentinel / Defender
kusto
let NonSystemDrivePattern = @"(?i)^[d-z]:\\";
let DriveRootPattern = @"(?i)^[d-z]:\\$";
let SuspiciousExtensions = dynamic([".exe", ".dll", ".bat", ".cmd", ".vbs", ".js", ".lnk", ".hta", ".ps1", ".scr", ".pif", ".com"]);
// Signal 1: autorun.inf creation on non-system drive — classic USB worm indicator (Stuxnet, Agent.btz, Flame)
let AutorunInfSignal = DeviceFileEvents
| where Timestamp > ago(24h)
| where FileName =~ "autorun.inf"
| where FolderPath matches regex NonSystemDrivePattern
| where not(FolderPath startswith @"\\\\")
| extend Signal = "AutorunInfCreated", SignalSeverity = "High", RiskScore = 90;
// Signal 2: Executable or script written to root of non-system drive (PlugX, HIUPAN, DustySky pattern)
let ExecAtDriveRootSignal = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType in ("FileCreated", "FileModified")
| where FolderPath matches regex DriveRootPattern
| where FileName has_any (SuspiciousExtensions)
| where not(FolderPath startswith @"\\\\")
| extend Signal = "ExecutableAtDriveRoot", SignalSeverity = "High", RiskScore = 85;
// Signal 3: Executable written to non-system drive by unexpected initiating process
let ExecOnRemovableSignal = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType in ("FileCreated", "FileModified")
| where FolderPath matches regex NonSystemDrivePattern
| where not(FolderPath startswith @"\\\\")
| where FileName has_any (SuspiciousExtensions)
| where InitiatingProcessFileName !in~ ("explorer.exe", "robocopy.exe", "xcopy.exe",
    "msiexec.exe", "setup.exe", "install.exe", "installer.exe")
| extend Signal = "SuspiciousExecOnRemovableMedia", SignalSeverity = "Medium", RiskScore = 65;
// Signal 4: Process launched directly FROM non-system drive (Raspberry Robin, Aoqin Dragon pattern)
let ProcFromRemovableSignal = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FolderPath matches regex NonSystemDrivePattern
| where not(FolderPath startswith @"\\\\")
| extend Signal = "ProcessLaunchedFromRemovableMedia", SignalSeverity = "High", RiskScore = 88;
union AutorunInfSignal, ExecAtDriveRootSignal, ExecOnRemovableSignal, ProcFromRemovableSignal
| project Timestamp, DeviceName, AccountName, FileName, FolderPath,
          Signal, SignalSeverity, RiskScore,
          InitiatingProcessFileName, InitiatingProcessCommandLine,
          SHA256
| sort by RiskScore desc, Timestamp desc
high severity medium confidence

Data Sources

File: File Creation File: File Modification Process: Process Creation Microsoft Defender for Endpoint

Required Tables

DeviceFileEvents DeviceProcessEvents

False Positives

  • Software installations from USB drives — legitimate setup.exe or msiexec.exe processes writing executable files to D: or E: drives during product installation or portable app setup
  • Backup software (Acronis, Veeam, Windows Backup, robocopy scripts) writing backup archives or system images containing executables to external USB hard drives on scheduled backup paths
  • IT administrators manually copying diagnostic tools, deployment packages, or OS installers to removable media for endpoint remediation or imaging tasks
  • Portable application suites (PortableApps.com platform, U3 smart drive) that legitimately store and execute full application stacks from USB drives by design
  • Multi-drive workstations where D:, E:, or other letters refer to secondary fixed internal drives (NVMe, SSD, HDD) rather than removable media — tuning against known fixed drive letters in your environment is required
  • Developer workflows using large external drives to store build toolchains, compilers, or VM images accessed directly from non-C: drive paths

Unlock Pro Content

Get the full detection package for T1091 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections