T1074.002 Google Chronicle · YARA-L

Detect Remote Data Staging in Google Chronicle

Adversaries may stage data collected from multiple systems in a central location or directory on one system prior to Exfiltration. Data may be kept in separate files or combined into one file through techniques such as Archive Collected Data. Interactive command shells may be used, and common functionality within cmd and bash may be used to copy data into a staging location. By staging data on one system prior to Exfiltration, adversaries can minimize the number of connections made to their C2 server and better evade detection.

MITRE ATT&CK

Tactic
Collection
Technique
T1074 Data Staged
Sub-technique
T1074.002 Remote Data Staging
Canonical reference
https://attack.mitre.org/techniques/T1074/002/

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
rule t1074_002_remote_data_staging {
  meta:
    author = "Detection Engineering"
    description = "Detects Remote Data Staging (T1074.002) - archive file creation in staging directories and remote copy tool usage to UNC paths"
    mitre_attack_tactic = "Collection"
    mitre_attack_technique = "T1074.002"
    severity = "HIGH"
    confidence = "HIGH"
    reference = "https://attack.mitre.org/techniques/T1074/002/"
    created = "2026-04-13"
    version = "1.0"

  events:
    // Event variable for file creation in staging directory
    $file_event.metadata.event_type = "FILE_CREATION"
    $file_event.principal.hostname = $hostname
    (
      re.regex($file_event.target.file.full_path, `(?i)\\(temp|tmp|public|programdata|appdata\\local\\temp|users\\public|inetpub\\wwwroot|wwwroot)\\`)
    )
    re.regex($file_event.target.file.full_path, `(?i)\.(zip|rar|7z|tar|gz|bz2|cab|iso|lzh|arj)$`)

    // Event variable for process execution using copy/archive tools
    $proc_event.metadata.event_type = "PROCESS_LAUNCH"
    $proc_event.principal.hostname = $hostname
    (
      // Remote copy tools to UNC paths
      (
        re.regex($proc_event.target.process.file.full_path, `(?i)(xcopy\.exe|robocopy\.exe)$`) and
        re.regex($proc_event.target.process.command_line, `\\\\[a-zA-Z0-9]`)
      ) or
      // PowerShell/cmd remote copy
      (
        re.regex($proc_event.target.process.file.full_path, `(?i)(powershell\.exe|pwsh\.exe|cmd\.exe)$`) and
        re.regex($proc_event.target.process.command_line, `(?i)(copy-item|move-item|xcopy|robocopy)`) and
        re.regex($proc_event.target.process.command_line, `\\\\[a-zA-Z0-9]`)
      ) or
      // Compression tools creating archives
      re.regex($proc_event.target.process.file.full_path, `(?i)(7z\.exe|7za\.exe|rar\.exe|winrar\.exe|compact\.exe|tar\.exe)$`)
    )

  match:
    $hostname over 5m

  condition:
    $file_event and $proc_event
}
high severity high confidence

Chronicle YARA-L 2.0 rule correlating archive file creation in staging-like directories with compression/copy tool execution on the same host within a 5-minute window. Uses UDM file and process event types with regex matching against known staging paths and tool names.

Data Sources

Google Chronicle SIEMChronicle Unified Data Model (UDM) - File and Process eventsChronicle Forwarder from Windows endpoints

Required Tables

FILE_CREATION UDM eventsPROCESS_LAUNCH UDM events

False Positives & Tuning

  • Automated system imaging tools (Symantec Ghost, Clonezilla) that compress and stage disk images in temp directories before transferring to deployment servers
  • Log archival processes that regularly compress log files in ProgramData or temp directories and move them to centralized log storage via UNC shares
  • Software packaging tools (NSIS, InstallShield) that create compressed installer archives in staging directories during build processes
Download portable Sigma rule (.yml)

Other platforms for T1074.002


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 Files to Remote SMB Share via xcopy

    Expected signal: Sysmon Event ID 1: Process Create for xcopy.exe with CommandLine containing UNC path '\\127.0.0.1\StagingTest$'. Sysmon Event ID 11: File Create events on the destination share. Security Event ID 5140 (if share auditing enabled): Network share 'StagingTest$' accessed. Security Event ID 4688 (if command line auditing enabled): xcopy.exe process creation with full command line.

  2. Test 2Archive and Stage Collected Files in Public Directory

    Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Compress-Archive' and 'C:\Users\Public'. Sysmon Event ID 11: File Create event for the .zip file in C:\Users\Public\staging_test\. PowerShell ScriptBlock Logging Event ID 4104: Records the Compress-Archive command.

  3. Test 3Stage Data in Web-Accessible Directory

    Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Compress-Archive' and 'C:\inetpub\wwwroot'. Sysmon Event ID 11: File Create event for the .zip file in C:\inetpub\wwwroot\uploads\. PowerShell ScriptBlock Logging Event ID 4104 with full command.

  4. Test 4Remote Staging via PowerShell Copy-Item to UNC Path

    Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Copy-Item' and '\\127.0.0.1\RemoteStage$'. Sysmon Event ID 11: File Create events on the destination share path. Sysmon Event ID 3: Network connection from powershell.exe to 127.0.0.1 on port 445 (SMB). Security Event ID 5140 (if share auditing enabled): Network share access event.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections