cloudpentest

AWS · Azure · Google Cloud

A cloud security assessment, by the provider’s own rules

Cloud findings are configuration and identity far more often than they are exploits, and every hyperscaler publishes exactly what you may test. This is the reference: what is open, what needs notice, what is prohibited outright, and what access a tester actually needs.

  • Provider policies quoted
  • Primary sources linked
  • NIS2 · DORA

Where the line falls

The provider secures the cloud. You secure what you put in it.

Shared responsibility is not a diagram for slide decks. It is the sentence that decides what a tester may look at, what they will find, and what is off limits before anyone writes a rule of engagement.

Customer sideIn scope

identity Identity and access Users, roles, service principals, service accounts, trust policies, federation and consent. Microsoft states that for every deployment type “you own your data and identities”.
configuration Configuration Network rules, storage exposure, key policies, logging, admission control, metadata service settings. This is where the findings are.
data Data and its classification Customer data and encryption decisions sit in the customer column of every provider matrix, including for abstracted services such as Amazon S3 and DynamoDB.
workload Application and guest OS On IaaS, AWS puts guest operating system updates and patches, installed software and firewall configuration squarely on the customer.

Provider sideOut of bounds

facilities Physical and environmental Datacentres, cabling, hardware. Inherited controls: the customer does not implement them, and cannot test them.
hypervisor Hypervisor and host fleet The virtualisation layer under your instances. Escaping it is a platform vulnerability, reportable to the provider, not a customer finding.
control-plane Managed control planes The service internals behind a managed database or managed Kubernetes API. You test your configuration of them, not their implementation.
tenants Anything you do not own Every provider draws the same hard line: your test must not reach another tenant, subscription, project or customer.

AWS calls the split “security of the cloud” against “security in the cloud”. Microsoft’s matrix keeps customer data, configuration and identity in the customer column for on-premises, IaaS, PaaS and SaaS alike. Google puts it most plainly: “Most cloud security breaches are the direct result of misconfiguration.” All three are linked in the scope guide.

Rules of engagement

What each provider actually lets you test

None of the three requires approval for an ordinary penetration test of your own resources. All three prohibit denial of service. The differences sit in the detail, and the detail is where engagements go wrong.

  • No approval
  • Notice or terms
  • Prohibited

Amazon Web ServicesService-scoped permission

No approval

  • Assessment of a named list of services without advance permission: EC2, WAF, NAT gateways and load balancers, RDS, Aurora, CloudFront, API Gateway, AppSync, Lambda and Lambda@Edge, Lightsail, Elastic Beanstalk, ECS, Fargate, OpenSearch Service, FSx, Transit Gateway, Bedrock AgentCore and Global Accelerator.
  • Everything you configure on those services: identity, network rules, storage policy and application behaviour.

Two weeks’ notice

  • Simulated events must be submitted at least two weeks before the start date: red, blue or purple team testing with command and control, DDoS simulation, iPerf network testing, simulated phishing campaigns and malware testing.
  • A service that is not on the permitted list is not automatically forbidden, but it is not covered by the published permission either. Check the policy page before you touch it.

Prohibited

  • Denial of service and distributed denial of service; port, protocol and request flooding, including login and API request flooding.
  • DNS zone walking and DNS hijacking via Amazon Route 53.
  • S3 bucket takeover and subdomain takeover.

AWS Customer Support Policy for Penetration Testing

Microsoft AzureRules of engagement bind

No pre-approval

  • Since 15 June 2017 Microsoft has not required pre-approval to test Azure resources. Notification is not required either.
  • Fuzzing, port scanning and vulnerability assessment of your own virtual machines; traffic that tests surge capacity within your own applications.
  • Testing your tenant’s own monitoring and detection, and evaluating Conditional Access or Intune application-management policies.
  • Attempting to break out of shared service containers such as Azure App Service or Azure Functions, stopping and disclosing responsibly on success.

Conditions apply

  • A third party testing on your behalf needs explicit written authorization from the resource owner. Microsoft does not grant it for you: put it in the service agreement before testing starts.
  • DDoS resilience is exercised only through Microsoft-approved simulation partners, never as a direct test.
  • Using Azure as the source of testing aimed at systems elsewhere still falls under the same rules of engagement.

Prohibited

  • Denial of service testing of any kind, including tests that determine, demonstrate or simulate it. DDoS is prohibited under all circumstances.
  • Touching tenants, systems, logs, data or storage accounts you do not own or have permission to test; using credentials or secrets that are not your own, leaked ones included.
  • Network-intensive fuzzing or automated testing that generates excessive traffic.
  • Phishing or social engineering against Microsoft staff, or using Microsoft services to phish anyone else.
  • Post-exploitation against Microsoft’s own services beyond an initial proof of concept. Stop and report to the Microsoft Security Response Center.

Microsoft Cloud Unified Penetration Testing Rules of Engagement

Google CloudStay in your projects

No notification

  • Google does not require notification before you conduct a penetration test against your own Cloud Platform infrastructure.
  • Your own projects, and everything you have configured inside them.

Terms apply

  • The Acceptable Use Policy and the Cloud Platform Terms of Service still bind the test in full.
  • Vulnerabilities discovered in Google’s own platform go to the Vulnerability Reward Program rather than being exploited further.

Prohibited

  • Anything that reaches beyond your own projects. Google’s condition is explicit: tests must only affect your projects, and not other customers’ applications.

Google Cloud Platform FAQ: penetration testing

Provider policies change. Every line here was read from the provider’s own page and is linked above; treat those pages, not this one, as authoritative on the day you test. The full text, including the AWS permitted-service list, is in the rules of engagement guide.

Scope checker

Work out your scope before the kick-off call

Pick your providers, what you run and whether it is production. The checker returns the published position for that combination: what is open, what needs notice, what is prohibited, the test areas that matter for that stack, and the access a tester will ask for.

Interactive mode is not available. You can read the full reference content below. No answers are assessed and no result is calculated.

  • AWS permits assessment of a named service list without advance permission, including EC2, RDS, Aurora, CloudFront, API Gateway, AppSync, Lambda, Lightsail, Elastic Beanstalk, ECS, Fargate, OpenSearch Service, FSx, Transit Gateway and Global Accelerator. Simulated events, which include command-and-control red teaming, DDoS simulation, simulated phishing and malware testing, must be submitted at least two weeks in advance.
  • Microsoft Azure has not required pre-approval since 15 June 2017, but the Microsoft Cloud Unified Penetration Testing Rules of Engagement remain binding, and a third-party tester needs explicit written authorization from the resource owner.
  • Google Cloud requires no notification, provided the test complies with the Acceptable Use Policy and Terms of Service and affects only your own projects.
  • Prohibited on every provider: denial of service in any form, reaching resources you do not own, and using credentials that are not yours. AWS additionally prohibits Route 53 DNS zone walking and hijacking, and bucket and subdomain takeover.
  • Access a tester needs: a read-only audit role for configuration and identity review, one credentialed low-privilege principal per persona for privilege-escalation testing, cluster credentials where managed Kubernetes is in scope, and a written authorization naming the scope, the window and the testers.
  • Test areas that carry most findings: instance metadata reachability, the scope of identities attached to compute, cross-account trust policies, storage and secret exposure, and Kubernetes RBAC together with the cluster-to-cloud pivot.
Scope this with OffSeq

Providers

What you run

Environment

ProfileAWS / VM·K8S / PROD

Live

Testing against production

Everything runs against systems people depend on. No destructive tests, no denial of service under any circumstances, agreed rate limits, and a read-only pass before anything credentialed. Providers run automated abuse detection and may interrupt work that is entirely within the rules, so keep the authorization document within reach.

No approval Test without asking the provider 2

  • AWS AWS names the services you may assess without advance permission: EC2, WAF, NAT gateways and load balancers, RDS, Aurora, CloudFront, API Gateway, AppSync, Lambda and Lambda@Edge, Lightsail, Elastic Beanstalk, ECS, Fargate, OpenSearch Service, FSx, Transit Gateway, Bedrock AgentCore and Global Accelerator.
  • AWS · VM EC2 instances you own, including the guest operating system, the instance profile attached to them and the instance metadata service configuration.

Notice or terms Needs notice, authorization or a partner 3

  • AWS Simulated events need a form filed at least two weeks before the start date: red, blue or purple team testing with command and control, DDoS simulation, iPerf network testing, simulated phishing campaigns and malware testing.
  • AWS · K8S Amazon EKS is not named on the AWS permitted-service list. Test the workloads, node instances and IAM roles you own, and confirm the current policy before approaching the managed control plane.
  • PROD Live testing needs an agreed window, rate limits, a named escalation contact and a documented stop condition. Providers may interrupt activity in progress at their discretion even when the test is entirely valid.

Prohibited Prohibited, whatever your own authorization says 3

  • AWS Denial of service and distributed denial of service, port flooding, protocol flooding and request flooding, including login request flooding and API request flooding.
  • AWS DNS zone walking via Amazon Route 53, and DNS hijacking via Route 53.
  • AWS S3 bucket takeover and subdomain takeover.

Test areas What actually matters for this stack 8

  • IAM Identity attack paths across the whole account, subscription or organization. Most cloud findings are a chain of individually reasonable permissions rather than one broken service.
  • VM Reachability of the instance metadata service from the application layer. On AWS that means whether IMDSv2 is required, and what the response hop limit is; the metadata address is 169.254.169.254.
  • VM The scope of the identity attached to each host: an EC2 instance profile, an Azure managed identity, a Compute Engine service account. What the identity can reach matters more than whether the host is patched.
  • VM Guest operating system, runtime and application patching. Every shared responsibility model puts this half of an IaaS host on the customer.
  • K8S RBAC escalation paths: the escalate, bind and impersonate verbs, plus who may create workloads, list secrets, create persistent volumes or reach nodes/proxy.
  • K8S Pod Security Standards enforcement per namespace, and whether privileged or hostPath workloads are admitted anywhere in the cluster.
  • K8S Whether workloads can reach the cloud metadata API. This is the cluster-to-cloud pivot, it is item K08 in the OWASP Kubernetes Top Ten, and filtering it is on the Kubernetes project’s own baseline checklist.
  • K8S Default-deny network policy in every namespace, and whether the Kubernetes API, the kubelet API or etcd are reachable from the internet.

Access What the tester needs from you 5

  • DOC Written authorization from the account, subscription or organization owner, naming the scope, the window and the testers. Azure’s rules of engagement require it for third-party testers, and it is good practice everywhere.
  • AWS A read-only audit role assumable from the tester’s account and protected with an sts:ExternalId condition. SecurityAudit and ViewOnlyAccess cover most configuration and identity review.
  • IAM One credentialed low-privilege principal for each persona you want tested. Privilege-escalation paths cannot be proven from a read-only role alone.
  • K8S Cluster credentials: a read-only ClusterRole for the review pass, and a namespace-scoped service account for the workload-level tests.
  • PROD A named escalation contact reachable for the whole window, a documented stop condition, and confirmation that alerting teams know a test is running if the engagement is not a detection exercise.
Scope this with OffSeq

Provider policies are the authoritative source and can change without notice: confirm the current policy pages before every engagement. This checker reflects published rules for the profile you selected. It is not legal advice and it is not authorization to test anything.

What we are looking for

Three paths that carry most cloud findings

None of these needs a vulnerability. Each is a chain of permissions and settings that were reasonable on their own, drawn the way an attacker would traverse them.

PATH-02Identity

Delegation reaches further than the delegate

  1. role/build-runner A pipeline identity with permission to create functions
  2. iam:PassRole Permitted to pass a role, without a resource restriction
  3. role/data-reader A stronger role attached to a newly created function
  4. s3://finance-exports Data the pipeline identity was never granted

What breaks the chain Filter iam:PassRole with the policy’s Resource element and the iam:PassedToService condition key. AWS warns directly against letting a user pass a role that carries more permissions than the user should have.

PATH-03Storage

A control that was switched off, not overridden

  1. PutBucketPolicy An engineer holds permission to change bucket policy
  2. BlockPublicPolicy = false Block Public Access set at bucket level only
  3. Principal: "*" A policy statement that qualifies as public
  4. s3://acme-exports/* Objects readable from the internet

What breaks the chain Apply all four Block Public Access settings at the account level. AWS notes that a user able to change a bucket policy could otherwise disable the bucket-level settings, and that removing a setting makes an existing public policy effective again.

PATH-04Kubernetes

The cluster is a door into the account

  1. ns/payments · create pods A namespace role that can create workloads
  2. serviceaccount/etl Pods may run as any service account in the namespace
  3. 169.254.169.254 Workload egress to the cloud metadata API is unfiltered
  4. node instance role Cloud credentials belonging to the node, not the pod

What breaks the chain Filter workload access to the cloud metadata API, apply a default-deny network policy per namespace, and grant create on workloads only where it is needed. Kubernetes documents that creating workloads implicitly grants the API access of any service account in that namespace.

How an assessment runs

Configuration review first, then the paths, then the proof

A cloud assessment is not a network test with different targets. The order matters: read the whole account before you touch anything, because the account tells you which paths are worth walking.

  1. P1

    Authorize and scope

    Accounts, subscriptions and projects in scope; the provider policies that apply; the environment; the window; the escalation contact. Authorization is written, and for Azure that written authorization from the resource owner is a rules-of-engagement requirement rather than a courtesy.

    Output A signed scope and rules-of-engagement document naming every account and every constraint.

  2. P2

    Read the account

    A read-only pass over identity, network, storage, keys, logging and workload configuration, measured against the CIS Benchmark for that provider. Nothing is changed and nothing is exploited: this phase exists to build an accurate map.

    Output A configuration baseline with every deviation recorded against a benchmark control.

  3. P3

    Build the identity graph

    Resolve who can become whom. Role trust policies, PassRole and impersonation grants, cross-account trust, federation, service accounts and workload identities, resolved into reachability rather than a list of policies.

    Output An identity graph with the reachable escalation paths ranked by what they reach.

  4. P4

    Walk the paths

    Prove the paths that matter, from a credentialed low-privilege principal, inside the provider’s rules. No denial of service, no destructive action, and nothing that reaches a tenant you do not own.

    Output Reproducible evidence for each proven path, with the exact permissions that made it possible.

  5. P5

    Report and retest

    Findings written against the control that fixes them, not the tool that found them. Each one carries the responsible party, because in a cloud account that is not always the same team.

    Output A report, a prioritised remediation list, and a retest of the fixes.

Reference frameworks

What the findings are measured against

Configuration review is only credible against a published baseline, and identity findings are only comparable when they map to named techniques. These are the references a cloud assessment cites.

Baselines and cataloguesPublic

CIS Benchmarks Center for Internet Security 25+ product families Consensus configuration recommendations covering AWS, Azure, Google Cloud, Oracle Cloud and Kubernetes, including the EKS, AKS and GKE variants. Level 1 is a base recommendation designed not to have an extensive performance impact; Level 2 is defence in depth for environments where security is paramount.
CSA CCM v4.1 Cloud Controls Matrix and CAIQ 197 objectives · 17 domains A cybersecurity control framework for cloud computing, with the Consensus Assessments Initiative Questionnaire built in as a yes or no assessment of a provider. It maps to ISO, NIST and PCI DSS, which is how a cloud finding reaches an existing compliance programme.
OWASP K8s Top 10 OWASP Kubernetes Top Ten K01 to K10 Insecure workload configurations, overly permissive authorization, secrets management failures, missing policy enforcement and network segmentation, exposed components, vulnerable cluster components, cluster-to-cloud lateral movement, broken authentication, and inadequate logging.
ATT&CK Cloud MITRE ATT&CK Cloud matrix IaaS · SaaS · IdP · Office The behavioural catalogue for cloud intrusions. The identity techniques matter most here: valid accounts, additional cloud credentials and additional cloud roles are how a foothold becomes durable access.
K8s baseline Kubernetes security checklist Project guidance The project’s own baseline, including default-deny network policy per namespace, no public exposure of the API, kubelet API or etcd, and filtered workload access to the cloud metadata API. The page itself warns that a checklist is not sufficient on its own.

None of these is a substitute for the others. A CIS Benchmark tells you whether a setting is right; the OWASP and ATT&CK catalogues tell you what an attacker does with the settings that are not; the CSA matrix tells an auditor how both map onto the control framework they already use.

EU drivers

Why European buyers commission cloud testing

Two instruments now put cloud assurance on a legal footing in the EU. Neither says “penetration test your cloud” in those words, and both make it very hard to argue you do not need to.

NIS2 · Article 21(2)(f)

The measures … shall include at least the following: … policies and procedures to assess the effectiveness of cybersecurity risk-management measures.
Directive (EU) 2022/2555, EUR-Lex

DORA · Article 25(1)

The digital operational resilience testing programme … shall provide … for the execution of appropriate tests, such as vulnerability assessments and scans … source code reviews where feasible, scenario-based tests … end-to-end testing and penetration testing.
Regulation (EU) 2022/2554, EUR-Lex
  • Supply chain reaches your provider

    NIS2 Article 21(2)(d) covers supply chain security, including security-related aspects of the relationship between an entity and its direct suppliers or service providers. Your cloud provider is one of them, and the part of the stack you configure is the part you can evidence.

  • Cloud providers have their own rulebook

    Commission Implementing Regulation (EU) 2024/2690 sets the technical requirements for cloud computing service providers under NIS2. Its Annex point 6.5 requires a security testing policy, tests carried out to a documented methodology, documented results with a criticality assessment, and mitigating action on critical findings.

  • Configuration is a named requirement

    The same Annex, at point 6.3, requires relevant entities to establish, document, implement and monitor security configurations of hardware, software, services and networks, and to put processes and tools in place to enforce them. That is a configuration review with a legal citation.

  • Financial entities test yearly, and deeper every three

    DORA Article 24(6) requires appropriate tests at least yearly on all ICT systems and applications supporting critical or important functions. Article 26 adds threat-led penetration testing at least every three years for the entities authorities identify.

  • A hyperscaler will not be red-teamed for one customer

    DORA Article 26(3) requires an entity to secure the participation of in-scope ICT third-party providers while retaining full responsibility. Article 26(4) then allows the provider to contract an external tester directly for a pooled test covering several financial entities, which is the mechanism that exists precisely because per-customer platform testing does not scale.

Questions

Common questions about cloud penetration testing

Short answers with the provider or the instrument named. The detail sits in the guides.

Do I need permission from AWS, Azure or Google Cloud to run a penetration test?

Not for an ordinary test of your own resources. AWS publishes a list of services you may assess without advance permission. Microsoft has not required pre-approval for Azure since 15 June 2017, though the Microsoft Cloud Unified Penetration Testing Rules of Engagement remain binding. Google requires no notification, provided you comply with the Acceptable Use Policy and Terms of Service and your tests only affect your own projects.

Approval is needed for AWS simulated events, which cover command-and-control red teaming, DDoS simulation, iPerf network testing, simulated phishing and malware testing. Those must be submitted at least two weeks before the start date.

What is prohibited on every cloud provider?

Denial of service in any form. AWS prohibits DoS and DDoS along with port, protocol and request flooding; Microsoft prohibits DoS testing of any kind and states that DDoS is prohibited under all circumstances. All three also prohibit reaching anything you do not own. AWS additionally prohibits Route 53 DNS zone walking and hijacking, S3 bucket takeover and subdomain takeover, and Microsoft prohibits using credentials that are not your own, including publicly leaked ones.

Can a third-party consultancy test my cloud environment?

Yes, with the account owner’s authorization. Microsoft is explicit: third parties may test if they hold explicit written authorization from the resource owner, Microsoft does not grant that authorization on the customer’s behalf, and it should be documented in the service agreement before testing begins. Treat that as the standard for all three providers and keep the document accessible during the test.

Why is a cloud assessment mostly configuration review rather than network testing?

Because of where the responsibility line falls. The provider secures the infrastructure, so hosts, hypervisors and physical facilities are both out of your control and out of bounds. What remains yours is identity, configuration, data and the application, and that is where the findings are. Google states the position directly: most cloud security breaches are the direct result of misconfiguration.

What is an identity attack path?

A sequence of individually legitimate permissions that together reach something the starting identity was never meant to reach. A pipeline role that may pass a stronger role to a function it creates, a Google Cloud principal holding Service Account Token Creator on a privileged service account, or a Kubernetes role that may create workloads and therefore run as any service account in the namespace. Nothing in the chain is a vulnerability, which is exactly why scanners miss it.

Does the assessment cover managed Kubernetes?

The parts you own: RBAC, workload configuration, Pod Security Standards enforcement, network policy, secrets handling and whether pods can reach the cloud metadata API. That last item is the cluster-to-cloud pivot, item K08 in the OWASP Kubernetes Top Ten. Managed control planes are provider-operated, so you test your configuration of them, not their implementation, and on AWS note that EKS is not named on the permitted-service list.

What access do you need to run the assessment?

A read-only audit role for the configuration and identity pass: SecurityAudit and ViewOnlyAccess on AWS, assumable with an ExternalId condition; Reader plus Security Reader on Azure; Viewer plus Security Reviewer on Google Cloud. Then one credentialed low-privilege principal per persona you want tested, because escalation paths cannot be proven from a read-only role, and cluster credentials where Kubernetes is in scope.

Can you test against production?

Yes, and for cloud configuration it is usually the only environment that answers the question. It needs an agreed window, rate limits, a named escalation contact and a documented stop condition, and no destructive action at any point. Note that providers run automated abuse detection and may interrupt activity in progress even when the test is entirely within the rules, so the authorization document has to be at hand.

Does NIS2 require cloud penetration testing?

Not in those words. NIS2 Article 21(2)(f) requires policies and procedures to assess the effectiveness of cybersecurity risk-management measures, and point (d) covers supply chain security including relationships with service providers. For cloud computing service providers themselves, Commission Implementing Regulation (EU) 2024/2690 is concrete: its Annex requires a security testing policy, tests to a documented methodology, documented results and mitigating action on critical findings.

How does DORA treat cloud providers in testing?

Article 25(1) lists penetration testing among the tests a financial entity’s resilience programme must provide for, and Article 24(6) requires appropriate tests at least yearly on systems supporting critical or important functions. For threat-led penetration testing, Article 26(3) requires the entity to secure the participation of in-scope ICT third-party providers while retaining full responsibility, and Article 26(4) allows a provider to contract an external tester directly for a pooled test covering several financial entities.