OSINT Azure

Def et Fonctionnement :


Microsoft Entra ID est un identity provider qui remplace Active directory dans le cloud et offre de nombreuses options de sécurité qui rendent les attaques plus difficiles.

Étapes d'attaques :


Détection :


Détection tenant Azure

Fonctionnement :


scripter ca et faire une wordlist (publier l'outil sur github à chaque fois)
D'abord on veut détecter si l'entreprise possède un Az AD, on peut le faire avec :

https://login.microsoftonline.com/getuserrealm.srf?login=username@gothamlab.onmicrosoft.com&xml=1

En remplaçant gothamlab par le nom de la boîte :
Pasted image 20240610154839.png
Si le nom managed apparait alors la boîte possède un Az AD.
https://www.synacktiv.com/en/publications/azure-ad-introduction-for-red-teamers

Reconnaissance non connecté :


Une fois le tenant trouvé on va essayer de détecter quels comptes sont présents sur le tenant.

Détection de comptes sur le tenant :


Tool : https://github.com/nyxgeek/AzureAD_Autologon_Brute?tab=readme-ov-file
Voici la commande initiale :

python3 azuread_autologon_brute.py -d test.microsoft.com -U users.txt -p test

Avec :

BBBBB@gothamlab.onmicrosoft.com@microsoft.com
CCCCC@gothamlab.onmicrosoft.com@microsoft.com
DDDDD@gothamlab.onmicrosoft.com@microsoft.com
EEEEE@gothamlab.onmicrosoft.com@microsoft.com
FFFFF@gothamlab.onmicrosoft.com@microsoft.com
GGGGG@gothamlab.onmicrosoft.com@microsoft.com
HHHHH@gothamlab.onmicrosoft.com@microsoft.com
IIIII@gothamlab.onmicrosoft.com@microsoft.com
JJJJJ@gothamlab.onmicrosoft.com@microsoft.com
KKKKK@gothamlab.onmicrosoft.com@microsoft.com
LLLLL@gothamlab.onmicrosoft.com@microsoft.com
MMMMM@gothamlab.onmicrosoft.com@microsoft.com
NNNNN@gothamlab.onmicrosoft.com@microsoft.com
OOOOO@gothamlab.onmicrosoft.com@microsoft.com
PPPPP@gothamlab.onmicrosoft.com@microsoft.com
QQQQQ@gothamlab.onmicrosoft.com@microsoft.com
RRRRR@gothamlab.onmicrosoft.com@microsoft.com
SSSSS@gothamlab.onmicrosoft.com@microsoft.com
TTTTT@gothamlab.onmicrosoft.com@microsoft.com

Cet outil permet de détecter les comptes actifs et disponibles.

Ressources :
https://www.synacktiv.com/en/publications/azure-ad-introduction-for-red-teamers
https://cloud.hacktricks.xyz/pentesting-cloud/azure-security/az-azuread