Join our Newsletter — 33% off our NHI Course
Home› Guides› Cloud Penetration Testing Guide: Scope, Provider Rules and…
Guide Offensive Security & Testing

Cloud Penetration Testing Guide: Scope, Provider Rules and Identity Paths

PDF for newsletter subscribers · free to read online

← All guides
By Lalit Choda, NHI Mgmt Group Updated 24 October 2026 17 min read
On this page

A cloud penetration test that is scoped like a data centre test misses the control plane, breaks provider rules or tests systems the customer does not own. In the cloud the attack surface is as much IAM roles, federation, workload identities and management APIs as it is virtual machines and open ports, and the provider sets its own rules on what customers may test. This guide is for buyers, asset owners and security managers who commission and govern a cloud penetration test on AWS, Microsoft Azure or Google Cloud. It covers scope under shared responsibility, each provider's testing policy, authorisation and contracts, identity paths as a scope area, safety and stop conditions, and how to handle findings and the credentials given to testers. It does not describe testing methods or tools. For the general programme see the Penetration Testing Guide; for the scoping worksheet see the Penetration Test Scoping Checklist.

Key takeaways

  • Scope what you control, not what the provider runs. Your accounts, subscriptions, projects, IAM configuration, workloads and data are in scope; the provider's hypervisors, shared services and other tenants never are.
  • Each provider has its own rules. AWS, Microsoft and Google Cloud do not require notice for ordinary testing of your own resources, but all three prohibit denial of service, and AWS requires a form at least two weeks ahead for red team, phishing, malware and command and control simulations.
  • Identity is the main cloud attack path. Ask testers to assess role assumption, cross-account trust, workload and service account permissions, federation and CI/CD credentials, and to report complete paths from a starting identity to sensitive data.
  • Authorisation must name exact resources. Written authorisation from the resource owner should list account IDs, subscription IDs, tenant IDs and project IDs, dates, source addresses and named contacts; a provider cannot authorise testing on your behalf.
  • Test credentials and reports are sensitive assets. Issue dedicated, short-lived, labelled identities to testers, revoke them at close, rotate anything exposed, and protect the report like the secrets it may contain.

What a cloud penetration test covers under shared responsibility

AWS describes shared responsibility as security "of" the cloud (provider) and "in" the cloud (customer); test scope follows the customer's share. The Cloud Security Alliance Cloud Penetration Testing Playbook makes the same point: customer-controlled systems such as a virtual machine in IaaS are in scope, while the hypervisor beneath it is not.

LayerCustomer controls (can be in scope)Provider controls (out of scope)Scope question for the asset owner
Identity and control planeIAM users, roles, policies, service accounts, service principals, federation trusts, organisation policiesThe IAM service itself, its APIs and infrastructureWhich identities and permission boundaries should testers start from?
IaaS compute and networkGuest OS, installed software, security groups, network security groups, firewall rules, load balancers you configureHypervisor, physical network, host hardwareWhich VPCs, VNets and subnets, and which instances are production?
Containers and serverlessCluster configuration, workload identities, function code and its execution roleManaged control plane hosts, shared runtimeWhich clusters and functions, and with which roles attached?
Managed data servicesData, access policies, encryption settings, key permissions, public access settingsStorage and database service internalsWhich buckets, databases and key vaults hold regulated data?
SaaS built on the cloudYour tenant configuration, users, integrations and OAuth grantsThe SaaS application and its infrastructureDoes the SaaS vendor allow customer testing at all, and under which terms?

Two scope decisions matter most. First, external versus assumed breach: an external test starts with no access and shows what the internet sees; an assumed-breach test starts from a given identity (a developer, a CI runner, a compromised workload) and shows how far that identity reaches. Second, configuration review versus penetration test: a configuration review checks settings against a benchmark; a penetration test shows whether weaknesses chain into real impact. Say in the statement of work which you are buying.

Provider testing policies at a glance

Service lists change: re-read each page before every engagement. Summary as read on 24 October 2026.

TopicAWSMicrosoft AzureGoogle Cloud
Notice for ordinary testing of your resourcesNot required for listed services (including EC2, RDS, Aurora, CloudFront, API Gateway, Lambda, ECS, Fargate, Elastic Beanstalk, Lightsail, OpenSearch, FSx, Transit Gateway, WAF, NAT gateways, ELB, AppSync, Global Accelerator, Bedrock AgentCore)Not required since 15 June 2017; the Microsoft Cloud Unified Penetration Testing Rules of Engagement are authoritativeNot required; follow the Acceptable Use Policy and Terms of Service
Explicitly prohibitedDoS and DDoS (including simulated), port, protocol and request flooding (including login and API flooding), Route 53 zone walking, DNS hijacking and pharming, S3 bucket and subdomain takeover, assessments of AWS infrastructure or AWS services themselves, outbound testing from API Gateway and Bedrock AgentCoreDoS of any kind, network-intensive fuzzing, using credentials that are not yours (including leaked ones), touching storage outside your subscription, phishing Microsoft employees, post-exploitation against Microsoft services beyond proof of conceptAnything that affects other customers' projects or breaches the Acceptable Use Policy
Needs advance approvalSimulated events form at least two weeks ahead for red, blue and purple team exercises, any command and control, simulated phishing, malware testing and iPerf; AWS aims to respond within two business days; China regions use a separate formDDoS resilience testing only through Microsoft-approved simulation partnersNot stated beyond the general policy
Reporting provider vulnerabilitiesVulnerabilities caused directly by AWS tools or services to AWS Security within 24 hours of completing testingTo MSRC promptly under coordinated vulnerability disclosureThrough the Google Vulnerability Reward Program
Other conditionsCustomer liable for damage to AWS or other customers; any tool with DoS capability must have it disabled; resellers answer for their customers' testsLabel test accounts and tenants with "MSOBB" where possible; Microsoft may interrupt any attack in progress and may suspend accounts that break the rulesReport through the VRP rather than probing Google infrastructure
  • Bandwidth and rate limits: AWS limits testing to the agreed services, bandwidth, requests per minute and instance types. Put the agreed rate in the rules of engagement.
  • Accidental access to provider data: Microsoft's rules say stop, notify MSRC, delete the data and record it in the report. Write the same rule into your contract for any provider or third-party data.
  • Microsoft 365 and other services: the Azure no-notice statement covers Azure; the unified rules of engagement cover Microsoft online services more broadly.

Authorisation, contracts and rules of engagement

Microsoft states that third parties such as consultancies and red teams need explicit written authorisation from the resource owner, documented in the service agreement before testing begins, and that Microsoft does not grant authorisation on the customer's behalf.

  1. Confirm ownership: list every in-scope AWS account ID, Azure subscription and tenant ID, and Google Cloud project and organisation ID, and confirm each is owned by the commissioning entity. Exclude accounts owned by partners or vendors unless they sign too.
  2. Write the authorisation letter: signed by someone with authority over the accounts, naming the testing firm, individual testers, start and end dates and times with time zone, source IP addresses, in-scope and out-of-scope resources.
  3. Agree the rules of engagement: testing windows, rate limits, production restrictions, data handling, stop conditions, communication channels and the out-of-hours escalation contact.
  4. Cover legal terms in the contract: liability and insurance, confidentiality, data protection terms if personal data may be seen (a processor agreement under UK or EU GDPR Article 28 where relevant), retention and destruction of test data and evidence, and subcontracting restrictions.
  5. File provider approvals: submit the AWS simulated events form where it applies and keep the approval reference with the authorisation.
  6. Tell the right internal people: the SOC, cloud platform team and incident response lead should know a test is running, unless the test is deliberately unannounced, in which case a named "white cell" contact confirms it within minutes.

Choosing the firm is a separate decision covered in the Penetration Testing Provider Buyer's Guide. For cloud work, ask for redacted identity path findings and the named testers' provider experience.

Identity and IAM paths as a scope area

In cloud breaches the decisive step is usually an identity that can do more than intended. Ask testers to assess these paths and to report each finding as a chain from a starting identity to an impact. The table lists what to request (what to assess, not how), with the ATT&CK technique defenders will recognise.

Scope item to requestWhy it mattersATT&CK reference for defendersEvidence to expect in the report
Permissions of starting identities (developer, CI runner, workload)Shows the real reach of a compromised everyday identityT1078.004 Cloud AccountsEffective permissions and the resources they reach
Privilege escalation through IAM changesRights to create keys or attach roles turn a low identity into an administratorT1098.001 Additional Cloud Credentials, T1098.003 Additional Cloud RolesWhich permission enabled the escalation and the policy that grants it
Role passing and service account impersonationAWS iam:PassRole and Google iam.serviceAccounts.getAccessToken let one identity act with another's rightsT1548.005 Temporary Elevated Cloud AccessThe pair of identities and the binding or policy linking them
Instance and workload metadata exposureApplications that can be made to fetch internal URLs may expose role credentialsT1552.005 Cloud Instance Metadata APIWhether metadata protections (such as AWS IMDSv2) are enforced
Cross-account, cross-tenant and federation trustsTrusts with partners, old accounts or external identity providers bypass local controlsT1078.004 Cloud AccountsList of trusts, their conditions and which are unused
Data store access from discovered identitiesConfirms whether paths end at regulated dataT1530 Data from Cloud StorageProof of access (metadata or a marker file), not bulk data
Visibility of the estate to a low-privilege identityBroad read rights make the rest of an attack easierT1580 Cloud Infrastructure Discovery, T1526 Cloud Service Discovery, T1069.003 Cloud GroupsWhat a reader-level identity could enumerate

Safety and stop conditions

Write stop conditions into the rules of engagement so both sides can act on them at any hour.

  • Stop on unexpected data: if testers reach personal, payment or health data, another tenant's data or provider data, they stop, record the path without copying the data, and notify the named contact.
  • Stop on instability: errors, latency spikes, autoscaling events or cost alerts linked to testing pause the test until the asset owner agrees to resume.
  • No destructive changes: testers demonstrate the ability to modify or delete with a harmless marker (a tagged test object) rather than changing production resources.
  • Stop on real compromise indicators: signs of a genuine intruder go straight to incident response. See the Cloud Incident Response Guide.
  • Kill switch for test identities: the platform team can disable every tester identity in one action, and has rehearsed it.

Where identity fits: credentials given to testers

An assumed-breach test needs the organisation to hand over access, and those credentials become a real attack path if they leak or outlive the test. The Red Hat Consulting GitLab breach exposed tokens and connection strings held in customer engagement reports.

StageControlOwner
IssueDedicated identities per tester, never shared or personal accounts; names tagged as test accounts (Microsoft recommends "MSOBB" in test account or tenant names); MFA on human access; expiry set to the test end dateCloud platform team
ScopePermissions matching the agreed starting position, plus a permissions boundary or service control policy that blocks out-of-scope accounts and destructive actionsCloud platform team with asset owner
UseSource IP restriction where possible; all activity logged to a store testers cannot changeSecurity operations
Hand-overCredentials shared through a vault or one-time secret link, never email or chatEngagement manager
CloseDisable and delete identities, revoke sessions and keys, remove trust policies and test resources, confirm in writingCloud platform team
AfterRotate any secret found during testing, because it has now been seen by a third party and is written in a reportSecret owners

The broader rules for tester access appear in the Penetration Testing Guide; the rotation steps are in the Leaked Credential Response Playbook.

Handling findings and reports

  • Report structure: ask for findings grouped as attack paths (starting identity, each step, impact) as well as individual issues, with the exact policy, binding or setting that needs to change. The NCSC notes that risk decisions on findings remain the organisation's, not the tester's.
  • Severity in context: agree a scheme that weights identity reach and data sensitivity.
  • Secrets in reports: require testers to redact credentials and tokens in the report and evidence, and to store evidence encrypted with agreed retention and destruction dates.
  • Provider vulnerabilities: if testers find a flaw in the provider's own service, it is reported to the provider under its programme (AWS Security within 24 hours where the flaw comes from AWS tools or services, MSRC, Google VRP), not exploited further.
  • Remediation and retest: enter findings into the vulnerability management process with owners and due dates, and include a retest in the contract. See the Vulnerability Management Guide.
  • Risk acceptance: any finding not fixed gets a documented acceptance with an expiry date and a compensating control.

How to commission and run a cloud test

  1. Set the objective: for example, "can a compromised CI runner reach customer data in production?"
  2. Inventory the estate: accounts, subscriptions, projects, identity providers, federation trusts and CI/CD systems.
  3. Run your own checks first: configuration posture tooling and access analysers.
  4. Check provider rules: read the current AWS, Microsoft and Google pages and file the AWS simulated events form at least two weeks ahead if the test includes red team, phishing, malware or command and control.
  5. Sign authorisation and rules of engagement: as set out above, with contacts and stop conditions.
  6. Prepare test identities and logging: issue scoped, labelled, expiring identities; confirm that AWS CloudTrail, the Azure activity log and Entra ID sign-in and audit logs, and Google Cloud Audit Logs are capturing the in-scope accounts.
  7. Start in non-production or with a pilot slice: one account or project first, review the first day's activity and any side effects, then widen.
  8. Hold daily check-ins: critical findings are reported the same day, not saved for the report.
  9. Roll back at close: remove every test identity, resource, policy change and trust, compare against the pre-test configuration snapshot, and get written confirmation.
  10. Report, fix and retest: track remediation to closure and feed lessons into guardrails.

Decision guidance

SituationBetter choiceTrade-off
First test of a new cloud estateConfiguration review plus assumed-breach identity path testLess realism about external entry, far more coverage of what matters
Internet-facing application on cloudApplication test plus cloud configuration of its hosting accountTwo scopes to coordinate; see the Web Application Security Testing Guide
Mature estate with strong guardrailsObjective-based red team with provider approvalsMore cost and lead time; needs a white cell
Small organisation vs large multi-cloud estateSmall: annual assumed-breach test from a developer identity. Large: rolling programme by business unit plus cross-cloud federation pathsNeeds central scoping standards and a single findings register
Continuous assurance needed between testsBreach and attack simulation for repeatable checksCovers known scenarios only; see the Breach and Attack Simulation (BAS) Guide

Detection and measurement

Ask the SOC to record what it saw and compare with the testers' activity log at close.

  • What to monitor during the test: new access keys, role or binding changes, assumed roles from unusual sources, service account token creation, consent and federation changes, and data access spikes on in-scope stores.
  • Percentage of tester actions detected: share of reported steps that produced an alert or a log the SOC reviewed.
  • Time to detect and time to contain: for unannounced tests, from first action to alert and from alert to disabling the identity.
  • Identity paths to crown jewels: count of complete paths from a standard starting identity to regulated data; this should fall between tests.
  • Critical finding closure time: median days from report to verified fix.
  • Test hygiene: tester identities removed within one business day of close, and secrets rotated where exposed (target: all).

Framework mapping

FrameworkReferenceHow a cloud penetration test supports it
NIST SP 800-53 Rev. 5CA-8 Penetration Testing; CA-8(1) Independent Penetration Testing Agent or Team; CA-8(2) Red Team ExercisesIndependent testing of cloud systems, with red team exercises for mature estates
NIST SP 800-53 Rev. 5RA-5 Vulnerability Monitoring and Scanning; AC-6 Least PrivilegeFindings feed vulnerability management; identity path findings test least privilege
NIST CSF 2.0ID.RA-01; ID.IM-02; PR.AA-05Vulnerabilities identified and recorded; improvements from tests; access permissions reviewed
CIS Controls v8.1Control 18 Penetration TestingA programme of external and internal testing with remediation
ISO/IEC 27001:2022 Annex AA.8.8 Management of technical vulnerabilities; A.8.29 Security testing in development and acceptanceEvidence that vulnerabilities in cloud systems are found and treated
MethodologyNIST SP 800-115; CSA Cloud Penetration Testing PlaybookTesting process and cloud-specific scope boundaries for the provider to follow

Common failure patterns

  • Testing the network, missing the identity layer: a port-and-host test of cloud workloads with no assumed-breach phase. The Capital One breach turned on a firewall's role credentials and what that role could read, exactly the path an identity-scoped test is meant to find.
  • Trusting role names over permissions: scoping a role as harmless because of its name or description. The Azure Key Vault Contributor escalation showed a role described as having no data access could still lead to reading secrets.
  • Vague authorisation: letters naming "our AWS environment" rather than account IDs, so testers touch a partner's account.
  • Test access that never ends: tester users, keys and trust policies left in place after the report.
  • Reports full of live secrets: unredacted tokens and connection strings in reports and evidence, stored in shared drives and ticketing systems.
  • Red team without provider approval: command and control or phishing simulations on AWS without the simulated events form, leading to abuse reports and a stopped test.

Practitioner checklist

  • State one objective for the test and choose external, assumed-breach or both.
  • List every in-scope account, subscription, tenant and project ID and confirm ownership.
  • Read the current AWS, Microsoft and Google Cloud testing policies and file AWS simulated events forms two weeks ahead where needed.
  • Sign written authorisation and rules of engagement with dates, source IPs, contacts and stop conditions.
  • Put identity paths in the statement of work: role assumption, role passing, service account impersonation, federation, metadata and CI/CD credentials.
  • Issue dedicated, labelled, expiring tester identities with a permissions boundary, and rehearse the kill switch.
  • Confirm cloud audit logging is on for all in-scope accounts before day one.
  • Require redaction of secrets in reports and encrypted evidence with a destruction date.
  • Remove all tester access and test artefacts at close, rotate exposed secrets and schedule the retest.

Standards and references

Related NHI Mgmt Group resources: Penetration Testing Guide · Penetration Test Scoping Checklist · Penetration Testing Provider Buyer's Guide · Cloud PAM and CIEM Guide · Cloud Security Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Written and reviewed by Lalit Choda, NHI Mgmt Group. Last updated 24 October 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.