Skip to main content

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

  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iam_principal_enumerator-0.1.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iam_principal_enumerator-0.1.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file iam_principal_enumerator-0.1.1.tar.gz.

File metadata

  • Download URL: iam_principal_enumerator-0.1.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.12.3 Darwin/24.2.0

File hashes

Hashes for iam_principal_enumerator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a846611981d78b759270d3e447f1366bb5cb591226a25d066ffc5b48e24167cc
MD5 2774b88c053d0e8ac3f95e43ebb4dc5b
BLAKE2b-256 e2e75aea774f7b985852b0376a6668d4431696a4b1a55b238c550f54c89a147e

See more details on using hashes here.

File details

Details for the file iam_principal_enumerator-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for iam_principal_enumerator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8b980bc94181aa032402417e6e3a6bb1fc8f740683a09c554a677b9efcf95aa7
MD5 42edb8b3c2138b6407e4ab21786e6753
BLAKE2b-256 74545a00f80bdb8b7c7e7f3e434f526e60cfe38a85992363988f6f044fb9e0db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page