Profile Applicability:
- Level 1
Description:
This control ensures that AWS CloudTrail log data is monitored for any changes made to Identity and Access Management (IAM) policies. A CloudWatch metric filter and corresponding alarm should be configured to detect and alert when IAM policies are created, updated, deleted, or attached/detached from users, groups, or roles. Monitoring IAM policy changes is critical to maintaining the integrity of access control within the AWS environment.
Rationale:
IAM policies define permissions for AWS users, roles, and services. Unauthorized or unintended modifications to IAM policies can lead to privilege escalation, unauthorized access, and potential data breaches. Establishing alerts for IAM policy changes ensures visibility into access control modifications, enabling rapid detection and response to potential security risks.
Impact:
- Positive Impact:Provides visibility into changes that affect user and role permissions.Helps detect unauthorized privilege escalations or policy misconfigurations.Supports compliance by maintaining proper access control auditability.
- Negative Impact:Slight increase in CloudWatch log ingestion and alerting costs.
Default Value:
By default, AWS does not provide a metric filter or alarm for IAM policy changes. Manual configuration is required.
Pre-Requisite:
CloudTrail must be enabled in all regions.
CloudTrail logs must be delivered to a CloudWatch Logs group.
IAM permissions required:
logs:PutMetricFilter
,cloudwatch:PutMetricAlarm
, andcloudwatch:DescribeAlarms
.
Remediation
Test Plan
Using AWS Console:
Sign in to the AWS Management Console.
Navigate to CloudWatch → Logs → Log groups.
Locate the CloudTrail log group (typically named
/aws/cloudtrail/...
).Select Create metric filter.
Enter the following filter pattern to detect IAM policy changes:
Assign a metric name such as
IAMPolicyChangeEvents
.Go to CloudWatch → Alarms → Create alarm.
Create an alarm for the
IAMPolicyChangeEvents
metric.Set a threshold (e.g., ≥ 1 occurrence within 5 minutes) and configure SNS notifications to alert the security team.
Save the configuration.
Implementation Plan
Using AWS Console:
- Go to CloudWatch → Logs → Log groups.
- Open the CloudTrail log group.
- Choose Create metric filter and use the following pattern:
- Set Metric Name:
IAMPolicyChangeEvents
. - Create an Alarm:
- Metric:
IAMPolicyChangeEvents
- Namespace:
CISBenchmark
- Condition: ≥ 1 in 5 minutes
- Actions: Send notification to security team via SNS topic (e.g.,
aws-security-alerts
)
- Metric:
- Save all configurations.
Backout Plan
Using AWS Console:
Go to CloudWatch → Alarms.
Select the
IAMPolicyChangeEventsAlarm
.Choose Actions → Delete.
Go to Logs → Metric Filters.
Delete the
IAMPolicyChangeEvents
filter.