Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: Ensure a log metric filter and alarm exist for VPC changes

This rule requires the existence of a log metric filter and alarm for VPC changes.

RuleEnsure a log metric filter and alarm exist for VPC changes
FrameworkNIST Cybersecurity Framework (CSF) v1.1
Severity
Low

Rule Description:

The rule ensures that a log metric filter and alarm are set up to monitor and alert for any VPC changes in alignment with the NIST Cybersecurity Framework (CSF) v1. This helps in maintaining the security and integrity of the Virtual Private Cloud (VPC) environment.

Troubleshooting Steps:

  1. 1.
    Verify if the CloudTrail service is enabled in the AWS Management Console.
  2. 2.
    Ensure that the necessary IAM permissions are granted to access and configure CloudTrail and CloudWatch services.
  3. 3.
    Confirm that the necessary log groups and metric filters are created correctly.
  4. 4.
    Check if the alarm is set up properly and associated with the metric filter.
  5. 5.
    Validate that the alert notifications are correctly configured.

Necessary Codes:

No specific codes are required for this rule as it is related to configuring CloudTrail and CloudWatch services.

Step-by-step Guide for Remediation:

CloudTrail Setup:

  1. 1.
    Go to the AWS Management Console and navigate to the CloudTrail service.
  2. 2.
    Click on "Create trail" to create a new trail.
  3. 3.
    Provide a name for the trail and select a S3 bucket to store the CloudTrail logs.
  4. 4.
    Enable "Management events" for the trail.
  5. 5.
    Under "Data events", enable logging for "CreateVpc", "DeleteVpc", and "ModifyVpcAttribute" events.
  6. 6.
    Click on "Create" to create the trail.

CloudWatch Metric Filter Setup:

  1. 1.
    Go to the AWS Management Console and navigate to the CloudWatch service.
  2. 2.
    Click on "Log groups" and select the log group corresponding to the CloudTrail logs.
  3. 3.
    Click on "Create metric filter" for the log group.
  4. 4.
    Specify a filter pattern that captures VPC-related events. Example:
    { $.eventName = "CreateVpc" || $.eventName = "DeleteVpc" || $.eventName = "ModifyVpcAttribute" }
  5. 5.
    Choose a metric namespace and name for the filter.
  6. 6.
    Click on "Create filter" to create the metric filter.

CloudWatch Alarm Setup:

  1. 1.
    In the CloudWatch Management Console, go to "Alarms" on the left-hand menu.
  2. 2.
    Click on "Create alarm" to configure a new alarm.
  3. 3.
    Select the metric filter created in the previous step as the alarm source.
  4. 4.
    Set the appropriate threshold and conditions for the alarm trigger. You can choose to trigger the alarm when the count is greater than zero or set a specific threshold.
  5. 5.
    Configure the actions to be taken when the alarm is triggered, such as sending a notification via SNS topic or executing an Auto Scaling policy.
  6. 6.
    Click on "Create alarm" to create the alarm.

Conclusion:

By following the above steps, you can ensure that a log metric filter and alarm are set up to monitor VPC changes in accordance with NIST CSF v1. This helps in maintaining the visibility and security of your AWS VPC environment.

Is your System Free of Underlying Vulnerabilities?
Find Out Now