Skip to main content

Description

AWS CloudTrail is a web service that records AWS API calls for your account and delivers log files to you. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail provides a history of AWS API calls for an account, including API calls made via the Management Console, SDKs, command line tools, and higher-level AWS services (such as CloudFormation).

Rationale​

The AWS API call history produced by CloudTrail enables security analysis, resource change tracking, and compliance auditing. Additionally:

  • Ensuring that a multi-region trail exists helps detect unexpected activity in otherwise unused regions.
  • Ensuring that a multi-region trail exists ensures Global Service Logging is enabled by default to capture events generated by AWS global services.
  • For a multi-region trail, ensuring that management events are configured for both read and write operations ensures recording of management operations performed on all resources in an AWS account.

Impact​

S3 lifecycle features can be used to manage the accumulation and management of logs over time. See the following AWS resource for more information on these features:

  1. https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html

Audit​

Perform the following to determine if CloudTrail is enabled for all regions:

From Console​

  1. Sign in to the AWS Management Console and open the CloudTrail console at https://console.aws.amazon.com/cloudtrail.

  2. Click on Trails on the left navigation pane.

    • You will be presented with a list of trails across all regions.
  3. Ensure at least one Trail has Yes specified in the Multi-region trail column.

  4. Click on a trail via the link in the Name column.

  5. Ensure Logging is set to ON.

  6. Ensure Multi-region trail is set to Yes.

  7. In section Management Events ensure API activity set to ALL.

From Command Line​

  1. List all trails:

    aws cloudtrail describe-trails
  2. Ensure IsMultiRegionTrail is set to true:

    aws cloudtrail get-trail-status --name {{trail-name}}
  3. Ensure IsLogging is set to true:

    aws cloudtrail get-event-selectors --trail-name {{trail-name}}
  4. Ensure there is at least one fieldSelector for a Trail that equals Management:

    • This should NOT output any results for "Field": "readOnly" if either true or false is returned one of the checkboxes is not selected for read or write.

    Example of correct output:

        "TrailARN": "<your_trail_ARN>",
    "AdvancedEventSelectors": [
    {
    "Name": "Management events selector",
    "FieldSelectors": [
    {
    "Field": "eventCategory",
    "Equals": [
    "Management"
    ]
    }
    ]
    }
    ]

Default Value​

Not Enabled.

References​

  1. CCE-78913-1
  2. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events
  3. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html?icmpid=docs_cloudtrail_console#logging-management-events
  4. https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-supported-services.html#cloud-trail-supported-services-data-events