logo svg
logo

October 15, 2025

Updated: November 5, 2026

Azure Penetration Testing: Methodology, Checklist & Report

How to scope and run an Azure penetration test: Microsoft rules of engagement, Entra ID enumeration, common attack paths, test cases and tools.

Hazem El-Sayed

Hazem El-Sayed

Featured Image

Azure penetration testing is an authorized, simulated attack on the Azure subscriptions and Microsoft Entra ID tenant your organization owns, run to find the misconfigurations and identity paths a real attacker could use. A typical engagement has six phases: scope and written authorization, external reconnaissance, identity and configuration review, attack-path validation, a detection check, and a report with retest. Microsoft has not required pre-approval since June 15, 2017, but every test must follow its rules of engagement, which ban denial-of-service testing and testing tenants you do not own.

Azure Cloud Penetration Testing Guide: A Complete Technical Blueprint

Cloud security is a cornerstone of modern enterprise defense, and Azure penetration testing has become a top priority for organizations relying on Microsoft’s cloud ecosystem. Unlike traditional on-prem infrastructures, Azure environments present a complex mix of identity-based security controls, network segmentation, SaaS integrations, and PaaS services. For penetration testers and security professionals, mastering these nuances is crucial to simulate real-world adversaries effectively. Teams also running on AWS can compare the best AWS penetration testing companies.

This comprehensive guide provides a structured methodology to conduct Azure cloud penetration testing—from initial enumeration to exploitation and post-exploitation—designed for intermediate to senior security professionals.

Azure Penetration Testing: The Short Answer

Azure penetration testing is an authorized simulation of attacks against the Azure resources and Microsoft Entra ID tenant an organization owns. It focuses on identities and permissions, exposed services, storage, containers, serverless functions and the paths an attacker could use to move from one foothold to sensitive data or control of a subscription.

Microsoft has not required pre-approval since June 15, 2017, but every test must follow the Microsoft Cloud Unified Penetration Testing Rules of Engagement. Denial-of-service testing, testing tenants you do not own and using credentials that are not your own are prohibited. Microsoft summarizes the rules on its Azure penetration testing page.

Table of Contents

Why Azure Penetration Testing Matters

Many large enterprises run critical workloads and identities on Azure and Microsoft Entra ID, making them a prime target for threat actors. While Microsoft provides robust security controls, misconfigurations, weak identity management, and excessive permissions remain the biggest attack surfaces. Experienced Azure consulting specialists can help organizations design secure cloud architectures, strengthen access controls, and reduce configuration-related risks.

For U.S. organizations testing Azure environments, regular penetration testing should be a non-negotiable part of cloud security programs that need to validate permissions, configurations, identity paths, and exposed services.

Penetration testing Azure environments helps organizations:

Pre-Engagement Rules and Scoping

Before launching any testing activity, clear rules of engagement must be established to remain compliant with Microsoft’s Cloud Penetration Testing Rules.

Key Scoping Considerations

Tip: Use a signed Rules of Engagement (RoE) document to protect both the testing team and the client, and if you're outsourcing the work, check how the leading cloud penetration testing companies define scope before you commit.

Understanding Azure Architecture

A solid understanding of Azure’s structure is essential to identify attack vectors. Azure resources are organized in a hierarchical model:

  1. Tenant → represents the organization’s identity boundary (Microsoft Entra ID, formerly Azure AD).
  2. Management Groups → used to manage multiple subscriptions.
  3. Subscriptions → billing and access boundary.
  4. Resource Groups → logical containers for resources.
  5. Resources → virtual machines, storage accounts, databases, Key Vaults, etc.

For UK teams validating Azure identity and access controls, Microsoft Entra ID controls access across Azure, M365, and connected SaaS applications, making privilege boundaries and permissions central to security review.

Azure Penetration Testing Methodology: 6 Phases

Most Azure engagements follow six phases, whatever the tooling. Each phase narrows what the next one tests, and the test cases later in this guide fit into phases 2 to 4.

1. Scope and authorization

List the tenants, subscriptions and resource groups in scope and name what is out of scope. Agree testing windows, contacts and the starting access: external only, a standard user, or an assumed-breach account. For the configuration review, testers usually get read-only roles such as Reader on the subscriptions and Global Reader in Microsoft Entra ID. Keep the written authorization on file; you will need it if Azure flags the activity.

2. External reconnaissance

Start without credentials. Confirm the tenant ID from public OpenID metadata, map internet-facing endpoints under Azure DNS suffixes such as blob.core.windows.net, azurewebsites.net and vault.azure.net, and check for anonymously readable storage. Keep this phase read-only. Resolve and inventory, but do not brute-force or fuzz at volume, because the Microsoft rules of engagement prohibit network-intensive testing.

3. Identity and configuration review

Identity is the main Azure attack surface, so this phase usually produces the most findings. Review privileged Entra ID roles and Privileged Identity Management (PIM), Conditional Access exclusions, guest and default user permissions, app registrations with powerful Microsoft Graph permissions, and Azure RBAC assignments at broad scopes. Compare settings with the Microsoft cloud security benchmark or the CIS Microsoft Azure Foundations Benchmark.

4. Attack-path validation

A misconfiguration matters when it leads somewhere. Show whether a finding chains into higher access, such as a managed identity that can read Key Vault secrets or a Contributor role that allows VM Run Command. Stop at proof of concept and leave production data alone. Our guide to privilege escalation explains the underlying technique.

5. Detection and response check

For each step, check whether the Azure Activity Log recorded the control-plane operation, whether Entra ID sign-in and audit logs captured the identity changes, and whether Microsoft Defender for Cloud or Microsoft Sentinel raised an alert. Microsoft’s rules explicitly encourage testing your own tenant’s detection.

6. Reporting and retest

Write each issue up with evidence, impact, remediation and the log operation to watch, then rerun the same checks after fixes.

Diagram of the six phases of an Azure penetration test, from scope and authorization to report and retest

Azure Attacks & Test Cases

Azure Portal access for all users (tenant-wide info leak)

Why it matters: By default, any user can browse the Azure portal surface and enumerate some tenant objects and app connections.

Check

Mitigation

Anonymous service discovery via Azure DNS suffixes

Goal: Find accidentally exposed services by fuzzing common Azure DNS zones (read-only checks only).

Targets

Safe triage

# Resolve candidate hostnames without sending requests to app paths
dig +short myapp.azurewebsites.net
dig +short mystorage.blob.core.windows.net


Mitigation

Azure Storage Blob scanning (anonymous)

Goal: Detect publicly listable/READable containers.

Safe check

# Inventory
az graph query -q "Resources | where type=='microsoft.storage/storageaccounts' | project name,rg=resourceGroup,allowBlobPublicAccess=properties.allowBlobPublicAccess"

# Spot-test (anonymous listing; no credentials)
curl -s "https://<acct>.blob.core.windows.net/<container>?restype=container&comp=list"
# An XML blob list means anonymous listing is enabled; stop, don't download data.



Mitigation

Tenant enumeration (OpenID config)

Goal: Identify tenant ID and endpoints safely.

curl -s https://login.microsoftonline.com/<org-domain>/.well-known/openid-configuration | jq '.issuer,.authorization_endpoint,.token_endpoint'



What to expect: Tenant (GUID) revealed via issuer; use only for scoping. Mitigation: None needed—public metadata by design. Use branding and monitoring to reduce phishing utility.

Azure Cloud Shell extract access token (session abuse)

Goal: Confirm who can use Cloud Shell and whether token use from it would be noticed. A Cloud Shell session carries the signed-in user’s full permissions.

# Read-only checks: no token is requested, printed or exported
# 1. Privileged identities whose Cloud Shell session would be valuable to an attacker
az role assignment list --all --query "[?roleDefinitionName=='Owner' || roleDefinitionName=='Contributor'].{who:principalName, role:roleDefinitionName, scope:scope}" -o table
# 2. Conditional Access policies that should cover Azure management sign-ins (names and state only)
az rest --method get --url "https://graph.microsoft.com/v1.0/identity/conditionalAccess/policies" --query "value[].{name:displayName, state:state}" -o table

# Detection: Entra ID sign-in logs for Azure CLI / Cloud Shell sign-ins from unusual locations;
#   Entra ID Protection and Defender for Cloud alerts on anomalous token use
# Fix: limit Cloud Shell to admins, require MFA and sign-in frequency through Conditional Access


Evidence: the privileged users who can open Cloud Shell and any Conditional Access gaps that apply to them. Mitigation: Disable Cloud Shell for non-admins, enforce re-auth, monitor Cloud Shell app sign-ins, shorten token lifetimes.

ACR pull images with Reader account (misconfig paths)

Risk patterns

Checks

az acr show -n <registry> -g <rg> --query "{adminUserEnabled:adminUserEnabled, policies:policies}"
az role assignment list --scope $(az acr show -n <registry> --query id -o tsv) -o table

What to look for

Mitigation

ACR extract admin password (if enabled)

Goal: Confirm whether the ACR admin account is enabled and who could read its password (high impact if someone left it on).

# Read-only: is the admin user enabled? (does not reveal the password)
az acr show -n <registry> --query "{adminUserEnabled:adminUserEnabled, anonymousPullEnabled:anonymousPullEnabled}"
# Who could read the admin credentials (Owner and Contributor include listCredentials)
az role assignment list --scope $(az acr show -n <registry> --query id -o tsv) --include-inherited -o table

# Detection: Activity Log operation Microsoft.ContainerRegistry/registries/listCredentials/action
# Fix: az acr update -n <registry> --admin-enabled false, then rotate any password that was exposed

Mitigation

AKS gather kubectl credentials

Goal: Check who can obtain cluster credentials and whether local (non-Entra) accounts are still enabled.

# Read-only: how does the cluster authenticate users?
az aks show -g <rg> -n <aks> --query "{entraManaged:aadProfile.managed, azureRbac:aadProfile.enableAzureRbac, localAccountsDisabled:disableLocalAccounts, kubernetesRbac:enableRbac}"
# Who can list cluster credentials (admin or user) on this cluster
az role assignment list --scope $(az aks show -g <rg> -n <aks> --query id -o tsv) --include-inherited -o table

# Detection: Activity Log operations Microsoft.ContainerService/managedClusters/listClusterAdminCredential/action
#   and .../listClusterUserCredential/action; Defender for Containers alerts
# Fix: disable local accounts, use Entra ID authentication with Azure RBAC or Kubernetes RBAC


What to expect: If local accounts are enabled or Entra ID/RBAC is weak, anyone with credential-listing rights can reach cluster-admin or broad namespace access. Mitigation: Enforce Azure AD for AKS, granular Kubernetes RBAC, and least-priv on get-credentials.

Azure Functions access keys stored in Storage by default

Goal: Check whether the storage account behind a Function app, which can hold its host keys, is open to too many identities.

# Read-only: where does the Function app keep its keys? (setting names only, no values)
az functionapp config appsettings list -g <rg> -n <func> --query "[?name=='AzureWebJobsSecretStorageType' || name=='AzureWebJobsStorage'].name" -o tsv
# How is the backing storage account protected?
az storage account show -g <rg> -n <func_storage_acct> --query "{sharedKeyAccess:allowSharedKeyAccess, publicNetworkAccess:publicNetworkAccess, defaultAction:networkRuleSet.defaultAction}"
az role assignment list --scope $(az storage account show -g <rg> -n <func_storage_acct> --query id -o tsv) --include-inherited -o table

# Detection: Activity Log operation Microsoft.Storage/storageAccounts/listKeys/action;
#   storage resource logs for reads of the azure-webjobs-secrets container
# Fix: Key Vault for secret storage, disable shared key access, private endpoints, rotate function keys

Mitigation

Backdoor Azure Applications & abuse Service Principals

Goal: Find app registrations and service principals where an attacker could gain persistence through credentials, owners or permissions.

Common abuse paths

Read-only checks

# Credentials on an app registration (metadata only: key IDs, names, expiry; no secret values)
az ad app credential list --id <APP_ID> -o table
# Owners, who can add new credentials
az ad app owner list --id <APP_ID> --query "[].userPrincipalName" -o tsv
# Requested API permissions and existing grants
az ad app permission list --id <APP_ID> -o table
az ad app permission list-grants --id <APP_ID> --show-resource-name -o table

# Detection: Entra ID audit log activities "Update application - Certificates and secrets management",
#   "Add owner to application", "Add app role assignment to service principal" and "Consent to application"
# Fix: restrict who can register apps and grant consent, use PIM for application admin roles,
#   alert on new credentials and owners


Mitigation

Exploit VM Managed Identity (MSI)

Goal: Find VMs with managed identities and measure what a token for that identity could reach, without requesting one.

# Read-only: which managed identity does the VM have? (no token is requested from IMDS)
az vm identity show -g <rg> -n <vm>
# What can that identity reach? Use the principalId from the output above
az role assignment list --assignee <principalId> --all -o table

# Detection: Entra ID managed identity sign-in logs from unexpected resources;
#   Defender for Cloud alerts on anomalous managed identity activity
# Fix: least-privilege scopes, user-assigned identities, no identity where none is needed



Mitigation

VM Run Command (Linux & Windows) escalation via Contributor

Goal: Find identities that can run commands as root (Linux) or NT AUTHORITY\SYSTEM (Windows) through Microsoft.Compute/virtualMachines/runCommand/action, which Contributor includes.

# Read-only: who holds roles that include Run Command on this VM? (no command is executed)
az role assignment list --scope $(az vm show -g <rg> -n <vm> --query id -o tsv) --include-inherited -o table
# Custom roles and their actions, to spot Microsoft.Compute/virtualMachines/runCommand/action
az role definition list --custom-role-only true --query "[].{role:roleName, actions:permissions[].actions}" -o json

# Detection: Activity Log operation Microsoft.Compute/virtualMachines/runCommand/action;
#   Defender for Servers alerts on suspicious Run Command use
# Fix: custom roles without runCommand, just-in-time VM access, Azure Bastion for maintenance

Mitigation

Exfiltration of VM disks (SAS grant)

Goal: Check who can export managed disks through a SAS URL and whether exports are restricted.

# Read-only: can this disk be exported, and how? (no SAS URL is generated)
az disk show -g <rg> -n <diskName> --query "{networkAccessPolicy:networkAccessPolicy, publicNetworkAccess:publicNetworkAccess, dataAccessAuthMode:dataAccessAuthMode}"
# Who can call beginGetAccess on it (Owner and Contributor include it)
az role assignment list --scope $(az disk show -g <rg> -n <diskName> --query id -o tsv) --include-inherited -o table

# Detection: Activity Log operation Microsoft.Compute/disks/beginGetAccess/action
# Fix: networkAccessPolicy DenyAll or AllowPrivate, dataAccessAuthMode AzureActiveDirectory, narrower roles

Mitigation

Dump credentials from App Service (Kudu/SCM)

Goal: Check whether the SCM (Kudu) site and its settings are reachable with weak authentication.

# Read-only: is basic authentication (publishing credentials) allowed for SCM/Kudu and FTP?
az resource show -g <rg> -n scm --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/<app> --query properties.allow
az resource show -g <rg> -n ftp --namespace Microsoft.Web --resource-type basicPublishingCredentialsPolicies --parent sites/<app> --query properties.allow
# Access restrictions on the SCM site
az webapp config access-restriction show -g <rg> -n <app> --query "{scmUsesMainRules:scmIpSecurityRestrictionsUseMain, scmRules:scmIpSecurityRestrictions}"
# App settings that are not Key Vault references (names only, no values)
az webapp config appsettings list -g <rg> -n <app> --query "[?!starts_with(to_string(value), '@Microsoft.KeyVault')].name" -o tsv

# Detection: Activity Log operations Microsoft.Web/sites/publishxml/action and Microsoft.Web/sites/config/list/action
# Fix: disable basic auth, restrict SCM access, move secrets to Key Vault references

Mitigation

Azure Penetration Testing Checklist

Use this checklist to scope a test or to check that a provider’s proposal covers the areas attackers use most.

AreaWhat to checkCommon finding
Entra ID tenant settingsDefault user permissions, guest access, who can register apps and grant consentAny user can register apps or consent to risky permissions
Privileged roles and PIMStanding Global Administrator and other privileged roles; PIM activation rulesPermanent admins with no just-in-time activation
Conditional Access and MFAPolicy coverage, exclusions, legacy authenticationService or emergency accounts excluded from MFA without monitoring
App registrations and service principalsOwners, credentials, Microsoft Graph application permissionsNon-admin owner of an app with high-privilege Graph permissions
Azure RBACOwner, Contributor and User Access Administrator at broad scopes; custom rolesContributor at subscription scope for many users
Managed identitiesWhich resources have identities and what those identities can reachVM identity with Contributor on the whole subscription
Storage accountsAnonymous blob access, shared key access, SAS lifetime, network rulesContainer listable without authentication
Key VaultPermission model, who can read secrets, network access, purge protectionBroad secret read access through a legacy access policy
Network exposurePublic IPs, NSG rules, management ports, private endpointsRDP or SSH open to the internet
ComputeVM Run Command, disk export through SAS, VM extensionsContributor users can run commands as SYSTEM or root
Containers (ACR and AKS)ACR admin user, anonymous pull, AKS authentication and Kubernetes RBACACR admin user enabled; local accounts on AKS
App Service and FunctionsSCM (Kudu) access, basic auth publishing, secrets in app settingsPublishing credentials enabled; secrets in plain app settings
Logging and detectionActivity Log retention and export, Entra ID logs, Defender for Cloud plans, Sentinel rulesLogs kept but no alert on role or credential changes

For the cluster layer inside AKS, our Kubernetes penetration testing guide goes deeper. Name Microsoft 365 workloads such as Exchange Online or SharePoint in the scope explicitly if you want them tested.

Tooling quick-reference

ToolUsageLink
ROADtools (ROADrecon)Azure AD / Entra ID enumerationhttps://github.com/dirkjanm/ROADtools
AADInternalsAdvanced Entra ID / Azure AD PowerShell toolkithttps://github.com/Gerenios/AADInternals
AzureHoundAzure data exporter for BloodHound (collection)https://github.com/SpecterOps/AzureHound
BloodHoundGraph-based attack-path analysishttps://github.com/SpecterOps/BloodHound
MicroBurstAutomated Azure attack & escalation scriptshttps://github.com/NetSPI/MicroBurst
Azure CLI (azure-cli)Authenticated Azure enumeration & managementhttps://github.com/Azure/azure-cli
Azure PowerShell (azure-powershell / Az)Authenticated Azure enumeration and management from PowerShellhttps://github.com/Azure/azure-powershell
Azure Storage ExplorerGUI for browsing and copying Azure Storage datahttps://github.com/microsoft/AzureStorageExplorer
ScoutSuiteMulti-cloud security posture auditinghttps://github.com/nccgroup/ScoutSuite
CloudSploit (Aqua / cloudsploit)Cloud configuration / CSPM checkshttps://github.com/aquasecurity/cloudsploit
ImpacketPost-exploitation / AD lateral movementhttps://github.com/fortra/impacket
NetExec (successor to CrackMapExec)Network and Active Directory credential testing and lateral movementhttps://github.com/Pennyw0rth/NetExec
PowerZurePowerShell Azure reconnaissance & exploitationhttps://github.com/hausec/PowerZure

For a wider comparison of tools across AWS, Azure and Google Cloud, see our cloud penetration testing tools guide.

How to weave these into your report

What an Azure Penetration Testing Report Includes

An Azure penetration testing report should let leadership see the risk and let engineers reproduce and fix every issue. Beyond the executive summary, it needs Azure-specific detail:

Example finding: Contributor role allows command execution on production VMs. Evidence: a read-only role assignment review shows a broad group of users with Contributor on the production subscription, and that role includes Microsoft.Compute/virtualMachines/runCommand/action, which runs commands as SYSTEM or root. Detection: no alert rule watches that Activity Log operation. Remediation: a custom role without Run Command, plus just-in-time access.

For report structure, severity scoring and how to read a report you receive, see our guide to the penetration testing report. If you want the test done for you, DeepStrike’s cloud penetration testing services cover Azure environments, including identity and access management, privilege escalation testing and retesting of fixed findings.

Frequently Asked Questions

Do I need Microsoft's permission to pentest Azure?

No. Microsoft has not required pre-approval for penetration testing of Azure resources since June 15, 2017. You must still follow the Microsoft Cloud Unified Penetration Testing Rules of Engagement, and you may only test resources you own or are explicitly authorized to test.

What is not allowed when pentesting Azure?

Microsoft prohibits denial-of-service testing of any kind, testing tenants or data you do not own, using credentials or secrets that are not your own, network-intensive fuzzing, phishing Microsoft employees, and post-exploitation against Microsoft online services beyond an initial proof of concept.

What should an Azure penetration test cover?

A typical test covers Microsoft Entra ID users, roles and app registrations; Azure RBAC and managed identities; storage accounts and Key Vault; containers (ACR, AKS); Functions and App Service; network exposure; and whether logging and detection catch the attack paths found.

Can a third party pentest my Azure environment?

Yes. Consulting firms, managed security providers and red teams can test Azure resources with explicit written authorization from the resource owner, documented in the service agreement before testing begins.

How do you pentest Azure without disrupting production?

Agree scope and testing windows in writing, use dedicated test accounts, start with read-only enumeration, avoid any denial-of-service or high-volume traffic, and keep the signed authorization ready in case Azure flags the activity.

What should an Azure penetration testing report include?

A scope record (tenant, subscriptions, test accounts, dates and source IP addresses), an executive summary, attack-path narratives, findings with affected resource IDs, evidence, severity and remediation, the log event or alert each step should trigger, and retest results after fixes.

Is an Azure penetration test the same as an Azure security assessment?

No. A security or configuration assessment compares settings with a benchmark such as the Microsoft cloud security benchmark or CIS. A penetration test goes further and shows which of those weaknesses an attacker can chain into real access, with evidence. Most Azure engagements combine both.

Can I include Microsoft 365 and Entra ID in an Azure penetration test?

Yes, if they belong to your tenant and are named in your written scope. Microsoft’s rules of engagement cover its cloud services and encourage testing Conditional Access and your own detection, while still prohibiting testing other tenants, using credentials that are not yours and phishing Microsoft employees.

Expert Sources Referenced

background
Let's hack you before real hackers do

Stay secure with DeepStrike penetration testing services. Reach out for a quote or customized technical proposal today

Contact Us