aboutsummaryrefslogtreecommitdiff
path: root/Recon
diff options
context:
space:
mode:
authorHarmJ0y <HarmJ0y@users.noreply.github.com>2017-01-07 18:20:56 -0800
committerGitHub <noreply@github.com>2017-01-07 18:20:56 -0800
commit855203324211b5087c66c44922ad12c20a5a9413 (patch)
tree1570ef2d50b32e3516c318e5d1ea1667ffa7139a /Recon
parent5500a7e1311662a8e88d1361ef0d8ab86f8f35b5 (diff)
parentd1060930c7af88730e983155077b56b3cc47a4dc (diff)
downloadPowerSploit-855203324211b5087c66c44922ad12c20a5a9413.tar.gz
PowerSploit-855203324211b5087c66c44922ad12c20a5a9413.zip
Merge pull request #205 from mbrancato/dev
Fix errors gathering the forest SID
Diffstat (limited to 'Recon')
-rwxr-xr-xRecon/PowerView.ps14
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 '-'