Unauthenticated enumeration of services, roles, and users in an AWS account or in every AWS account in existence.

Overview

Quiet Riot

🎶 C'mon, Feel The Noise 🎶

An enumeration tool for scalable, unauthenticated validation of AWS principals; including AWS Acccount IDs, root e-mail addresses, users, and roles.

Credit: Daniel Grzelak @dagrz for identifying the technique and Will Bengston @__muscles for inspiring me to scale it.

See the introductory blog post here See a defender's perspective blog post here

Featureploitation Limits

Throttling

After performing extensive analysis of scaling methods using the AWS Python (Boto3) SDK, I was able to determine that the bottleneck for scanning (at least for Python and awscli -based tools) is I/O capacity of a single-threaded Python application. After modifying the program to run with multiple threads, I was able to trigger exceptions in individual threads due to throttling by the various AWS APIs. You can see the results from running a few benchmarking test scans here. APIs that I tested had wildly different throttling limits and notably, s3 bucket policy attempts took ~10x as long as similar attempts against other services.

With further testing, I settled on a combination of SNS, ECR-Public, and ECR-Private services running in US-East-1 in ~40%/50%/10% configuration split with ~700 threads. The machine I used was a 2020 Macbook Air (M1 and 16 GB RAM). This configuration yielded on average ~1100 calls/sec, though the actual number of calls can fluctuate significantly depending on a variety of factors including network connectivity. Under these configurations, I did occasionally throw an exception on a thread from throttling...but I have subsequently configured additional re-try attempts (4 -> 7) via botocore that will eliminate this issue with a minor performance trade-off.

Computational Difficulty

To attempt every possible Account ID in AWS (1,000,000,000,000) would require an infeasible amount of time given only one account. Even assuming absolute efficiency*, over the course of a day an attacker will only be able to make 95,040,000 validation checks. Over 30 days, this is 2,851,200,000 validation checks and we are still over 28 years away from enumerating every valid AWS Account ID. Fortunately, there is nothing stopping us from registering many AWS accounts and automating this scan. While there is an initial limit of 20 accounts per AWS organization, I was able to get this limit increased for my Organization via console self-service and approval from an AWS representative. The approval occured without any further questions and now I'm off to automating this writ large. Again, assuming absolute efficiency, the 28 years scanning could potentially be reduced down to ~100 days.

*~1100 API calls/check per second in perpetuity per account and never repeating a guessed Account ID.

Potential Supported Services

# AWS Service Description API Limits Resource Pricing Enumeration Capability
1 SNS Managed Serverless Notification Service Unknown Unknown Yes
2 KMS Encryption Key Management Service Unknown Unknown Yes
3 SecretsManager Managed Secret Store Unknown Unknown Yes
4 CodeArtifact Managed Source Code Repository Unknown Unknown Yes
5 ECR Public Managed Container Registry Unknown Unknown Yes
6 ECR Private Managed Container Registry Unknown Unknown Yes
7 Lambda Managed Serverless Function Unknown Unknown Yes
8 s3 Managed Serverless Object Store Unknown Unknown Yes
9 SES SMTP Automation Service Unknown Unknown Unknown
10 ACM Private Certificate Authority Unknown Unknown Unknown
11 CodeBuild Software Build Agent Unknown Unknown Unknown
12 AWS Backup Managed Backup Service Unknown Unknown Unknown
13 Cloud9 Managed IDE Unknown Unknown Unknown
14 Glue Managed ETL Job Service Unknown Unknown Unknown
15 EKS Managed K8s Service Unknown Unknown Unknown
16 Lex V2 Managed NLP Service Unknown Unknown Unknown
17 CloudWatch Logs Managed Log Pipeline/Monitoring Unknown Unknown Unknown
18 VPC Endpoints Managed Virtual Network Unknown Unknown Unknown
19 Elemental MediaStore Unknown Unknown Unknown Unknown
20 OpenSearch Managed ElasticSearch Unknown Unknown Unknown
21 EventBridge Managed Serverless Event Hub Unknown Unknown Unknown
22 EventBridge Schemas Managed Serverless Event Hub Unknown Unknown Unknown
23 IoT Internet-of-Things Management Unknown Unknown Unknown
24 s3 Glacier Cold Object Storage Unknown Unknown Unknown
25 ECS Managed Container Orchestration Unknown Unknown Unknown
26 Serverless Application Repository Managed Source Code Repository Unknown Unknown No
27 SQS Managed Serverless Queueing Service Unknown Unknown No
28 EFS Managed Serverless Elastic File System Unknown Unknown No

Getting Started With Quiet Riot

To get started with Quiet Riot, clone the repository to your local directory. You'll need boto3 and AWS cli tools installed. You'll need credentials configured with sufficient privileges in an AWS account to deploy the resources (SNS topic, ECR-Public repository, and ECR-Private repository). Then you just run ./main.py and follow the prompts.

If you want to footprint the services in-use (or previously in use) for a specific account, select footprint. It will automatically leverage a wordlist composed of service-linked roles that indicate a particular service is or has been in use in an account.

If you want to help identify valid Account IDs, you can select accounts and it will automatically generate a wordlist of random Account IDs of arbitrary (user-selected) size. Please consider making a pull request against the repository to include newly identified valid account IDs under wordlists/known_valid_account_ids.txt. I have collected <100k Account IDs and estimate there are between 50-60m Account IDs based on random sampling analysis.

Otherwise, you will want to use your own wordlist as a dictionary to guess User names or Role names for a specific account. If you don't bring your own wordlists, I recommend starting with SecLists Usernames.

Prerequisites

boto3/botocore
Sufficient AWS credentials configured via CLI

You might also like...
A Discord BOT that uses Google Sheets for storing the roles and permissions of a discord server.

Discord Role Manager Bot Role Manager is a discord BOT that utilizes Google Sheets for the organization of a server's hierarchy and permissions. Detai

AWSXenos will list all the trust relationships in all the IAM roles and S3 buckets
AWSXenos will list all the trust relationships in all the IAM roles and S3 buckets

AWS External Account Scanner Xenos, is Greek for stranger. AWSXenos will list all the trust relationships in all the IAM roles, and S3 buckets, in an

A minimalistic, modern Discord bot for roles and polls using dropdowns
A minimalistic, modern Discord bot for roles and polls using dropdowns

DropBot A minimalistic, modern Discord bot for roles and polls using dropdowns Made by ThatOneCalculator Technologies used Instructions Type /, and na

Discovery is an open-source Discord Bot with the main features Tickets, Moderation, Giveaways and Reaction roles.

Discovery is an open-source Discord Bot with the main features Tickets, Moderation, Giveaways and Reaction roles.

Compares and analyzes GCP IAM roles.

gcp-iam-analyzer I wrote this to help in my day to day working in GCP. A lot of the time I am doing role comparisons to see which role has more permis

This is a simple program that uses Python and pyTwitchAPI to retrieve the list of users in a streamer's chat and then checks each one of these users to see if they follow the broadcaster or not

This is a simple program that uses Python and pyTwitchAPI to retrieve the list of users in a streamer's chat and then checks each one of these users to see if they follow the broadcaster or not

A discord bot written in discord.py to manage custom roles assigned to boosters of your server.

BBotty A discord bot written in discord.py to manage custom roles assigned to boosters of your server. v0.0.1-alpha released! This version is incomple

Discord bot that manages expiration of roles with subscriptions!

Discord bot that manages expiration of roles with subscriptions!

A solution designed to extract, transform and load Chicago crime data from an RDS instance to other services in AWS.

This project is intended to implement a solution designed to extract, transform and load Chicago crime data from an RDS instance to other services in AWS.

Comments
  • Initial uplift work

    Initial uplift work

    Moved to using Python click. We are putting this in the staging branch so we can migrate all the stuff over from main to here, with an initial focus on the enum and global_enum commands, and updating the backend logic to reflect the current updates from main branch.

    opened by kmcquade 1
  • Fix/pytest failures due to unsorted list

    Fix/pytest failures due to unsorted list

    Pytest was failing because the wordlist was from an unsorted set. Rather than sorting the wordlist (which would take a long time for large data sets), I decided to verify the list contents differently. Now the tests pass.

    opened by kmcquade 0
  • Add Terraform for integration testing

    Add Terraform for integration testing

    This Terraform populates an AWS Account that has all the different IAM resources that we enumerate for, and nothing else. It will have all the SLRs that we check for, some dummy users, and other stuff.

    We can use these for integration tests. Since AWS Account IDs are clearly no longer sensitive, the account ID that we use is: 227156886084.

    opened by kmcquade 0
Owner
Wes Ladd
Cloud Security Architect
Wes Ladd
DIAL(Did I Alert Lambda?) is a centralised security misconfiguration detection framework which completely runs on AWS Managed services like AWS API Gateway, AWS Event Bridge & AWS Lambda

DIAL(Did I Alert Lambda?) is a centralised security misconfiguration detection framework which completely runs on AWS Managed services like AWS API Gateway, AWS Event Bridge & AWS Lambda

CRED 71 Dec 29, 2022
Create a Neo4J graph of users and roles trust policies within an AWS Organization.

AWS_ORG_MAPPER This tool uses sso-oidc to authenticate to the AWS organization. Once authenticated the tool will attempt to enumerate all users and ro

Ruse 24 Jul 28, 2022
This Server Cloner can clone the server you want with all the perms of roles in every particular channel.

Server-Cloner-with-perms ?? This Server Cloner can clone the server you want with all the perms of roles in every particular channel. Features Clone C

Gripz 0 Feb 17, 2022
Automated AWS account hardening with AWS Control Tower and AWS Step Functions

Automate activities in Control Tower provisioned AWS accounts Table of contents Introduction Architecture Prerequisites Tools and services Usage Clean

AWS Samples 20 Dec 7, 2022
Roblox-Account-Gen - A simple account generator not using paid solving services

Roblox Account Generator Star this if it helped to spread awareness! No 2captcha

x 1 Feb 17, 2022
AWS Enumeration and Footprinting Tool

Quiet Riot ?? C'mon, Feel The Noise ?? An enumeration tool for scalable, unauthenticated validation of AWS principals; including AWS Acccount IDs, roo

Wes Ladd 89 Jan 5, 2023
Automatically compile an AWS Service Control Policy that ONLY allows AWS services that are compliant with your preferred compliance frameworks.

aws-allowlister Automatically compile an AWS Service Control Policy that ONLY allows AWS services that are compliant with your preferred compliance fr

Salesforce 189 Dec 8, 2022
An simple python script for remove rockstar account for fivem, very useful for cheating or change account for unban from an server, remember change steam account.

This tool is used for be unbanned from servers, u need disconnect the discord, use other steam account and uninstall xbox for be unbanned 100%, it only work for unban in server, not global

MiguDEV 4 Oct 10, 2022
Implement backup and recovery with AWS Backup across your AWS Organizations using a CI/CD pipeline (AWS CodePipeline).

Backup and Recovery with AWS Backup This repository provides you with a management and deployment solution for implementing Backup and Recovery with A

AWS Samples 8 Nov 22, 2022