Skip to content

Commit 6f725b1

Browse files
authored
[Rule Tunings] AWS DynamoDB new terms Rules (#5074)
* [Rule Tunings] AWS DynamoDB new terms Rules ### AWS DynamoDB Scan by Unusual User - changed new terms field to use cloud.account.id and user.name combination to account for roles and users - reduced execution window - reduced history window - small edits to description, IG and highlighted fields ### AWS DynamoDB Table Exported to S3 - removed inaccurate setup notes - reduced history window - small edits to description and highlighted fields * Apply suggestions from code review
1 parent 1f04411 commit 6f725b1

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

rules/integrations/aws/exfiltration_dynamodb_scan_by_unusual_user.toml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
creation_date = "2025/03/13"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2025/03/13"
5+
updated_date = "2025/09/08"
66

77
[rule]
88
author = ["Elastic"]
99
description = """
1010
Identifies when an AWS DynamoDB table is scanned by a user who does not typically perform this action. Adversaries may
1111
use the Scan operation to collect sensitive information or exfiltrate data from DynamoDB tables. This rule detects
1212
unusual user activity by monitoring for the Scan action in CloudTrail logs. This is a New Terms rule that only flags
13-
when this behavior is observed by the `aws.cloudtrail.user_identity.arn` for the first time in the last 14 days.
13+
when this behavior is observed by a user or role for the first time.
1414
"""
1515
false_positives = [
1616
"""
1717
Legitimate users may scan DynamoDB tables for various reasons, such as data analysis or application functionality.
1818
Ensure that the user has the necessary permissions and that the Scan operation is authorized before taking action.
1919
""",
2020
]
21-
from = "now-9m"
21+
from = "now-6m"
2222
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
2323
language = "kuery"
2424
license = "Elastic License v2"
@@ -29,12 +29,12 @@ note = """## Triage and analysis
2929
3030
This rule identifies when an AWS DynamoDB table is scanned by a user who does not typically perform this action. Adversaries may use the Scan operation to collect sensitive information or exfiltrate data from DynamoDB tables. This rule detects unusual user activity by monitoring for the Scan action in CloudTrail logs.
3131
32-
This 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.
32+
This 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.
3333
3434
#### Possible Investigation Steps
3535
3636
- Identify the Actor: Review the `aws.cloudtrail.user_identity.arn` field to identify the user who requested the subscription. 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.
37+
- Review the Source IP: Check the `source.ip` 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.
3838
- Analyze the Request Parameters: Examine the `aws.cloudtrail.request_parameters` field to understand the details of the Scan request. Look for any unusual parameters or patterns that may indicate malicious intent. This also details the DynamoDB table being scanned.
3939
- 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.
4040
@@ -53,7 +53,7 @@ This is a [New Terms](https://www.elastic.co/guide/en/security/current/rules-ui-
5353
5454
### Additional Information
5555
56-
For 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.
56+
For further guidance on managing and securing DynamoDB in AWS environments, refer to the [AWS DynamoDB documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/security.html) and AWS best practices for security.
5757
"""
5858
references = ["https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Scan.html"]
5959
risk_score = 21
@@ -109,24 +109,25 @@ reference = "https://attack.mitre.org/tactics/TA0009/"
109109
field_names = [
110110
"@timestamp",
111111
"user.name",
112-
"source.address",
112+
"user_agent.original",
113+
"source.ip",
113114
"aws.cloudtrail.user_identity.arn",
114115
"aws.cloudtrail.user_identity.type",
115116
"aws.cloudtrail.user_identity.access_key_id",
116-
"user_agent.original",
117+
"aws.cloudtrail.resources.arn",
118+
"aws.cloudtrail.resources.type",
117119
"event.action",
118120
"event.outcome",
121+
"cloud.account.id",
119122
"cloud.region",
120-
"aws.cloudtrail.flattened.request_parameters.tableName",
121-
"aws.cloudtrail.flattened.response_elements.subscriptionArn",
122-
"aws.cloudtrail.request_parameters",
123+
"aws.cloudtrail.request_parameters"
123124
]
124125

125126
[rule.new_terms]
126127
field = "new_terms_fields"
127-
value = ["aws.cloudtrail.user_identity.arn"]
128+
value = ["cloud.account.id", "user.name"]
128129
[[rule.new_terms.history_window_start]]
129130
field = "history_window_start"
130-
value = "now-14d"
131+
value = "now-10d"
131132

132133

rules/integrations/aws/exfiltration_dynamodb_table_exported_to_s3.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
creation_date = "2025/03/13"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2025/07/10"
5+
updated_date = "2025/09/08"
66

77
[rule]
88
author = ["Elastic"]
99
description = """
10-
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 "user.name" for the first time.
10+
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 a user or role for the first time.
1111
"""
1212
false_positives = [
1313
"""
@@ -50,7 +50,6 @@ For further guidance on managing and securing DynamoDB in AWS environments, refe
5050
references = ["https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_ExportTableToPointInTime.html"]
5151
risk_score = 21
5252
rule_id = "e8ea6f58-0040-11f0-a243-f661ea17fbcd"
53-
setup = "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."
5453
severity = "low"
5554
tags = [
5655
"Domain: Cloud",
@@ -99,17 +98,18 @@ field_names = [
9998
"aws.cloudtrail.user_identity.arn",
10099
"aws.cloudtrail.user_identity.type",
101100
"aws.cloudtrail.user_identity.access_key_id",
101+
"aws.cloudtrail.resources.arn",
102+
"aws.cloudtrail.resources.type",
102103
"event.action",
103104
"event.outcome",
104105
"cloud.account.id",
105106
"cloud.region",
106-
"aws.cloudtrail.request_parameters",
107-
"aws.cloudtrail.response_elements"
107+
"aws.cloudtrail.request_parameters"
108108
]
109109

110110
[rule.new_terms]
111111
field = "new_terms_fields"
112112
value = ["cloud.account.id", "user.name"]
113113
[[rule.new_terms.history_window_start]]
114114
field = "history_window_start"
115-
value = "now-14d"
115+
value = "now-10d"

0 commit comments

Comments
 (0)