FlAWS Part 1
The write-up covers three AWS S3 misconfigurations: a publicly listable bucket, a bucket readable by any authenticated AWS user, and a bucket containing a .git directory whose history exposed AWS access keys. An attacker could use these to enumerate and download bucket contents and, in the third case, obtain credentials to access other buckets in the account.
Published on systemweakness.com
FLAWS is a fun series of CTF challenges. It focuses on how AWS misconfigured services might lead to a breach.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely overly permissive S3 bucket policies (public list/read, or read for any authenticated AWS user) and a leaked .git directory containing credentials in commit history.
Impact
An attacker could list and download bucket contents, and in the third level use leaked AWS keys to access other buckets in the account.
What the attacker needed
A free AWS account for level 2; none for level 1 and 3
The fix
Bucket permissions should be restricted so that listing and reading are not open to everyone or any authenticated AWS user, and leaked keys should be revoked.
How it was found
- Perform reverse DNS lookup to find the domain and confirm S3 hosting and region.
- List the S3 bucket without credentials using the no-sign-request option.
- Download the bucket contents and open the secret HTML file to find the next level link.
- Create an AWS free tier account and an IAM user, then configure credentials in the CLI.
- List the bucket using the IAM user's profile to access the secret file.
- Download the bucket containing a .git directory, inspect commit history, and compare commits to recover removed credentials.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is a walkthrough of a practice challenge about cloud storage. It shows how a storage bucket (a folder in the cloud) can be left open so anyone can list and download its files, or so any person with a cloud account can read it. In one level, old versions of files kept in a hidden history folder revealed secret login keys.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.