Discover AWS Organization ID via S3 Bucket
Discover AWS Organization IDs by exploiting limited S3 bucket access. Using an automated approach, this lab demonstrates how to efficiently identify org IDs in just 360 attempts instead of brute-forcing 3.66 quadrillion combinations.
- 7 guided tasks
- Capture the flag
- Video walkthrough

Scenario
In the prior lab, we used an S3 bucket to uncover an AWS account ID. Now, we'll leverage a similar but different technique to enumerate the AWS Organization ID associated with that bucket.
This is going to be fun, so grab yourself a coffee or tea and let's get started.
In this scenario, we're conducting a basic penetration test for a client who has provided IAM User credentials via an access key. This simulates stolen long-term credentials, a common source of AWS breaches. After completing basic enumeration from prior labs in this course, you successfully discovered an IAM Role that appears to have access to an Amazon S3 bucket, but the S3 bucket seems is in a different AWS account. You already figured out which AWS account it belongs to from the prior lab, but now you want to know the AWS Organization ID.
What you will learn
- Install and set up the conditional-love tool in a Python virtual environment.
- Enumerate an IAM role and read its policy to find the target S3 bucket.
- Assume the role and run conditional-love to guess an AWS Organization ID one character at a time.
- Read the CloudTrail log entries this technique leaves behind.
- Explain why testing one character at a time makes guessing the Organization ID practical.
Discover AWS Organization ID via S3 Bucket
Free with a Cybr account.