PowerShellMafia / PowerSploit

PowerSploit - A PowerShell Post-Exploitation Framework
Other
11.77k stars 4.59k forks source link

Find-InterestingDomainAcl doesn't work from non domain joined machine #301

Open rbrown256 opened 6 years ago

rbrown256 commented 6 years ago
Find-InterestingDomainAcl -Domain MACFARLANE.EXAMPLE.COM -Server 192.168.201.1 -Credential $creds -Verbose
VERBOSE: [Get-DomainSearcher] search base: LDAP://192.168.201.1/DC=MACFARLANE,DC=EXAMPLE,DC=COM
VERBOSE: [Get-DomainSearcher] Using alternate credentials for LDAP connection
VERBOSE: [Get-DomainObjectAcl] Get-DomainObjectAcl filter string: (objectClass=*)
VERBOSE: [Convert-ADName] Error initializing translation for 'S-1-5-21-194907926-3087329505-3194028638-1109' using alternate credentials : Exception calling "InvokeMembe
r" with "5" argument(s): "The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))"
VERBOSE: [Convert-ADName] Error translating 'S-1-5-21-194907926-3087329505-3194028638-1109' : The specified domain either does not exist or could not be contacted. (Exce
ption from HRESULT: 0x8007054B)
WARNING: [Find-InterestingDomainAcl] Unable to convert SID 'S-1-5-21-194907926-3087329505-3194028638-1109' to a distinguishedname with Convert-ADName

Although interestingly if I call Convert-ADName directly this works:

Convert-ADName -Identity S-1-5-21-194907926-3087329505-3194028638-1109 -Credential $creds
MACFARLANE\bill.bloke 

If I try with ResolveGUIDs I get

 Find-InterestingDomainAcl -Domain MACFARLANE.EXAMPLE.COM -Server 192.168.201.1 -Credential $creds -ResolveGUIDs
[Get-DomainGUIDMap] Error in retrieving forest schema path from Get-Forest
At Z:\HostDocs\Dev\PowerSploit\Recon\PowerView.ps1:5904 char:9
+         throw '[Get-DomainGUIDMap] Error in retrieving forest schema  ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: ([Get-DomainGUID...from Get-Forest:String) [], RuntimeException
    + FullyQualifiedErrorId : [Get-DomainGUIDMap] Error in retrieving forest schema path from Get-Forest
chppppp commented 5 years ago

I have the same issue but on a domain machine. Win 7 x64. wonder if its a ps2.0 issue?

robsware commented 4 years ago

Encountered the same issue with the dev branch. Running it in a PowerShell x86 terminal fixes it.