Detect Local Data Staging in CrowdStrike LogScale
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/
LogScale Detection Query
// Detection 1: Bulk file copy operations into staging paths
#event_simpleName=ProcessRollup2
| FileName = /(?i)(cmd\.exe|powershell\.exe|pwsh\.exe|xcopy\.exe|robocopy\.exe|bash|sh)$/
| CommandLine = /(?i)(xcopy|robocopy|\bcopy\b|\bmove\b|compress|7z|rar|zip|tar)/
| CommandLine = /(?i)(\\temp\\|\\tmp\\|\\programdata\\|\\users\\public\\|\\appdata\\local\\temp\\|\\windows\\temp\\|\\appdata\\roaming\\)/
| eval bulk_copy = 1
| table([@timestamp, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName, bulk_copy])
union
// Detection 2: Archive file creation in staging paths via DNSRequest/FileCreate correlation
#event_simpleName=SyntheticProcessRollup2 OR #event_simpleName=PeFileWritten
| TargetFileName = /(?i)(\\temp\\|\\tmp\\|\\programdata\\|\\users\\public\\|\\appdata\\local\\temp\\|\\windows\\temp\\)/
| TargetFileName = /(?i)\.(zip|rar|7z|tar|gz|tmp|dat|db|bak)$/
| ImageFileName != /(?i)(msmpeng|svchost|tiworker|wuauclt|msiexec|onedrive|teams|slack)\.exe/
| eval archive_creation = 1
| table([@timestamp, ComputerName, UserName, ImageFileName, TargetFileName, archive_creation])
union
// Detection 3: Output redirection into staging directories
#event_simpleName=ProcessRollup2
| FileName = /(?i)(cmd\.exe|powershell\.exe|pwsh\.exe|bash|sh)$/
| CommandLine = /(>>|>\s)/
| CommandLine = /(?i)(\\temp\\|\\tmp\\|\\programdata\\|\\users\\public\\)/
| eval output_redirect = 1
| table([@timestamp, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName, output_redirect])
| groupBy([ComputerName, UserName], function=[
count(bulk_copy, as=bulk_copy_count),
count(archive_creation, as=archive_creation_count),
count(output_redirect, as=redirect_count),
collect([CommandLine, TargetFileName, FileName], multival=true)
])
| eval TotalScore = bulk_copy_count + archive_creation_count + redirect_count
| where TotalScore > 0
| sort(TotalScore, order=desc) Detects T1074.001 Local Data Staging in CrowdStrike Falcon LogScale (CQL) using ProcessRollup2 and PeFileWritten event types. Identifies bulk copy/archive tool execution targeting staging paths, archive file creation in temp/public directories by non-system processes, and output redirection from interactive shells. Groups results by host and user with a composite score.
Data Sources
Required Tables
False Positives & Tuning
- CrowdStrike Falcon sensor updates and Real Time Response (RTR) sessions themselves can trigger ProcessRollup2 events for copy and archive operations when analysts are performing live response investigations on endpoints
- Managed endpoint software deployment via tools like PDQ Deploy, Puppet, or Chef runs robocopy and xcopy to distribute configuration files and binaries into ProgramData staging directories
- Developer CI/CD pipeline agents (Jenkins, GitHub Actions self-hosted runners, TeamCity agents) execute archive and copy commands during build artifact staging, particularly on build server endpoints
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.
- 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.
- 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.
- 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.
- 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.
References (13)
- https://attack.mitre.org/techniques/T1074/001/
- https://web.archive.org/web/20220629230035/https://www.prevailion.com/darkwatchman-new-fileless-techniques/
- https://unit42.paloaltonetworks.com/unit42-oopsie-oilrig-uses-threedollars-deliver-new-trojan/
- https://www.malwarebytes.com/blog/threat-intelligence/2021/12/sidecopy-apt-connecting-lures-to-victims-payloads-to-infrastructure
- https://www.mandiant.com/resources/roadsweep-ransomware-zerocleare-wiper
- https://www.mandiant.com/resources/blog/suspected-apt-actors-leverage-bypass-techniques-pulse-secure-zero-day
- https://securelist.com/my-name-is-dtrack/93338/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1074.001/T1074.001.md
- https://github.com/SigmaHQ/sigma/tree/master/rules/windows/file/file_event
- https://www.secureworks.com/research/bronze-union
- https://attack.mitre.org/groups/G0027/
- https://attack.mitre.org/groups/G0053/
- https://docs.microsoft.com/en-us/sysinternals/downloads/sysmon
Unlock Pro Content
Get the full detection package for T1074.001 including response playbook, investigation guide, and atomic red team tests.