Cross-domain enumeration
Last updated
Last updated
Active Directory Domain Services (AD DS) provides security across multiple domains or forests through domain and forest trust relationships. Before authentication can occur across trusts, Windows must first check if the domain being requested by a user, computer, or service has a trust relationship with the domain of the requesting account.
Get-NetForest [-Forest megacorp.local]
Get-Forest [-Forest megacorp.local]
Need PowerView.ps1 for this:
Get-NetForestDomain [-Forest megacorp.local]
Get-ForestDomain [-Forest megacorp.local]
If you have a valid account for the child/parent domain and there is a trust between the domains, you can enumerate the other domain using the authentication of the compromised domain.
A great tool can me powershell empire, but you will need to do all enumeration from the compromised DC and run powershell empire. This can trigger AV. A better way is to use BloodyAD. BloodyAD is a remote tool that uses LDAP to enumerate the domain.
bloodyAD -d compromised-domain.local -u Administrator -p :<nt-hash-or-password> --host ip-of-target-domain get children 'DC=bloody,DC=local' --type user
bloodyAD -d compromised-domain.local -u Administrator -p :<nt-hash-or-password> --host ip-of-target-domain get writable