| name | performing-cloud-penetration-testing-with-pacu |
| description | Performing authorized AWS penetration testing using Pacu, the open-source AWS exploitation framework, to enumerate IAM configurations, discover privilege escalation paths, test credential harvesting, and validate security controls through systematic attack simulation.
|
| 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 |
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