From f2398576f97462af43d58b6f8cbf9fcf91bee527 Mon Sep 17 00:00:00 2001 From: Crypt0-M3lon Date: Fri, 24 Aug 2018 15:33:40 +0200 Subject: [PATCH] Fix trust enumeration with API in Get-DomainTrust When using API enum, Get-DomainTrust did not use provided Domain and/or Credential. --- Recon/PowerView.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Recon/PowerView.ps1 b/Recon/PowerView.ps1 index 2dc5234a..a6120112 100755 --- a/Recon/PowerView.ps1 +++ b/Recon/PowerView.ps1 @@ -19820,6 +19820,8 @@ Custom PSObject with translated domain API trust result fields. } else { # if we're searching for domain trusts through .NET methods + if ($PSBoundParameters['Domain']) { $NetSearcherArguments['Domain'] = $Domain } + if ($PSBoundParameters['Credential']) { $NetSearcherArguments['Credential'] = $Credential } $FoundDomain = Get-Domain @NetSearcherArguments if ($FoundDomain) { $FoundDomain.GetAllTrustRelationships() | ForEach-Object {