T1074.002 Elastic Security · Elastic

Detect Remote Data Staging in Elastic Security

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/

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=5m
  [file where event.action == "creation" and
   file.extension in ("zip", "rar", "7z", "tar", "gz", "bz2", "cab", "iso", "lzh", "arj") and
   (
     file.path like~ "*\\Temp\\*" or
     file.path like~ "*\\tmp\\*" or
     file.path like~ "*\\Public\\*" or
     file.path like~ "*\\ProgramData\\*" or
     file.path like~ "*\\Windows\\Temp\\*" or
     file.path like~ "*\\AppData\\Local\\Temp\\*" or
     file.path like~ "*\\inetpub\\wwwroot\\*" or
     file.path like~ "*\\Users\\Public\\*"
   )
  ] by user.name
  [process where event.action == "start" and
   process.name in~ ("xcopy.exe", "robocopy.exe", "7z.exe", "7za.exe", "rar.exe", "winrar.exe", "compact.exe", "tar.exe") or
   (process.name in~ ("powershell.exe", "pwsh.exe", "cmd.exe") and
    process.args like~ "*\\\\*" and
    (process.args like~ "*Copy-Item*" or process.args like~ "*xcopy*" or process.args like~ "*robocopy*" or process.args like~ "*Move-Item*"))
  ] by user.name

OR

process where event.action == "start" and
  process.name in~ ("xcopy.exe", "robocopy.exe") and
  process.args like~ "*\\\\*"
high severity high confidence

Detects Remote Data Staging (T1074.002) by correlating archive file creation in common staging directories with use of copy/compression tools targeting remote UNC paths. Uses EQL sequence to link file creation and process execution within the same session.

Data Sources

Elastic Endpoint SecurityWinlogbeat with SysmonElastic Agent (endpoint)

Required Tables

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

False Positives & Tuning

  • Legitimate IT backup tools (e.g., Veeam, Acronis agents) that compress data and copy to network shares as part of scheduled backup jobs
  • Software deployment pipelines that stage build artifacts (zip/tar) to shared network directories for deployment to servers
  • Help desk or IT staff using robocopy/xcopy to migrate user profile data or files during workstation refresh operations
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