Skip to content

Commit 534d302

Browse files
authored
[Rule Tunings] AWS CloudWatch Deletion Rules (#5316)
Noticed some false positives in alert telemetry leading to high alert volume. For all 3 rules I've added `source.ip:*` and excluded `user_agent.original: AWS Internal` to reduce noise from internal AWS services and backend API calls made on a user's behalf. These rules will instead stay focused on direct SDK/CLI triggered API calls. - reduced execution window - updated description, false positive and investigation guide sections - added highlighted fields - udpated tags and MITRE mapping
1 parent 7b2c02f commit 534d302

File tree

3 files changed

+329
-135
lines changed

3 files changed

+329
-135
lines changed

rules/integrations/aws/defense_evasion_cloudwatch_alarm_deletion.toml

Lines changed: 105 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,77 +2,108 @@
22
creation_date = "2020/06/15"
33
integration = ["aws"]
44
maturity = "production"
5-
updated_date = "2024/05/21"
5+
updated_date = "2025/11/13"
66

77
[rule]
88
author = ["Elastic"]
9-
description = "Identifies the deletion of an AWS CloudWatch alarm. An adversary may delete alarms in an attempt to evade defenses."
9+
description = """
10+
Detects the deletion of one or more Amazon CloudWatch alarms using the "DeleteAlarms" API. CloudWatch alarms are
11+
critical for monitoring metrics and triggering alerts when thresholds are exceeded. An adversary may delete alarms to
12+
impair visibility, silence alerts, and evade detection following malicious activity. This behavior may occur during
13+
post-exploitation or cleanup phases to remove traces of compromise or disable automated responses.
14+
"""
1015
false_positives = [
1116
"""
12-
Verify whether the user identity, user agent, and/or hostname should be making changes in your environment. Alarm
13-
deletions by unfamiliar users or hosts should be investigated. If known behavior is causing false positives, it can
14-
be exempted from the rule.
17+
CloudWatch alarm deletions can occur legitimately during scheduled maintenance, infrastructure redeployments, or
18+
automation workflows that clean up temporary monitoring configurations. Verify that the user identity, role, and IP
19+
address are expected for the environment. If deletions are performed by CI/CD pipelines or authorized administrators
20+
during controlled operations, consider adding exceptions based on specific IAM roles, automation accounts, or IP
21+
address ranges.
1522
""",
1623
]
17-
from = "now-60m"
24+
from = "now-6m"
1825
index = ["filebeat-*", "logs-aws.cloudtrail-*"]
19-
interval = "10m"
2026
language = "kuery"
2127
license = "Elastic License v2"
2228
name = "AWS CloudWatch Alarm Deletion"
2329
note = """## Triage and analysis
2430
31+
> **Disclaimer**:
32+
> This investigation guide was created using generative AI technology and has been reviewed to improve its accuracy and relevance.
33+
> While every effort has been made to ensure its quality, validate and adapt it to your operational context.
34+
2535
### Investigating AWS CloudWatch Alarm Deletion
2636
27-
Amazon CloudWatch is a monitoring and observability service that collects monitoring and operational data in the form of
28-
logs, metrics, and events for resources and applications. This data can be used to detect anomalous behavior in your environments, set alarms, visualize
29-
logs and metrics side by side, take automated actions, troubleshoot issues, and discover insights to keep your
30-
applications running smoothly.
37+
Amazon CloudWatch is a monitoring and observability service that collects monitoring and operational data in the form of logs, metrics, and events for resources and applications. This data can be used to detect anomalous behavior in your environments, set alarms, visualize logs and metrics side by side, take automated actions, troubleshoot issues, and discover insights to keep your applications running smoothly.
3138
32-
CloudWatch Alarms is a feature that allows you to watch CloudWatch metrics and to receive notifications when the metrics
33-
fall outside of the levels (high or low thresholds) that you configure.
39+
Amazon CloudWatch Alarms monitor key metrics and trigger automated alerts or remediation workflows. Deleting these alarms disables monitoring of associated metrics and can delay detection of performance degradation or security incidents. Attackers may delete alarms to evade detection, suppress alerts, or disable security automation that responds to anomalies or policy violations.
3440
35-
This rule looks for the deletion of a alarm using the API `DeleteAlarms` action. Attackers can do this to cover their
36-
tracks and evade security defenses.
41+
This rule detects successful calls to the `DeleteAlarms` API via CloudTrail. These events should be rare and always associated with a valid change-control request or automation pipeline.
3742
3843
#### Possible investigation steps
3944
40-
- Identify the user account that performed the action and whether it should perform this kind of action.
41-
- Investigate other alerts associated with the user account during the past 48 hours.
42-
- Contact the account and resource owners and confirm whether they are aware of this activity.
43-
- Check if there is a justification for this behavior.
44-
- Considering the source IP address and geolocation of the user who issued the command:
45-
- Do they look normal for the user?
46-
- If the source is an EC2 IP address, is it associated with an EC2 instance in one of your accounts or is the source IP from an EC2 instance that's not under your control?
47-
- If it is an authorized EC2 instance, is the activity associated with normal behavior for the instance role or roles? Are there any other alerts or signs of suspicious activity involving this instance?
48-
- If you suspect the account has been compromised, scope potentially compromised assets by tracking servers, services, and data accessed by the account in the last 24 hours.
45+
- **Identify the actor**
46+
- Review `aws.cloudtrail.user_identity.arn` and `aws.cloudtrail.user_identity.access_key_id` to determine who initiated the deletion.
47+
- Check whether this actor typically performs CloudWatch management or automation tasks.
48+
49+
- **Review request details**
50+
- Inspect `aws.cloudtrail.request_parameters` or `target.entity.id` for the specific alarm names deleted.
51+
- Determine whether the alarms were security-related (e.g., CloudTrail log delivery, GuardDuty finding rate, or IAM API monitoring alarms).
52+
- Cross-reference deleted alarms with your organization's list of critical monitoring configurations.
53+
54+
- **Analyze source and context**
55+
- Review `source.ip` and `user_agent.original` for anomalies such as external IPs, unusual user agents, or custom SDKs.
56+
- Determine whether the activity occurred during a known maintenance window or from a trusted automation host.
57+
- Examine `cloud.region` to identify whether alarms were deleted from unexpected regions.
58+
59+
- **Correlate with surrounding events**
60+
- Review CloudTrail events for related activity around the same time, such as:
61+
- `PutMetricAlarm`, `DisableAlarmActions`, or `DeleteLogGroup`
62+
- Changes to CloudTrail, Config, or GuardDuty configurations
63+
- IAM policy or permission modifications that could facilitate evasion
64+
- Identify whether the same actor has previously modified logging or monitoring infrastructure.
65+
66+
- **Assess impact and scope**
67+
- Determine which systems or detection workflows relied on the deleted alarms.
68+
- Review whether the deletion affected automated responses, notifications, or third-party integrations (e.g., SNS, Lambda, or PagerDuty).
4969
5070
### False positive analysis
5171
52-
- If this rule is noisy in your environment due to expected activity, consider adding exceptions — preferably with a combination of user and IP address conditions.
72+
- **Legitimate automation or redeployment**
73+
- Infrastructure as Code (IaC) frameworks such as Terraform or CloudFormation may delete and recreate alarms during updates.
74+
- Validate automation account roles and ensure alarm deletions are immediately followed by re-creation actions.
75+
- **Operational maintenance**
76+
- Scheduled monitoring cleanup, regional deactivation, or test environment resets can trigger legitimate deletions.
77+
- Verify timing and user identity against approved change management records.
78+
- **Organizational migrations**
79+
- Security operations or DevOps teams may consolidate alarms during account merges or refactors.
80+
- Confirm intent with relevant teams and exclude authorized administrative accounts as necessary.
5381
5482
### Response and remediation
5583
56-
- Initiate the incident response process based on the outcome of the triage.
57-
- Disable or limit the account during the investigation and response.
58-
- Identify the possible impact of the incident and prioritize accordingly; the following actions can help you gain context:
59-
- Identify the account role in the cloud environment.
60-
- Assess the criticality of affected services and servers.
61-
- Work with your IT team to identify and minimize the impact on users.
62-
- Identify if the attacker is moving laterally and compromising other accounts, servers, or services.
63-
- Identify any regulatory or legal ramifications related to this activity.
64-
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords or delete API keys as needed to revoke the attacker's access to the environment. Work with your IT teams to minimize the impact on business operations during these actions.
65-
- Check if unauthorized new users were created, remove unauthorized new accounts, and request password resets for other IAM users.
66-
- Consider enabling multi-factor authentication for users.
67-
- Review the permissions assigned to the implicated user to ensure that the least privilege principle is being followed.
68-
- Implement security best practices [outlined](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/) by AWS.
69-
- Take the actions needed to return affected systems, data, or services to their normal operational levels.
70-
- Identify the initial vector abused by the attacker and take action to prevent reinfection via the same vector.
71-
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
72-
73-
## Setup
74-
75-
The AWS Fleet integration, Filebeat module, or similarly structured data is required to be compatible with this rule."""
84+
- **Containment**
85+
- If the deletion was unauthorized, recreate the deleted alarms immediately using IaC templates or CloudFormation backups.
86+
- Re-enable any dependent automation or alerts that rely on those alarms.
87+
- Temporarily restrict CloudWatch modification privileges to designated IAM roles.
88+
89+
- **Investigation**
90+
- Review related CloudTrail logs for preceding IAM changes, STS activity, or anomalous role assumptions that might indicate compromised credentials.
91+
- Investigate whether any alerts were suppressed or delayed prior to the deletion.
92+
93+
- **Recovery and hardening**
94+
- Implement AWS Config rules to continuously monitor alarm existence and alert on `DeleteAlarms` API calls.
95+
- Restrict permissions to `cloudwatch:DeleteAlarms` and enforce MFA for users performing monitoring configuration changes.
96+
- Maintain IaC definitions for all critical alarms to support rapid restoration.
97+
- Audit IAM roles and automation accounts that manage CloudWatch configurations to ensure least privilege.
98+
- Integrate alarm configuration checks into your CI/CD validation workflows.
99+
100+
### Additional information
101+
102+
- **[AWS Config Rule – cloudwatch-alarm-action-check](https://docs.aws.amazon.com/config/latest/developerguide/cloudwatch-alarm-action-check.html)**
103+
- **[AWS IR Playbooks](https://github.com/aws-samples/aws-incident-response-playbooks/blob/c151b0dc091755fffd4d662a8f29e2f6794da52c/playbooks/)**
104+
- **[AWS Customer Playbook Framework](https://github.com/aws-samples/aws-customer-playbook-framework/tree/a8c7b313636b406a375952ac00b2d68e89a991f2/docs)**
105+
- **Security Best Practices:** [AWS Knowledge Center – Security Best Practices](https://aws.amazon.com/premiumsupport/knowledge-center/security-best-practices/).
106+
"""
76107
references = [
77108
"https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudwatch/delete-alarms.html",
78109
"https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DeleteAlarms.html",
@@ -84,14 +115,20 @@ tags = [
84115
"Domain: Cloud",
85116
"Data Source: AWS",
86117
"Data Source: Amazon Web Services",
118+
"Data Source: Amazon CloudWatch",
87119
"Resources: Investigation Guide",
88120
"Tactic: Defense Evasion",
89121
]
90122
timestamp_override = "event.ingested"
91123
type = "query"
92124

93125
query = '''
94-
event.dataset:aws.cloudtrail and event.provider:monitoring.amazonaws.com and event.action:DeleteAlarms and event.outcome:success
126+
event.dataset: "aws.cloudtrail"
127+
and event.provider: "monitoring.amazonaws.com"
128+
and event.action: "DeleteAlarms"
129+
and event.outcome: "success"
130+
and source.ip: *
131+
and not user_agent.original : "AWS Internal"
95132
'''
96133

97134

@@ -106,10 +143,32 @@ id = "T1562.001"
106143
name = "Disable or Modify Tools"
107144
reference = "https://attack.mitre.org/techniques/T1562/001/"
108145

146+
[[rule.threat.technique.subtechnique]]
147+
id = "T1562.006"
148+
name = "Indicator Blocking"
149+
reference = "https://attack.mitre.org/techniques/T1562/006/"
150+
109151

110152

111153
[rule.threat.tactic]
112154
id = "TA0005"
113155
name = "Defense Evasion"
114156
reference = "https://attack.mitre.org/tactics/TA0005/"
115157

158+
[rule.investigation_fields]
159+
field_names = [
160+
"@timestamp",
161+
"user.name",
162+
"user_agent.original",
163+
"source.ip",
164+
"aws.cloudtrail.user_identity.arn",
165+
"aws.cloudtrail.user_identity.type",
166+
"aws.cloudtrail.user_identity.access_key_id",
167+
"target.entity.id",
168+
"event.action",
169+
"event.outcome",
170+
"cloud.account.id",
171+
"cloud.region",
172+
"aws.cloudtrail.request_parameters",
173+
]
174+

0 commit comments

Comments
 (0)