Detection rules › Splunk
Data Exfiltration via AWS CLI - Windows (Sysmon)
Threat actors may abuse the AWS CLI s3 cp command with recursive and custom endpoint flags to exfiltrate large volumes of data to an S3-compatible storage service outside of the target environment. The use of --recursive, --region, and --endpoint-url flags together is indicative of bulk data transfers, potentially to unauthorized or attacker-controlled storage. This use case detects such activity on Windows systems, helping identify suspicious data movement or staging for exfiltration.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Exfiltration | T1567 Exfiltration Over Web Service |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Sysmon | Event ID 1 | Process creation |
Rule body yaml
id: '45491.91376'
title: Data Exfiltration via AWS CLI - Windows
description: Threat actors may abuse the AWS CLI s3 cp command with recursive and
custom endpoint flags to exfiltrate large volumes of data to an S3-compatible storage
service outside of the target environment. The use of --recursive, --region, and
--endpoint-url flags together is indicative of bulk data transfers, potentially
to unauthorized or attacker-controlled storage. This use case detects such activity
on Windows systems, helping identify suspicious data movement or staging for exfiltration.
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
"s3 " " cp " " --recursive" " --region" " --endpoint-url" | table _time, host, user,
process, parent_process_name, process_name | bin span=1s | stats values(*) as *
by _time, host '
techniques:
- exfiltration:exfiltration over web service
technique_id:
- T1567
data_category:
- Windows Sysmon
references:
- https://thedfirreport.com/2024/04/29/from-icedid-to-dagon-locker-ransomware-in-29-days/
- https://x.com/Kostastsale/status/1714343784799223877
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") "s3 " " cp " " --recursive" " --region" " --endpoint-url"
Stage 2: table
| table _time, host, user, process, parent_process_name, process_name
Stage 3: bucket
| bin span=1s
Stage 4: 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.
| Field | Kind | Values |
|---|---|---|
EventCode | eq |
|
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>1<" |
| 1 | "s3 " |
| 1 | " cp " |
| 1 | " --recursive" |
| 1 | " --region" |
| 1 | " --endpoint-url" |