GithubHelp home page GithubHelp logo

Comments (7)

liamcs98 avatar liamcs98 commented on July 28, 2024 1

I had this same-ish problem. The weird thing is that I could do a scan against one domain, however not other trusted domains in the forest...until I did "-SearchForest" which worked perfectly!

For your problem, try doing a -SearchForest, then maybe do a run as (see below), all with -verbose flag.

runas /netonly /user:bestdomain.local\Administrator powershell.exe

from sharphound2.

rvazarkar avatar rvazarkar commented on July 28, 2024 1

Runas /netonly is the preferred way.

We've added the LDAPUser and LDAPPassword parameters in 2.0 as well

from sharphound2.

webr0ck avatar webr0ck commented on July 28, 2024

Runas /netonly is the preferred way.
--- it does not work.
work only runas /user

We've added the LDAPUser and LDAPPassword parameters in 2.0 as well

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);

from sharphound2.

deveshm avatar deveshm commented on July 28, 2024

I think you have to use DirectoryContextType.DirectoryServer instead of DirectoryContextType.Domain

from sharphound2.

0xGreen avatar 0xGreen commented on July 28, 2024

Was this issue ever got resolved ? i am getting the same error

Unable to contact domain example.com
LDAP connection test failed, probably can't contact domain

Tried both sharhound.exe and sharphound.ps1 from a pc outside of DC.

Anyhelp ?

from sharphound2.

rvazarkar avatar rvazarkar commented on July 28, 2024

from sharphound2.

surajpkhetani avatar surajpkhetani commented on July 28, 2024

@nsrauf I resolved it by changing the DNS address to that of the target domain.

from sharphound2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.