pam-trust

  • Usually enabled between Bastion or Red Forest and prod/user forest

  • allows high-privileged access to prod forest without needing credentials from a bastion forest

    • requires the creation of Shadow Principals in bastion domain that are mapped to DA or EA in prod forest

Methodology

  1. Enumerate trusts.

  2. Enumerate PAM trusts (ForestTransitive true and SIDFIlteringForestAware is false).

  3. Enumerate Shadow Principals.

  4. Abuse PAM trust.

Powershell

[!INFO] Remember to follow the Powershell methodology

ADModule

https://github.com/samratashok/ADModulearrow-up-right

Get-ADTrust -Filter *
Get-ADObject -Filter {objectClass -eq "foreignSecurityPrincipal"} -Server bastion.local

Enumerate if PAM trust exists

Check members of Shadow Principals

Configure WSMan to allow PSRemoting via IP Address Set-Item

PSRemote into prod_forest

[!INFO] when PSRemoting using an IP address, you must use NTLM authentication

Last updated