| ID | Technique | Tactic |
|---|---|---|
| T1530 | Data from Cloud Storage | Collection |
Detection: AWS Repeated CloudWatch Logs Read Operations
Description
The following analytic detects a high volume of Amazon CloudWatch Logs read operations performed by the same AWS principal and account within a five-minute period. It identifies more than 500 DescribeLogGroups, DescribeLogStreams, DownloadLogEvents, FilterLogEvents, GetLogEvents, or GetQueryResults API calls. This activity may indicate automated discovery or collection of operational, application, or security telemetry from CloudWatch Logs.
Search
1`cloudtrail`
2eventSource="logs.amazonaws.com"
3eventName IN (
4 "DescribeLogGroups",
5 "DescribeLogStreams",
6 "DownloadLogEvents",
7 "FilterLogEvents",
8 "GetLogEvents",
9 "GetQueryResults"
10)
11
12
13| eval user='userIdentity.principalId'
14
15| eval vendor_account=coalesce(
16 vendor_account,
17 recipientAccountId,
18 'userIdentity.accountId'
19)
20
21| eval role_name='userIdentity.sessionContext.sessionIssuer.userName'
22
23| eval signature=coalesce(signature, eventName)
24
25| eval src=coalesce(src, sourceIPAddress)
26
27| eval user_agent=coalesce(user_agent, userAgent)
28
29| eval vendor_region=coalesce(vendor_region, awsRegion)
30
31
32| where isnotnull(user) AND len(trim(user)) > 0
33
34
35| dedup eventID keepempty=true
36
37
38| sort 0 _time
39
40
41| streamstats time_window=5m count AS event_count
42 by user vendor_account
43
44
45| where event_count > 500
46
47
48| stats max(_time) AS lastTime
49 max(event_count) AS event_count
50 min(_time) AS firstTime
51 values(role_name) AS role_name
52 values(signature) AS api_operations
53 values(src) AS src
54 values(user_agent) AS user_agent
55 values(vendor_region) AS vendor_region
56 by user vendor_account
57
58
59| `security_content_ctime(firstTime)`
60
61| `security_content_ctime(lastTime)`
62
63| `aws_repeated_cloudwatch_logs_read_operations_filter`
Data Source
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| AWS CloudTrail | 'aws:cloudtrail' |
'aws_cloudtrail' |
Macros Used
| Name | Value |
|---|---|
| cloudtrail | sourcetype=aws:cloudtrail |
| aws_repeated_cloudwatch_logs_read_operations_filter | search * |
aws_repeated_cloudwatch_logs_read_operations_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Annotations
Default Configuration
This detection is configured by default in Splunk Enterprise Security to run with the following settings:
| Setting | Value |
|---|---|
| Disabled | true |
| Cron Schedule | 0 * * * * |
| Earliest Time | -70m@m |
| Latest Time | -10m@m |
| Schedule Window | auto |
| Creates Finding (Notable) | Yes |
| Rule Title | %name% |
| Rule Description | %description% |
| Notable Event Fields | user, dest |
| Creates Intermediate Finding (Risk Event) | No |
Implementation
You must install Splunk AWS Add on and enable CloudTrail logs in your AWS Environment.
Known False Positives
Automated log analytics, SIEM pipelines, incident-response tooling, backup processes, and administrative troubleshooting may continuously read CloudWatch Logs and generate a high volume of matching operations. The prevalence of this activity has not yet been evaluated against broader customer telemetry. Review the principal, account, source addresses, user agents, Regions, and accessed CloudWatch Logs resources before escalating.
Associated Analytic Story
Finding
| Title | Entity Field | Entity Type | Risk Score |
|---|---|---|---|
| The AWS principal [$user$] performed [$event_count$] CloudWatch Logs read operations | user | user | 50 |
Threat Objects
| Field | Type |
|---|---|
| src | ip_address |
References
-
https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetLogEvents.html
-
https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_GetQueryResults.html
-
https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_FilterLogEvents.html
-
https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogStreams.html
-
https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogGroups.html
Detection Testing
| Test Type | Status | Dataset | Source | Sourcetype |
|---|---|---|---|---|
| Validation | ✅ Passing | N/A | N/A | N/A |
| Unit | ✅ Passing | Dataset | aws_cloudtrail |
aws:cloudtrail |
| Integration | ✅ Passing | Dataset | aws_cloudtrail |
aws:cloudtrail |
Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
Source: GitHub |
Version: 1