Use the Conformity Knowledge Base AI to help improve your Cloud Posture

S3 Bucket Authenticated Users 'FULL_CONTROL' Access

Trend Micro Cloud One™ – Conformity is a continuous assurance tool that provides peace of mind for your cloud infrastructure, delivering over 750 automated best practice checks.

Risk Level: Very High (act immediately)
Rule ID: S3-010

Ensure that your Amazon S3 buckets are not granting FULL_CONTROL access to authenticated users (i.e. signed AWS accounts or IAM users) in order to prevent unauthorized access. An Amazon S3 bucket that allows full control access to authenticated users will give any AWS account or IAM user the ability to LIST (READ) objects, UPLOAD/DELETE (WRITE) objects, VIEW (READ_ACP) objects permissions, and EDIT (WRITE_ACP) permissions for the objects within the bucket. Trend Micro Cloud One™ – Conformity strongly recommends against setting all these permissions for the "Authenticated users group (anyone with an AWS account)" grantee in production.

This rule can help you with the following compliance standards:

  • PCI
  • APRA
  • MAS
  • NIST4

For further details on compliance standards supported by Conformity, see here.

This rule can help you work with the AWS Well-Architected Framework.

This rule resolution is part of the Conformity Security & Compliance tool for AWS.

Security

Granting authenticated FULL_CONTROL access to Amazon S3 buckets can allow other AWS accounts or IAM users to view, upload, modify, and delete S3 objects without any restrictions. Exposing your S3 buckets to other AWS signed accounts or IAM users can lead to data leaks, data loss, and unexpected charges on your AWS bill.


Audit

To determine if your Amazon S3 buckets allow full access to AWS authenticated users, perform the following operations:

Using AWS Console

01 Sign in to the AWS Management Console.

02 Navigate to Amazon S3 console at https://console.aws.amazon.com/s3/.

03 Click on the name of the S3 bucket that you want to examine to access the bucket configuration settings.

04 Select the Permissions tab from the console menu to access the bucket permissions.

05 In the Access control list (ACL) section, check the Access Control List (ACL) configuration settings available for the grantee labeled Authenticated users group (anyone with an AWS account). This grantee is a predefined group that allows anyone with an AWS account to access your Amazon S3 resources. If the Authenticated users group (anyone with an AWS account) grantee has all the permissions enabled, i.e. Objects set to List, Write, and Bucket ACL set to Read, Write, the selected Amazon S3 bucket is fully accessible to other AWS accounts and IAM users, therefore the bucket ACL configuration is not secure.

06 Repeat steps no. 3 – 5 for each Amazon S3 bucket that you want to examine, available in your AWS cloud account.

Using AWS CLI

01 Run list-buckets command (OSX/Linux/UNIX) using custom query filters to list the names of all Amazon S3 buckets available in your AWS cloud account:

aws s3api list-buckets
	--query 'Buckets[*].Name'

02 The command output should return an array with the requested bucket names:

[
    "cc-production-web-data",
    "cc-project5-audit-logs"
]

03 Run get-bucket-acl command (OSX/Linux/UNIX) using the name of the Amazon S3 bucket that you want to examine as the identifier parameter to describe the Access Control List (ACL) configuration set for the Authenticated users group (anyone with an AWS account) grantee, available for the selected S3 bucket:

aws s3api get-bucket-acl
  --bucket cc-production-web-data
  --query 'Grants[?(Grantee.URI==`http://acs.amazonaws.com/groups/global/AuthenticatedUsers`)]'

04 The command output should return the ACL configuration available for the Authenticated users group (anyone with an AWS account) grantee:

[
    {
        "Grantee": {
            "Type": "Group",
            "URI": "http://acs.amazonaws.com/groups/global/AuthenticatedUsers"
        },
        "Permission": "FULL_CONTROL"
    }
]

If the get-bucket-acl command output returns "FULL_CONTROL" for the "Permission" attribute, as shown in the example above, the selected Amazon S3 bucket is fully accessible to anyone with an AWS account, therefore the bucket ACL configuration is not secure.

05 Repeat steps no. 3 and 4 for each Amazon S3 bucket that you want to examine, available within your AWS cloud account.

Remediation / Resolution

To deny authenticated FULL_CONTROL access to your Amazon S3 buckets, perform the following operations:

Note: An S3 bucket can be deemed compliant if implements either "AccessControl": "Private" or sets the "PublicAccessBlockConfiguration" feature options to true. The following CloudFormation template uses both for added security.

Using AWS CloudFormation

01 CloudFormation template (JSON):

{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "S3 Bucket Authenticated 'FULL_CONTROL' Access",
  "Resources": {
    "SecureS3Bucket": {
      "Properties": {
        "AccessControl": "Private",
        "BucketName": "cc-production-web-data",
        "PublicAccessBlockConfiguration": {
          "BlockPublicAcls": true,
          "IgnorePublicAcls": true,
          "BlockPublicPolicy": true,
          "RestrictPublicBuckets": true
        }
      },
      "Type": "AWS::S3::Bucket"
    }
  }
}

02 CloudFormation template (YAML):

AWSTemplateFormatVersion: '2010-09-09'
Description: S3 Bucket Authenticated 'FULL_CONTROL' Access
Resources:
  SecureS3Bucket:
    Properties:
      AccessControl: Private
      BucketName: cc-production-web-data
      PublicAccessBlockConfiguration:
        BlockPublicAcls: true
        IgnorePublicAcls: true
        BlockPublicPolicy: true
        RestrictPublicBuckets: true
    Type: 'AWS::S3::Bucket'

Using Terraform (AWS Provider)

Note: An S3 bucket can be deemed compliant if implements either acl = "private" or sets the "aws_s3_bucket_public_access_block" feature options to true. The following Terraform configuration file uses both for added security.

01 Terraform configuration file (.tf):

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 3.27"
    }
  }

  required_version = ">= 0.14.9"
}

provider "aws" {
  profile = "default"
  region  = "us-east-1"
}

resource "aws_s3_bucket" "secure-bucket" {
  bucket = "cc-production-web-data"
  acl    = "private"
}

resource "aws_s3_bucket_public_access_block" "secure-bucket" {
  bucket = "cc-production-web-data"
  block_public_acls       = true
  ignore_public_acls      = true
  block_public_policy     = true
  restrict_public_buckets = true
}

Using AWS Console

01 Sign in to the AWS Management Console.

02 Navigate to Amazon S3 console at https://console.aws.amazon.com/s3/.

03 Click on the name of the S3 bucket that you want to reconfigure (see Audit section part I to identify the right resource).

04 Select the Permissions tab from the console menu to access the bucket permissions.

05 In the Access control list (ACL) section, choose Edit to modify the Access Control List (ACL) configuration available for the selected bucket.

06 Under Access control list (ACL), deselect all the permissions listed next to the Authenticated users group (anyone with an AWS account) grantee, i.e. List, Write from Objects and Read, Write from Bucket ACL, to deny authenticated FULL_CONTROL access to the selected Amazon S3 bucket. Select I understand the effects of these changes on my objects and buckets checkbox for confirmation, then choose Save changes to apply the changes.

07 Repeat steps no. 3 – 6 for each Amazon S3 bucket that allows authenticated FULL_CONTROL access, available in your AWS cloud account.

Using AWS CLI

01 Run get-bucket-acl command (OSX/Linux/UNIX) using the name of the Amazon S3 bucket that you want to reconfigure as the identifier parameter (see Audit section part II to identify the right S3 resource) to deny authenticated FULL_CONTROL access to the selected S3 bucket by removing the permissions set for the Authenticated users group (anyone with an AWS account) grantee. The following command request removes all the permissions, i.e. LIST (READ), UPLOAD/DELETE (WRITE), VIEW (READ_ACP), and EDIT (WRITE_ACP), from the Authenticated users group (anyone with an AWS account) grantee, for the specified S3 bucket (the command request should not produce an output):

aws s3api put-bucket-acl
  --bucket cc-production-web-data
  --acl private

02 Repeat step no. 1 for each Amazon S3 bucket that allows authenticated FULL_CONTROL access, available within your AWS cloud account.

References

Publication date May 13, 2016

Unlock the Remediation Steps


Free 30-day Trial

Automatically audit your configurations with Conformity
and gain access to our cloud security platform.

Confirmity Cloud Platform

No thanks, back to article

You are auditing:

S3 Bucket Authenticated Users 'FULL_CONTROL' Access

Risk Level: Very High