Detection rules › Splunk
AWS Exfiltration via DataSync Task
The following analytic detects the creation of an AWS DataSync task, which could indicate potential data exfiltration. It leverages AWS CloudTrail logs to identify the CreateTask event from the DataSync service. This activity is significant because attackers can misuse DataSync to transfer sensitive data from a private AWS location to a public one, leading to data compromise. If confirmed malicious, this could result in unauthorized access to sensitive information, causing severe data breaches and compliance violations.
Known false positives
- It is possible that an AWS Administrator has legitimately created this task for creating backup. Please check the `sourceLocationArn` and `destinationLocationArn` of this task
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Collection |
Telemetry coverage
| Platform | Record / event type |
|---|---|
| AWS | CloudTrail event CreateTask: Configures a task, which defines where and how DataSync transfers your data. |
Rule body
name: AWS Exfiltration via DataSync Task
id: 05c4b09f-ea28-4c7c-a7aa-a246f665c8a2
version: 11
creation_date: '2023-04-10'
modification_date: '2026-05-13'
author: Bhavin Patel, Splunk
status: production
type: TTP
description: The following analytic detects the creation of an AWS DataSync task, which could indicate potential data exfiltration. It leverages AWS CloudTrail logs to identify the `CreateTask` event from the DataSync service. This activity is significant because attackers can misuse DataSync to transfer sensitive data from a private AWS location to a public one, leading to data compromise. If confirmed malicious, this could result in unauthorized access to sensitive information, causing severe data breaches and compliance violations.
data_source:
- AWS CloudTrail CreateTask
search: |-
`cloudtrail` eventName = CreateTask eventSource="datasync.amazonaws.com"
| rename requestParameters.* as *
| rename user_name as user
| stats count min(_time) as firstTime max(_time) as lastTime
BY signature dest user
user_agent src vendor_account
vendor_region vendor_product destinationLocationArn
sourceLocationArn
| `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`
| `aws_exfiltration_via_datasync_task_filter`
how_to_implement: You must install splunk AWS add on and Splunk App for AWS. This search works with AWS CloudTrail logs.
known_false_positives: It is possible that an AWS Administrator has legitimately created this task for creating backup. Please check the `sourceLocationArn` and `destinationLocationArn` of this task
references:
- https://labs.nettitude.com/blog/how-to-exfiltrate-aws-ec2-data/
- https://www.shehackske.com/how-to/data-exfiltration-on-cloud-1606/
finding:
title: DataSync task created on account id - $vendor_account$ by user $user$ from src_ip $src$
entity:
field: user
type: user
score: 50
threat_objects:
- field: src
type: ip_address
analytic_story:
- Suspicious AWS S3 Activities
- Data Exfiltration
- Hellcat Ransomware
asset_type: AWS Account
mitre_attack_id:
- T1119
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: cloud
security_domain: threat
Stages and Predicates
Stage 1: search
`cloudtrail` eventName = CreateTask eventSource="datasync.amazonaws.com"
Stage 2: rename
| rename requestParameters.* as *
Stage 3: rename
| rename user_name as user
Stage 4: stats
| stats count min(_time) as firstTime max(_time) as lastTime
BY signature dest user
user_agent src vendor_account
vendor_region vendor_product destinationLocationArn
sourceLocationArn
Stage 5: search
| `security_content_ctime(firstTime)`
Stage 6: search
| `security_content_ctime(lastTime)`
Stage 7: search
| `aws_exfiltration_via_datasync_task_filter`
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
eventName | eq |
| field:"aws::eventName" kind:eq value:"CreateTask" |
eventSource | eq |
| field:"aws::eventSource" kind:eq |
sourcetype | eq |
| field:"sourcetype" kind:eq value:"aws:cloudtrail" |