T1092 Elastic Security · Elastic

Detect Communication Through Removable Media in Elastic Security

Adversaries can perform command and control between compromised hosts on potentially disconnected networks using removable media to transfer commands from system to system. Both systems would need to be compromised, with the likelihood that an Internet-connected system was compromised first and the second through lateral movement via Replication Through Removable Media. Commands and files are relayed from the disconnected system to the Internet-connected system to which the adversary has direct access. This technique has been observed in APT28/Fancy Bear operations using CHOPSTICK and USBStealer malware to bridge air-gapped networks, writing encoded command files to USB drives on internet-connected hosts and reading results from the same media when re-inserted.

MITRE ATT&CK

Tactic
Command and Control
Technique
T1092 Communication Through Removable Media
Canonical reference
https://attack.mitre.org/techniques/T1092/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=2m
  [any where event.category == "driver" and action == "installed" and dll.name : ("usbstor*", "USBSTOR*")]
  [file where event.action in ("creation", "overwrite") and
   file.path : ("D:\\*", "E:\\*", "F:\\*", "G:\\*", "H:\\*", "I:\\*") and
   file.extension in~ ("exe", "dll", "bat", "cmd", "ps1", "vbs", "js", "hta", "dat", "bin", "enc", "tmp", "cfg", "db") and
   not process.name in~ ("explorer.exe", "robocopy.exe", "xcopy.exe")]

OR

sequence by host.name with maxspan=2m
  [any where event.category == "driver" and action == "installed" and dll.name : ("usbstor*")]
  [file where event.action == "access" and
   file.path : ("D:\\*", "E:\\*", "F:\\*", "G:\\*", "H:\\*")]

OR

process where event.type == "start" and
  process.executable : ("D:\\*", "E:\\*", "F:\\*", "G:\\*", "H:\\*", "I:\\*") and
  not process.name in~ ("setup.exe", "autorun.exe", "install.exe")
high severity medium confidence

Detects T1092 Communication Through Removable Media by identifying three behavioral patterns: (1) USB device insertion followed within 2 minutes by suspicious file creation on the drive, (2) USB mount followed by rapid file reads (command pickup pattern), and (3) process execution directly from removable drive letters. Covers both the C2 staging side (writing encoded data files) and the execution side (running payloads from USB).

Data Sources

Elastic EndpointWindows Event Logs via FilebeatSysmon via Winlogbeat

Required Tables

logs-endpoint.events.file-*logs-endpoint.events.process-*logs-endpoint.events.driver-*winlogbeat-*

False Positives & Tuning

  • Legitimate software installations from USB drives by IT staff (e.g., deploying system images, BIOS updates via bootable USB)
  • Backup agents (e.g., Acronis, Veeam) writing backup archives to external USB drives as part of scheduled jobs
  • Portable application suites (PortableApps, U3) executing directly from USB — common in developer/sysadmin workflows
Download portable Sigma rule (.yml)

Other platforms for T1092


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Stage Encoded Command File on USB Drive

    Expected signal: Sysmon Event ID 11 (FileCreate): TargetFilename=E:\system.dat, Image=powershell.exe. Sysmon Event ID 1 (Process Create): CommandLine containing 'Out-File' and 'E:\'. DeviceFileEvents in MDE: ActionType=FileCreated, FolderPath=E:\, FileName=system.dat, InitiatingProcessFileName=powershell.exe.

  2. Test 2Execute Payload from USB Drive

    Expected signal: Sysmon Event ID 1 (Process Create): Image=cmd.exe, CommandLine=cmd.exe /c E:\update.bat. Parent process is cmd.exe or the test shell. Sysmon Event ID 11: TargetFilename=E:\update.bat and E:\output.dat. Security Event ID 4688 (if command line auditing enabled): NewProcessName contains E:\update.bat. DeviceProcessEvents: FileName=cmd.exe, ProcessCommandLine contains 'E:\update.bat'.

  3. Test 3Automated USB File Pickup Simulation

    Expected signal: Multiple Sysmon Event ID 11 entries for file creation on E:\ by powershell.exe (cmd_*.dat and rsp_*.dat). Sysmon Event ID 1: PowerShell process with Get-Content and Out-File accessing removable drive. DeviceFileEvents: multiple FileCreated and FileRead actions on E:\ within a short time window — triggers the rapid-access-after-mount correlation branch.

  4. Test 4USB Device Serial Number Enumeration

    Expected signal: Sysmon Event ID 1: powershell.exe with CommandLine containing 'USBSTOR' and 'Win32_DiskDrive'. Security Event ID 4663 (if object access auditing enabled on registry): access to HKLM\SYSTEM\CurrentControlSet\Enum\USBSTOR. DeviceProcessEvents: PowerShell process accessing registry via Get-ItemProperty with USBSTOR path.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections