| name | cis-aws-compute-5.9 |
| description | Ensure that your Lightsail buckets are not publicly accessible |
| category | cis-compute |
| version | 1.1.0 |
| author | cyberstrike-official |
| tags | ["cis","aws","compute","lightsail","buckets","public-access","permissions","storage"] |
| cis_id | 5.9 |
| cis_benchmark | CIS AWS Compute Services Benchmark v1.1.0 |
| tech_stack | ["aws"] |
| cwe_ids | [] |
| chains_with | ["cis-aws-compute-5.7","cis-aws-compute-5.8","cis-aws-compute-5.10"] |
| prerequisites | [] |
| severity_boost | {} |
5.9 Ensure that your Lightsail buckets are not publicly accessible (Manual)
Description
You can make all objects private, public (read-only) or private while making individual objects public (read-only). By default when creating a bucket the permissions are set to "All objects are private".
Rationale
When the Bucket access permissions are set to All objects are public (read-only) - All objects in the bucket are readable by anyone on the internet through the URL of the bucket.
Impact
N/A
Audit Procedure
Using AWS Console
- Login to AWS Console using https://console.aws.amazon.com
- Click
All services, click Lightsail under Compute.
- This will open up the Lightsail console.
- Select
Storage.
- All Lightsail buckets are listed here.
- Underneath the bucket name and size there are 3 possible statements:
All objects are private
All objects are public (read-Only)
Individual objects can be public
- If any buckets are set to
All objects are public (read-Only) and or 'Individual objects can be public' refer to the remediation below.
Using AWS CLI
- Run
aws lightsail get-buckets
aws lightsail get-buckets
This command will provide a list of Buckets tied to Lightsail.
- Review the accessRules, getobject and allowPublicOverrides.
"accessRules": {
"getObject": "private",
"allowPublicOverrides": false
}
- If it reads "getObject": "public" or "allowPublicOverrides": true please make note "name" of the bucket also listed in the output.
- Then refer to the remediation below.
Expected Result
All Lightsail buckets should have access rules set to "getObject": "private" and , meaning all objects are private.