Performing AWS Account Enumeration with ScoutSuite
Overview
ScoutSuite is an open-source multi-cloud security auditing tool developed by NCC Group that enables comprehensive security posture assessment of AWS environments. It queries AWS APIs to gather configuration data across all services, stores results locally, and generates interactive HTML reports highlighting high-risk areas. ScoutSuite is agentless and works by analyzing how cloud resources are configured, accessed, and monitored.
When to Use
- When conducting security assessments that involve performing aws account enumeration with scout suite
- When following incident response procedures for related security events
- When performing scheduled security testing or auditing activities
- When validating security controls through hands-on testing
Most Often Missed & How to Confirm
- Silent permission gaps look like a clean account: when the running principal lacks an action, ScoutSuite skips that check rather than failing loudly. Grep the run log/console for
AccessDenied/UnauthorizedOperation before trusting a "good" result - missing iam:GenerateCredentialReport or s3:GetBucketPolicy produces false greens.
- Region scoping hides resources: passing
--regions us-east-1 misses opt-in regions and resources elsewhere. Run a full scout aws (all regions) at least once; remember IAM/S3 are global and surface under any region.
- Services not deeply covered: ScoutSuite won't surface secrets in Lambda env vars, SSM Parameter Store, ECR image exposure, or Secrets Manager resource policies - pair it with
cloudfox env-vars or manual aws ssm describe-parameters.
- S3 public-access nuance: a bucket can be flagged or cleared by ACL, bucket policy, or account-level Block Public Access independently. Corroborate any S3 finding with
aws s3api get-public-access-block (account and bucket) before concluding.
- Single-account tunnel vision: in an Organization, scan each member account with an assumed role (
--profile); one clean account says nothing about the others.
- How to confirm a real hit: open
scoutsuite-results/scoutsuite_results.json and look for flagged_items > 0 with level: "danger" (e.g., iam-root-no-mfa, s3-bucket-world-listable), then reproduce it with the matching aws CLI call.
- Don't conclude the account is secure until you've run all regions and services with no
AccessDenied in the log, validated danger findings via direct API calls, and scanned every account in the org.
Prerequisites
- Python 3.6+ installed
- AWS CLI configured with appropriate IAM credentials
- Read-only IAM permissions across target AWS services (SecurityAudit managed policy recommended)
- pip package manager for ScoutSuite installation
- Network access to AWS API endpoints
Installation and Setup
Install ScoutSuite
pip install scoutsuite
Verify installation
scout --version
Configure AWS credentials
aws configure
# Or use environment variables:
export AWS_ACCESS_KEY_ID=<your-key>
export AWS_SECRET_ACCESS_KEY=<your-secret>
export AWS_DEFAULT_REGION=us-east-1
Required IAM Policy
Attach the AWS managed policy SecurityAudit and ViewOnlyAccess to the IAM user or role running ScoutSuite. For comprehensive scanning, a custom policy may be needed:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"acm:Describe*",
"acm:List*",
"cloudformation:Describe*",
"cloudformation:Get*",
"cloudformation:List*",
"cloudtrail:Describe*",
"cloudtrail:Get*",
"cloudtrail:List*",
"cloudwatch:Describe*",
"cloudwatch:Get*",
"cloudwatch:List*",
"config:Describe*",
"config:Get*",
"config:List*",
"dynamodb:Describe*",
"dynamodb:List*",
"ec2:Describe*",
"ec2:Get*",
"elasticloadbalancing:Describe*",
"iam:Generate*",
"iam:Get*",
"iam:List*",
"iam:Simulate*",
"kms:Describe*",
"kms:Get*",
"kms:List*",
"lambda:Get*",
"lambda:List*",
"logs:Describe*",
"logs:Get*",
"rds:Describe*",
"rds:List*",
"redshift:Describe*",
"route53:Get*",
"route53:List*",
"s3:Get*",
"s3:List*",
"ses:Get*",
"ses:List*",
"sns:Get*",
"sns:List*",
"sqs:Get*",
"sqs:List*",
"ssm:Describe*",
"ssm:Get*",
"ssm:List*"
],
"Resource": "*"
}
]
}
Running ScoutSuite
Full AWS scan
scout aws
Scan specific services only
scout aws --services s3 iam ec2 rds
Scan specific regions
scout aws --regions us-east-1 us-west-2 eu-west-1
Use an assumed role for cross-account scanning
scout aws --profile target-account-profile
Exclude specific services from scan
scout aws --skip iam ec2
Specify output directory
scout aws --report-dir /tmp/scoutsuite-reports/
Report Analysis
ScoutSuite generates an interactive HTML report stored locally. The report includes:
- Dashboard: Overview of findings by severity (danger, warning, good)
- Service-level findings: Grouped by AWS service (IAM, S3, EC2, RDS, etc.)
- Rule-based checks: Each finding maps to a security best practice rule
- Resource inventory: Complete listing of enumerated resources
Key areas to review in the report
| Service |
Critical Checks |
| IAM |
Root account MFA, password policy, unused credentials, overprivileged policies |
| S3 |
Public buckets, unencrypted buckets, versioning disabled, logging disabled |
| EC2 |
Security groups with 0.0.0.0/0, unencrypted EBS volumes, public IPs |
| RDS |
Public accessibility, unencrypted databases, backup retention |
| CloudTrail |
Logging disabled, log file validation, multi-region disabled |
| Lambda |
Public access, environment variable secrets, VPC configuration |
Interpreting Findings
Severity Levels
- Danger (Red): Critical security issues requiring immediate remediation (e.g., S3 buckets with public write access)
- Warning (Orange): Moderate risk findings that should be addressed (e.g., unused IAM access keys)
- Good (Green): Security best practices that are properly configured
Common High-Risk Findings
- IAM root account without MFA: The AWS root account has no multi-factor authentication enabled
- S3 bucket policy allows public access: Bucket policies with Principal set to "*"
- Security group allows unrestricted SSH: Inbound rule allowing 0.0.0.0/0 on port 22
- CloudTrail not enabled in all regions: Audit logging gaps allow unmonitored API activity
- RDS instance publicly accessible: Database endpoints reachable from the internet
Remediation Workflow
- Run ScoutSuite scan to establish baseline
- Export findings and prioritize by severity
- Create remediation tickets for danger and warning findings
- Implement fixes (update security groups, enable encryption, restrict access)
- Re-run ScoutSuite to verify remediation
- Schedule regular scans (weekly or after infrastructure changes)
Integration with CI/CD
# Run ScoutSuite in CI/CD pipeline and fail on danger findings
scout aws --services s3 iam ec2 --no-browser --report-dir ./scout-report/
# Parse results programmatically
python -c "
import json
with open('./scout-report/scoutsuite-results/scoutsuite_results.json') as f:
results = json.load(f)
for service in results.get('services', {}):
findings = results['services'][service].get('findings', {})
for finding_id, finding in findings.items():
if finding.get('flagged_items', 0) > 0 and finding.get('level') == 'danger':
print(f'CRITICAL: {finding_id} - {finding.get(\"description\", \"\")}')
"
Multi-Cloud Capability
ScoutSuite supports multiple cloud providers using the same framework:
# Azure
scout azure --cli
# GCP
scout gcp --user-account
# AWS with specific profile
scout aws --profile production
References
1---2name: performing-aws-account-enumeration-with-scout-suite3description: Perform comprehensive security posture assessment of AWS accounts using ScoutSuite to enumerate resources, identify misconfigurations, and generate actionable security reports.4license: Apache-2.05---67# Performing AWS Account Enumeration with ScoutSuite89## Overview1011ScoutSuite is an open-source multi-cloud security auditing tool developed by NCC Group that enables comprehensive security posture assessment of AWS environments. It queries AWS APIs to gather configuration data across all services, stores results locally, and generates interactive HTML reports highlighting high-risk areas. ScoutSuite is agentless and works by analyzing how cloud resources are configured, accessed, and monitored.121314## When to Use1516- When conducting security assessments that involve performing aws account enumeration with scout suite17- When following incident response procedures for related security events18- When performing scheduled security testing or auditing activities19- When validating security controls through hands-on testing2021## Most Often Missed & How to Confirm2223- **Silent permission gaps look like a clean account:** when the running principal lacks an action, ScoutSuite skips that check rather than failing loudly. Grep the run log/console for `AccessDenied`/`UnauthorizedOperation` before trusting a "good" result - missing `iam:GenerateCredentialReport` or `s3:GetBucketPolicy` produces false greens.24- **Region scoping hides resources:** passing `--regions us-east-1` misses opt-in regions and resources elsewhere. Run a full `scout aws` (all regions) at least once; remember IAM/S3 are global and surface under any region.25- **Services not deeply covered:** ScoutSuite won't surface secrets in Lambda env vars, SSM Parameter Store, ECR image exposure, or Secrets Manager resource policies - pair it with `cloudfox env-vars` or manual `aws ssm describe-parameters`.26- **S3 public-access nuance:** a bucket can be flagged or cleared by ACL, bucket policy, or account-level Block Public Access independently. Corroborate any S3 finding with `aws s3api get-public-access-block` (account and bucket) before concluding.27- **Single-account tunnel vision:** in an Organization, scan each member account with an assumed role (`--profile`); one clean account says nothing about the others.28- **How to confirm a real hit:** open `scoutsuite-results/scoutsuite_results.json` and look for `flagged_items > 0` with `level: "danger"` (e.g., `iam-root-no-mfa`, `s3-bucket-world-listable`), then reproduce it with the matching `aws` CLI call.29- **Don't conclude the account is secure until** you've run all regions and services with no `AccessDenied` in the log, validated danger findings via direct API calls, and scanned every account in the org.3031## Prerequisites3233- Python 3.6+ installed34- AWS CLI configured with appropriate IAM credentials35- Read-only IAM permissions across target AWS services (SecurityAudit managed policy recommended)36- pip package manager for ScoutSuite installation37- Network access to AWS API endpoints3839## Installation and Setup4041### Install ScoutSuite4243```bash44pip install scoutsuite45```4647### Verify installation4849```bash50scout --version51```5253### Configure AWS credentials5455```bash56aws configure57# Or use environment variables:58export AWS_ACCESS_KEY_ID=<your-key>59export AWS_SECRET_ACCESS_KEY=<your-secret>60export AWS_DEFAULT_REGION=us-east-161```6263### Required IAM Policy6465Attach the AWS managed policy `SecurityAudit` and `ViewOnlyAccess` to the IAM user or role running ScoutSuite. For comprehensive scanning, a custom policy may be needed:6667```json68{69 "Version": "2012-10-17",70 "Statement": [71 {72 "Effect": "Allow",73 "Action": [74 "acm:Describe*",75 "acm:List*",76 "cloudformation:Describe*",77 "cloudformation:Get*",78 "cloudformation:List*",79 "cloudtrail:Describe*",80 "cloudtrail:Get*",81 "cloudtrail:List*",82 "cloudwatch:Describe*",83 "cloudwatch:Get*",84 "cloudwatch:List*",85 "config:Describe*",86 "config:Get*",87 "config:List*",88 "dynamodb:Describe*",89 "dynamodb:List*",90 "ec2:Describe*",91 "ec2:Get*",92 "elasticloadbalancing:Describe*",93 "iam:Generate*",94 "iam:Get*",95 "iam:List*",96 "iam:Simulate*",97 "kms:Describe*",98 "kms:Get*",99 "kms:List*",100 "lambda:Get*",101 "lambda:List*",102 "logs:Describe*",103 "logs:Get*",104 "rds:Describe*",105 "rds:List*",106 "redshift:Describe*",107 "route53:Get*",108 "route53:List*",109 "s3:Get*",110 "s3:List*",111 "ses:Get*",112 "ses:List*",113 "sns:Get*",114 "sns:List*",115 "sqs:Get*",116 "sqs:List*",117 "ssm:Describe*",118 "ssm:Get*",119 "ssm:List*"120 ],121 "Resource": "*"122 }123 ]124}125```126127## Running ScoutSuite128129### Full AWS scan130131```bash132scout aws133```134135### Scan specific services only136137```bash138scout aws --services s3 iam ec2 rds139```140141### Scan specific regions142143```bash144scout aws --regions us-east-1 us-west-2 eu-west-1145```146147### Use an assumed role for cross-account scanning148149```bash150scout aws --profile target-account-profile151```152153### Exclude specific services from scan154155```bash156scout aws --skip iam ec2157```158159### Specify output directory160161```bash162scout aws --report-dir /tmp/scoutsuite-reports/163```164165## Report Analysis166167ScoutSuite generates an interactive HTML report stored locally. The report includes:1681691. **Dashboard**: Overview of findings by severity (danger, warning, good)1702. **Service-level findings**: Grouped by AWS service (IAM, S3, EC2, RDS, etc.)1713. **Rule-based checks**: Each finding maps to a security best practice rule1724. **Resource inventory**: Complete listing of enumerated resources173174### Key areas to review in the report175176| Service | Critical Checks |177|---------|----------------|178| IAM | Root account MFA, password policy, unused credentials, overprivileged policies |179| S3 | Public buckets, unencrypted buckets, versioning disabled, logging disabled |180| EC2 | Security groups with 0.0.0.0/0, unencrypted EBS volumes, public IPs |181| RDS | Public accessibility, unencrypted databases, backup retention |182| CloudTrail | Logging disabled, log file validation, multi-region disabled |183| Lambda | Public access, environment variable secrets, VPC configuration |184185## Interpreting Findings186187### Severity Levels188189- **Danger (Red)**: Critical security issues requiring immediate remediation (e.g., S3 buckets with public write access)190- **Warning (Orange)**: Moderate risk findings that should be addressed (e.g., unused IAM access keys)191- **Good (Green)**: Security best practices that are properly configured192193### Common High-Risk Findings1941951. **IAM root account without MFA**: The AWS root account has no multi-factor authentication enabled1962. **S3 bucket policy allows public access**: Bucket policies with Principal set to "*"1973. **Security group allows unrestricted SSH**: Inbound rule allowing 0.0.0.0/0 on port 221984. **CloudTrail not enabled in all regions**: Audit logging gaps allow unmonitored API activity1995. **RDS instance publicly accessible**: Database endpoints reachable from the internet200201## Remediation Workflow2022031. Run ScoutSuite scan to establish baseline2042. Export findings and prioritize by severity2053. Create remediation tickets for danger and warning findings2064. Implement fixes (update security groups, enable encryption, restrict access)2075. Re-run ScoutSuite to verify remediation2086. Schedule regular scans (weekly or after infrastructure changes)209210## Integration with CI/CD211212```bash213# Run ScoutSuite in CI/CD pipeline and fail on danger findings214scout aws --services s3 iam ec2 --no-browser --report-dir ./scout-report/215216# Parse results programmatically217python -c "218import json219with open('./scout-report/scoutsuite-results/scoutsuite_results.json') as f:220 results = json.load(f)221 for service in results.get('services', {}):222 findings = results['services'][service].get('findings', {})223 for finding_id, finding in findings.items():224 if finding.get('flagged_items', 0) > 0 and finding.get('level') == 'danger':225 print(f'CRITICAL: {finding_id} - {finding.get(\"description\", \"\")}')226"227```228229## Multi-Cloud Capability230231ScoutSuite supports multiple cloud providers using the same framework:232233```bash234# Azure235scout azure --cli236237# GCP238scout gcp --user-account239240# AWS with specific profile241scout aws --profile production242```243244## References245246- ScoutSuite GitHub Repository: https://github.com/nccgroup/ScoutSuite247- AWS Security Audit Checklist248- CIS AWS Foundations Benchmark249- AWS Well-Architected Security Pillar