T1074.001 Splunk · SPL

Detect Local Data Staging in Splunk

Adversaries may stage collected data in a central location or directory on the local system prior to exfiltration. Data may be kept in separate files or combined into one file through archiving techniques. Adversaries commonly use temp directories, hidden folders, or application data paths to aggregate stolen files, credentials, screenshots, keylogger output, and memory dumps before transferring them out. Interactive command shells (cmd.exe, bash) and scripting languages are frequently used to copy and consolidate data into staging locations.

MITRE ATT&CK

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

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog (sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" (EventCode=1 OR EventCode=11))
| eval staging_path=if(
    match(lower(coalesce(TargetFilename, CommandLine, "")),
      "(\\\\temp\\\\|\\\\tmp\\\\|\\\\programdata\\\\|\\\\users\\\\public\\\\|\\\\appdata\\\\local\\\\temp\\\\|\\\\windows\\\\temp\\\\|\\\\appdata\\\\roaming\\\\)"
    ), 1, 0)
| eval bulk_copy=if(
    EventCode=1 AND match(lower(CommandLine),
      "(xcopy|robocopy|\\bcopy\\b|\\bmove\\b|cp\\s|mv\\s)"
    ) AND staging_path=1, 1, 0)
| eval archive_creation=if(
    EventCode=11 AND match(lower(TargetFilename),
      "(\.zip|\.rar|\.7z|\.tar|\.gz|\.tmp|\.dat|\.db|\.bak)$"
    ) AND staging_path=1, 1, 0)
| eval output_redirect=if(
    EventCode=1 AND match(CommandLine, "(>>|>\s+)") AND staging_path=1, 1, 0)
| eval staging_tools=if(
    EventCode=1 AND match(lower(CommandLine),
      "(xcopy|robocopy|7z\.exe|winrar|compact\s|tar\s)"
    ), 1, 0)
| eval SuspicionScore=bulk_copy + archive_creation + output_redirect + staging_tools
| where SuspicionScore > 0
| eval EventDescription=case(
    EventCode=1, "Process Create",
    EventCode=11, "File Create",
    true(), "Unknown")
| eval ProcessOrFile=coalesce(Image, TargetFilename)
| eval CmdOrPath=coalesce(CommandLine, TargetFilename)
| where NOT match(lower(coalesce(Image, ParentImage, TargetFilename, "")),
    "(msmpeng|svchost|tiworker|wuauclt|msiexec|onedrive|teams|slack|acronis|veeam)")
| table _time, host, User, EventCode, EventDescription, ProcessOrFile,
    CmdOrPath, ParentImage, ParentCommandLine,
    bulk_copy, archive_creation, output_redirect, staging_tools, SuspicionScore
| sort - _time
medium severity medium confidence

Detects local data staging using Sysmon Event ID 1 (Process Create) and Event ID 11 (File Create). Scores events across four indicators: bulk copy tool usage targeting staging paths, archive/data file creation in staging directories, output redirection to staging paths, and presence of known staging tools. Known-benign processes (AV, update agents) are excluded. Higher suspicion scores indicate more confident staging activity.

Data Sources

Process: Process CreationFile: File CreationCommand: Command ExecutionSysmon Event ID 1Sysmon Event ID 11

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Backup software or IT tools (Acronis, Veeam, Windows Backup) writing archives to temp directories during scheduled backup jobs
  • Software installers and update mechanisms that extract files to %TEMP% or %ProgramData% as part of legitimate installation workflows
  • Log aggregation or diagnostic tools that consolidate logs into temp folders for upload to centralized logging systems
  • Developer workflows where build systems (MSBuild, CMake, npm) create temporary archives or data files in project directories
Download portable Sigma rule (.yml)

Other platforms for T1074.001


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 Temp Directory Using CMD Copy

    Expected signal: Sysmon Event ID 1: Process Create for cmd.exe with CommandLine containing 'copy' and '%TEMP%\staging_test'. Sysmon Event ID 11: Multiple FileCreate events in the staging directory. Security Event ID 4688 (if command-line auditing enabled) showing the copy commands.

  2. Test 2Stage Collected Output Using Append Redirect Operator

    Expected signal: Sysmon Event ID 1: Multiple Process Create events for cmd.exe with CommandLine containing '>>' and the staging file path in %TEMP%. Sysmon Event ID 11: FileCreate/FileModify events for collected_data.tmp. The file grows with each command execution.

  3. Test 3Stage Files with Hostname-Username Naming Convention

    Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine referencing %COMPUTERNAME%_%USERNAME%.txt. Sysmon Event ID 11: FileCreate event in %TEMP% with filename matching Hostname_Username.txt pattern. PowerShell ScriptBlock Log Event ID 4104 with full script content.

  4. Test 4Stage Data in Windows Registry (DarkWatchman Pattern)

    Expected signal: Sysmon Event ID 1: Process Create for powershell.exe. Sysmon Event ID 13 (RegistryValueSet): Registry value CachedData set under HKCU\SOFTWARE\Microsoft\Notepad with large Base64-encoded data. DeviceRegistryEvents: RegistryValueSet event visible in MDE.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections