AWS, Azure, and GCP secure the underlying cloud. Everything built and configured on top of it, from identities and storage to workloads and exposed services, is the customer’s job to secure. That customer side is exactly what a cloud penetration test covers.
This guide explains what is and is not in scope, what gets tested in each of the three clouds, the rules each provider sets, and how a cloud test is scoped and run.
What Is Cloud Penetration Testing?
Cloud penetration testing is authorized, hands-on testing of the cloud resources a customer controls, including accounts, identities, storage, workloads, and internet-facing services. Its goal is to show whether an attacker could reach data or gain control.
The cloud provider’s own infrastructure and services are out of scope. Tests target only resources the customer owns and has authorized.
Cloud Penetration Testing vs. Cloud Scanning & Posture Tools
Scanning and posture tools are part of the vulnerability assessment process. They list misconfigurations and known vulnerabilities. A penetration test chains those findings together to show what an attacker can actually do.
The difference matters when you buy. A posture tool can flag an overly permissive role, and a penetration test shows what an attacker could reach with it.
What Gets Tested in a Cloud Penetration Test
The same layers are tested in every cloud, under different service names.
Layer | AWS | Azure | GCP |
|---|---|---|---|
Identity & access | IAM users, roles, and policies | Microsoft Entra ID users, roles, and service principals | Google Cloud IAM members, roles, and service accounts |
Object storage | S3 buckets | Blob Storage in storage accounts | Cloud Storage buckets |
Virtual machines & metadata | EC2 and the instance metadata service | Azure VMs and the instance metadata endpoint | Compute Engine and the metadata server |
Serverless | Lambda | Azure Functions and App Service | Cloud Functions and Cloud Run |
Kubernetes | EKS | AKS | GKE |
Secrets | Secrets Manager and Parameter Store | Key Vault | Secret Manager |
Logging & detection | CloudTrail and GuardDuty | Azure Monitor and Microsoft Defender for Cloud | Cloud Audit Logs and Security Command Center |
A test covers only the accounts, subscriptions, or projects the customer authorizes, and the layers tested depend on that scope.
AWS Penetration Testing: What Gets Tested
Testers look for these attack paths in AWS.
- Over-permissive IAM roles and policies: Privilege escalation paths, wildcard permissions, and cross-account trust.
- Public or misconfigured S3 buckets: Exposed data and writable buckets.
- Instance metadata exposure: Server-side request forgery against EC2 to reach IAM credentials, and whether IMDSv2 is enforced.
- Secrets in code and configuration: Keys in Lambda environment variables, instance user data, and repositories.
- Container and serverless workloads: EKS and Lambda permissions and exposed endpoints.
- Dangling DNS records: Records that still point at deleted cloud resources, found without taking over the resource.
Azure Penetration Testing: What Gets Tested
Azure testing leans on identity, because Microsoft Entra ID connects subscriptions, Microsoft 365, and hybrid environments.
- Entra ID configuration: Privileged roles, conditional access gaps, app registrations, service principals, and guest access.
- Managed identities & the metadata endpoint: Whether a compromised workload can request tokens for other resources.
- Storage accounts: Exposed blobs, shared access signature (SAS) tokens, and access keys.
- Key Vault access: Access policies and role assignments that expose secrets.
- App Service & Functions: Exposed endpoints, deployment credentials, and application settings.
- Hybrid paths: Connections between on-premises Active Directory and Entra ID.
GCP Penetration Testing: What Gets Tested
Testers look for these attack paths in GCP.
- Service accounts: Exposed keys, over-broad roles, and impersonation chains.
- IAM at project, folder & organization level: Permissions that are inherited down the resource hierarchy.
- Cloud Storage buckets: Public access and overly permissive bucket permissions.
- Compute Engine metadata server: Server-side request forgery to reach service account tokens.
- Cloud Functions & Cloud Run: Unauthenticated invocation and secrets in environment variables.
- GKE: Cluster access, workload identity, and exposed APIs or dashboards.
Cloud Penetration Testing Policies: What AWS, Azure & GCP Allow
All three providers let customers test their own resources within published limits, and none allows testing the provider’s own infrastructure or services.
AWS Penetration Testing Policy
AWS allows testing without prior approval for services on its published list of permitted services, such as EC2, RDS, and Lambda. Testing other services means working directly with AWS Support, and command and control (C2) testing needs prior approval through the Simulated Events process. Some activities, including DNS zone walking via Route 53, S3 bucket takeover, and subdomain takeover, are prohibited. See the current AWS penetration testing policy for the full list.
Azure Penetration Testing Rules of Engagement
Microsoft stopped requiring pre-approval on June 15, 2017, but every test must follow the Microsoft Cloud penetration testing rules of engagement.
GCP Penetration Testing Policy
Google does not require customers to contact it before penetration testing their own Google Cloud resources. Testing must follow the Cloud Platform Acceptable Use Policy and Terms of Service and affect only the customer's own projects. Refer to the Google Cloud Security FAQ for the current guidance.
How a Cloud Penetration Test Is Scoped & Run
Scope is set by each account, subscription, or project, not by IP range alone.
Outside-In Testing
External penetration testing starts with what an attacker can see from the internet, such as public IPs, DNS records, exposed storage, and exposed services, and then tests what it finds.
Assumed-Breach Testing With Cloud Credentials
Testers receive a limited role or set of credentials to show how far an attacker with a foothold could go. That includes privilege escalation, movement across accounts or subscriptions, and access to data.
A good report includes proof of exploitation, the attack path, remediation guidance, and a retest to confirm the fix.
Cloud environments also need testing more often than once a year, because resources, roles, and permissions change constantly and cloud migrations expand your attack surface faster than a yearly test can track.
How Sprocket Tests Your Cloud-Exposed Attack Surface
Sprocket approaches the cloud from the outside in, focusing on the internet-facing assets an attacker can reach.
- Continuous discovery. Attack surface management continuously discovers external assets, including cloud-hosted ones, and feeds them into continuous penetration testing, where expert penetration testers validate findings.
- AWS discovery. The AWS Scanner finds public IPs, AWS-registered domains, and DNS records that point at cloud-hosted assets, from an external attacker’s viewpoint, and feeds them into attack surface management and continuous penetration testing.
- Unlimited retesting. After you apply a fix, you can request verification at no additional cost, with no re-scoping.
Scoping Your Cloud Penetration Test
Identities, storage, workloads, and exposed assets are tested in each cloud, under different names. The providers differ in service names and policies, but a good test follows the same path in each, from exposed assets to identity to data, and scope decides what it finds.
Find What’s Exposed in Your Cloud Environment
The first step is knowing which cloud-hosted assets are exposed to the internet. Sprocket ASM Community Edition is a free way to start.
Try Sprocket ASM Community Edition →