For the complete documentation index, see llms.txt. This page is also available as Markdown.

Azure

1. Authentication & Setup

Enumeration Commands

User

export EMAIL=''
export PASSWORD=''
az login -u "$EMAIL" -p "$PASSWORD" [--allow-no-subscriptions]
export SUBSCRIPTION_ID=$(az account show --query id --output tsv)
export TENANT_ID=$(az account show --query tenantId --output tsv)
export MY_OID=$(az ad signed-in-user show --query id -o tsv)

ARM (Service Principal Authentication)

export ARM_CLIENT_ID=''
export ARM_SECRET=''
export TENANT_ID='fdd066e1-ee37-49bc-b08f-d0e152119b04'
az login --service-principal -u "$ARM_CLIENT_ID" -p "$ARM_SECRET" --tenant "$TENANT_ID" [--allow-no-subscriptions]
export SUBSCRIPTION_ID=$(az account show --query id --output tsv)
export TENANT_ID=$(az account show --query tenantId --output tsv)
export MY_OID=$(az ad sp show --id $ARM_CLIENT_ID --query id -o tsv)

Connection Information

Displays details of the currently authenticated user.

Lists all subscriptions accessible by the current user

2. Account Enumeration

Groups

Enumeration Commands

Retrieves every group in the tenant.

Retrieve Azure AD groups and directory roles assigned to the current identity.

Get groups where the user is a member

List dynamic Azure AD groups (membership rule-based)

Roles

Enumeration Commands

Get Entra ID roles assigned and its definition (One Liner)

Get Entra ID roles assigned and its definition (Manual)

List Azure Roles & Show Role actions definitions for a given scope (One Liner)

List Azure Roles & Show Role actions definitions for a given scope (Manual)

Find Custom Azure Roles

Service Principals

Enumeration Commands

Users

Enumeration Commands

Enumerate EntraID Users

Resources

Get Resource List

Check what actions you can execute on every specific resource after all role inheritance and assignments are calculated.

Identities

Enumeration Commands

List managed identities in the resource group

Storage accounts

Enumeration Commands

Enumerate storage accounts

In case case Firewall is set to "Deny", execute the following command to check the allowed roules.

Enumerate keys

Containers

Enumeration Commands

Enumerate storage containers for a given account

Enumerate files inside the container

Download the file

Script to check all the storage accounts, its containers and the files inside them

File Shares

Enumeration Commands

Enumerate Shares

Enumerate Files inside the Dir

Download the file

Enumerate snapshots

For each snapshot in the share name, enumerate its files

Applications

Enumeration Commands

Enumerate applcations and miss configurations

  1. Implicit Grant (ImpAccess / ImpID)

  • The Risk: If enableAccessTokenIssuance or enableIdTokenIssuance is true, the application is using the Implicit Flow.

  • Attack: This flow is legacy and insecure. Tokens are returned directly in the URL fragment (after the #), making them susceptible to theft via browser history, logs, or Referer headers.

  1. Public Client (Public)

  • The Risk: If this is true (or isFallbackPublicClient is enabled), the application is considered a "Public Client" (like a mobile app or a script).

  • Attack: These apps do not require a Client Secret to authenticate. If you find a valid username/password (via spraying), you can often authenticate directly against this App ID without needing a secret.

  1. Redirect URIs (Redirects)

  • The Risk: These are the URLs where Azure sends the auth token after login.

  • Attack:

    • Open Redirects: If a URI is overly broad (e.g., [https://example.com/](https://example.com/)*), you might be able to craft a link that sends the token to a server you control.

    • Subdomain Takeover: If one of the listed URLs points to a dead subdomain, you can claim that subdomain and hijack any tokens sent to it.

  1. Required Resource Access (Permissions)

If you want to see what this application is actually allowed to do (e.g., "Read all Mail," "Directory.ReadWrite.All"), add this to the query:

  • Perms:requiredResourceAccess[].resourceAccess[].id

See the application's permissions and internal identifier URIs (great for finding internal domain names

Identify the target app

Identify users or service principals that have administrative rights over this application.

KeyVault

More commands

Who has access to the key vault

Enumerate KeyVault keys

Enumerate KeyVault secrets

VMs

Enumeration Commands

Obtain Machine user identities

Disks

Enumeration Commands

Table Storage

Enumeration Commands

MSSQL

Enumeration Commands

Enumerate servers

Identify information from a given server

Obtian information from the database perspective

MySQL

Enumeration Commands

Enumerate Database Servers

Enumerate Databases

FIrewall Rules

List AD admins and users

List backups and replicas

Enumerate Monitoring Mechanisms

Get the server's advanced threat protection setting

Audit Logging Enabled

List all of the maintenances of a flexible server

List log files for a server

PostgreSQL

Enumeration Commands

Database Servers

Databases

Enumerate Firewalls

CosmosDB

Enumeration Commands

Enumerate Instances

Obtain keys

MongoDB

Enumeration Commands

App Services

Enumeration Commands

Get the App Settings (API Keys, DB Strings, etc.)

Retrieves the publishing profiles

Azure Container Registry

Enumeration Commands

Function Apps

Enumeration Commands

List functions

Get details about the source of the function code

Retrieve the publishing profiles for a specific Azure Function App

Get SCM credentials

Get function, system and master keys

Static Web Apps

Enumeration Commands

Get appsettings

Get env information

Get current snippets

Get database connections

Azure Container Registry (ACR)

Enumeration Commands

List of all authentication tokens

Retrieve recently deleted repositories

Retrieve active repositories

List tasks runs

Azure Container Instances

Enumeration Commands

Queue Storage

Enumeration Commands

Automation Accounts

Enumeration Commands

Get keys of automation account. These are used for the DSC

Get schedules of automation account

Get jobs of an automation account

Get runbooks of an automation account

Get runbook content

Get variables of automation account. It's possible to get the value of unencrypted variables but not the encrypted ones.

Get credentials of automation account

Get credential details. Note that you will only be able to access the password from inside a Runbook

Service Bus

Enumeration Commands

Namespace Enumeration

Authorization Rule Enumeration

Queue Enumeration

Topic Enumeration

Susbscription Enumeration

Logic Apps

Enumeration Commands

Virtual Desktop

Enumeration Commands

Monitoring Logs

Enumeration Commands

Get The Flag

KeyVault

Blob

SSRF

More Azure SSRF Information

Obtain tokens

Manual

Bash: Exfiltrate all the tokens

PowerShell: Exfiltrate all the tokens

Azure App & Functions Services & Automation Accounts

From the env you can get the values of IDENTITY_HEADER and IDENTITY_ENDPOINT. That you can use to gather a token to speak with the metadata server.

Bash

Examples:

Curl

Wget

PowerShell

Examples

MiTM

Tools

Last updated