More Info:
Your trails should have file integrity validation feature enabled in order to check the log files and detect whether these were modified or deleted after CloudTrail agent delivered them to the S3 bucket.Risk Level
MediumAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS AWS
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- Essential 8
- GDPR
- HIPAA
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- StateRAMP
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate the misconfiguration “File Integrity Validation Feature Should Be Enabled For Trails” for AWS using AWS console, follow these steps:
- Login to the AWS Management Console.
- Go to the CloudTrail service.
- Select the trail for which you want to enable file integrity validation.
- Click on the “Edit” button in the “Trail details” section.
- In the “Advanced” section, enable the “Enable log file integrity validation” option.
- Click on the “Save” button to save the changes.
Using CLI
Using CLI
To remediate the misconfiguration “File Integrity Validation Feature Should Be Enabled For Trails” for AWS using AWS CLI, follow the steps below:Make sure to replace This will return a JSON object that includes the configuration settings for the specified trail. Look for the
- Open the AWS CLI on your local machine.
- Run the following command to enable the file integrity validation feature for trails:
<trail-name> with the name of the trail you want to enable the feature for.- Verify that the file integrity validation feature has been enabled by running the following command:
LogFileValidationEnabled property and make sure it is set to true.- Repeat these steps for any other trails that need the file integrity validation feature enabled.
Using Python
Using Python
To remediate the misconfiguration “File Integrity Validation Feature Should Be Enabled For Trails” in AWS, you can follow these steps using Python:
- Import the required AWS SDK libraries:
- Create an AWS CloudTrail client object:
- Get a list of all the existing trails:
- For each trail, check if the “LogFileValidationEnabled” parameter is set to true:
- The script will loop through all the trails and enable file integrity validation for any trail where it is not already enabled.
Using Terraform
Using Terraform
aws cloudtrail update-trail --enable-log-file-validation.This change does not force replacement of the trail; it updates it in place.To verify, terraform plan should show enable_log_file_validation changing from false (or null) to true on the aws_cloudtrail.THIS_TRAIL resource.
