// Internal · Active Directory

Trust - Relationship

Trust - Relationship

  • One-way
    • Domain B trusts A
    • Users in Domain A can access resources in Domain B
    • Users in Domain B cannot access resources in Domain A
  • Two-way
    • Domain A trusts Domain B
    • Domain B trusts Domain A
    • Authentication requests can be passed between the two domains in both directions

Enumerate trusts between domains

  • Native nltest

    nltest /trusted_domains
  • PowerShell GetAllTrustRelationships

    ([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).GetAllTrustRelationships()
    
    SourceName          TargetName                    TrustType      TrustDirection
    ----------          ----------                    ---------      --------------
    domainA.local      domainB.local                  TreeRoot       Bidirectional
  • netexec module enum_trusts

    nxc ldap <ip> -u <user> -p <pass> -M enum_trusts 

Exploit trusts between domains

:warning: Require a Domain-Admin level access to the current domain.

SourceTargetTechnique to useTrust relationship
RootChildGolden Ticket + Enterprise Admin group (Mimikatz /groups)Inter Realm (2-way)
ChildChildSID History exploitation (Mimikatz /sids)Inter Realm Parent-Child (2-way)
ChildRootSID History exploitation (Mimikatz /sids)Inter Realm Tree-Root (2-way)
Forest AForest BPrinterBug + Unconstrained delegation ?Inter Realm Forest or External (2-way)

References

☧ CPTS · ordered posts

Locked

Unlock with your Main_Key through local GPG.

Start the local GPG helper

In your cheatsheet checkout, run:

npm run unlock:helper

Open the link it prints, or paste its pairing code below. Keep the terminal open until GPG finishes.

Import an index you already decrypted

Download the encrypted index, then decrypt with GPG:

gpg --output report-index.json --decrypt report-index.gpg

Your private key stays in GPG. The decrypted index is saved in this browser so you can reopen it after navigation, refreshes and restarts. Lock this browser or clear this site's browser data to remove the saved index. Nothing is uploaded.