Cross-Domain Trusts Abuse
TODO: Add theory after exam
Enumerating Trust Relationships
# Using AD module
Import-Module activedirectory
Get-ADTrust -Filter *
# Using Powerview
Import-Module PowerView.ps1
Get-DomainTrust
# Using netdom
netdom query /domain:$DOMAIN trust
# Get details like type and direction of trust
Get-DomainTrustMapping
# Get DC and other machines of a domain
netdom query /domain:$DOMAIN dc
netdom query /domain:$DOMAIN workstation
# Getting users in domain
Get-DomainUser -Domain $DOMAIN | select SamAccountNameExtraSids Attack
Following are the requirements to perform this attack:
The KRBTGT hash for the child domain (the domain you compromised)
The SID for the child domain
The name of a target user in the child domain (does not need to exist!)
The FQDN of the child domain.
The SID of the Enterprise Admins group of the root domain
Child domain is the one we compromised.
From Windows
Using mimikatz:
Check the ticket using
klistcommand.
Using rubeus:
Now perform DCSync on Parent domain and compromise it.
From Linux
Impacket also has the tool
raiseChild, which will automate escalating from child to parent domain. We need to specify the target domain controller and credentials for an administrative user in the child domain
Last updated