Azure / Entra ID — Enumeration
Azure enumeration
Azure enumeration
Entra ID (eski adıyla Azure AD), Microsoft bulutunun kimlik katmanıdır. Keşif; tenant’ı ve kullanıcıları çıkarmakla başlar, ele geçirilen kimlik sonrası rol, grup, uygulama ve Azure kaynak envanterine döner. AD on-prem enumeration ile paralel düşün: önce kimlik haritası, sonra saldırı yolu.
Ön koşullar
Section titled “Ön koşullar”Kimliksiz: hedef domain / e-posta formatıKimlikli: kullanıcı+parola, PRT/token, veya app client_id+secret/certAraçlar: az cli, AADInternals, ROADtools, AzureHound, GraphRunner, curlKimliksiz (unauthenticated) keşif
Section titled “Kimliksiz (unauthenticated) keşif”curl -s "https://login.microsoftonline.com/getuserrealm.srf?login=user@hedef.com&xml=1"curl -s "https://login.microsoftonline.com/hedef.com/.well-known/openid-configuration" | jq .curl -s "https://login.microsoftonline.com/hedef.com/v2.0/.well-known/openid-configuration" \ | jq -r .issuercurl -sI "https://hedef.com"curl -s "https://login.microsoftonline.com/getuserrealm.srf?login=admin@hedef.com&xml=1"Kullanıcı geçerlilik enumeration:
Import-Module AADInternalsGet-AADIntLoginInformation -UserName user@hedef.comInvoke-AADIntUserEnumerationAsOutsider -UserName user@hedef.comAADInternals tenant bilgisi, alan adları, Auth method ve kullanıcı doğrulaması için yaygın kullanılır.
Kimlikli keşif — Azure CLI
Section titled “Kimlikli keşif — Azure CLI”az loginaz login --service-principal -u $APP_ID -p $SECRET --tenant $TENANTaz account show -o jsonaz account list -o tableaz ad signed-in-user showaz ad user list -o table --query "[].{upn:userPrincipalName,id:id}"az ad group list -o tableaz ad group member list --group "Global Administrators" -o table 2>/dev/nullaz role assignment list --all -o tableaz resource list -o tableaz group list -o tableaz vm list -o tableaz keyvault list -o tableaz storage account list -o tableaz webapp list -o tableaz functionapp list -o tableMicrosoft Graph ile:
az account get-access-token --resource-type ms-graphroadrecon auth -u user@hedef.com -p 'Pass'roadrecon gatherroadrecon guiAzureHound / BloodHound
Section titled “AzureHound / BloodHound”-
Kimliği tanı — az account show , az ad signed-in-user show ; hangi tenant/subscription’dasın, MFA var mı.
-
Grafiği çıkar — AzureHound ile Entra ID + Azure RBAC ilişkilerini topla, BloodHound’da privesc yollarını gör:
Terminal window azurehound list -u user@hedef.com -p 'Pass' -t <tenant-id> -o ah.zipTerminal window azurehound list --jwt <token> -o ah.json -
Kaynak envanteri — abonelikler, kaynak grupları, Key Vault, Storage, VM’ler, Automation, App Service; okunabilir sırları ve managed identity atamalarını ara.
Odaklanılacak nesneler
Section titled “Odaklanılacak nesneler”Directory roles → Global Admin, Privileged Role Admin, Application AdminApp registrations → yüksek Graph izinleri (Mail.Read, RoleManagement...)Service principals → creds, ownersConditional Access → boşluklar (legacy auth, excluded users)Azure RBAC → Owner / User Access Administrator / ContributorKey Vault → secrets/keys/certsHybrid → AAD Connect, PTA, federation → on-prem köprüaz ad app list --show-mine -o tableaz ad sp list --show-mine -o tableaz ad sp credential list --id <sp-id>az rest --method GET \ --url "https://graph.microsoft.com/v1.0/directoryRoles"Komut üreteci
Section titled “Komut üreteci”Azure · user list
embedded toolaz ad user list -o tableAzure · user list
Section titled “Azure · user list”Saldırı zinciri
Section titled “Saldırı zinciri”getuserrealm + user enum → password spray (eşik altında) → roadrecon / AzureHound → Application Admin path veya Subscription Contributor → Key Vault / VM Run Command / managed identity