🟢AbusingPAM Trust
Get-ADTrust -Filter *Get-ADObject -Filter {objectClass -eq "foreignSecurityPrincipal"} -Server bastion.localPowerShell
1. Enumerating trusts and hunting for access
# PowerView
# From techcorp-dc
Get-ADTrust -Filter *
Get-ADObject -Filter {objectClass -eq "foreignSecurityPrincipal"} -Server bastion.local2. Enumerate if there is a PAM trust
# PowerView
$bastiondc = New-PSSession bastion-dc.bastion.local
Invoke-Command -ScriptBlock {Get-ADTrust -Filter {(ForestTransitive -eq $True) -and (SIDFilteringQuarantined - eq $False)}} -Session $bastiondc3. Check which users are members of the Shadow Principals
4. Establish a direct PSRemoting session on bastion-dc and access production.local
Last updated