AWS DynamoDB Table Exported to S3
Identifies when an AWS DynamoDB table is exported to S3. Adversaries may use the ExportTableToPointInTime operation to
collect sensitive information or exfiltrate data from DynamoDB tables. This rule detects unusual user activity by
monitoring for the ExportTableToPointInTime action in CloudTrail logs. This is a New Terms rule that only flags when
this behavior is observed by the aws.cloudtrail.user_identity.arn
for the first time in the last 14 days.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2025/03/13"
3integration = ["aws"]
4maturity = "production"
5updated_date = "2025/03/13"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies when an AWS DynamoDB table is exported to S3. Adversaries may use the ExportTableToPointInTime operation to
11collect sensitive information or exfiltrate data from DynamoDB tables. This rule detects unusual user activity by
12monitoring for the ExportTableToPointInTime action in CloudTrail logs. This is a New Terms rule that only flags when
13this behavior is observed by the `aws.cloudtrail.user_identity.arn` for the first time in the last 14 days.
14"""
15false_positives = [
16 """
17 Legitimate users may export DynamoDB tables for various reasons, such as data analysis or backup purposes. Ensure
18 that the user has the necessary permissions and that the ExportTableToPointInTime operation is authorized before
19 taking action.
20 """,
21]
22from = "now-9m"
23index = ["filebeat-*", "logs-aws.cloudtrail-*"]
24language = "kuery"
25license = "Elastic License v2"
26name = "AWS DynamoDB Table Exported to S3"
27note = """ ## Triage and analysis
28
29### Investigating AWS DynamoDB Table Exported to S3
30
31This rule identifies when an AWS DynamoDB table is exported to S3. Adversaries may use the ExportTableToPointInTime operation to collect sensitive information or exfiltrate data from DynamoDB tables. This rule detects unusual user activity by monitoring for the ExportTableToPointInTime action in CloudTrail logs.
32
33This is a [New Terms](https://www.elastic.co/guide/en/security/current/rules-ui-create.html#create-new-terms-rule) rule that only flags when this behavior is observed for the first time on a host in the last 14 days.
34
35#### Possible Investigation Steps
36- Identify the Actor: Review the `aws.cloudtrail.user_identity.arn` field to identify the user who requested the export. Verify if this actor typically performs such actions and has the necessary permissions. It may be unusual for this activity to originate from certain user types, such as an assumed role or federated user.
37- Review the Source IP: Check the `source.address` field to determine the source of the request. If the request comes from an unexpected location or IP address, it may indicate a compromised account or unauthorized access.
38- Analyze the Request Parameters: Examine the `aws.cloudtrail.request_parameters` field to understand the details of the ExportTableToPointInTime request. Look for any unusual parameters or patterns that may indicate malicious intent. This also details the DynamoDB table being exported.
39- Review Access Key: Check the `aws.cloudtrail.user_identity.access_key_id` field to identify the access key used for the request. Determine if this key is associated with a legitimate user or if it has been compromised.
40
41### False Positive Analysis
42- Historical User Actions: If the user has a history of exporting DynamoDB tables for legitimate purposes, this may not be a false positive. Review the user's activity logs to determine if this behavior is consistent with their normal actions.
43- Automated Processes: Some automated processes or applications may perform exports on DynamoDB tables as part of their functionality. If the user is associated with such a process, this may not be a false positive.
44
45### Response and Remediation
46- Immediate Review and Reversal: If the ExportTableToPointInTime action is determined to be unauthorized, immediately revoke the user's access to the DynamoDB table and any associated resources. This may involve disabling the user's account or removing their permissions.
47- Investigate Compromise: If the ExportTableToPointInTime action is determined to be malicious, investigate the source and destination of the request and any potential compromise of the user's account. If the destination S3 bucket is not known, it may be a sign of data exfiltration and may require incident response.
48- Review IAM Policies: Review the IAM policies associated with the user to ensure that they have the appropriate permissions for their role. If necessary, update the policies to restrict access to sensitive resources.
49- Monitor for Future Activity: Continue to monitor the user's activity for any further suspicious behavior. Set up additional alerts or logging to detect any future unauthorized access attempts.
50
51### Additional Information
52
53For further guidance on managing and securing SNS topics in AWS environments, refer to the [AWS SNS documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/security.html) and AWS best practices for security.
54"""
55references = ["https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ExportTableToPointInTime.html"]
56risk_score = 21
57rule_id = "e8ea6f58-0040-11f0-a243-f661ea17fbcd"
58setup = "DynamoDB data events must be enabled in CloudTrail to capture the ExportTableToPointInTime actions. Ensure that the AWS CloudTrail service is configured to log data events for DynamoDB tables."
59severity = "low"
60tags = [
61 "Domain: Cloud",
62 "Data Source: AWS",
63 "Data Source: Amazon Web Services",
64 "Data Source: AWS DynamoDB",
65 "Resources: Investigation Guide",
66 "Use Case: Threat Detection",
67 "Tactic: Exfiltration",
68]
69timestamp_override = "event.ingested"
70type = "new_terms"
71
72query = '''
73event.dataset: "aws.cloudtrail"
74 and event.provider: "dynamodb.amazonaws.com"
75 and event.action: "ExportTableToPointInTime"
76 and aws.cloudtrail.flattened.request_parameters.dryRun: false
77'''
78
79
80[[rule.threat]]
81framework = "MITRE ATT&CK"
82[[rule.threat.technique]]
83id = "T1567"
84name = "Exfiltration Over Web Service"
85reference = "https://attack.mitre.org/techniques/T1567/"
86[[rule.threat.technique.subtechnique]]
87id = "T1567.002"
88name = "Exfiltration to Cloud Storage"
89reference = "https://attack.mitre.org/techniques/T1567/002/"
90
91
92
93[rule.threat.tactic]
94id = "TA0010"
95name = "Exfiltration"
96reference = "https://attack.mitre.org/tactics/TA0010/"
97
98[rule.investigation_fields]
99field_names = [
100 "@timestamp",
101 "user.name",
102 "source.address",
103 "aws.cloudtrail.user_identity.arn",
104 "aws.cloudtrail.user_identity.type",
105 "aws.cloudtrail.user_identity.access_key_id",
106 "user_agent.original",
107 "event.action",
108 "event.outcome",
109 "cloud.region",
110 "aws.cloudtrail.flattened.request_parameters.clientToken",
111 "aws.cloudtrail.flattened.response_elements.s3Bucket",
112 "aws.cloudtrail.flattened.response_elements.tableArn",
113 "aws.cloudtrail.request_parameters",
114]
115
116[rule.new_terms]
117field = "new_terms_fields"
118value = ["aws.cloudtrail.user_identity.arn"]
119[[rule.new_terms.history_window_start]]
120field = "history_window_start"
121value = "now-14d"
Triage and analysis
Investigating AWS DynamoDB Table Exported to S3
This rule identifies when an AWS DynamoDB table is exported to S3. Adversaries may use the ExportTableToPointInTime operation to collect sensitive information or exfiltrate data from DynamoDB tables. This rule detects unusual user activity by monitoring for the ExportTableToPointInTime action in CloudTrail logs.
This is a New Terms rule that only flags when this behavior is observed for the first time on a host in the last 14 days.
Possible Investigation Steps
- Identify the Actor: Review the
aws.cloudtrail.user_identity.arn
field to identify the user who requested the export. Verify if this actor typically performs such actions and has the necessary permissions. It may be unusual for this activity to originate from certain user types, such as an assumed role or federated user. - Review the Source IP: Check the
source.address
field to determine the source of the request. If the request comes from an unexpected location or IP address, it may indicate a compromised account or unauthorized access. - Analyze the Request Parameters: Examine the
aws.cloudtrail.request_parameters
field to understand the details of the ExportTableToPointInTime request. Look for any unusual parameters or patterns that may indicate malicious intent. This also details the DynamoDB table being exported. - Review Access Key: Check the
aws.cloudtrail.user_identity.access_key_id
field to identify the access key used for the request. Determine if this key is associated with a legitimate user or if it has been compromised.
False Positive Analysis
- Historical User Actions: If the user has a history of exporting DynamoDB tables for legitimate purposes, this may not be a false positive. Review the user's activity logs to determine if this behavior is consistent with their normal actions.
- Automated Processes: Some automated processes or applications may perform exports on DynamoDB tables as part of their functionality. If the user is associated with such a process, this may not be a false positive.
Response and Remediation
- Immediate Review and Reversal: If the ExportTableToPointInTime action is determined to be unauthorized, immediately revoke the user's access to the DynamoDB table and any associated resources. This may involve disabling the user's account or removing their permissions.
- Investigate Compromise: If the ExportTableToPointInTime action is determined to be malicious, investigate the source and destination of the request and any potential compromise of the user's account. If the destination S3 bucket is not known, it may be a sign of data exfiltration and may require incident response.
- Review IAM Policies: Review the IAM policies associated with the user to ensure that they have the appropriate permissions for their role. If necessary, update the policies to restrict access to sensitive resources.
- Monitor for Future Activity: Continue to monitor the user's activity for any further suspicious behavior. Set up additional alerts or logging to detect any future unauthorized access attempts.
Additional Information
For further guidance on managing and securing SNS topics in AWS environments, refer to the AWS SNS documentation and AWS best practices for security.
References
Related rules
- AWS DynamoDB Scan by Unusual User
- AWS EC2 EBS Snapshot Shared or Made Public
- AWS SNS Email Subscription by Rare User
- AWS RDS DB Snapshot Shared with Another Account
- AWS S3 Bucket Policy Added to Share with External Account