Name:AWS Exfiltration via DataSync Task id:05c4b09f-ea28-4c7c-a7aa-a246f665c8a2 version:3 date:2024-09-30 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 * | stats count min(_time) as firstTime max(_time) as lastTime by src_ip aws_account_id awsRegion eventName destinationLocationArn sourceLocationArn userAgent user_arn userIdentity.principalId errorCode | `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/ drilldown_searches: name:'View the detection results for - "$aws_account_id$"' search:'%original_detection_search% | search aws_account_id = "$aws_account_id$"' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' name:'View risk events for the last 7 days for - "$aws_account_id$"' search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$aws_account_id$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`' earliest_offset:'$info_min_time$' latest_offset:'$info_max_time$' tags: analytic_story: - 'Suspicious AWS S3 Activities' - 'Data Exfiltration' asset_type:AWS Account confidence:80 impact:80 message:DataSync task created on account id - $aws_account_id$ by user $user_arn$ from src_ip $src_ip$ mitre_attack_id: - 'T1119' observable: name:'user_arn' type:'User' - role: - 'Attacker' name:'src_ip' type:'IP Address' - role: - 'Attacker' name:'aws_account_id' type:'Other' - role: - 'Victim' product: - 'Splunk Enterprise' - 'Splunk Enterprise Security' - 'Splunk Cloud' required_fields: - '_time' - 'eventName' - 'user_arn' - 'src_ip' - 'aws_account_id' - 'destinationLocationArn' - 'sourceLocationArn' - 'userAgent' - 'userIdentity.principalId' risk_score:64 security_domain:threat