Cloud Penetration Testing
Cloud penetration testing is the authorized, adversarial evaluation of cloud-hosted infrastructure, platforms, services, and configurations to identify exploitable vulnerabilities before malicious actors reach them. This reference covers the definition and regulatory scope of cloud penetration testing, the structural mechanics of how engagements are conducted, the compliance frameworks that mandate or incentivize it, and the classification distinctions that separate cloud testing from conventional network assessments. The sector is shaped by the shared responsibility model, provider-specific authorization requirements, and a distinct set of attack surfaces that do not exist in on-premises environments.
- Definition and scope
- Core mechanics or structure
- Causal relationships or drivers
- Classification boundaries
- Tradeoffs and tensions
- Common misconceptions
- Checklist or steps (non-advisory)
- Reference table or matrix
- References
Definition and scope
Cloud penetration testing is a structured security discipline in which qualified practitioners conduct authorized simulated attacks against cloud environments — including infrastructure-as-a-service (IaaS), platform-as-a-service (PaaS), and software-as-a-service (SaaS) deployments — to demonstrate the real-world exploitability of identified weaknesses. The engagement goes beyond automated scanning: testers must chain misconfigurations, abuse identity and access management (IAM) policies, escalate privileges, and move laterally within cloud tenants to demonstrate the actual impact of discovered vulnerabilities.
Scope in a cloud penetration test is bounded by both the contracting organization's authorization and the acceptable use policies of the cloud service provider (CSP). Amazon Web Services, Microsoft Azure, and Google Cloud Platform each publish formal penetration testing policies that define what subscribers may and may not test without prior written approval. AWS, for example, permits testing of EC2 instances, RDS databases, and Lambda functions owned by the customer but prohibits activities including DNS zone walking and port flooding (AWS Customer Support Policy for Penetration Testing).
The regulatory scope of cloud penetration testing intersects with frameworks including PCI DSS penetration testing requirements, HIPAA penetration testing requirements, and FedRAMP penetration testing. Under FedRAMP's authorization process, cloud service offerings seeking a federal Authority to Operate (ATO) must undergo penetration testing conducted according to the FedRAMP Penetration Test Guidance, which specifies testing categories, documentation requirements, and assessor qualifications.
Core mechanics or structure
Cloud penetration testing follows a phased engagement structure adapted from foundational frameworks such as NIST SP 800-115 and the Penetration Testing Execution Standard (PTES), with cloud-specific extensions to address the unique attack surfaces presented by CSP environments.
Reconnaissance and enumeration in cloud contexts targets publicly exposed cloud assets: S3 bucket namespaces, Azure Blob Storage URLs, publicly accessible cloud APIs, DNS records pointing to cloud-hosted services, and metadata from cloud-native certificate transparency logs. Tools such as cloud-specific enumeration frameworks can identify misconfigured storage, exposed management endpoints, and overly permissive security groups without crossing into unauthorized access.
Identity and access management (IAM) assessment is central to cloud penetration testing in a way that has no direct analogue in traditional network testing. Testers evaluate role assignments, policy documents, cross-account trust relationships, service account permissions, and the presence of overly broad wildcard permissions (e.g., "Action": "*" in AWS IAM policies). The Cloud Security Alliance (CSA) identifies IAM misconfiguration as a primary risk category in its Cloud Controls Matrix (CCM).
Exploitation and privilege escalation in cloud environments frequently involves abusing misconfigured instance metadata services (IMDS), exploiting Lambda function environment variable exposure, leveraging misconfigured Kubernetes RBAC in container orchestration environments, or abusing federated identity tokens. The MITRE ATT&CK for Cloud matrix catalogs 67+ techniques specific to cloud platforms including AWS, Azure, GCP, Office 365, and SaaS applications.
Lateral movement within cloud tenants may involve pivoting between cloud accounts via assume-role operations, exploiting VPC peering misconfigurations, or abusing shared service accounts across organizational units.
Reporting documents confirmed exploitation paths, the business impact of each finding, and the specific cloud resource identifiers (ARNs, subscription IDs, project numbers) affected — providing direct remediation targets rather than generic recommendations. For more on reporting standards, see penetration testing reporting.
Causal relationships or drivers
The demand for cloud penetration testing is driven by the convergence of rapid cloud adoption, regulatory mandate, and a distinct class of misconfiguration-driven vulnerabilities that differ structurally from on-premises risks.
The shared responsibility model — published by AWS, Azure, and GCP — defines a division of security obligations between the CSP and the customer. CSPs secure the underlying infrastructure; customers are responsible for securing their configurations, data, identity controls, and application layers. This boundary creates a category of risk that is entirely customer-owned and therefore testable: misconfigured security groups, public-facing storage buckets, and excessive IAM permissions are customer-controlled failure modes, not CSP failures. The Cloud Security Alliance's 2022 Top Threats to Cloud Computing identifies inadequate identity, credential, and access management as the top cloud security threat — a finding that directly motivates IAM-focused penetration testing.
Regulatory drivers are specific and binding for regulated industries. FedRAMP requires penetration testing as part of the annual assessment cycle for cloud service offerings holding federal ATOs, with testing categories defined in the FedRAMP Penetration Test Guidance. PCI DSS v4.0, Requirement 11.4.1, mandates penetration testing of systems in the cardholder data environment at least once every 12 months and after significant changes — a requirement that explicitly extends to cloud-hosted CDE components (PCI SSC, PCI DSS v4.0). HIPAA's Security Rule, while not specifying penetration testing by name, requires covered entities and business associates to conduct technical and non-technical evaluations of security controls under 45 CFR § 164.308(a)(8).
The expansion of cloud-native attack techniques cataloged in the MITRE ATT&CK framework has also driven demand: as threat actors develop and publicize cloud-specific exploitation methods, organizations face pressure to validate their defenses against the same techniques.
Classification boundaries
Cloud penetration testing subdivides along three primary axes: the cloud service model targeted, the deployment model, and the knowledge state of the tester.
By service model:
- IaaS testing targets virtual machines, virtual networks, storage services, and the IAM layer controlling access to those resources. This is the most analogous to traditional network and system penetration testing.
- PaaS testing evaluates managed services — databases, container platforms, serverless functions, message queues — and the application code or configurations deployed to them.
- SaaS testing focuses on authentication mechanisms, API exposure, tenant isolation, and data access controls within software delivered entirely by the provider.
By knowledge state: Cloud tests follow the same black-box, white-box, and gray-box classification applied to other engagement types (see black-box, white-box, gray-box testing). In cloud contexts, gray-box is the dominant model: testers receive valid cloud credentials with a defined starting permission set and attempt to escalate from that position, mirroring the most realistic threat scenario of a compromised internal user or stolen access key.
By deployment model:
- Public cloud (AWS, Azure, GCP) — subject to CSP acceptable use policies and customer-side authorization only.
- Private cloud — no CSP authorization layer; testing authorized entirely by the organization.
- Hybrid cloud — requires coordinated scope covering on-premises and cloud segments, with attention to the connectivity pathways between them (VPNs, Direct Connect circuits, ExpressRoute links).
Cloud penetration testing differs structurally from network penetration testing in that network topology is abstracted; the attack surface is defined by API permissions and service configurations rather than IP ranges and open ports.
Tradeoffs and tensions
Scope breadth versus CSP constraint: Cloud environments are architecturally boundless — a single AWS organization may contain hundreds of accounts and thousands of services. Comprehensive testing is technically possible but commercially and logistically constrained by CSP acceptable use policies and engagement time limits. Testers and clients must negotiate scope that is meaningful without triggering provider policy violations or generating noise indistinguishable from actual attacks.
Ephemeral infrastructure and test repeatability: Cloud-native architectures frequently use auto-scaling groups, containerized workloads, and infrastructure-as-code pipelines that spin resources up and down continuously. A misconfiguration identified and exploited during a test window may be redeployed from the same flawed template within hours. Point-in-time penetration testing captures a snapshot; continuous penetration testing and infrastructure-as-code security scanning address the repeatability gap but introduce cost and operational overhead.
Credential sensitivity during testing: Cloud penetration testing requires provisioning tester accounts with real IAM credentials in the target environment. These credentials, if mishandled, can themselves become an attack vector. Credential lifecycle management, MFA enforcement on tester accounts, and post-engagement credential rotation are operational requirements, not optional safeguards.
Attribution and logging: Cloud platforms generate detailed API call logs (AWS CloudTrail, Azure Monitor, GCP Cloud Audit Logs) that record every action taken during a test. This logging supports forensic review but also means that detection and response teams may react to penetration tester activity as genuine incidents, creating internal coordination requirements that must be addressed in the rules of engagement. See rules of engagement for penetration testing for the contractual framing.
Automated versus manual testing: Automated cloud security posture management (CSPM) tools detect misconfiguration at scale but cannot replicate the chained exploitation logic of a skilled tester. The distinction between CSPM output and an actual penetration test finding is material for compliance purposes — regulators and auditors treat them differently. See automated vs. manual penetration testing for the classification framework.
Common misconceptions
Misconception: The CSP secures the environment, so penetration testing is unnecessary.
The shared responsibility model explicitly assigns configuration security, IAM management, and data protection to the customer. CSP security controls protect the underlying hardware and hypervisor — not customer-controlled resource configurations. The majority of cloud breaches documented in public reporting involve customer-side misconfiguration, not CSP infrastructure failure.
Misconception: Cloud penetration testing requires no special authorization from the CSP.
All three major CSPs — AWS, Azure, and GCP — publish policies governing what testing is permitted. Azure requires advance notification for certain test types via its Rules of Engagement form. Conducting denial-of-service testing, DNS zone walking, or bandwidth flooding against CSP infrastructure without authorization violates these policies regardless of whether the target resources belong to the tester's account.
Misconception: A cloud penetration test and a cloud security posture assessment are equivalent.
A cloud security posture assessment uses automated tools to enumerate misconfigured resources against a benchmark (e.g., CIS Benchmarks for AWS, Azure, or GCP). A penetration test goes further: it demonstrates that a misconfiguration is exploitable, shows the actual privilege escalation or data access path, and quantifies business impact. The two are complementary, not substitutable. PCI DSS and FedRAMP treat them as distinct controls.
Misconception: Kubernetes testing is covered by a standard web application test.
Container orchestration platforms such as Kubernetes introduce distinct attack surfaces — the Kubernetes API server, etcd datastores, admission controllers, pod security policies, and namespace isolation — that fall outside the scope of a web application engagement. Kubernetes testing is a defined sub-discipline within cloud penetration testing, with specific technique categories documented in the MITRE ATT&CK matrix under Container and Cloud entries.
Checklist or steps (non-advisory)
The following phase sequence reflects the standard operational structure of a cloud penetration testing engagement, aligned with NIST SP 800-115 phases and FedRAMP Penetration Test Guidance categories:
Phase 1 — Pre-Engagement
- [ ] Executed authorization agreement covering cloud account IDs, regions, and service types in scope
- [ ] CSP acceptable use policy reviewed; any required pre-notification submitted (Azure, others)
- [ ] Rules of engagement document defines prohibited actions (DoS, production data exfiltration, cross-tenant testing)
- [ ] Emergency escalation contacts established with client cloud operations team
- [ ] Tester IAM credentials provisioned in target environment with defined starting permission set
Phase 2 — Reconnaissance and Enumeration
- [ ] Public asset enumeration: storage buckets, exposed APIs, DNS records, certificate transparency data
- [ ] Cloud-native asset inventory: EC2/VM inventories, function listings, managed service endpoints
- [ ] IAM policy and role enumeration within authorized account scope
- [ ] Security group and network ACL mapping
Phase 3 — Vulnerability Identification
- [ ] IMDS exposure and version assessment (IMDSv1 versus IMDSv2 enforcement on AWS)
- [ ] Overly permissive IAM policy identification (wildcard actions, cross-account trust misconfigurations)
- [ ] Publicly accessible storage resource identification
- [ ] Secrets management assessment: environment variables, parameter stores, secrets manager configurations
- [ ] Logging and monitoring gap identification (CloudTrail, Azure Monitor, GCP Audit Logs coverage)
Phase 4 — Exploitation and Privilege Escalation
- [ ] Documented exploitation attempts against identified vulnerabilities
- [ ] IAM privilege escalation path execution (within authorized scope)
- [ ] Lateral movement between cloud accounts or services (within authorized scope)
- [ ] Metadata service credential harvesting simulation (if in scope)
Phase 5 — Post-Exploitation and Impact Assessment
- [ ] Data access confirmation (identifying what data a successful attacker could reach)
- [ ] Persistence mechanism identification (Lambda backdoors, IAM key creation)
- [ ] Blast radius documentation for each confirmed exploitation path
Phase 6 — Reporting and Remediation Support
- [ ] Finding documentation with cloud resource identifiers (ARNs, resource IDs)
- [ ] CVSS scoring or equivalent severity classification per finding
- [ ] Remediation guidance mapped to CSP-specific controls
- [ ] Tester credentials revoked; post-engagement access removal confirmed
- [ ] Retest scope defined for critical findings
Reference table or matrix
| Dimension | IaaS | PaaS | SaaS |
|---|---|---|---|
| Primary attack surface | VMs, virtual networks, storage, IAM | Managed services, serverless, containers | Authentication, API endpoints, tenant isolation |
| CSP authorization required | Yes (AWS/Azure/GCP policies) | Yes | Typically yes; varies by provider |
| Key MITRE ATT&CK categories | Execution, Persistence, Privilege Escalation | Defense Evasion, Credential Access | Initial Access, Collection |
| Common finding types | Open security groups, exposed S3 buckets, IMDSv1 | Lambda env variable secrets, misconfigured Kubernetes RBAC | OAuth misconfiguration, excessive API scopes |
| FedRAMP test category applicability | Full | Full | Partial (customer-controlled components) |
| PCI DSS 11.4.1 applicability | Yes, if CDE in scope | Yes, if CDE in scope | Yes, if CDE in scope |
| Primary knowledge model | Gray-box (most common) | Gray-box | Black-box or gray-box |
| Logging artifacts generated | CloudTrail, VPC Flow Logs | Function logs, audit logs | Application logs, CASB |
| Relevant CSA CCM domain | IVS, IAM | DSP, CCC | AIS, GRC |
| Cloud Provider | Penetration Testing Policy | Advance Notification Required | Prohibited Test Types |
|---|---|---|---|
| AWS | AWS Penetration Testing Policy | No (for permitted services) | DoS, DNS zone walking, port/protocol flooding |
| Microsoft |