More Info:
S3 buckets should have default encryption (SSE) enabled or use a bucket policy to enforce it. S3 default encryption will enable Amazon to encrypt your S3 data at the bucket level instead of object level in order to protect it from attackers or unauthorized personnel.Risk Level
HighAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- AWS Well Architected Framework
- 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)
- 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 CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- Reserve Bank of India (RBI) Cyber Security Framework
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Sure, here are the step-by-step instructions to remediate the misconfiguration of S3 Buckets not having default encryption enabled in AWS:
- Log in to the AWS Management Console.
- Go to the S3 service dashboard.
- Click on the bucket for which you want to enable default encryption.
- Click on the “Properties” tab.
- Scroll down to the “Default encryption” section and click on “Edit”.
- Select “AES-256” or “AWS-KMS” as the default encryption option.
- If you choose “AWS-KMS”, select the KMS key that you want to use for encryption.
- Click on the “Save” button to save the changes.
Using CLI
Using CLI
To remediate the misconfiguration of S3 Buckets not having default encryption enabled in AWS, you can follow the below steps using AWS CLI:
- Open the AWS CLI on your system.
-
Check if the S3 bucket has default encryption enabled or not using the following command:
-
If the response shows that default encryption is not enabled, then you can enable it using the following command:
This command will enable default encryption for the specified S3 bucket using AES256 encryption.
-
Verify that default encryption is enabled on the S3 bucket using the following command:
The response should show that default encryption is enabled on the S3 bucket.
Using Python
Using Python
To remediate the misconfiguration of S3 buckets not having default encryption enabled in AWS using Python, you can follow these steps:
- Install the AWS SDK for Python (Boto3) using pip:
- Configure AWS credentials using the AWS CLI or by setting environment variables.
- Write a Python script to enable default encryption for all S3 buckets in your AWS account:
- Run the Python script to enable default encryption for all S3 buckets in your AWS account.
Using Terraform
Using Terraform
terraform plan should show creation (or update) of aws_s3_bucket_server_side_encryption_configuration.THIS_BUCKET_ENCRYPTION with sse_algorithm = "AES256" and no replace of the bucket.
