| name | cis-aws-foundations-4.2 |
| description | Ensure CloudTrail log file validation is enabled |
| category | cis-logging |
| version | 7.0.0 |
| author | cyberstrike-official |
| tags | ["cis","aws","logging","cloudtrail","log-validation","integrity"] |
| cis_id | 4.2 |
| cis_benchmark | CIS AWS Foundations Benchmark v7.0.0 |
| tech_stack | ["aws"] |
| cwe_ids | [] |
| chains_with | ["cis-aws-foundations-4.1","cis-aws-foundations-4.5"] |
| prerequisites | [] |
| severity_boost | {} |
Ensure CloudTrail log file validation is enabled
Description
CloudTrail log file validation creates a digitally signed digest file containing a hash of each log that CloudTrail writes to S3. These digest files can be used to determine whether a log file was changed, deleted, or remained unchanged after CloudTrail delivered the log. It is recommended that file validation be enabled for all CloudTrails.
Rationale
Enabling log file validation will provide additional integrity checks for CloudTrail logs.
Impact
N/A
Audit Procedure
Using AWS Console
- Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/cloudtrail.
- Click on
Trails in the left navigation pane.
- For every trail:
- Click a trail via the link in the
Name column.
- Under the
General details section, ensure log file validation is set to Enabled.
Using AWS CLI
List all trails:
aws cloudtrail describe-trails
Ensure LogFileValidationEnabled is set to true for each trail.
Expected Result
All CloudTrail trails have LogFileValidationEnabled set to true.
Remediation
Using AWS Console
- Sign in to the AWS Management Console and open the IAM console at https://console.aws.amazon.com/cloudtrail.
- Click on
Trails in the left navigation pane.
- Click on the target trail.
- Within the
General details section, click edit.
- Under
Advanced settings, check the enable box under Log file validation.
- Click
Save changes.
Using AWS CLI
Enable log file validation on a trail:
aws cloudtrail update-trail --name <trail_name> --enable-log-file-validation
Note that periodic validation of logs using these digests can be carried out by running the following command:
aws cloudtrail validate-logs --trail-arn <trail_arn> --start-time <start_time> --end-time <end_time>