T1025 Google Chronicle · YARA-L

Detect Data from Removable Media in Google Chronicle

Adversaries may search connected removable media on computers they have compromised to find files of interest. Sensitive data can be collected from any removable media (optical disk drive, USB memory, etc.) connected to the compromised system prior to exfiltration. Threat actors including APT28, Gamaredon Group, and OilRig have leveraged this technique. Malware families such as USBStealer, GravityRAT, Rover, Crimson, Crutch, and BADNEWS implement automated USB harvesting — copying files matching predefined extension lists (documents, credentials, archives) to staging directories for later exfiltration.

MITRE ATT&CK

Tactic
Collection
Technique
T1025 Data from Removable Media
Canonical reference
https://attack.mitre.org/techniques/T1025/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule t1025_data_from_removable_media {
  meta:
    author = "Detection Engineering"
    description = "Detects bulk access to sensitive files on removable media drives consistent with T1025 — adversary data collection from USB/optical media."
    mitre_attack_tactic = "Collection"
    mitre_attack_technique = "T1025"
    severity = "HIGH"
    priority = "HIGH"
    version = "1.0"

  events:
    // Branch 1: Sensitive file created/modified on removable drive
    $e1.metadata.event_type = "FILE_CREATION"
    $e1.target.file.full_path = /(?i)^[D-Z]:\\/
    $e1.target.file.full_path != /(?i)^C:\\/
    (
      $e1.target.file.full_path = /\.doc$/
      or $e1.target.file.full_path = /\.docx$/
      or $e1.target.file.full_path = /\.xls$/
      or $e1.target.file.full_path = /\.xlsx$/
      or $e1.target.file.full_path = /\.pdf$/
      or $e1.target.file.full_path = /\.ppt$/
      or $e1.target.file.full_path = /\.pptx$/
      or $e1.target.file.full_path = /\.txt$/
      or $e1.target.file.full_path = /\.csv$/
      or $e1.target.file.full_path = /\.kdbx$/
      or $e1.target.file.full_path = /\.pfx$/
      or $e1.target.file.full_path = /\.pem$/
      or $e1.target.file.full_path = /\.key$/
      or $e1.target.file.full_path = /\.p12$/
      or $e1.target.file.full_path = /\.zip$/
      or $e1.target.file.full_path = /\.rar$/
      or $e1.target.file.full_path = /\.7z$/
      or $e1.target.file.full_path = /\.bak$/
      or $e1.target.file.full_path = /\.sql$/
      or $e1.target.file.full_path = /\.db$/
      or $e1.target.file.full_path = /\.sqlite$/
      or $e1.target.file.full_path = /\.conf$/
      or $e1.target.file.full_path = /\.config$/
      or $e1.target.file.full_path = /\.xml$/
      or $e1.target.file.full_path = /\.json$/
    )
    $e1.principal.hostname = $hostname
    $e1.principal.user.userid = $user

  match:
    $hostname, $user over 1h

  outcome:
    $event_count = count_distinct($e1.target.file.full_path)
    $file_paths = array_distinct($e1.target.file.full_path)
    $initiating_process = array_distinct($e1.principal.process.file.full_path)
    $risk_score = if($event_count >= 100, 95,
      if($event_count >= 50, 75,
      if($event_count >= 20, 50, 25)))

  condition:
    #e1 >= 20
}
high severity medium confidence

Chronicle YARA-L 2.0 rule detecting T1025 — bulk sensitive file creation/collection on removable media drives. Monitors FILE_CREATION UDM events where the target file path begins with drive letters D through Z (excluding C:) and matches sensitive extensions including documents, credentials, archives, and configuration files. Fires when 20+ such events occur within a 1-hour window for the same host and user.

Data Sources

Google Chronicle SIEMGoogle Workspace/Chronicle Unified Data Model (UDM)Windows endpoint telemetry forwarded to ChronicleCrowdStrike Falcon or Carbon Black endpoint agents sending to Chronicle

Required Tables

UDM Events (FILE_CREATION, PROCESS_LAUNCH)

False Positives & Tuning

  • Automated backup jobs writing to network-attached or USB storage appearing as removable drives
  • Software installers that extract files to temporary USB-based staging areas
  • Corporate imaging tools writing OS packages to USB deployment drives
  • Users bulk-exporting documents to portable drives before travel
Download portable Sigma rule (.yml)

Other platforms for T1025


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 1Bulk File Collection from USB Drive via PowerShell Copy-Item

    Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Get-ChildItem', 'Copy-Item', and the fake USB path. Sysmon Event ID 11: File Create events for each copied file in the staging directory. DeviceFileEvents: multiple FileRead and FileCreated entries for the extension sweep. DeviceProcessEvents: PowerShell process with copy pipeline command line.

  2. Test 2Removable Media Enumeration via CMD dir and xcopy

    Expected signal: Sysmon Event ID 1: Process Create for cmd.exe and xcopy.exe with command lines showing the target path. Sysmon Event ID 11: File Create events for each file copied to usb_collect. Security Event ID 4688 (with command line auditing enabled) for cmd.exe and xcopy.exe. DeviceFileEvents: xcopy.exe performing FileRead on source and FileCreated on destination.

  3. Test 3Credential File Targeted Collection from Removable Media

    Expected signal: Sysmon Event ID 1: PowerShell process with Get-ChildItem filtering .kdbx/.pfx/.key extensions and Copy-Item to staging. Sysmon Event ID 11: File Create events for .kdbx, .pfx, id_rsa, .key in the staging directory. DeviceFileEvents: FileRead on credential-extension files. The credential-targeted hunting query will match immediately on file extensions.

  4. Test 4Robocopy Mirroring of Removable Media to Network Share

    Expected signal: Sysmon Event ID 1: Process Create for robocopy.exe with source path, destination path, /E /COPYALL flags. Sysmon Event ID 11: File Create events for all mirrored files in staging directory. Sysmon Event ID 11: Log file creation (%TEMP%\robocopy_collection.log). DeviceFileEvents: robocopy.exe FileRead from source and FileCreated at destination.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections