T1052.001
Exfiltration over USB
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.
Microsoft Sentinel / Defender
kusto
// Detect USB device insertion and subsequent large-scale file copy activity
let SuspiciousExtensions = dynamic([".zip", ".rar", ".7z", ".tar", ".gz", ".docx", ".xlsx", ".pdf", ".pptx", ".doc", ".xls", ".csv", ".db", ".kdbx", ".pfx", ".pem", ".key"]);
let USBDrivePaths = dynamic(["D:\\", "E:\\", "F:\\", "G:\\", "H:\\", "I:\\", "J:\\"]);
// Part 1: Detect file writes to removable drive paths
let FileCopyToUSB = DeviceFileEvents
| where Timestamp > ago(24h)
| where ActionType in ("FileCreated", "FileModified")
| where FolderPath has_any (USBDrivePaths)
| where FileName has_any (SuspiciousExtensions)
| summarize FilesCopied=count(), FileSizeMB=sum(FileSize)/1048576, FileSample=make_set(FileName, 10), EarliestCopy=min(Timestamp), LatestCopy=max(Timestamp)
by DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine
| where FilesCopied >= 5
| extend AlertReason = "Bulk file copy to removable drive path";
// Part 2: Detect USB device arrival events via PnP logs
let USBDeviceEvents = DeviceEvents
| where Timestamp > ago(24h)
| where ActionType == "PnpDeviceConnected"
| where AdditionalFields has "USB"
| extend DeviceClass = tostring(parse_json(AdditionalFields).ClassName)
| extend DeviceDesc = tostring(parse_json(AdditionalFields).DeviceDescription)
| where DeviceClass in~ ("DiskDrive", "USB", "USBSTOR") or DeviceDesc has_any ("USB", "Flash", "Removable")
| project Timestamp, DeviceName, AccountName, DeviceClass, DeviceDesc;
// Part 3: Correlate USB arrival with subsequent file copies
FileCopyToUSB
| join kind=leftouter (
USBDeviceEvents
| project DeviceName, USBInsertTime=Timestamp, DeviceClass, DeviceDesc
) on DeviceName
| where isempty(USBInsertTime) or (EarliestCopy >= USBInsertTime and EarliestCopy <= USBInsertTime + 1h)
| project EarliestCopy, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine,
FilesCopied, FileSizeMB, FileSample, USBInsertTime, DeviceDesc, AlertReason
| sort by FilesCopied desc high severity
medium confidence
Data Sources
File: File Creation Drive: Drive Creation Microsoft Defender for Endpoint Windows Plug and Play
Required Tables
DeviceFileEvents DeviceEvents
False Positives
- Legitimate IT asset backup operations copying files to external drives for archival or disaster recovery
- Software developers copying build artifacts or source code to USB drives for air-gapped deployment
- Users performing authorized transfers of their own work files to external media per company policy
- Automated backup software (e.g., Windows Backup, third-party tools) that writes to removable drives on a schedule
Last updated: 2026-04-17 Research depth: deep
References (12)
- https://attack.mitre.org/techniques/T1052/001/
- https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/rpt-apt30.pdf
- https://securelist.com/faq-the-projectsauron-apt/75533/
- https://www.welivesecurity.com/2014/11/11/sednit-espionage-group-attacking-air-gapped-networks/
- https://www.trendmicro.com/en_us/research/20/e/tropic-trooper-s-back-usbferry-attack-targets-air-gapped-environments.html
- https://www.avira.com/en/blog/mustang-panda-threat-actor-is-adding-new-techniques-to-its-arsenal
- https://securelist.com/agent-btz-a-source-of-inspiration/58551/
- https://www.welivesecurity.com/2019/08/05/machete-just-got-sharper-venezuelan-government-institutions-under-attack/
- https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-pnp-activity
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1052.001/T1052.001.md
- https://docs.microsoft.com/en-us/windows/win32/sysinfo/registry-key-security-and-access-rights
- https://www.sans.org/blog/investigating-usb-drive-forensics-on-windows/
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