aboutsummaryrefslogtreecommitdiff
path: root/Recon
diff options
context:
space:
mode:
authorHarmJ0y <will@harmj0y.net>2017-06-16 16:43:23 -0400
committerHarmJ0y <will@harmj0y.net>2017-06-16 16:43:23 -0400
commitd0e4e270f166ba603051da12019a894a35652134 (patch)
treea4115fbcbf391e814015c1754bb8849c01323b19 /Recon
parent035166385eb23a396f2f73864690ecaefd91a4d2 (diff)
downloadPowerSploit-d0e4e270f166ba603051da12019a894a35652134.tar.gz
PowerSploit-d0e4e270f166ba603051da12019a894a35652134.zip
Convert-LDAPProperty now properly parses sidHistory with multiple values
Diffstat (limited to 'Recon')
-rwxr-xr-xRecon/PowerView.ps16
1 files changed, 3 insertions, 3 deletions
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'"
}
}
}