What it does. Run the agentless, open-source ScoutSuite tool (via pip install and the scout CLI) Part of mukul975/Anthropic-Cybersecurity-Skills (817 security skills) (mukul975/Anthropic-Cybersecurity-Skills).
Install
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-aws-account-enumeration-with-scout-suite, or copy the skill folder into ~/.claude/skills/performing-aws-account-enumeration-with-scout-suite/.
- Raw file:
curl -sL https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/HEAD/skills/performing-aws-account-enumeration-with-scout-suite/SKILL.md
SKILL.md (verbatim)
name: performing-aws-account-enumeration-with-scout-suite
description: Run the agentless, open-source ScoutSuite tool (via pip install and the `scout` CLI)
against an AWS account to enumerate resources across services, identify misconfigurations,
and generate an interactive HTML security report. Use when assessing an AWS account's overall
security posture with read-only IAM credentials, such as during a cloud security audit or
compliance review.
domain: cybersecurity
subdomain: cloud-security
tags:
- aws
- scoutsuite
- cloud-security
- enumeration
- misconfiguration
- security-audit
- cspm
- nccgroup
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- PR.IR-01
- ID.AM-08
- GV.SC-06
- DE.CM-01
mitre_attack:
- T1078.004
- T1530
- T1537
- T1580
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
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
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
- 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
Other files in this skill
assets/template.md (verbatim)
ScoutSuite AWS Security Assessment Template
| Field |
Value |
| Assessment Date |
YYYY-MM-DD |
| AWS Account ID |
|
| Assessor |
|
| ScoutSuite Version |
|
| Scan Scope |
Full / Targeted Services |
| Regions Scanned |
|
Findings Summary
| Severity |
Count |
Remediated |
| Critical (Danger) |
|
|
| Warning |
|
|
| Passing |
|
|
Service-Level Findings
IAM
S3
EC2
RDS
CloudTrail
Lambda
| Priority |
Finding |
Service |
Remediation |
Owner |
Due Date |
Status |
| P1 |
|
|
|
|
|
|
| P2 |
|
|
|
|
|
|
| P3 |
|
|
|
|
|
|
Sign-off
| Role |
Name |
Date |
Signature |
| Security Assessor |
|
|
|
| Account Owner |
|
|
|
| CISO |
|
|
|
references/api-reference.md (verbatim)
API Reference: AWS Account Enumeration with Scout Suite
Libraries Used
| Library |
Purpose |
subprocess |
Execute Scout Suite CLI scans |
json |
Parse Scout Suite JSON report output |
boto3 |
AWS SDK for supplementary API calls |
os |
Read AWS credentials from environment |
Installation
pip install scoutsuite boto3
# Or from source
git clone https://github.com/nccgroup/ScoutSuite
cd ScoutSuite
pip install -r requirements.txt
python scout.py --help
Authentication
Scout Suite uses standard AWS credential chain:
import os
# Option 1: Environment variables
os.environ["AWS_ACCESS_KEY_ID"] = "AKIA..."
os.environ["AWS_SECRET_ACCESS_KEY"] = "..."
os.environ["AWS_DEFAULT_REGION"] = "us-east-1"
# Option 2: AWS CLI profile
# scout aws --profile my-profile
# Option 3: IAM Role (EC2 instance profile / ECS task role)
# Automatically detected by boto3
CLI Reference
Full AWS Account Scan
scout aws --report-dir ./scout-report
Scan Specific Services
scout aws --services iam s3 ec2 rds lambda --report-dir ./scout-report
Scan Specific Regions
scout aws --regions us-east-1 us-west-2 eu-west-1 --report-dir ./scout-report
Use Named Profile
scout aws --profile production-readonly --report-dir ./scout-report
Key CLI Flags
| Flag |
Description |
--provider |
Cloud provider: aws, azure, gcp |
--profile |
AWS CLI named profile |
--regions |
Specific AWS regions to scan |
--services |
Specific services to audit |
--report-dir |
Output directory for HTML report |
--no-browser |
Don't open report in browser |
--max-workers |
Number of parallel API threads |
--result-format |
Output format: json, csv |
--exceptions |
Path to exceptions file (known acceptable findings) |
--ruleset |
Custom ruleset file for scoring |
Python Integration
Run Scout Suite and Parse Results
import subprocess
import json
from pathlib import Path
def run_scout(services=None, regions=None, profile=None, report_dir="/tmp/scout"):
cmd = ["scout", "aws", "--report-dir", report_dir, "--no-browser"]
if services:
cmd.extend(["--services"] + services)
if regions:
cmd.extend(["--regions"] + regions)
if profile:
cmd.extend(["--profile", profile])
result = subprocess.run(cmd, capture_output=True, text=True, timeout=1800)
if result.returncode != 0:
raise RuntimeError(f"Scout Suite failed: {result.stderr}")
# Parse the JSON results
report_path = Path(report_dir) / "scoutsuite-results" / "scoutsuite_results.json"
if report_path.exists():
with open(report_path) as f:
return json.load(f)
return None
def extract_findings(report, min_severity="warning"):
severity_order = {"danger": 3, "warning": 2, "info": 1}
min_level = severity_order.get(min_severity, 1)
findings = []
for service_name, service_data in report.get("services", {}).items():
for rule_name, rule_data in service_data.get("findings", {}).items():
level = severity_order.get(rule_data.get("level", "info"), 0)
if level >= min_level:
findings.append({
"service": service_name,
"rule": rule_name,
"severity": rule_data.get("level"),
"description": rule_data.get("description"),
"flagged_items": rule_data.get("flagged_items", 0),
"checked_items": rule_data.get("checked_items", 0),
})
return sorted(findings, key=lambda x: severity_order.get(x["severity"], 0), reverse=True)
Common Findings Categories
| Service |
Common Findings |
| IAM |
Root account MFA, access key rotation, overly permissive policies |
| S3 |
Public buckets, missing encryption, no versioning |
| EC2 |
Security groups with 0.0.0.0/0, unencrypted EBS, public IPs |
| RDS |
Public access, no encryption at rest, no multi-AZ |
| Lambda |
Overly permissive roles, environment variable secrets |
| CloudTrail |
Logging disabled, no log file validation |
| VPC |
Default VPC in use, missing flow logs |
{
"provider_code": "aws",
"account_id": "123456789012",
"last_run": {
"time": "2025-01-15T10:30:00Z",
"ruleset_name": "default",
"run_parameters": {"services": ["iam", "s3", "ec2"]}
},
"services": {
"iam": {
"findings": {
"iam-root-account-no-mfa": {
"level": "danger",
"description": "Root account does not have MFA enabled",
"flagged_items": 1,
"checked_items": 1
}
}
},
"s3": {
"findings": {
"s3-bucket-no-default-encryption": {
"level": "warning",
"description": "S3 bucket does not have default encryption",
"flagged_items": 3,
"checked_items": 15
}
}
}
}
}
references/standards.md (verbatim)
Standards and References - AWS Account Enumeration with ScoutSuite
Industry Standards
CIS AWS Foundations Benchmark v3.0
- Section 1: Identity and Access Management
- Section 2: Logging
- Section 3: Monitoring
- Section 4: Networking
- Section 5: Storage
AWS Well-Architected Framework - Security Pillar
- SEC 1: Securely operate your workload
- SEC 2: Manage identities for people and machines
- SEC 3: Manage permissions for people and machines
- SEC 6: Protect compute resources
- SEC 8: Protect data at rest
- SEC 9: Protect data in transit
NIST 800-53 Mapped Controls
- AC-2: Account Management
- AU-2: Audit Events
- AU-6: Audit Review, Analysis, and Reporting
- CM-6: Configuration Settings
- SC-7: Boundary Protection
ScoutSuite Rule Mappings
IAM Rules
| Rule ID |
Description |
CIS Benchmark |
| iam-root-account-no-mfa |
Root account MFA not enabled |
1.5 |
| iam-user-no-mfa |
IAM user without MFA |
1.10 |
| iam-password-policy-no-uppercase |
Weak password policy |
1.5 |
| iam-unused-access-key |
Access key unused > 90 days |
1.12 |
| iam-inline-policy |
Inline policies attached to users |
1.16 |
S3 Rules
| Rule ID |
Description |
CIS Benchmark |
| s3-bucket-public-access |
Bucket allows public access |
2.1.5 |
| s3-bucket-no-logging |
Server access logging disabled |
2.1.3 |
| s3-bucket-no-versioning |
Versioning not enabled |
N/A |
| s3-bucket-no-encryption |
Default encryption not set |
2.1.1 |
EC2 Rules
| Rule ID |
Description |
CIS Benchmark |
| ec2-security-group-opens-all-ports |
Security group allows all traffic |
5.2 |
| ec2-instance-with-public-ip |
Instance has public IP |
N/A |
| ec2-ebs-volume-not-encrypted |
EBS volume unencrypted |
2.2.1 |
Compliance Framework Coverage
- SOC 2 Type II
- PCI DSS v4.0
- HIPAA Security Rule
- ISO 27001:2022
- GDPR (data protection controls)
references/workflows.md (verbatim)
Workflows - AWS Account Enumeration with ScoutSuite
Standard Security Assessment Workflow
1. Preparation Phase
├── Define scope (accounts, regions, services)
├── Create read-only IAM role with SecurityAudit policy
├── Install and configure ScoutSuite
└── Verify credentials and connectivity
2. Enumeration Phase
├── Run ScoutSuite against target AWS account
├── Monitor scan progress and address API errors
├── Collect results from all specified regions
└── Generate HTML report
3. Analysis Phase
├── Review dashboard for severity distribution
├── Prioritize danger-level findings
├── Map findings to CIS Benchmarks
├── Identify patterns across services
└── Document false positives
4. Reporting Phase
├── Create executive summary of findings
├── Detail remediation steps per finding
├── Assign priority and ownership
└── Establish remediation timeline
5. Remediation Phase
├── Implement fixes per priority order
├── Re-scan to validate remediation
├── Update documentation
└── Schedule recurring assessments
Multi-Account Assessment Workflow
1. Setup Organization Scanning
├── Create cross-account IAM roles in each target account
├── Configure trust relationships to auditor account
└── Prepare account list and scanning schedule
2. Execute Scans
├── Iterate through accounts using assume-role
├── Run ScoutSuite per account
├── Aggregate results into central location
└── Generate per-account and aggregate reports
3. Consolidate Findings
├── Merge findings across accounts
├── Identify organization-wide patterns
├── Compare accounts against baseline
└── Produce organization security scorecard
CI/CD Integration Workflow
1. Pipeline Trigger
├── Infrastructure change detected (Terraform/CloudFormation)
└── Scheduled nightly scan
2. Automated Scan
├── Run ScoutSuite with targeted service scope
├── Parse JSON results programmatically
└── Evaluate against security baseline
3. Gate Decision
├── Danger findings → Block deployment, alert security team
├── Warning findings → Proceed with notification
└── No findings → Continue pipeline
Back to mukul975/Anthropic-Cybersecurity-Skills (817 security skills) or Agent skills.