| name | performing-cloud-penetration-testing-with-pacu |
| description | Run authorized AWS penetration tests with Pacu, the open-source AWS exploitation framework, to enumerate IAM configuration, scan for privilege escalation paths, and test data access and lateral movement using compromised credentials. Use when conducting authorized red-team assessments of AWS environments, validating IAM policies and SCPs, or determining the blast radius of compromised AWS credentials.
|
| domain | cybersecurity |
| subdomain | cloud-security |
| tags | ["cloud-security","aws","pacu","penetration-testing","offensive-security","iam-exploitation"] |
| 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","T1068"] |
Performing Cloud Penetration Testing with Pacu
When to Use
- When conducting authorized penetration testing of AWS environments
- When validating the effectiveness of IAM policies, SCPs, and permission boundaries
- When assessing the blast radius of a compromised set of AWS credentials
- When testing detection capabilities of GuardDuty, Security Hub, and custom alerting
- When building red team exercises against AWS cloud infrastructure
Do not use for unauthorized testing of any AWS account, for testing AWS infrastructure itself (covered by shared responsibility), for DDoS or volumetric attacks without AWS approval, or for production account testing without explicit authorization and breakglass procedures.
Prerequisites
- Written authorization from the AWS account owner with defined scope and rules of engagement
- Pacu v1.5+ installed (
pip install pacu)
- Test AWS credentials with limited starting permissions (simulates compromised credential scenario)
- CloudTrail logging enabled to capture all Pacu activity for post-engagement review
- GuardDuty enabled to validate detection of Pacu activities
- Emergency contact and rollback procedures documented
Workflow
Step 1: Initialize Pacu Session and Configure Credentials
Set up a Pacu session with the test credentials and define the engagement scope.
pip install pacu
pacu
Pacu > set_keys --key-alias pentest-target
Pacu > whoami
Pacu > list
Pacu > search iam
Pacu > search ec2
Pacu > search s3
Step 2: Enumerate IAM Configuration
Run IAM enumeration modules to map users, roles, policies, and group memberships.
Pacu > run iam__enum_users_roles_policies_groups
Pacu > run iam__enum_permissions
Pacu > run iam__get_credential_report
Pacu > run iam__enum_roles
Pacu > data iam