Beginner Friendly
![]()
S3 Bucket Brute Force to Breach
This beginner-friendly lab teaches how predictable S3 bucket naming conventions can expose sensitive data and enable a full cloud attack chain. Starting from one known bucket, you brute force additional buckets, recover leaked AWS keys, retrieve a secret from SSM Parameter Store, and finally invoke a Lambda function that returns crew PII.
Overview
This beginner-friendly lab teaches how predictable S3 bucket naming conventions can expose sensitive data and enable a full cloud attack chain. Starting from one known bucket, you brute force additional buckets, recover leaked AWS keys, retrieve a secret from SSM Parameter Store, and finally invoke a Lambda function that returns crew PII.
Scenario
Huge Logistics has hired you to evaluate their cloud security after a preliminary scan revealed an S3 bucket named hlogistics-web. Your mission is to use the naming convention to find other buckets and pivot to further cloud services.
Lab prerequisites
- Basic Linux command line knowledge
- AWS CLI installed
- Provided starting S3 bucket name
Learning outcomes
- Confirm bucket existence and region using a curl request
- Brute force S3 bucket names across regions with the ffuf fuzzer and wordlists
- Enumerate and download bucket contents anonymously using the AWS CLI no-sign-request flag
- Recover hardcoded AWS keys from a leaked Python file
- Enumerate IAM user policies and read the SSM parameter secret with GetParameter
- Enumerate permissions with aws-enumerator and pivot between IAM users
- List and invoke a Lambda function to exfiltrate crew PII
Real-world context
S3 bucket names are globally unique and often predictably named to company standards, so misconfigured buckets have repeatedly led to large data exposures and have driven a whole class of bucket discovery automation.
KEY TAKEAWAY
S3 bucket names are global and predictable. Organizations name them from the company, environment and application, so discovery is a wordlist exercise rather than an intrusion, and obscurity provides no meaningful protection.
What this lab covers
You generate and test candidate bucket names against a target's naming convention, find storage that should not have been reachable, and follow what it contains into the account's parameter store and identity layer.
The chain is short and realistic. A discovered bucket rarely holds the prize itself, and what it usually holds is the credential or configuration detail that leads to the prize.
It assumes no prior AWS experience and is a good companion to the S3 enumeration basics lab.
How bucket brute forcing works
Bucket names occupy a single global namespace, so any name either exists or does not, and that can be tested from anywhere without credentials. Existence, listability and readability are three separate results, and each is informative.
Candidate generation is where the effort goes and it is not difficult. Organizations name buckets from a small vocabulary: company name, product names, environment identifiers, and function words such as backup, logs, assets and static. Combining these produces a list that is small enough to test exhaustively.
What follows depends on contents. Parameter Store is a frequent next step because configuration discovered in a bucket often references parameters, and Parameter Store holds exactly the kind of secret that widens access. Whether it can be read is decided by the identity, which is why the chain typically runs storage to configuration to credential to identity.
How to detect this in your own environment
Anonymous requests are not visible without S3 server access logging or data events, neither of which is on by default. This is the most common reason organizations learn about bucket exposure from an outsider.
Where logging is enabled, high volumes of not-found responses are the signature of name guessing, and failures are more informative than successes here.
Alert on Parameter Store reads by identities that do not normally perform them, and particularly on bulk retrieval of parameters, which is not how applications behave.
How to prevent it
Enable account-level block public access, which overrides bucket policies and access control lists and is the control that holds when a permission is granted carelessly.
Avoid predictable names for anything sensitive. This is not a control on its own and it meaningfully raises the cost of discovery when combined with correct permissions.
Use SecureString parameters with restricted access in Parameter Store and scope read permissions per parameter path, so a single identity cannot retrieve everything the account stores.
Real-world context
Bucket enumeration is a standard step in external cloud assessment and is run continuously at internet scale by automated tooling. Exposed storage is generally found within a short period regardless of how obscure the name is.
The chain through configuration to secrets is what makes discovery consequential. A bucket holding only public assets is uninteresting, and a bucket holding a deployment configuration file frequently is not.
The pattern maps to MITRE ATT&CK T1580 Cloud Infrastructure Discovery, T1530 Data from Cloud Storage Object and T1552 Unsecured Credentials.
Applying this at work
- Run your own naming convention through a bucket enumeration tool and see what a stranger would find.
- Enable account-level block public access everywhere it is not a documented exception.
- Turn on S3 data events or server access logging for buckets holding anything sensitive.
- Review who can read Parameter Store paths, and scope permissions per path rather than account-wide.
- Check whether any bucket contains configuration files referencing internal systems or parameters.
Frequently asked questions
How are S3 bucket names guessed?
By combining company names, product names, environment identifiers and function words such as backup, logs and assets. The resulting list is small enough to test exhaustively, and the global namespace confirms existence instantly.
Does an obscure bucket name protect data?
Not meaningfully. Automated scanning runs continuously and names are often referenced in an organization's own web content. Naming is a cost increase, not a control, and permissions are what actually protect the data.
Why does Parameter Store feature in this chain?
Because configuration discovered in storage frequently references parameters, and Parameter Store holds secrets. Whether they can be read depends on the identity, which is why bucket discovery so often leads to a credential.
Do I need my own AWS account to practice this?
No. The lab runs in a live AWS environment that Pwned Labs provisions for you, so there is nothing to set up and no risk to your own infrastructure.
Which certification covers this in depth?
The Amazon Cloud Red Team Professional (ACRTP) covers AWS attack and detection paths in full, including IAM abuse and privilege escalation, and is assessed hands-on in a live AWS account.
Cloud Security Training To Protect Your Business
Pwned Labs for Business gives your team access to dedicated business content, including labs and cyber ranges.
We also offer in-person or remote workshops, and our cloud penetration services are helping businesses become more secure!