diff options
author | Mike Brancato <mbrancato@users.noreply.github.com> | 2017-01-04 23:23:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-04 23:23:25 -0500 |
commit | d1060930c7af88730e983155077b56b3cc47a4dc (patch) | |
tree | af5a9de11aa55dfb6217cea3dad66ed1a69221db /Recon | |
parent | 94438eda67711e2803b40a093bd4b38568c134ec (diff) | |
download | PowerSploit-d1060930c7af88730e983155077b56b3cc47a4dc.tar.gz PowerSploit-d1060930c7af88730e983155077b56b3cc47a4dc.zip |
Fix errors gathering the forest SID
Pull the SID directly from the 'krbtgt' user to avoid errors in ConvertTo-SID
Diffstat (limited to 'Recon')
-rwxr-xr-x | Recon/PowerView.ps1 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Recon/PowerView.ps1 b/Recon/PowerView.ps1 index 17d5b9e..5598dbe 100755 --- a/Recon/PowerView.ps1 +++ b/Recon/PowerView.ps1 @@ -3891,10 +3891,10 @@ to the forest root domain SID. if ($ForestObject) { # get the SID of the forest root if ($PSBoundParameters['Credential']) { - $ForestSid = ConvertTo-SID -ObjectName "krbtgt@$($ForestObject.RootDomain)" -Credential $Credential + $ForestSid = (Get-DomainUser -Identity "krbtgt" -Domain $ForestObject.RootDomain.Name -Credential $Credential).objectsid } else { - $ForestSid = ConvertTo-SID -ObjectName "krbtgt@$($ForestObject.RootDomain)" + $ForestSid = (Get-DomainUser -Identity "krbtgt" -Domain $ForestObject.RootDomain.Name).objectsid } $Parts = $ForestSid -Split '-' |