Name:AWS Exfiltration via Bucket Replication id:eeb432d6-2212-43b6-9e89-fcd753f7da4c version:3 date:2024-09-30 author:Bhavin Patel, Splunk status:production type:TTP Description:The following analytic detects API calls to enable S3 bucket replication services. It leverages AWS CloudTrail logs to identify `PutBucketReplication` events, focusing on fields like `bucketName`, `ReplicationConfiguration.Rule.Destination.Bucket`, and user details. This activity is significant as it can indicate unauthorized data replication, potentially leading to data exfiltration. If confirmed malicious, attackers could replicate sensitive data to external accounts, leading to data breaches and compliance violations. Data_source:
-AWS CloudTrail PutBucketReplication
search:`cloudtrail` eventName = PutBucketReplication eventSource = s3.amazonaws.com | rename requestParameters.* as * | stats count values(bucketName) as source_bucket values(ReplicationConfiguration.Rule.ID) as rule_id values(ReplicationConfiguration.Rule.Destination.Bucket) as destination_bucket by _time user_arn userName user_type src_ip aws_account_id userIdentity.principalId user_agent | `aws_exfiltration_via_bucket_replication_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 admin has legitimately implemented data replication to ensure data availability and improve data protection/backup strategies. References: -https://hackingthe.cloud/aws/exploitation/s3-bucket-replication-exfiltration/ drilldown_searches: name:'View the detection results for - "$user_arn$" and "$aws_account_id$"' search:'%original_detection_search% | search user_arn = "$user_arn$" 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 - "$user_arn$" and "$aws_account_id$"' search:'| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$user_arn$", "$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:EC2 Snapshot confidence:80 impact:80 message:AWS Bucket Replication rule $rule_id$ added on $source_bucket$ to $destination_bucket$ by user $user_arn$ from IP Address - $src_ip$ mitre_attack_id: - 'T1537' observable: name:'user_arn' type:'User' - role: - 'Victim' 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' - 'eventSource' - 'requestParameters.*' - 'aws_account_id' - 'vendor_region' - 'user_agent' - 'userIdentity.principalId' risk_score:64 security_domain:threat