Description
Ensure that log file integrity validation is enabled on every AWS CloudTrail trail. When it is enabled, CloudTrail delivers digitally signed digest files to the S3 bucket, which can be used to verify that delivered log files have not been modified, deleted or forged.
Rationale
Without log file validation, an attacker who gains access to the log bucket can alter, forge or delete audit records without detection. This undermines the integrity of the logs, hinders investigations and makes unauthorized changes harder to prove. With validation enabled, any change to a log file after delivery can be detected. The log bucket and its digest files should also be protected with least-privilege access.
Impact
Makes tampering with or deleting CloudTrail log files detectable
Strengthens the evidential value of logs for audits and investigations
Adds a small number of digest files to the S3 bucket; there is no effect on workloads
Default Value
Log file validation is enabled by default for trails created in the CloudTrail console. It is disabled by default for trails created with the API or AWS CLI.
Pre-Requisites
IAM permissions: cloudtrail:DescribeTrails and cloudtrail:UpdateTrail
Remediation
Test Plan
Console:
Sign in to the AWS Management Console at https://console.aws.amazon.com.
Open the CloudTrail console and select Trails in the left menu.
Select each trail and, in the General details section, check that Log file validation is Enabled.
Repeat for each region in use.
If log file validation is disabled for any trail, follow the implementation steps.
CLI:
List the trails with their log file validation setting:
aws cloudtrail describe-trails --region <REGION> --query "trailList[].[Name,HomeRegion,IsMultiRegionTrail,LogFileValidationEnabled]" --output table
A trail fails if LogFileValidationEnabled is False.
Implementation Steps
Console:
Sign in to the AWS Management Console at https://console.aws.amazon.com.
Open the CloudTrail console and select Trails in the left menu.
Select the trail and, in the General details section, choose Edit.
Under Additional settings, select Log file validation (Enabled).
Choose Save changes.
Repeat for each affected trail in each region in use.
CLI:
Enable log file validation on the trail:
aws cloudtrail update-trail --name <TRAIL_NAME> --region <HOME_REGION> --enable-log-file-validation
Backout Plan
Sign in to the AWS Management Console at https://console.aws.amazon.com.
Open the CloudTrail console and select the trail.
In the General details section, choose Edit.
Clear Log file validation.
Choose Save changes.
CLI:
aws cloudtrail update-trail --name <TRAIL_NAME> --region <HOME_REGION> --no-enable-log-file-validation
Note: while validation is disabled, changes to newly delivered log files cannot be detected.
Reference