BloodHoundAD / SharpHound2

The Old BloodHound C# Ingestor (Deprecated)
509 stars 113 forks source link

User or Computer not in AD #59

Closed webr0ck closed 5 years ago

webr0ck commented 5 years ago

LDAPUser and LDAPPassword doesn't work, if you use Sharphound at a computer(user) outside of AD.

Problem is in GetDomain: var context = new DirectoryContext(DirectoryContextType.Domain, domainName); - Api tryed connect this your user credentials. You can see that in Wireshark.

If we use LdapUser, LdapPassword true string is: var context = new DirectoryContext(DirectoryContextType.Domain, domainName, _options.LdapUser, _options.LdapPass);

rvazarkar commented 5 years ago

Good catch! I'll merge this in and make some additional changes to make sure it works in all cases