AWS - Enumerate
contents
Collectors#
nccgroup/ScoutSuite - Multi-Cloud Security Auditing Tool
$ python scout.py PROVIDER --help# The --session-token is optional and only used for temporary credentials (i.e. role assumption).$ python scout.py aws --access-keys --access-key-id <AKIAIOSFODNN7EXAMPLE> --secret-access-key <wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY> --session-token <token>$ python scout.py azure --cliRhinoSecurityLabs/pacu - Exploit configuration flaws within an AWS environment using an extensible collection of modules with a diverse feature-set
$ bash install.sh$ python3 pacu.pyset_keys/swap_keysrun <module_name> [--keyword-arguments]run <module_name> --regions eu-west-1,us-west-1salesforce/cloudsplaining - An AWS IAM Security Assessment tool that identifies violations of least privilege and generates a risk-prioritized report
pip3 install --user cloudsplainingcloudsplaining download --profile myawsprofilecloudsplaining scan --input-file default.jsonduo-labs/cloudmapper - CloudMapper helps you analyze your Amazon Web Services (AWS) environments
sudo apt-get install autoconf automake libtool python3.7-dev python3-tk jq awscli build-essentialpipenv install --skip-lockpipenv shellreport: Generate HTML report. Includes summary of the accounts and audit findings.iam_report: Generate HTML report for the IAM information of an account.audit: Check for potential misconfigurations.collect: Collect metadata about an account.find_admins: Look at IAM policies to identify admin users and roles, or principals with specific privilegescyberark/SkyArk - Discover the most privileged users in the scanned AWS environment, including the AWS Shadow Admins
$ powershell -ExecutionPolicy Bypass -NoProfilePS C> Import-Module .\SkyArk.ps1 -forcePS C> Start-AWStealthPS C> Scan-AWShadowAdminsBishopFox/CloudFox - Automating situational awareness for cloud penetration tests. Designed for white box enumeration (SecurityAudit/ReadOnly type permission), but can be used for black box (found credentials) as well.
cloudfox aws --profile [profile-name] all-checkstoniblyx/Prowler - AWS security best practices assessments, audits, incident response, continuous monitoring, hardening and forensics readiness. It follows guidelines of the CIS Amazon Web Services Foundations Benchmark and DOZENS of additional checks including GDPR and HIPAA (+100).
pip install awscli ansi2html detect-secretssudo apt install jq./prowler -E check42,check43./prowler -p custom-profile -r us-east-1 -c check11./prowler -A 123456789012 -R ProwlerRolenccgroup/PMapper - A tool for quickly evaluating IAM permissions in AWS
pip install principalmapperpmapper graph --createpmapper visualize --filetype pngpmapper analysis --output-type text# Determine if PowerUser can escalate privilegespmapper query "preset privesc user/PowerUser"pmapper argquery --principal user/PowerUser --preset privesc# Find all principals that can escalate privilegespmapper query "preset privesc *"pmapper argquery --principal '*' --preset privesc# Find all principals that PowerUser can accesspmapper query "preset connected user/PowerUser *"pmapper argquery --principal user/PowerUser --resource '*' --preset connected# Find all principals that can access PowerUserpmapper query "preset connected * user/PowerUser"pmapper argquery --principal '*' --resource user/PowerUser --preset connected
AWS - Enumerate IAM permissions#
Enumerate the permissions associated with AWS credential set with andresriancho/enumerate-iam
git clone git@github.com:andresriancho/enumerate-iam.gitpip install -r requirements.txt./enumerate-iam.py --access-key AKIA... --secret-key StF0q...2019-05-10 15:57:58,447 - 21345 - [INFO] Starting permission enumeration for access-key-id "AKIA..."2019-05-10 15:58:01,532 - 21345 - [INFO] Run for the hills, get_account_authorization_details worked!2019-05-10 15:58:01,537 - 21345 - [INFO] -- { "RoleDetailList": [ { "Tags": [], "AssumeRolePolicyDocument": { "Version": "2008-10-17", "Statement": [ {...2019-05-10 15:58:26,709 - 21345 - [INFO] -- gamelift.list_builds() worked!2019-05-10 15:58:26,850 - 21345 - [INFO] -- cloudformation.list_stack_sets() worked!2019-05-10 15:58:26,982 - 21345 - [INFO] -- directconnect.describe_locations() worked!2019-05-10 15:58:27,021 - 21345 - [INFO] -- gamelift.describe_matchmaking_rule_sets() worked!2019-05-10 15:58:27,311 - 21345 - [INFO] -- sqs.list_queues() worked!