Az - Enumeration Tools

Tip

AWS Hacking’i öğrenin ve pratik yapın:HackTricks Training AWS Red Team Expert (ARTE)
GCP Hacking’i öğrenin ve pratik yapın: HackTricks Training GCP Red Team Expert (GRTE)
Az Hacking’i öğrenin ve pratik yapın: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks'i Destekleyin

Linux’te PowerShell’i Kurma

Tip

Linux’te PowerShell Core’u kurmanız gerekecek:

sudo apt-get update
sudo apt-get install -y wget apt-transport-https software-properties-common

# Ubuntu 20.04
wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb

# Update repos
sudo apt-get update
sudo add-apt-repository universe

# Install & start powershell
sudo apt-get install -y powershell
pwsh

# Az cli
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

MacOS’ta PowerShell’i Yükleme

Talimatlar için documentation:

  1. brew henüz yüklü değilse yükleyin:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. PowerShell’in en son kararlı sürümünü yükleyin:
brew install powershell/tap/powershell
  1. PowerShell’i çalıştır:
pwsh
  1. Güncelleme:
brew update
brew upgrade powershell

Ana Enumeration Araçları

az cli

Azure Command-Line Interface (CLI) Python ile yazılmış, çapraz platform bir araç olup (çoğu) Azure ve Entra ID kaynaklarını yönetmek ve idare etmek için kullanılır. Azure’a bağlanır ve komut satırı veya scriptler aracılığıyla yönetim komutlarını çalıştırır.

Follow this link for the installation instructions¡.

Commands in Azure CLI are structured using a pattern of: az <service> <action> <parameters>

Debug | MitM az cli

--debug parametresini kullanarak aracın az gönderdiği tüm istekleri görmek mümkündür:

az account management-group list --output table --debug

Aracı üzerinde bir MitM gerçekleştirmek ve gönderdiği tüm istekleri manuel olarak kontrol etmek için şunu yapabilirsiniz:

export ADAL_PYTHON_SSL_NO_VERIFY=1
export AZURE_CLI_DISABLE_CONNECTION_VERIFICATION=1
export HTTPS_PROXY="http://127.0.0.1:8080"
export HTTP_PROXY="http://127.0.0.1:8080"

# If this is not enough
# Download the certificate from Burp and convert it into .pem format
# And export the following env variable
openssl x509 -in ~/Downloads/cacert.der -inform DER -out ~/Downloads/cacert.pem -outform PEM
export REQUESTS_CA_BUNDLE=/Users/user/Downloads/cacert.pem
“CA cert does not include key usage extension” hatasını düzeltme

Hatanın nedeni

When Azure CLI authenticates, it makes HTTPS requests (via MSAL → Requests → OpenSSL). If you’re intercepting TLS with Burp, Burp generates “on the fly” certificates for sites like login.microsoftonline.com and signs them with Burp’s CA.

Yeni yığınlarda (Python 3.13 + OpenSSL 3), CA doğrulaması daha katıdır:

  • Bir CA sertifikası Basic Constraints: CA:TRUE içermeli ve sertifika imzalamaya izin veren bir Key Usage uzantısına sahip olmalıdır (keyCertSign, genelde cRLSign de).

Burp’ın varsayılan CA’sı (PortSwigger CA) eski olup genelde Key Usage uzantısından yoksundur; bu yüzden OpenSSL, ona “güvenseniz” bile reddeder.

Bu şu hatalara yol açar:

  • CA cert does not include key usage extension
  • CERTIFICATE_VERIFY_FAILED
  • self-signed certificate in certificate chain

Bu yüzden şunları yapmalısınız:

  1. Doğru Key Usage içeren modern bir CA oluşturun.
  2. Burp’ın yakalanan sertifikaları imzalarken onu kullanmasını sağlayın.
  3. macOS’ta bu CA’yı güvenilir olarak ekleyin.
  4. Azure CLI / Requests’i o CA bundle’a yönlendirin.

Adım adım: çalışan yapılandırma

0) Ön koşullar

  • Burp yerel olarak çalışıyor (proxy at 127.0.0.1:8080)
  • Azure CLI yüklü (Homebrew)
  • sudo kullanabiliyor olun (CA’yı sistem keychain’ine güvenilir olarak eklemek için)

1) Standartlara uygun bir Burp CA oluşturun (PEM + KEY)

Create an OpenSSL config file that explicitly sets CA extensions:

mkdir -p ~/burp-ca && cd ~/burp-ca

cat > burp-ca.cnf <<'EOF'
[ req ]
default_bits       = 2048
prompt             = no
default_md         = sha256
distinguished_name = dn
x509_extensions    = v3_ca

[ dn ]
C  = US
O  = Burp Custom CA
CN = Burp Custom Root CA

[ v3_ca ]
basicConstraints = critical,CA:TRUE
keyUsage = critical,keyCertSign,cRLSign
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
EOF

CA sertifikası + özel anahtar oluşturun:

openssl req -x509 -new -nodes \
-days 3650 \
-keyout burp-ca.key \
-out burp-ca.pem \
-config burp-ca.cnf

Basit doğrulama (Key Usage’ı mutlaka görmelisiniz):

openssl x509 -in burp-ca.pem -noout -text | egrep -A3 "Basic Constraints|Key Usage"

Şunun gibi şeyler içermesi beklenir:

  • CA:TRUE
  • Key Usage: ... Certificate Sign, CRL Sign

2) PKCS#12’e dönüştürme (Burp içe aktarma formatı)

Burp sertifika + özel anahtar ister, en kolay yol PKCS#12:

openssl pkcs12 -export \
-out burp-ca.p12 \
-inkey burp-ca.key \
-in burp-ca.pem \
-name "Burp Custom Root CA"

Dışa aktarma parolası istenecek (bir tane belirleyin; Burp bunu soracak).

3) CA’yı Burp’a içe aktarın ve Burp’u yeniden başlatın

Burp içinde:

  • Proxy → Options
  • Import / export CA certificate öğesini bulun
  • Import CA certificate’e tıklayın
  • PKCS#12’yi seçin
  • burp-ca.p12 dosyasını seçin
  • Parolayı girin
  • Burp’u tamamen yeniden başlatın (önemli)

Neden yeniden başlatmak? Burp, yeniden başlatılana kadar eski CA’yı kullanmaya devam edebilir.

4) macOS system keychain’de yeni CA’ya güvenin

Bu sayede sistem uygulamaları ve birçok TLS yığını CA’yı güvenilir kabul eder.

sudo security add-trusted-cert \
-d -r trustRoot \
-k /Library/Keychains/System.keychain \
~/burp-ca/burp-ca.pem

(If you prefer GUI: Keychain Access → System → Certificates → import → set “Always Trust”.)

5) Proxy ortam değişkenlerini yapılandırın

export HTTPS_PROXY="http://127.0.0.1:8080"
export HTTP_PROXY="http://127.0.0.1:8080"

6) Requests/Azure CLI’yi Burp CA’nızı güvenilir sayacak şekilde yapılandırın

Azure CLI dahili olarak Python Requests kullanır; her ikisini de şu şekilde ayarlayın:

export REQUESTS_CA_BUNDLE="$HOME/burp-ca/burp-ca.pem"
export SSL_CERT_FILE="$HOME/burp-ca/burp-ca.pem"

Notlar:

  • REQUESTS_CA_BUNDLE Requests tarafından kullanılır.
  • SSL_CERT_FILE diğer TLS kullanan uygulamalara ve uç durumlara yardımcı olur.
  • CA doğru olduğunda genellikle eski ADAL_PYTHON_SSL_NO_VERIFY / AZURE_CLI_DISABLE_CONNECTION_VERIFICATION’e ihtiyaç duymazsınız.

7) Burp’un gerçekten yeni CA’nızla imzaladığını doğrulayın (kritik kontrol)

Bu, yakalama zincirinizin doğru olduğunu onaylar:

openssl s_client -connect login.microsoftonline.com:443 \
-proxy 127.0.0.1:8080 </dev/null 2>/dev/null \
| openssl x509 -noout -issuer

Beklenen issuer CA adınızı içerir, örn.:

O=Burp Custom CA, CN=Burp Custom Root CA

Hâlâ PortSwigger CA görüyorsanız, Burp içe aktardığınız CA’yı kullanmıyor → içe aktarmayı tekrar kontrol edin ve yeniden başlatın.

8) Python Requests’in Burp üzerinden çalıştığını doğrulayın

python3 - <<'EOF'
import requests
requests.get("https://login.microsoftonline.com")
print("OK")
EOF

Beklenen: OK

9) Azure CLI testi

az account get-access-token --resource=https://management.azure.com/

Zaten oturum açtıysanız, bir accessToken içeren JSON döndürmelidir.

Az PowerShell

Azure PowerShell, PowerShell komut satırından Azure kaynaklarını doğrudan yönetmek için cmdlet’ler içeren bir modüldür.

Follow this link for the installation instructions.

Commands in Azure PowerShell AZ Module are structured like: <Action>-Az<Service> <parameters>

Debug | MitM Az PowerShell

Parametre -Debug kullanıldığında aracın gönderdiği tüm istekleri görmek mümkündür:

Get-AzResourceGroup -Debug

In order to do a MitM to the tool and check all the requests it’s sending manually you can set the env variables HTTPS_PROXY and HTTP_PROXY according to the docs.

Microsoft Graph PowerShell

Microsoft Graph PowerShell, tek bir endpoint üzerinden SharePoint, Exchange ve Outlook gibi servisler de dahil olmak üzere tüm Microsoft Graph API’larına erişim sağlayan çapraz platform bir SDK’dır. PowerShell 7+, MSAL aracılığıyla modern kimlik doğrulamayı, harici kimlikleri (external identities) ve gelişmiş sorguları destekler. En az ayrıcalık (least privilege) ilkesine odaklanarak güvenli işlemler sağlar ve Microsoft Graph API’nin en son özellikleriyle uyumlu kalmak için düzenli güncellemeler alır.

Follow this link for the installation instructions.

Commands in Microsoft Graph PowerShell are structured like: <Action>-Mg<Service> <parameters>

Microsoft Graph PowerShell Hata Ayıklama

Using the parameter -Debug it’s possible to see all the requests the tool is sending:

Get-MgUser -Debug

AzureAD Powershell

The Azure Active Directory (AD) module, now deprecated, is part of Azure PowerShell for managing Azure AD resources. Azure AD kaynaklarını yönetmek için kullanılan Azure PowerShell’in bir parçasıdır. Entra ID’de kullanıcıları, grupları ve uygulama kayıtlarını yönetmek gibi görevler için cmdlet’ler sağlar.

Tip

Bu, Microsoft Graph PowerShell ile değiştirildi.

Follow this link for the installation instructions.

Automated Recon & Compliance Tools

turbot azure plugins

Turbot with steampipe and powerpipe allows to gather information from Azure and Entra ID and perform compliance checks and find misconfigurations. Turbot, steampipe ve powerpipe ile Azure ve Entra ID’den bilgi toplamanıza, uyumluluk kontrolleri yapmanıza ve yanlış yapılandırmaları bulmanıza olanak tanır. The currently most recommended Azure modules to run are:

# Install
brew install turbot/tap/powerpipe
brew install turbot/tap/steampipe
steampipe plugin install azure
steampipe plugin install azuread

# Config creds via env vars or az cli default creds will be used
export AZURE_ENVIRONMENT="AZUREPUBLICCLOUD"
export AZURE_TENANT_ID="<tenant-id>"
export AZURE_SUBSCRIPTION_ID="<subscription-id>"
export AZURE_CLIENT_ID="<client-id>"
export AZURE_CLIENT_SECRET="<secret>"

# Run steampipe-mod-azure-insights
cd /tmp
mkdir dashboards
cd dashboards
powerpipe mod init
powerpipe mod install github.com/turbot/steampipe-mod-azure-insights
steampipe service start
powerpipe server
# Go to http://localhost:9033 in a browser

Prowler

Prowler, AWS, Azure, Google Cloud ve Kubernetes için güvenlik en iyi uygulamaları değerlendirmeleri, denetimler, olay müdahalesi, sürekli izleme, hardening ve forensics readiness gerçekleştirmek üzere kullanılan açık kaynaklı bir güvenlik aracıdır.

Temelde bir Azure ortamı üzerinde yüzlerce kontrol çalıştırarak güvenlik yanlış yapılandırmalarını bulmamıza ve sonuçları json (ve diğer metin formatlarında) olarak toplamamıza veya web üzerinde görüntülememize olanak tanır.

# Create a application with Reader role and set the tenant ID, client ID and secret in prowler so it access the app

# Launch web with docker-compose
export DOCKER_DEFAULT_PLATFORM=linux/amd64
curl -LO https://raw.githubusercontent.com/prowler-cloud/prowler/refs/heads/master/docker-compose.yml
curl -LO https://raw.githubusercontent.com/prowler-cloud/prowler/refs/heads/master/.env
## If using an old docker-compose version, change the "env_file" params to: env_file: ".env"
docker compose up -d
# Access the web and configure the access to run a scan from it

# Prowler cli
python3 -m pip install prowler --break-system-packages
docker run --rm toniblyx/prowler:v4-latest azure --list-checks
docker run --rm toniblyx/prowler:v4-latest azure --list-services
docker run --rm toniblyx/prowler:v4-latest azure --list-compliance
docker run --rm -e "AZURE_CLIENT_ID=<client-id>" -e "AZURE_TENANT_ID=<tenant-id>" -e "AZURE_CLIENT_SECRET=<secret>" toniblyx/prowler:v4-latest azure --sp-env-auth
## It also support other authentication types, check: prowler azure --help

Monkey365

Azure abonelikleri ve Microsoft Entra ID güvenlik yapılandırma incelemelerini otomatik olarak gerçekleştirmeyi sağlar.

HTML raporları, github repository klasörünün içindeki ./monkey-reports dizininde saklanır.

git clone https://github.com/silverhack/monkey365
Get-ChildItem -Recurse monkey365 | Unblock-File
cd monkey365
Import-Module ./monkey365
mkdir /tmp/monkey365-scan
cd /tmp/monkey365-scan

Get-Help Invoke-Monkey365
Get-Help Invoke-Monkey365 -Detailed

# Scan with user creds (browser will be run)
Invoke-Monkey365 -TenantId <tenant-id> -Instance Azure -Collect All -ExportTo HTML

# Scan with App creds
$SecureClientSecret = ConvertTo-SecureString "<secret>" -AsPlainText -Force
Invoke-Monkey365 -TenantId <tenant-id> -ClientId <client-id> -ClientSecret $SecureClientSecret -Instance Azure -Collect All -ExportTo HTML

ScoutSuite

Scout Suite, manuel inceleme için yapılandırma verilerini toplar ve riskli alanları vurgular. Bulut ortamlarının güvenlik duruşunun değerlendirilmesine olanak tanıyan çoklu bulut güvenlik denetimi aracıdır.

virtualenv -p python3 venv
source venv/bin/activate
pip install scoutsuite
scout --help

# Use --cli flag to use az cli credentials
# Use --user-account to have scout prompt for user credentials
# Use --user-account-browser to launch a browser to login
# Use --service-principal to have scout prompt for app credentials

python scout.py azure --cli

Azure-MG-Sub-Governance-Reporting

Bu, bir Management Group ve Entra ID tenant içindeki tüm kaynakları ve izinleri görselleştirmenize ve güvenlik yanlış yapılandırmalarını bulmanıza yardımcı olan bir PowerShell script’idir.

Az PowerShell module kullanılarak çalışır; dolayısıyla bu araç tarafından desteklenen herhangi bir kimlik doğrulama yöntemi kullanılabilir.

import-module Az
.\AzGovVizParallel.ps1 -ManagementGroupId <management-group-id> [-SubscriptionIdWhitelist <subscription-id>]

Automated Post-Exploitation tools

ROADRecon

ROADRecon’in enumeration’ı, Entra ID yapılandırması hakkında bilgi sağlar; örneğin users, groups, roles, conditional access policies…

cd ROADTools
pipenv shell
# Login with user creds
roadrecon auth -u test@corp.onmicrosoft.com -p "Welcome2022!"
# Login with app creds
roadrecon auth --as-app --client "<client-id>" --password "<secret>" --tenant "<tenant-id>"
roadrecon gather
roadrecon gui

AzureHound

AzureHound, Microsoft Entra ID ve Azure için BloodHound toplayıcısıdır. Windows/Linux/macOS için tek bir statik Go ikili dosyasıdır ve doğrudan şunlarla iletişim kurar:

  • Microsoft Graph (Entra ID directory, M365) and
  • Azure Resource Manager (ARM) control plane (subscriptions, resource groups, compute, storage, key vault, app services, AKS, etc.)

Temel özellikler

  • Kiracı API’lerine kamu interneti üzerinden her yerden çalıştırılabilir (iç ağ erişimi gerekmez)
  • Kimlikler ve bulut kaynakları arasındaki saldırı yollarını görselleştirmek için BloodHound CE’nin içeri alması amacıyla JSON çıktısı üretir
  • Gözlemlenen varsayılan User-Agent: azurehound/v2.x.x

Kimlik doğrulama seçenekleri

  • Kullanıcı adı + parola: -u -p
  • Refresh token: –refresh-token
  • JSON Web Token (access token): –jwt
  • Service principal secret: -a -s
  • Service principal certificate: -a –cert <cert.pem> –key <key.pem> [–keypass ]

Örnekler

# Full tenant collection to file using different auth flows
## User creds
azurehound list -u "<user>@<tenant>" -p "<pass>" -t "<tenant-id|domain>" -o ./output.json

## Use an access token (JWT) from az cli for Graph
JWT=$(az account get-access-token --resource https://graph.microsoft.com -o tsv --query accessToken)
azurehound list --jwt "$JWT" -t "<tenant-id>" -o ./output.json

## Use a refresh token (e.g., from device code flow)
azurehound list --refresh-token "<refresh_token>" -t "<tenant-id>" -o ./output.json

## Service principal secret
azurehound list -a "<client-id>" -s "<secret>" -t "<tenant-id>" -o ./output.json

## Service principal certificate
azurehound list -a "<client-id>" --cert "/path/cert.pem" --key "/path/key.pem" -t "<tenant-id>" -o ./output.json

# Targeted discovery
azurehound list users -t "<tenant-id>" -o users.json
azurehound list groups -t "<tenant-id>" -o groups.json
azurehound list roles -t "<tenant-id>" -o roles.json
azurehound list role-assignments -t "<tenant-id>" -o role-assignments.json

# Azure resources via ARM
azurehound list subscriptions -t "<tenant-id>" -o subs.json
azurehound list resource-groups -t "<tenant-id>" -o rgs.json
azurehound list virtual-machines -t "<tenant-id>" -o vms.json
azurehound list key-vaults -t "<tenant-id>" -o kv.json
azurehound list storage-accounts -t "<tenant-id>" -o sa.json
azurehound list storage-containers -t "<tenant-id>" -o containers.json
azurehound list web-apps -t "<tenant-id>" -o webapps.json
azurehound list function-apps -t "<tenant-id>" -o funcapps.json

What gets queried

  • Graph endpoints (örnekler):
  • /v1.0/organization, /v1.0/users, /v1.0/groups, /v1.0/roleManagement/directory/roleDefinitions, directoryRoles, owners/members
  • ARM endpoints (örnekler):
  • management.azure.com/subscriptions/…/providers/Microsoft.Storage/storageAccounts
  • …/Microsoft.KeyVault/vaults, …/Microsoft.Compute/virtualMachines, …/Microsoft.Web/sites, …/Microsoft.ContainerService/managedClusters

Preflight behavior and endpoints

  • Her azurehound list tipik olarak sayımlamadan önce şu test çağrılarını gerçekleştirir:
  1. Kimlik platformu: login.microsoftonline.com
  2. Graph: GET https://graph.microsoft.com/v1.0/organization
  3. ARM: GET https://management.azure.com/subscriptions?api-version=…
  • Cloud environment base URLs Government/China/Germany için farklıdır. Repo’daki constants/environments.go dosyasına bakın.

ARM-heavy objects (less visible in Activity/Resource logs)

  • Aşağıdaki hedefler ağırlıklı olarak ARM kontrol düzlemi okumalarını kullanır: automation-accounts, container-registries, function-apps, key-vaults, logic-apps, managed-clusters, management-groups, resource-groups, storage-accounts, storage-containers, virtual-machines, vm-scale-sets, web-apps.
  • Bu GET/list işlemleri tipik olarak Activity Logs’a yazılmaz; data-plane okumaları (örn. *.blob.core.windows.net, *.vault.azure.net) kaynak düzeyinde Diagnostic Settings ile kapsanır.

OPSEC and logging notes

  • Microsoft Graph Activity Logs varsayılan olarak etkin değildir; Graph çağrılarının görünürlüğünü elde etmek için etkinleştirip SIEM’e aktarın. Preflight Graph GET /v1.0/organization çağrısında UA azurehound/v2.x.x bekleyin.
  • Entra ID non-interactive sign-in logları, AzureHound tarafından kullanılan kimlik platformu kimlik doğrulamasını (login.microsoftonline.com) kaydeder.
  • ARM control-plane read/list işlemleri Activity Logs’a kaydedilmez; birçok azurehound list işlemi kaynaklara karşı orada görünmeyecektir. Sadece data-plane logging (Diagnostic Settings aracılığıyla) servis uç noktalarına yapılan okumaları yakalar.
  • Defender XDR GraphApiAuditEvents (preview) Graph çağrılarını ve token tanımlayıcılarını ortaya çıkarabilir ancak UserAgent eksik olabilir ve saklama süresi sınırlı olabilir.

Tip: When enumerating for privilege paths, dump users, groups, roles, and role assignments, then ingest in BloodHound and use prebuilt cypher queries to surface Global Administrator/Privileged Role Administrator and transitive escalation via nested groups and RBAC assignments.

Launch the BloodHound web with curl -L https://ghst.ly/getbhce | docker compose -f - up and import the output.json file. Then, in the EXPLORE tab, in the CYPHER section you can see a folder icon that contains pre-built queries.

MicroBurst

MicroBurst, Azure Services keşfini, zayıf yapılandırma denetimini ve credential dumping gibi post exploitation eylemlerini destekleyen fonksiyonlar ve script’ler içerir. Azure’ın kullanıldığı penetration tests sırasında kullanılmak içindir.

Import-Module .\MicroBurst.psm1
Import-Module .\Get-AzureDomainInfo.ps1
Get-AzureDomainInfo -folder MicroBurst -Verbose

PowerZure

PowerZure, Azure, EntraID ve ilgili kaynaklar üzerinde hem reconnaissance hem de exploitation gerçekleştirebilen bir framework ihtiyacından doğmuştur.

Bu araç Az PowerShell modülünü kullanır; bu nedenle modülün desteklediği herhangi bir authentication bu araç tarafından da desteklenir.

# Login
Import-Module Az
Connect-AzAccount

# Clone and import PowerZure
git clone https://github.com/hausec/PowerZure
cd PowerZure
ipmo ./Powerzure.psd1
Invoke-Powerzure -h # Check all the options

# Info Gathering (read)
Get-AzureCurrentUser # Get current user
Get-AzureTarget # What can you access to
Get-AzureUser -All # Get all users
Get-AzureSQLDB -All # Get all SQL DBs
Get-AzureAppOwner # Owners of apps in Entra
Show-AzureStorageContent -All # List containers, shared and tables
Show-AzureKeyVaultContent -All # List all contents in key vaults


# Operational (write)
Set-AzureUserPassword -Password <password> -Username <username> # Change password
Set-AzureElevatedPrivileges # Get permissions from Global Administrator in EntraID to User Access Administrator in Azure RBAC.
New-AzureBackdoor -Username <username> -Password <password>
Invoke-AzureRunCommand -Command <command> -VMName <vmname>
[...]

GraphRunner

GraphRunner, Microsoft Graph API ile etkileşim kurmak için kullanılan bir post-exploitation araç setidir. Microsoft Entra ID (Azure AD) hesabından reconnaissance, persistence ve pillaging yoluyla veri toplama ve kalıcılık sağlama gibi işlemler için çeşitli araçlar sağlar.

#A good place to start is to authenticate with the Get-GraphTokens module. This module will launch a device-code login, allowing you to authenticate the session from a browser session. Access and refresh tokens will be written to the global $tokens variable. To use them with other GraphRunner modules use the Tokens flag (Example. Invoke-DumpApps -Tokens $tokens)
Import-Module .\GraphRunner.ps1
Get-GraphTokens

#This module gathers information about the tenant including the primary contact info, directory sync settings, and user settings such as if users have the ability to create apps, create groups, or consent to apps.
Invoke-GraphRecon -Tokens $tokens -PermissionEnum

#A module to dump conditional access policies from a tenant.
Invoke-GraphRecon -Tokens $tokens -PermissionEnum

#A module to dump conditional access policies from a tenant.
Invoke-DumpCAPS -Tokens $tokens -ResolveGuids

#This module helps identify malicious app registrations. It will dump a list of Azure app registrations from the tenant including permission scopes and users that have consented to the apps. Additionally, it will list external apps that are not owned by the current tenant or by Microsoft's main app tenant. This is a good way to find third-party external apps that users may have consented to.
Invoke-DumpApps -Tokens $tokens

#Gather the full list of users from the directory.
Get-AzureADUsers -Tokens $tokens -OutFile users.txt

#Create a list of security groups along with their members.
Get-SecurityGroups -AccessToken $tokens.access_token

#Gets groups that may be able to be modified by the current user
Get-UpdatableGroups -Tokens $tokens

#Finds dynamic groups and displays membership rules
Get-DynamicGroups -Tokens $tokens

#Gets a list of SharePoint site URLs visible to the current user
Get-SharePointSiteURLs -Tokens $tokens

#This module attempts to locate mailboxes in a tenant that have allowed other users to read them. By providing a userlist the module will attempt to access the inbox of each user and display if it was successful. The access token needs to be scoped to Mail.Read.Shared or Mail.ReadWrite.Shared for this to work.
Invoke-GraphOpenInboxFinder -Tokens $tokens -Userlist users.txt

#This module attempts to gather a tenant ID associated with a domain.
Get-TenantID -Domain

#Runs Invoke-GraphRecon, Get-AzureADUsers, Get-SecurityGroups, Invoke-DumpCAPS, Invoke-DumpApps, and then uses the default_detectors.json file to search with Invoke-SearchMailbox, Invoke-SearchSharePointAndOneDrive, and Invoke-SearchTeams.
Invoke-GraphRunner -Tokens $tokens

Stormspotter

Stormspotter, Azure aboneliğindeki kaynakların bir “attack graph”ini oluşturur. Bu, red teams ve pentesters’in tenant içindeki attack surface ve pivot opportunities’ı görselleştirmesini sağlar ve defenders’ın incident response çalışmalarını hızlıca yönlendirmesine ve önceliklendirmesine yardımcı olur.

Ne yazık ki, bakımsız görünüyor.

# Start Backend
cd stormspotter\backend\
pipenv shell
python ssbackend.pyz

# Start Front-end
cd stormspotter\frontend\dist\spa\
quasar.cmd serve -p 9091 --history

# Run Stormcollector
cd stormspotter\stormcollector\
pipenv shell
az login -u test@corp.onmicrosoft.com -p Welcome2022!
python stormspotter\stormcollector\sscollector.pyz cli
# This will generate a .zip file to upload in the frontend (127.0.0.1:9091)

Kaynaklar

Tip

AWS Hacking’i öğrenin ve pratik yapın:HackTricks Training AWS Red Team Expert (ARTE)
GCP Hacking’i öğrenin ve pratik yapın: HackTricks Training GCP Red Team Expert (GRTE)
Az Hacking’i öğrenin ve pratik yapın: HackTricks Training Azure Red Team Expert (AzRTE)

HackTricks'i Destekleyin