Network ACL changes should be monitored

Cette page n'est pas encore disponible en français. Nous travaillons sur sa traduction.
Si vous avez des questions ou des commentaires concernant notre projet de traduction actuel, n'hésitez pas à nous contacter !

Description

AWS accounts should have at least one active multi-region CloudTrail trail that captures all management events (IncludeManagementEvents set to true and ReadWriteType set to All) and sends logs to a CloudWatch Logs log group with a metric filter for network ACL (NACL) changes (CreateNetworkAcl, CreateNetworkAclEntry, DeleteNetworkAcl, DeleteNetworkAclEntry, ReplaceNetworkAclEntry, ReplaceNetworkAclAssociation). The metric must have a CloudWatch alarm that notifies an SNS topic with at least one active (confirmed) subscriber, so that changes exposing AWS resources and services are detected promptly.

Remediation

Follow the AWS CloudWatch alarms for CloudTrail guide to create the metric filter on the trail’s log group, an SNS topic and subscription, and an alarm on the metric:

aws logs put-metric-filter --log-group-name <trail-log-group-name> --filter-name <nacl-changes-metric> --metric-transformations metricName=<nacl-changes-metric>,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = CreateNetworkAcl) || ($.eventName = CreateNetworkAclEntry) || ($.eventName = DeleteNetworkAcl) || ($.eventName = DeleteNetworkAclEntry) || ($.eventName = ReplaceNetworkAclEntry) || ($.eventName = ReplaceNetworkAclAssociation) }'
aws sns create-topic --name <sns-topic-name>
aws sns subscribe --topic-arn <sns-topic-arn> --protocol <sns-protocol> --notification-endpoint <sns-subscription-endpoints>
aws cloudwatch put-metric-alarm --alarm-name <nacl-changes-alarm> --metric-name <nacl-changes-metric> --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions <sns-topic-arn>

You can choose your own metricName and metricNamespace strings, and reuse the same SNS topic and subscription for all monitoring alarms. Confirm the subscription as described in the Amazon SNS subscription documentation.

References