Overview
The AWS integration lets you scan one or more AWS accounts from within Pwnbook. It discovers running resources, checks for security misconfigurations, and imports the findings into your engagement. This is especially useful for cloud security assessments and infrastructure reviews.Prerequisites
To connect an AWS account, you’ll need:- An AWS account with permissions to create IAM roles and policies
- Admin or Owner access in Pwnbook to configure the integration
- The target AWS account ID and the region(s) you want to scan
Connecting an AWS account
Pwnbook uses an IAM role with read-only permissions to access your AWS account. This follows the AWS recommended cross-account access pattern, giving you full control over what Pwnbook can see.Create the IAM role in AWS
Pwnbook will provide a CloudFormation template or manual instructions for creating an IAM role in your target AWS account.Using CloudFormation (recommended):
- Click Deploy CloudFormation Stack.
- You’ll be redirected to the AWS CloudFormation console with the template pre-loaded.
- Review the template — it creates a read-only IAM role with an external ID for secure cross-account access.
- Click Create Stack.
- Wait for the stack to complete (usually 1-2 minutes).
- In the AWS IAM console, create a new IAM role.
- Choose Another AWS account as the trusted entity.
- Enter the Pwnbook AWS account ID shown in the integration setup.
- Enter the External ID shown in the integration setup.
- Attach the
SecurityAuditandReadOnlyAccessmanaged policies. - Create the role and copy its ARN.
Running resource discovery
Once an AWS account is connected, you can discover what’s running in it:- Go to Organization Settings → Integrations → AWS.
- Select the connected account.
- Click Run Discovery.
- Choose the resource types to discover and the regions to scan.
- Click Start.
Discoverable resource types
Pwnbook can discover and inventory the following AWS resource types:Compute
Compute
EC2 instances, Auto Scaling groups, ECS clusters and tasks, Lambda functions, Elastic Beanstalk environments
Networking
Networking
VPCs, subnets, security groups, load balancers (ALB, NLB, CLB), CloudFront distributions, Route 53 zones and records
Storage
Storage
S3 buckets (with public access status), EBS volumes, EFS file systems, RDS instances and clusters
Identity and access
Identity and access
IAM users, roles, policies, and access keys; Cognito user pools
Security services
Security services
GuardDuty findings, Security Hub findings, Inspector findings, CloudTrail trails, Config rules and compliance status
Security findings
Pwnbook automatically checks for common security misconfigurations during discovery scans:| Check | Description |
|---|---|
| Public S3 buckets | Identifies buckets with public read or write access |
| Overly permissive security groups | Flags security groups allowing 0.0.0.0/0 inbound on sensitive ports |
| Unencrypted storage | RDS instances, EBS volumes, and S3 buckets without encryption |
| Exposed IAM access keys | IAM users with active access keys that haven’t been rotated recently |
| MFA not enforced | IAM users without MFA enabled |
| CloudTrail not enabled | Regions without active CloudTrail logging |
| GuardDuty/Security Hub findings | Imports active findings from AWS security services |
Importing into architecture models
After running discovery, import the discovered resources into an engagement’s architecture model:- Open the engagement.
- Navigate to the Architecture tab.
- Click Import Infrastructure.
- Select AWS and the connected account.
- Choose which resources to import.
- Click Import.
Scan jobs
Each discovery or security scan is tracked as a scan job. To view scan history:- Go to Organization Settings → Integrations → AWS.
- Select the connected account.
- Click Scan History.
- Start and completion time
- Regions scanned
- Resource counts by type
- Any errors encountered
Removing an AWS account
To disconnect an AWS account:- Go to Organization Settings → Integrations → AWS.
- Click Disconnect next to the account.
- Confirm the disconnection.