diff options
author | Meatballs <eat_meatballs@hotmail.co.uk> | 2016-05-09 22:24:23 +0100 |
---|---|---|
committer | Meatballs <eat_meatballs@hotmail.co.uk> | 2016-05-09 22:24:23 +0100 |
commit | 6a39c26b069529bd18fd90d325c3f2a4002aa45b (patch) | |
tree | 94b7e5ba350ad66820dc4fb6542753de98a97fe8 /Recon | |
parent | 26cef85d358a2ac2acc44c1a199ac35b0e1bc17d (diff) | |
download | PowerSploit-6a39c26b069529bd18fd90d325c3f2a4002aa45b.tar.gz PowerSploit-6a39c26b069529bd18fd90d325c3f2a4002aa45b.zip |
Retrieve Domain SIDs with -LDAP
Diffstat (limited to 'Recon')
-rw-r--r-- | Recon/PowerView.ps1 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Recon/PowerView.ps1 b/Recon/PowerView.ps1 index 0cc4739..2ba8021 100644 --- a/Recon/PowerView.ps1 +++ b/Recon/PowerView.ps1 @@ -12309,6 +12309,7 @@ function Get-NetDomainTrust { if($LDAP -or $DomainController) { $TrustSearcher = Get-DomainSearcher -Domain $Domain -DomainController $DomainController -Credential $Credential -PageSize $PageSize + $SourceSID = Get-DomainSID -Domain $Domain -DomainController $DomainController if($TrustSearcher) { @@ -12341,8 +12342,11 @@ function Get-NetDomainTrust { 3 { "Bidirectional" } } $ObjectGuid = New-Object Guid @(,$Props.objectguid[0]) + $TargetSID = (New-Object System.Security.Principal.SecurityIdentifier($Props.securityidentifier[0],0)).Value $DomainTrust | Add-Member Noteproperty 'SourceName' $Domain + $DomainTrust | Add-Member Noteproperty 'SourceSID' $SourceSID $DomainTrust | Add-Member Noteproperty 'TargetName' $Props.name[0] + $DomainTrust | Add-Member Noteproperty 'TargetSID' $TargetSID $DomainTrust | Add-Member Noteproperty 'ObjectGuid' "{$ObjectGuid}" $DomainTrust | Add-Member Noteproperty 'TrustType' "$TrustAttrib" $DomainTrust | Add-Member Noteproperty 'TrustDirection' "$Direction" @@ -12854,7 +12858,9 @@ function Invoke-MapDomainTrust { # build the nicely-parsable custom output object $DomainTrust = New-Object PSObject $DomainTrust | Add-Member Noteproperty 'SourceDomain' "$SourceDomain" + $DomainTrust | Add-Member Noteproperty 'SourceSID' $Trust.SourceSID $DomainTrust | Add-Member Noteproperty 'TargetDomain' "$TargetDomain" + $DomainTrust | Add-Member Noteproperty 'TargetSID' $Trust.TargetSID $DomainTrust | Add-Member Noteproperty 'TrustType' "$TrustType" $DomainTrust | Add-Member Noteproperty 'TrustDirection' "$TrustDirection" $DomainTrust |