GuideCloud Security8 min readIntermediate

Cloud Penetration Testing for AWS, Azure and GCP

What cloud penetration testing covers on AWS, Azure and GCP: provider testing policies, the IAM attack paths testers look for, and how to prepare.

Most modern products run in AWS, Microsoft Azure or Google Cloud. The cloud has changed what attackers go after. Instead of exploiting a single unpatched server, they look for an identity with slightly too much access, a storage bucket that’s more open than intended, or a CI/CD pipeline that can deploy anything.

This guide explains what a cloud penetration test covers, what each provider allows, the identity attack paths testers spend most of their time on, and how to prepare your accounts. It’s written for engineering and platform leads planning a first cloud test.

What a cloud penetration test is (and isn’t)

Cloud providers work on a shared responsibility model. The provider secures the physical data centres, the hypervisors and the managed service platforms. You secure everything you configure on top: identities and permissions, network rules, storage settings, secrets, and the workloads you deploy.

A cloud penetration test focuses on your side of that line. It doesn’t attack the provider’s infrastructure. It asks whether the way you’ve configured and connected your cloud services lets an attacker go further than you intended.

In practice, most cloud tests combine two approaches:

  • Configuration review. A read-only look across your accounts, subscriptions or projects for risky settings: public storage, broad network rules, missing logging, weak identity policies.
  • Authenticated attack-path testing. Starting from a realistic foothold, such as a compromised developer credential or a vulnerable workload, testers try to escalate privileges and reach sensitive data, just as an attacker would.

The review gives breadth. The attack-path testing shows which issues actually matter and how they chain together.

What the providers allow

All three major providers let you test your own resources without asking permission first. Each one also publishes rules you must follow. The summaries below were accurate when this guide was written. Policies change, so always read the current version before testing.

AWS

AWS says customers can carry out security assessments or penetration tests of their AWS infrastructure without prior approval for a published list of services. That list includes common services such as EC2, RDS, Aurora, Lambda, API Gateway, CloudFront, Elastic Load Balancing, ECS and Fargate.

AWS explicitly prohibits some activities, including:

  • Denial-of-service and simulated denial-of-service testing, including port, protocol and request flooding
  • DNS zone walking through Route 53 hosted zones, DNS hijacking and DNS pharming
  • Subdomain takeover and S3 bucket takeover

Some activities need advance notice through AWS’s simulated events form, including red team exercises, phishing simulations and malware testing. AWS asks for that at least two weeks ahead. DDoS resilience testing has its own separate policy.

Check the current AWS penetration testing policy before you start.

Microsoft Azure

Microsoft stopped requiring pre-approval for Azure penetration testing in 2017. Testing must follow the Microsoft Cloud Unified Penetration Testing Rules of Engagement, which Microsoft treats as the authoritative source.

You can test Azure resources you own, and third parties can test with explicit written authorisation from the owner. Prohibited activities include:

  • Denial-of-service testing of any kind, including simulating it
  • Accessing or testing tenants, data or storage you don’t own or aren’t authorised to test
  • Using credentials or secrets that aren’t your own, including publicly leaked ones
  • Network-intensive fuzzing that generates excessive traffic
  • Phishing or social engineering against Microsoft employees, or using Microsoft services to phish others
  • Going beyond an initial proof of concept if you find a vulnerability in Microsoft’s own services. You must stop and report it to Microsoft instead

Microsoft also notes that its automated abuse detection may flag legitimate testing. Keep your written authorisation handy so you can respond quickly if that happens.

Read Microsoft’s penetration testing rules of engagement and its Azure penetration testing guidance before you start.

Google Cloud

Google says you don’t need to notify it before penetration testing your Google Cloud projects. You must follow the Google Cloud Acceptable Use Policy and Terms of Service, and make sure your tests only affect your own projects, not other customers.

Check Google’s current penetration testing guidance for Google Cloud before you start.

At a glance

AWS Azure Google Cloud
Pre-approval to test your own resources Not needed for listed services Not needed Not needed
Rules to follow AWS penetration testing policy Microsoft Cloud Unified Rules of Engagement Acceptable Use Policy and Terms of Service
Denial-of-service testing Prohibited (separate DDoS simulation policy) Prohibited Tests must only affect your own projects; check the AUP
Extra notice needed for Red team, phishing and malware simulations, among others Not required Not required

Where cloud attacks really happen: identity

In on-premises networks, attackers move between machines. In the cloud, they move between identities. A role, a service account or a managed identity is often worth more to an attacker than any single server.

That’s why most high-impact cloud findings are about identity and access management (IAM). Individually, a permission may look harmless. Combined with another, it can become a path to full control.

Common IAM attack paths

These patterns appear across all three providers, under different names:

  • Permission to change permissions. An identity that can edit policies, attach roles or add itself to a group can usually grant itself anything.
  • Passing a powerful role to something you control. If an identity can create a function, VM or container and attach a more privileged role to it, it can run code with that role’s access.
  • Overly broad role assumption or impersonation. Trust policies that let too many principals assume an admin role, or service accounts that too many users can impersonate.
  • Credentials inside workloads. Access keys in environment variables, instance metadata reachable through an SSRF vulnerability, or secrets stored in plain text in configuration.
  • CI/CD with deployment rights everywhere. A pipeline identity that can deploy to production is a high-value target. So is anyone who can change the pipeline.
  • Cross-account trust. Roles that trust another account, partner or third-party tool more broadly than needed.

A tester’s job is to find these chains and prove them, safely. A finding that says “this developer credential can reach the production database in four steps” is far more useful than a list of hundreds of loosely related warnings.

Beyond identity

Identity is the centre, but a good cloud test also covers:

  • Storage exposure. Buckets, blobs and snapshots that are public or shared more widely than intended.
  • Network exposure. Security groups and firewall rules open to the internet, exposed management ports, and missing segmentation between environments.
  • Secrets management. Where secrets live, who can read them, and whether they are rotated.
  • Logging and monitoring. Whether audit logs are enabled, protected from tampering, and actually watched.
  • Kubernetes and containers. Cluster permissions, exposed dashboards, privileged pods and how workloads get cloud credentials.
  • Serverless. Function permissions, triggers that accept untrusted input, and environment secrets.

How a cloud test runs

Our cloud tests follow a pattern that works across providers.

  1. Scoping. We agree which accounts, subscriptions or projects are in scope, which starting identities to simulate, and what is off limits.
  2. Configuration review. Using read-only access, we review identity, network, storage, logging and workload settings against good practice and your own requirements.
  3. Attack-path testing. From the agreed starting points, we try to escalate privileges and reach sensitive assets, avoiding destructive actions.
  4. Validation. Every finding is reproduced manually. Configuration issues that don’t lead anywhere are rated accordingly, not inflated.
  5. Reporting and retest. You get a report showing each issue, the attack paths it enables, and how to fix it, followed by a retest once you’ve made changes.

You can read more about our approach on the cloud security testing page and in our methodology.

How to prepare

Good preparation makes the test faster and the results more relevant.

Access

  • A read-only role in each in-scope account, subscription or project, for the configuration review. Built-in read-only or security-audit roles are often enough.
  • Starting identities for attack-path testing. For example, a low-privilege developer account, or a workload identity similar to one an attacker might steal.
  • Access that works before kickoff. Test the roles and any single sign-on before the first test day. Access problems are the most common cause of lost time.

Boundaries

  • A list of every account, subscription or project in scope, and any explicitly out of scope
  • Any production resources where even read-only activity needs extra care
  • Third-party services connected to your cloud and how they should be treated

Context

  • A short architecture overview or diagram
  • Which data and systems matter most to the business
  • How identities are managed: single sign-on, federation, break-glass accounts
  • Any known issues you’d like confirmed or ruled out

What you get at the end

A useful cloud test report should give you:

  • An executive summary that explains your overall exposure in plain language
  • Each attack path, step by step, with evidence
  • Configuration findings rated by real impact, not just by rule
  • Clear remediation for each issue, specific to your provider
  • Retest results showing what’s been fixed

If you’re working towards SOC 2 or ISO 27001, cloud findings and their remediation also make strong evidence of vulnerability management in practice.

Summary

Cloud penetration testing is about the parts of the cloud you control, especially identity. All three major providers let you test your own resources without asking first, but each sets firm rules, and AWS and Azure explicitly prohibit denial-of-service testing. Prepare read-only access, agree realistic starting points, and list your boundaries clearly, and the test can focus on finding the paths an attacker would actually use.

If you’re planning a cloud test, get in touch and we’ll help you scope it.

Frequently asked questions

Do we need to tell AWS, Microsoft or Google before a penetration test?

At the time of writing, no notification is needed to test your own resources on any of the three, as long as you follow their published rules. AWS asks for advance notice of some simulated events, such as red team exercises and phishing simulations. Always check each provider's current policy before testing, because these pages change.

Can a pentest break our cloud environment?

A careful test shouldn't. Configuration review is read-only, and attack-path testing uses agreed starting points and avoids destructive actions. Anything that could change resources is agreed with you in advance, and AWS and Azure explicitly prohibit denial-of-service testing anyway.

What access do testers need?

Usually a read-only role in each account, subscription or project for the configuration review, plus one or more low-privilege identities to start attack-path testing from. We agree the exact permissions during scoping.

Is a cloud security posture tool enough?

Posture tools are excellent at flagging individual misconfigurations at scale. What they rarely show is how several harmless-looking permissions combine into a path to admin. That chaining is where manual testing adds the most.

Do you test Kubernetes and serverless too?

Yes, where they are in scope. Managed Kubernetes, containers, serverless functions and CI/CD access are common routes into cloud environments and are often included in a cloud test.

Need a pentest for an audit, a customer, or peace of mind?

Tell us what you need tested. You’ll get a fixed-fee proposal with tester-days and timeline stated, usually within a few days of the scoping call.