Performing Cloud Penetration Testing With Pacu
Overview
Cybersecurity skill for performing cloud penetration testing with pacu. Follows industry best practices and security standards.
When to Use
Trigger phrases:
"performing cloud penetration testing with pacu"
"Performing authorized AWS penetration testing using Pacu, the open-source AWS ex"
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.
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
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
# Example: IOC detection
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs(text: str) -> dict:
return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}
- Plan Operations — Define objectives, scope, and success criteria for cloud penetration testing operations.
- Prepare Environment — Set up tools, access, and data sources required for cloud penetration testing.
- Execute Core Workflow — Use pacu to perform cloud penetration testing operations following established procedures.
- Validate Results — Verify that results meet quality standards and objectives.
- Report Findings — Document results, observations, and recommendations.
- Follow Up — Track remediation actions and verify fixes where applicable.
Tools
- pacu — Primary tool for this skill
- Analysis Platform — Data processing and visualization
- Collaboration Tools — Team coordination and knowledge sharing
Process
- Design — Define interface, identify patterns, plan implementation
- Implement — Write code following existing conventions, add tests
- Verify — Run tests, check integration, validate behavior
Verification
Anti-Rationalization Table
| Rationalization |
Reality |
| "We are too small to be targeted" |
Automated attacks target everyone. Size does not matter. |
| "Security slows us down" |
A breach slows you down 100x more. Build security in from the start. |
| "We will fix it after launch" |
Vulnerabilities in production are exploited within hours. Fix before deploy. |
1---2name: performing-cloud-penetration-testing-with-pacu3description: Use when performing authorized AWS penetration testing using Pacu, the4 open-source AWS exploitation framework, to enumerate IAM configurations, discover5 privilege escalation paths, test credential harvesting, and validate security controls6 through systematic attack simulation. . Use when working with performing cloud penetration7 testing with pacu.8domain: cybersecurity9tags:10- cloud-security11- aws12- pacu13- penetration-testing14- offensive-security15- iam-exploitation16subdomain: cloud-security17version: '1.0'18author: oyi7719license: Apache-2.020nist_csf:21- PR.IR-0122- ID.AM-0823- GV.SC-0624- DE.CM-0125category: cybersecurity26metadata:27 source: https://skillmd.com/skills/oyi77/performing-cloud-penetration-testing-with-pacu28---2930# Performing Cloud Penetration Testing With Pacu3132## Overview3334Cybersecurity skill for performing cloud penetration testing with pacu. Follows industry best practices and security standards.3536## When to Use37**Trigger phrases:**38- "performing cloud penetration testing with pacu"39- "Performing authorized AWS penetration testing using Pacu, the open-source AWS ex"404142- When conducting authorized penetration testing of AWS environments43- When validating the effectiveness of IAM policies, SCPs, and permission boundaries44- When assessing the blast radius of a compromised set of AWS credentials45- When testing detection capabilities of GuardDuty, Security Hub, and custom alerting46- When building red team exercises against AWS cloud infrastructure4748**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.495051## When NOT to Use5253- When you lack proper authorization for testing54- For production systems without change management55- When the task requires legal or compliance expertise beyond technical scope565758## Prerequisites5960- Written authorization from the AWS account owner with defined scope and rules of engagement61- Pacu v1.5+ installed (`pip install pacu`)62- Test AWS credentials with limited starting permissions (simulates compromised credential scenario)63- CloudTrail logging enabled to capture all Pacu activity for post-engagement review64- GuardDuty enabled to validate detection of Pacu activities65- Emergency contact and rollback procedures documented6667## Workflow6869```python70# Example: IOC detection71import re7273IOC_PATTERNS = {74 "ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",75 "domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",76 "hash_md5": r"\b[a-f0-9]{32}\b",77 "hash_sha256": r"\b[a-f0-9]{64}\b",78}7980def extract_iocs(text: str) -> dict:81 return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}82```83841. **Plan Operations** — Define objectives, scope, and success criteria for cloud penetration testing operations.852. **Prepare Environment** — Set up tools, access, and data sources required for cloud penetration testing.863. **Execute Core Workflow** — Use pacu to perform cloud penetration testing operations following established procedures.874. **Validate Results** — Verify that results meet quality standards and objectives.885. **Report Findings** — Document results, observations, and recommendations.896. **Follow Up** — Track remediation actions and verify fixes where applicable.9091## Tools9293- **pacu** — Primary tool for this skill94- **Analysis Platform** — Data processing and visualization95- **Collaboration Tools** — Team coordination and knowledge sharing969798## Process991001. **Design** — Define interface, identify patterns, plan implementation1011. **Implement** — Write code following existing conventions, add tests1021. **Verify** — Run tests, check integration, validate behavior103104## Verification105106- [ ] All cloud penetration testing procedures executed completely and documented107- [ ] Findings validated against multiple data sources108- [ ] False positives identified and filtered109- [ ] Results documented with evidence and timestamps110- [ ] Recommendations provided with risk-based prioritization111112## Anti-Rationalization Table113114| Rationalization | Reality |115|---|---|116| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |117| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |118| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |