T1119 Splunk · SPL

Detect Automated Collection in Splunk

Once established within a system or network, an adversary may use automated techniques for collecting internal data. Methods for performing this technique could include use of a Command and Scripting Interpreter to search for and copy information fitting set criteria such as file type, location, or name at specific time intervals. In cloud-based environments, adversaries may also use cloud APIs, data pipelines, command line interfaces, or ETL services to automatically collect data. This functionality could also be built into remote access tools. This technique may incorporate use of other techniques such as File and Directory Discovery and Lateral Tool Transfer to identify and move files, as well as Cloud Service Dashboard and Cloud Storage Object Discovery to identify resources in cloud environments.

MITRE ATT&CK

Tactic
Collection
Technique
T1119 Automated Collection
Canonical reference
https://attack.mitre.org/techniques/T1119/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
| eval cmdline=lower(CommandLine), proc=lower(Image)
| eval RecursiveSearch=if(match(cmdline, "(get-childitem|gci |-recurse|dir /s|forfiles|os\.walk|glob\.glob|scandir)"), 1, 0)
| eval SensitiveExt=if(match(cmdline, "(\.docx?|\.xlsx?|\.pdf|\.pptx?|\.pst|\.ost|\.mdb|\.accdb|\.kdbx|\.pfx|\.pem|\.p12|\.key|\.csv)"), 1, 0)
| eval ArchiveTool=if(match(proc, "(rar\.exe|winrar\.exe|7z\.exe)"), 1, 0)
| eval MassCopy=if(match(proc, "(robocopy\.exe|xcopy\.exe)") AND match(cmdline, "(/s|/e|/mir)"), 1, 0)
| eval ScriptInterpreter=if(match(proc, "(powershell\.exe|pwsh\.exe|python[23]?\.exe|wscript\.exe|cscript\.exe)"), 1, 0)
| eval CredentialFiles=if(match(cmdline, "(\.pfx|\.pem|\.p12|\.key|\.kdbx)"), 1, 0)
| eval SuspicionScore=RecursiveSearch + SensitiveExt + ArchiveTool + MassCopy + CredentialFiles
| where (ScriptInterpreter=1 AND RecursiveSearch=1 AND SensitiveExt=1)
    OR MassCopy=1
    OR (ArchiveTool=1 AND SensitiveExt=1)
    OR SuspicionScore >= 2
| table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine,
        RecursiveSearch, SensitiveExt, ArchiveTool, MassCopy, CredentialFiles, SuspicionScore
| sort - SuspicionScore, - _time
high severity medium confidence

Detects automated collection patterns using Sysmon Event ID 1 (Process Creation). Assigns a suspicion score based on: recursive search commands (Get-ChildItem, dir /s, forfiles, os.walk), sensitive file extension targeting (.docx, .xlsx, .pdf, .pst, .kdbx, .pfx), archive tool invocation (RAR, 7z, WinRAR) with document targets, mass copy tools (robocopy/xcopy) with recursive flags, and credential file targeting. Scoring approach helps analysts prioritize higher-confidence events. Results sorted by suspicion score descending, then most recent first.

Data Sources

Process: Process CreationCommand: Command ExecutionSysmon Event ID 1

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Backup software agents (Veeam, Acronis, Windows Backup) performing scheduled recursive file enumeration and copy operations using robocopy or xcopy with standard recursive flags
  • Enterprise file sync and DLP agents (OneDrive sync client, SharePoint sync, Varonis, Symantec DLP) scanning for specific document types as part of classification and policy enforcement
  • IT administrators running robocopy or PowerShell Get-ChildItem for bulk file migrations, server decommissions, or departmental data reorganization projects
  • Software developers using Python scripts with os.walk or glob.glob for build processes, automated test data preparation, or log parsing pipelines
  • Anti-virus and endpoint security products performing scheduled content-inspection scans that enumerate files by extension type across user directories
Download portable Sigma rule (.yml)

Other platforms for T1119


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 1PowerShell Recursive Document Collection to Staging Directory

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Get-ChildItem', '-Recurse', '.docx', '.xlsx', '.pdf'. Sysmon Event ID 11: Multiple file creation events in %TEMP%\df00tech-stage for each copied file. PowerShell ScriptBlock Log Event ID 4104 with the full collection script. Security Event ID 4663 (if SACL auditing enabled) for each source document read.

  2. Test 2CMD Recursive File Enumeration with dir /s

    Expected signal: Sysmon Event ID 1: Process Create with Image=cmd.exe, CommandLine containing 'dir /s /b' and '.docx', '.xlsx', '.pdf'. Sysmon Event ID 11: File creation event for %TEMP%\df00tech-filelist.txt. Security Event ID 4688 (if process creation auditing and command line logging are enabled) with full command line including extension targets.

  3. Test 3forfiles Automated Document Enumeration

    Expected signal: Sysmon Event ID 1: Process Create for the shell executing forfiles with CommandLine containing 'forfiles', '/S', and '.docx'. Child cmd.exe process creation events as forfiles spawns a cmd.exe instance per matching file. Sysmon Event ID 11: File creation for %TEMP%\df00tech-forfiles.txt. The child cmd.exe processes with 'echo @PATH' are also logged individually.

  4. Test 47-Zip Archive Collection — Document Staging Pre-Exfiltration

    Expected signal: Sysmon Event ID 1: Process Create with Image=7z.exe, CommandLine containing 'a' (add to archive), target paths with '.docx', '.xlsx', '.pdf', '-r' (recursive), and '-p' (password). Sysmon Event ID 11: File creation event for %TEMP%\df00tech-archive.7z. Security Event ID 4663 (if auditing enabled) for each source document file opened by 7z.exe during archiving.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections