Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: S3 Buckets Should Prohibit Public Write Access

This rule ensures that S3 buckets disallow public write access.

RuleS3 buckets should prohibit public write access
FrameworkNIST 800-53 Revision 5
Severity
High

Rule Description:

According to the NIST 800-53 Revision 5 security standard, S3 buckets should prohibit public write access. This rule ensures that only authorized users have the ability to modify the contents of S3 buckets, preventing potential unauthorized modifications or data breaches.

Remediation Steps:

To remediate this rule, you need to configure the S3 bucket settings to prohibit public write access. Follow the step-by-step guide below for the necessary CLI commands:

Step 1: Identify the S3 Bucket

Identify the S3 bucket that needs to be modified to prohibit public write access.

Step 2: List Bucket Policy

To examine the current bucket policy, use the following CLI command:

aws s3api get-bucket-policy --bucket <bucket_name>

Step 3: Review Bucket Policy

Review the output of the above command to ensure that there are no public write access permissions defined in the bucket policy. Look for any "PutObject" or "Put*" actions that allow public access.

Step 4: Remove Public Write Access Permissions

If any public write access permissions are found, remove them from the bucket policy. Use the following CLI command to update the bucket policy:

aws s3api put-bucket-policy --bucket <bucket_name> --policy <updated_bucket_policy>

Replace

<bucket_name>
with the actual name of your S3 bucket, and
<updated_bucket_policy>
with the modified bucket policy.

Step 5: Verify Changes

To ensure the bucket policy has been successfully updated, use the following CLI command:

aws s3api get-bucket-policy --bucket <bucket_name>

Review the output again and confirm that public write access permissions have been removed.

Troubleshooting Steps:

If you encounter any issues during the remediation process, consider the following troubleshooting steps:

1. Verify AWS CLI Configuration

Ensure that you have the necessary permissions and proper AWS CLI configuration to modify S3 bucket policies. Use the following command to check your AWS CLI configuration:

aws configure

Make sure the credentials and region are correctly set up.

2. Check Bucket Policy Syntax

If you receive an error while updating the bucket policy, double-check the syntax of the provided bucket policy. The policy should be properly formatted to be accepted by the CLI command.

3. Check IAM Permissions

Ensure that your IAM user or role has the necessary permissions to modify S3 bucket policies. Check the IAM policy attached to your user or role to confirm the required permissions are granted.

4. Review AWS S3 Documentation

If you are still facing issues, refer to the official AWS S3 documentation or contact AWS support for further assistance.

By following the above steps, you can successfully remediate the S3 buckets to prohibit public write access, meeting the requirements specified in NIST 800-53 Revision 5.

Is your System Free of Underlying Vulnerabilities?
Find Out Now