Conducting Cloud Penetration Testing
Overview
Cybersecurity skill for conducting cloud penetration testing. Follows industry best practices and security standards.
When to Use
Trigger phrases:
"conducting cloud penetration testing"
"This skill outlines methodologies for performing authorized penetration testing "
When performing authorized security assessments of cloud environments before production deployment
When validating cloud security controls after a major architectural change or migration
When compliance requirements mandate annual penetration testing of cloud infrastructure
When testing incident response readiness by simulating realistic cloud-based attack scenarios
When assessing lateral movement risk across multi-account or multi-cloud environments
Do not use for unauthorized testing against cloud accounts, for testing cloud provider infrastructure itself (covered by the shared responsibility model), or for DDoS simulation without explicit cloud provider approval.
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 cloud account owner and scope definition document
- AWS, Azure, or GCP penetration testing policy acknowledgment (AWS no longer requires pre-approval for most services)
- Isolated testing account or explicitly scoped production account with breakglass procedures
- Cloud-specific offensive tooling installed: Pacu (AWS), ScoutSuite, Prowler, CloudFox
- MITRE ATT&CK Cloud matrix for finding classification
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()}
- Scope the Analysis — Define what cloud penetration testing artifacts or data sources to examine and the investigation timeline.
- Preserve Evidence — Create forensic copies of relevant data. Maintain chain of custody documentation.
- Extract Key Indicators — Parse and extract relevant cloud penetration testing data points from collected artifacts.
- Correlate Findings — Cross-reference extracted data with other sources (threat intel, logs, timelines).
- Build Timeline — Construct a chronological sequence of events related to cloud penetration testing.
- Document Analysis — Write findings report with evidence, conclusions, and recommendations.
Tools
- Forensic Toolkit — Evidence collection and analysis
- Timeline Tools — Chronological event reconstruction
- Log Analysis Platform — Centralized log parsing and search
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: conducting-cloud-penetration-testing3description: Use when this skill outlines methodologies for performing authorized penetration testing against AWS, Azure, and GCP cloud environments. It covers understanding the shared responsibility model for testing scope, leveraging cloud-specific attack tools like Pacu and ScoutSuite, exploiting IAM misconfigurations, testing for SSRF to cloud metadata services, and reporting findings aligned to MITRE ATT&CK Cloud matrix.4license: Apache-2.05---67# Conducting Cloud Penetration Testing89## Overview1011Cybersecurity skill for conducting cloud penetration testing. Follows industry best practices and security standards.1213## When to Use14**Trigger phrases:**15- "conducting cloud penetration testing"16- "This skill outlines methodologies for performing authorized penetration testing "171819- When performing authorized security assessments of cloud environments before production deployment20- When validating cloud security controls after a major architectural change or migration21- When compliance requirements mandate annual penetration testing of cloud infrastructure22- When testing incident response readiness by simulating realistic cloud-based attack scenarios23- When assessing lateral movement risk across multi-account or multi-cloud environments2425**Do not use** for unauthorized testing against cloud accounts, for testing cloud provider infrastructure itself (covered by the shared responsibility model), or for DDoS simulation without explicit cloud provider approval.262728## When NOT to Use2930- When you lack proper authorization for testing31- For production systems without change management32- When the task requires legal or compliance expertise beyond technical scope333435## Prerequisites3637- Written authorization from the cloud account owner and scope definition document38- AWS, Azure, or GCP penetration testing policy acknowledgment (AWS no longer requires pre-approval for most services)39- Isolated testing account or explicitly scoped production account with breakglass procedures40- Cloud-specific offensive tooling installed: Pacu (AWS), ScoutSuite, Prowler, CloudFox41- MITRE ATT&CK Cloud matrix for finding classification4243## Workflow4445```python46# Example: IOC detection47import re4849IOC_PATTERNS = {50 "ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",51 "domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",52 "hash_md5": r"\b[a-f0-9]{32}\b",53 "hash_sha256": r"\b[a-f0-9]{64}\b",54}5556def extract_iocs(text: str) -> dict:57 return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}58```59601. **Scope the Analysis** — Define what cloud penetration testing artifacts or data sources to examine and the investigation timeline.612. **Preserve Evidence** — Create forensic copies of relevant data. Maintain chain of custody documentation.623. **Extract Key Indicators** — Parse and extract relevant cloud penetration testing data points from collected artifacts.634. **Correlate Findings** — Cross-reference extracted data with other sources (threat intel, logs, timelines).645. **Build Timeline** — Construct a chronological sequence of events related to cloud penetration testing.656. **Document Analysis** — Write findings report with evidence, conclusions, and recommendations.6667## Tools6869- **Forensic Toolkit** — Evidence collection and analysis70- **Timeline Tools** — Chronological event reconstruction71- **Log Analysis Platform** — Centralized log parsing and search727374## Process75761. **Design** — Define interface, identify patterns, plan implementation771. **Implement** — Write code following existing conventions, add tests781. **Verify** — Run tests, check integration, validate behavior7980## Verification8182- [ ] All cloud penetration testing procedures executed completely and documented83- [ ] Findings validated against multiple data sources84- [ ] False positives identified and filtered85- [ ] Results documented with evidence and timestamps86- [ ] Recommendations provided with risk-based prioritization8788## Anti-Rationalization Table8990| Rationalization | Reality |91|---|---|92| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |93| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |94| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |