Detection rules › Splunk
Windows Copy Files (Windows Event Log)
Adversaries may search local system sources, such as file systems or local databases, or network shares to find files of interest and sensitive data prior to Exfiltration. Interactive command shells may be in use, and common functionality within cmd may be used to gather information. These events are only detected when a new process is created, or if powershell logging is enabled and used
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1059 Command and Scripting Interpreter |
| Collection | T1005 Data from Local System, T1039 Data from Network Shared Drive |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4688 | A new process has been created. |
Rule body yaml
id: '5685.5946'
title: Windows Copy Files
description: 'Adversaries may search local system sources, such as file systems or
local databases, or network shares to find files of interest and sensitive data
prior to Exfiltration. Interactive command shells may be in use, and common functionality
within cmd may be used to gather information. These events are only detected when
a new process is created, or if powershell logging is enabled and used. Threat Actor
Association: APT29, Evilnum, REvil, TA428, Vice Society Software Association: Black
Basta, SamSam Atomics T1505.003 Test #1'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<" OR Type=Process) (TERM(copy) OR TERM(xcopy) OR TERM(robocopy))
| regex process="(?i)(((^|\s+)copy|(xcopy|robocopy)(\.exe)?\"?)\s+)" | table _time,
host, user signature_id, process, process_*, parent_* | bin span=1s | stats values(*)
as * by _time, host '
techniques:
- collection:data from local system
- execution:command and scripting interpreter
- collection:data from network shared drive
technique_id:
- T1005
- T1059
- T1039
data_category:
- Process command-line parameters
- Windows event logs
references:
- https://book.hacktricks.xyz/exfiltration
- https://www.computerhope.com/xcopyhlp.htm
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) (TERM(copy) OR TERM(xcopy) OR TERM(robocopy))
Stage 2: regex
| regex process="(?i)(((^|\s+)copy|(xcopy|robocopy)(\.exe)?\"?)\s+)"
Stage 3: table
| table _time, host, user signature_id, process, process_*, parent_*
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
Search terms
Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.
| Stage | Term |
|---|---|
| 1 | TERM |
| 1 | "<EventID>4688<" |
| 1 | TERM |
| 1 | copy |
| 1 | TERM |
| 1 | xcopy |
| 1 | TERM |
| 1 | robocopy |