turbot/aws_compliance

Control: 3.1 Ensure CloudTrail is enabled in all regions

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).

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

  • ensuring that a multi-regions trail exists will ensure that unexpected activity occurring in otherwise unused regions is detected
  • ensuring that a multi-regions trail exists will ensure that Global Service Logging is enabled for a trail by default to capture recording of events generated on AWS global services
  • for a multi-regions trail, ensuring that management events configured for all type of Read/Writes ensures recording of management operations that are performed on all resources in an AWS account

Remediation

Perform the following to enable global (Multi-region) CloudTrail logging:

From Console:

  1. Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/cloudtrail.
  2. Click on Trails on the left navigation pane.
  3. Click Get Started Now, if presented.
  • Click Add new trail.
  • Enter a trail name in the Trail name box.
  • A trail created in the console is a multi-region trail by default.
  • Specify an S3 bucket name in the S3 bucket box.
  • Specify the AWS KMS alias under the Log file SSE-KMS encryption section or create a new key.
  • Click Next.
  1. Ensure Management events check box is selected.
  2. Ensure both Read and Write are check under API activity.
  3. Click Next.
  4. Review your trail settings and clickCreate trail

From Command Line:

Create a multi-region trail:

aws cloudtrail create-trail --name <trail-name> --bucket-name <s3-bucket-for- cloudtrail> --is-multi-region-trail

Enable multi-region on an existing trail:

aws cloudtrail update-trail --name <trail-name> --is-multi-region-trail

Note:. Creating a CloudTrail trail via the CLI without providing any overriding options configures all read and write Management Events to be logged by default.

Default Value:

Not Enabled.

Usage

Run the control in your terminal:

powerpipe control run aws_compliance.control.cis_v400_3_1

Snapshot and share results via Turbot Pipes:

powerpipe login
powerpipe control run aws_compliance.control.cis_v400_3_1 --share

SQL

This control uses a named query:

cloudtrail_multi_region_read_write_enabled

Tags