
Microsoft Entra ID (Azure AD) Enumerazione non autenticata
Fonte: EvilMist Toolkit - Invoke-EntraEnum.ps1 - https://github.com/Logisek/EvilMist
Individua le informazioni sul tenant utilizzando API pubbliche.
Recupera i dettagli del tenant dal servizio azmap.dev.
# Replace DOMAIN with target domain (e.g., example.com)
curl -s "https://azmap.dev/api/tenant?domain=DOMAIN&extract=true"
La risposta contiene: tenantId, displayName, countryCode
Recupera la configurazione OpenID Connect inclusi gli endpoint dei token.
# Replace DOMAIN with target domain
curl -s "https://login.microsoftonline.com/DOMAIN/v2.0/.well-known/openid-configuration"
La risposta contiene: token_endpoint, authorization_endpoint, jwks_uri, issuer
Recupera il namespace del dominio e la configurazione della federazione.
# Replace DOMAIN with target domain
curl -s "https://login.microsoftonline.com/getuserrealm.srf?login=enum@DOMAIN&json=1"
La risposta contiene:
NameSpaceType - "Managed" o "Federated"AuthURL - URL di autenticazione della federazione (se federato)CloudInstanceName - Istanza cloud (ad es., "microsoftonline.com")FederationBrandName - Nome del branding dell'organizzazioneDomainName - Dominio verificatoVerifica se un utente esiste in Azure AD. Restituisce codici diversi in base all'esistenza dell'utente.
# Replace EMAIL with target email address
curl -s -X POST "https://login.microsoftonline.com/common/GetCredentialType" \
-H "Content-Type: application/json" \
-d '{
"Username": "EMAIL",
"isOtherIdpSupported": true,
"checkPhones": false,
"isRemoteNGCSupported": true,
"isCookieBannerShown": false,
"isFidoSupported": true,
"originalRequest": "",
"country": "US",
"forceotclogin": false,
"isExternalFederationDisallowed": false,
"isRemoteConnectSupported": false,
"federationFlags": 0,
"isSignup": false,
"flowToken": "",
"isAccessPassSupported": true
}'
Codici IfExistsResult:
0 = L'utente esiste (IdP Azure)1 = L'utente non esiste2 = Richiesta non valida4 = Errore del server5 = L'utente esiste (IdP federato)6 = L'utente esiste (IdP esterno non MS)Query DNS per i record relativi ad Azure/M365. Utilizzare i comandi dig, nslookup o host.
# Main domain CNAME
dig CNAME DOMAIN
# Autodiscover CNAME
dig CNAME autodiscover.DOMAIN
dig CNAME lyncdiscover.DOMAIN
dig CNAME sip.DOMAIN
dig TXT DOMAIN
dig SRV _ldap._tcp.DOMAIN
dig SRV _kerberos._tcp.DOMAIN
dig SRV _autodiscover._tcp.DOMAIN
dig SRV _sip._tls.DOMAIN
dig SRV _sipfederationtls._tcp.DOMAIN
dig MX DOMAIN
Completamente non rilevabile - Nessun log di controllo generato.
Verifica se un utente esiste interrogando l'URL del sito personale OneDrive dell'utente.
# Replace TENANT with tenant name (e.g., example)
# Replace USERPATH with email formatted as: user_domain_com (@ and . replaced with _)
# Example: [email protected] becomes john_doe_example_com
curl -s -o /dev/null -w "%{http_code}" -I \
"https://TENANT-my.sharepoint.com/personal/USERPATH/_layouts/15/onedrive.aspx"
Codici di stato:
200 = L'utente esiste, OneDrive accessibile401/403 = L'utente esiste, accesso negato404 = L'utente non esistecurl -s -o /dev/null -w "%{http_code}" -I \
"https://example-my.sharepoint.com/personal/john_doe_example_com/_layouts/15/onedrive.aspx"
Recupera i metadati della federazione, inclusi i certificati di firma e gli endpoint dei token.
# Replace DOMAIN with target domain
curl -s "https://login.microsoftonline.com/DOMAIN/FederationMetadata/2007-06/FederationMetadata.xml"
La risposta contiene (XML):
Rileva se l'SSO desktop (Seamless Single Sign-On) è abilitato.
# Replace DOMAIN with target domain
curl -s "https://login.microsoftonline.com/getuserrealm.srf?login=user@DOMAIN&json=1"
Cercare: DesktopSsoEnabled: true
# Replace TENANT_ID with the tenant GUID
curl -s -o /dev/null -w "%{http_code}" \
"https://autologon.microsoftazuread-sso.com/TENANT_ID/winauth/trust/2005/usernamemixed"
Individua le risorse Azure associate a un tenant. Utilizza la risoluzione DNS.
# Replace TENANT with tenant name
# Primary tenant domain
dig A TENANT.onmicrosoft.com
# SharePoint
dig A TENANT.sharepoint.com
# OneDrive
dig A TENANT-my.sharepoint.com
# Azure Blob Storage
dig A TENANT.blob.core.windows.net
# Azure Files
dig A TENANT.file.core.windows.net
# Azure Queue
dig A TENANT.queue.core.windows.net
# Azure Table
dig A TENANT.table.core.windows.net
# Key Vault
dig A TENANT.vault.azure.net
# Azure SQL
dig A TENANT.database.windows.net
# App Service
dig A TENANT.azurewebsites.net
# Kudu/Git Deployment
dig A TENANT.scm.azurewebsites.net
# Cloud Services
dig A TENANT.cloudapp.net
dig A TENANT.cloudapp.azure.com
# Exchange Online Protection
dig A TENANT.mail.protection.outlook.com
# Container Registry
dig A TENANT.azurecr.io
# Redis Cache
dig A TENANT.redis.cache.windows.net
# Service Bus
dig A TENANT.servicebus.windows.net
# Front Door
dig A TENANT.azurefd.net
# Azure AD B2C
dig A TENANT.b2clogin.com
# API Management
dig A TENANT.azure-api.net
# Traffic Manager
dig A TENANT.trafficmanager.net
# HDInsight
dig A TENANT.azurehdinsight.net
# Cosmos DB
dig A TENANT.documents.azure.com
# Cognitive Search
dig A TENANT.search.windows.net
# Cognitive Services
dig A TENANT.cognitiveservices.azure.com
# Common suffixes: dev, prod, staging, test, uat, qa, backup, dr, api, app, web, data
dig A TENANTdev.blob.core.windows.net
dig A TENANTprod.azurewebsites.net
dig A TENANTstaging.vault.azure.net
Verifica l'esistenza dell'utente tramite l'endpoint JSON Autodiscover V2.
# Replace EMAIL with target email address
curl -s -o /dev/null -w "%{http_code}" -L --max-redirs 0 \
"https://autodiscover-s.outlook.com/autodiscover/autodiscover.json?Email=EMAIL&Protocol=Autodiscoverv1"
Codici di stato:
200 = L'utente esiste302 (reindirizzamento) = L'utente non esiste401/403 = L'utente esiste (autenticazione richiesta)Endpoint Autodiscover legacy basato su XML per l'enumerazione degli utenti.
# Replace DOMAIN with target domain
# Replace EMAIL with target email address
curl -s -X POST "https://autodiscover.DOMAIN/autodiscover/autodiscover.xml" \
-H "Content-Type: text/xml; charset=utf-8" \
-d '<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006">
<Request>
<EMailAddress>EMAIL</EMailAddress>
<AcceptableResponseSchema>http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a</AcceptableResponseSchema>
</Request>
</Autodiscover>'