byt3bl33d3r / CrackMapExec

A swiss army knife for pentesting networks
BSD 2-Clause "Simplified" License
8.29k stars 1.64k forks source link

How to authenticate with AzureAD #815

Open mk7120 opened 9 months ago

mk7120 commented 9 months ago

Is it possible to authenticate with an AzureAD (Microsoft Entra ID) credential? I have a PC with AzureAD joined, any account I created on Azure Portal can log in to the PC normally but I can't use CrackMapExec to log in.

crackmapexec --verbose smb <ib> -u "localadmin@<random>.onmicrosoft.com" -p "<password>"

I also tried 'AzureAD\localadmin@.onmicrosoft.com' but not work

mk7120 commented 9 months ago

I found a way to RDP to the target by this tutorial "https://bradleyschacht.com/remote-desktop-to-azure-ad-joined-computer/", but don't know how to be done with the tool.