CLI application that performs unauthenticated IAM principal enumeration against a target AWS account.
Project description
IAM Principal Enumerator
CLI application that performs unauthenticated IAM principal enumeration against a target AWS account.
The application accepts a custom wordlist containing principal names, and uses these to check for the existence of IAM principals in a target AWS account by attempting to update the trust policy of an attacker-controlled IAM role with the ARN of an IAM principal (user or role) in the target AWS account.
The error message received when updating the trust policy will determine if the IAM princiapl exists in the target account or not.
Table of Contents
Installation
- Install the package using
pip:
pip install iam-principal-enumerator
Usage
To run the IAM Principal Enumerator, ensure your terminal session is authenticated to your own attacker-controlled AWS account, then use the following command:
iam-principal-enumerator <account_id> [options]
Options
usage: iam-principal-enumerator [-h] [-r ENUM_ROLE_NAME] [-w WORDLIST] account_id
Enumerate valid IAM principals in an AWS account.
positional arguments:
account_id The target AWS account ID
options:
-h, --help show this help message and exit
-r ENUM_ROLE_NAME, --enum-role-name ENUM_ROLE_NAME
The name of the IAM role used for enumeration. The role name will
be suffixed with an 8-character random string.
-w WORDLIST, --wordlist WORDLIST
Path to a wordlist to use when enumerating IAM principal names.
Examples
Enumerate IAM principals using the default role name and wordlist:
iam-principal-enumerator 123456789012
Enumerate IAM principals using a custom role name and wordlist:
iam-principal-enumerator 123456789012 -r CustomRole -w /path/to/wordlist.txt
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iam_principal_enumerator-0.1.0.tar.gz.
File metadata
- Download URL: iam_principal_enumerator-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.2 Linux/6.1.0-28-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
533e065c00c37a8f09597f8ca5480912fea55d6f3f1601105df63542476b8d81
|
|
| MD5 |
74bb90acf6d780684a82436286a1e320
|
|
| BLAKE2b-256 |
f2e58fb66f30e72cfa139b9dbe06bdd394281a454c0c686bb8211c450baacce5
|
File details
Details for the file iam_principal_enumerator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: iam_principal_enumerator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.2 Linux/6.1.0-28-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adb934283b543a3bf1502a998cd34e29ecfccb56c96e52028459b4547ad788f7
|
|
| MD5 |
35b5a2a748c46c0ee229193378ea074a
|
|
| BLAKE2b-256 |
d38da392735ac15534d53fe52b2eac06d8299c0e69a999912259f45e9e264046
|