From d0e4e270f166ba603051da12019a894a35652134 Mon Sep 17 00:00:00 2001 From: HarmJ0y Date: Fri, 16 Jun 2017 16:43:23 -0400 Subject: Convert-LDAPProperty now properly parses sidHistory with multiple values --- Recon/PowerView.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Recon') diff --git a/Recon/PowerView.ps1 b/Recon/PowerView.ps1 index 42ba6fe..7842e2c 100755 --- a/Recon/PowerView.ps1 +++ b/Recon/PowerView.ps1 @@ -2790,8 +2790,8 @@ A custom PSObject with LDAP hashtable properties translated. $Properties.PropertyNames | ForEach-Object { if ($_ -ne 'adspath') { if (($_ -eq 'objectsid') -or ($_ -eq 'sidhistory')) { - # convert the SID to a string - $ObjectProperties[$_] = (New-Object System.Security.Principal.SecurityIdentifier($Properties[$_][0], 0)).Value + # convert all listed sids (i.e. if multiple are listed in sidHistory) + $ObjectProperties[$_] = $Properties[$_] | ForEach-Object { (New-Object System.Security.Principal.SecurityIdentifier($_, 0)).Value } } elseif ($_ -eq 'grouptype') { $ObjectProperties[$_] = $Properties[$_][0] -as $GroupTypeEnum @@ -6374,7 +6374,7 @@ https://blogs.technet.microsoft.com/pie/2014/08/25/metadata-1-when-did-the-deleg } } else { - Write-Verbose "[Get-DomainObjectHistory] Error retrieving 'msds-replattributemetadata' for '$ObjectDN'" + Write-Verbose "[Get-DomainObjectAttributeHistory] Error retrieving 'msds-replattributemetadata' for '$ObjectDN'" } } } -- cgit v1.2.3