T1052.001 Elastic Security · Elastic

Detect Exfiltration over USB in Elastic Security

Adversaries may attempt to exfiltrate data over a USB connected physical device. In certain circumstances, such as an air-gapped network compromise, exfiltration could occur via a USB device introduced by a user. The USB device could be used as the final exfiltration point or to hop between otherwise disconnected systems. Threat actors including APT30 (SPACESHIP), ProjectSauron (Remsec), APT28 (USBStealer), Tropic Trooper, Mustang Panda, and malware families like Agent.btz and Machete have all used USB-based exfiltration techniques.

MITRE ATT&CK

Tactic
Exfiltration
Technique
T1052 Exfiltration Over Physical Medium
Sub-technique
T1052.001 Exfiltration over USB
Canonical reference
https://attack.mitre.org/techniques/T1052/001/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=2h
  [any where event.code == "6416" or
   (event.provider : "Microsoft-Windows-Kernel-PnP" and
    message : ("*USB*", "*Removable*", "*Flash*", "*Thumb Drive*"))]
  [file where event.type in ("creation", "change") and
   file.path : ("D:\\*", "E:\\*", "F:\\*", "G:\\*", "H:\\*", "I:\\*", "J:\\*") and
   file.extension : ("zip", "rar", "7z", "tar", "gz", "docx", "xlsx", "pdf", "pptx",
                     "doc", "xls", "csv", "db", "kdbx", "pfx", "pem", "key")] with runs=5
high severity medium confidence

Uses EQL sequence correlation to detect Windows Event ID 6416 (new PnP device connected) or Kernel-PnP USB messages followed by at least 5 sensitive file creation or modification events on removable drive paths (D-J:\) within a 2-hour window on the same host. The 'with runs=5' clause enforces the minimum file count threshold before the sequence fires.

Data Sources

Windows Security Event LogSysmon (Winlogbeat)Elastic Endpoint Security Agent

Required Tables

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

False Positives & Tuning

  • IT administrators performing authorized USB-based OS deployments or system imaging that writes many archive or document files to removable media as part of standard workflows
  • Automated enterprise backup software (e.g., Acronis, Veeam) configured to write compressed backups to a USB-attached drive on a schedule
  • End users with approved workflows copying presentation files or project archives to USB drives for offsite work, trade shows, or air-gapped lab use
Download portable Sigma rule (.yml)

Other platforms for T1052.001


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 1Manual File Copy to USB Drive via xcopy

    Expected signal: Sysmon Event ID 11 (FileCreated): Multiple file creation events with TargetFilename starting with E:\ and InitiatingProcessFileName=xcopy.exe. Sysmon Event ID 1 (ProcessCreate): xcopy.exe process creation with command line referencing TEMP and E: drive. Security Event ID 4663 (if object access auditing enabled): File access on source files.

  2. Test 2PowerShell Automated File Staging and USB Copy

    Expected signal: Sysmon Event ID 1 (ProcessCreate): powershell.exe with -ExecutionPolicy Bypass flag. Sysmon Event ID 11 (FileCreated): 6 file creation events under E:\.hidden_sync\ with various sensitive extensions. PowerShell ScriptBlock Log Event ID 4104: Full script content including drive path and file names. Security Event ID 6416 (if auditing enabled): may correlate with prior USB insertion.

  3. Test 3Create Agent.btz-style thumb.dd Artifact on USB

    Expected signal: Sysmon Event ID 11 (FileCreated): TargetFilename=E:\thumb.dd, InitiatingProcessFileName=powershell.exe. PowerShell ScriptBlock Log Event ID 4104: Script showing system information collection and file write to USB path. Security Event ID 4688: Process creation for powershell.exe.

  4. Test 4Robocopy Bulk Transfer to Removable Drive with Mirror

    Expected signal: Sysmon Event ID 1 (ProcessCreate): robocopy.exe with MIR flag targeting E: drive. Sysmon Event ID 11 (FileCreated): 10+ file creation events under E:\backup_sync\. Security Event ID 4688: robocopy.exe process creation with full command line (if process command line auditing enabled via GPO).

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections