T1074 Splunk · SPL

Detect Data Staged in Splunk

Adversaries may stage collected data in a central location or directory prior to exfiltration. Data may be kept in separate files or combined into one file through archiving techniques. Adversaries choose staging to minimize the number of connections made to their C2 server and better evade detection. Staging locations are commonly temp directories, user profile folders, or hidden directories. In cloud environments, adversaries may stage data within a particular instance before exfiltration.

MITRE ATT&CK

Tactic
Collection
Technique
T1074 Data Staged
Canonical reference
https://attack.mitre.org/techniques/T1074/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" OR sourcetype="WinEventLog:Security")
(
  (EventCode=11
    (TargetFilename="*\\Temp\\*" OR TargetFilename="*\\tmp\\*" OR TargetFilename="*\\AppData\\Local\\Temp\\*"
     OR TargetFilename="*\\Users\\Public\\*" OR TargetFilename="*\\ProgramData\\*" OR TargetFilename="*\\Windows\\Temp\\*")
  )
  OR
  (EventCode=1
    (CommandLine="*robocopy*" OR CommandLine="*xcopy*" OR CommandLine="*copy /*" OR CommandLine="*Copy-Item*")
    (CommandLine="*\\Temp\\*" OR CommandLine="*\\tmp\\*" OR CommandLine="*\\Public\\*" OR CommandLine="*\\ProgramData\\*")
  )
)
| eval StagingType=case(
    EventCode=11 AND match(TargetFilename, "(?i)\.(zip|7z|rar|tar|gz|cab|iso)$"), "ArchiveCreated",
    EventCode=11, "FileCreatedInStagingPath",
    EventCode=1 AND match(CommandLine, "(?i)(robocopy|xcopy)"), "BulkCopyCommand",
    EventCode=1, "ScriptedCopy",
    true(), "Unknown"
  )
| eval StagingPath=coalesce(TargetFilename, CommandLine)
| eval Actor=coalesce(User, user)
| stats count as EventCount,
    values(StagingType) as StagingTypes,
    values(StagingPath) as StagingPaths,
    dc(TargetFilename) as UniqueFiles,
    earliest(_time) as FirstSeen,
    latest(_time) as LastSeen
    by host, Actor, Image, CommandLine
| where EventCount >= 5 OR (StagingTypes="ArchiveCreated")
| eval DurationSecs=LastSeen-FirstSeen
| eval IsRapidStaging=if(DurationSecs < 300 AND EventCount >= 10, 1, 0)
| sort - EventCount
| table _time, host, Actor, Image, CommandLine, StagingTypes, EventCount, UniqueFiles, DurationSecs, IsRapidStaging, FirstSeen, LastSeen
high severity medium confidence

Detects data staging activity using Sysmon Event ID 11 (File Create) for bulk file writes to staging paths and Event ID 1 (Process Create) for bulk copy commands. Aggregates events per host/actor/process combination to identify patterns: 5+ files written to staging directories by the same process, archive files created in temp locations, and bulk copy utilities targeting staging paths. The IsRapidStaging flag highlights 10+ files written within 5 minutes, a strong indicator of automated data collection.

Data Sources

File: File CreationProcess: Process CreationSysmon Event ID 1Sysmon Event ID 11

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/OperationalWinEventLog:Security

False Positives & Tuning

  • Software installation processes that extract files to temp directories during setup (installers, MSI packages)
  • Backup agents (Veeam, Backup Exec, Windows Backup) that stage files before writing to backup media
  • Software deployment tools (SCCM, Intune) copying update packages to staging directories
  • Log aggregation tools that collect and consolidate logs into a single directory for shipping
  • Developers using robocopy/xcopy in legitimate build scripts or deployment pipelines
Download portable Sigma rule (.yml)

Other platforms for T1074


Testing Methodology

Validate this detection against 5 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 Sensitive Files to Temp Directory Using Robocopy

    Expected signal: Sysmon Event ID 1: Process Create with Image=robocopy.exe, CommandLine containing source and destination temp paths with /E /COPYALL flags. Sysmon Event ID 11: Multiple FileCreate events in %TEMP%\df00tech-stage\ for each copied file. Security Event ID 4688 (if command line auditing enabled) for robocopy.exe execution. DeviceProcessEvents and DeviceFileEvents will capture this in MDE environments.

  2. Test 2Stage and Compress Data Using 7-Zip from Command Line

    Expected signal: Sysmon Event ID 1: Process Create for cmd.exe with copy command, then 7z.exe with -p flag (password) targeting staging directory. Sysmon Event ID 11: FileCreate events for each copied file in df00tech-collection\, then FileCreate for df00tech-exfil.zip. The -p flag in 7z.exe command line indicates password protection — a high-fidelity indicator of malicious intent.

  3. Test 3Stage Data Using PowerShell Copy-Item to ProgramData

    Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with Copy-Item in CommandLine targeting C:\ProgramData\MicrosoftUpdates. Sysmon Event ID 11: Multiple FileCreate events in C:\ProgramData\MicrosoftUpdates\. Sysmon Event ID 12/13: Registry or attribute change if attrib command is monitored. The directory name 'MicrosoftUpdates' is a common masquerading technique — look for this in DeviceFileEvents FolderPath.

  4. Test 4Linux Data Staging Using cp and tar

    Expected signal: Linux auditd syscall events (if configured): open/creat syscalls for files in /tmp/.df00tech_stage/, execve for cp, find, tar commands. Syslog entries if auditd rules cover /tmp/ writes. If Sysmon for Linux is deployed: Sysmon Event ID 11 for file creations, Event ID 1 for process creation with tar czf command. The hidden directory name (.df00tech_stage with leading dot) indicates deliberate concealment.

  5. Test 5Remote Data Staging via Network Share Copy

    Expected signal: Sysmon Event ID 1: Process Create for net.exe (net use) with UNC path and xcopy.exe with /E /H /Y flags. Sysmon Event ID 3: Network Connection to target host on port 445 (SMB). Sysmon Event ID 11: FileCreate events in staging directory. Security Event ID 4648 (explicit credential logon) if credentials were provided to net use. Security Event ID 5140/5145 (network share access) on the target host if SMB auditing is enabled.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections