Code Monkey home page Code Monkey logo

Comments (4)

the-useless-one avatar the-useless-one commented on May 23, 2024

Hmm, that's weird... Did you try with the dev version of pywerview? The branch is available on GitHub. Are you running this on an assignment or is this a test on a local lab?
[Edit] just pinging @asolino, to see if he knows what's up.

from pywerview.

ThePirateWhoSmellsOfSunflowers avatar ThePirateWhoSmellsOfSunflowers commented on May 23, 2024

Nope, master branch only and I can't have access to the environment anymore. Tested against a Server 2012, with a tiny domain (<50 users and ~10 computers).

from pywerview.

the-useless-one avatar the-useless-one commented on May 23, 2024

Oh, I think I see what the problem is. The user hunting worker creates a NetRequester object to list sessions on the target computer.

By default, a NetRequester tries to connect to its target computer with LDAP and RPC (cause NetRequester's functionalities use both LDAP and RPC).

However, sometimes, a NetRequester object is just used to make RPC requests against "normal" servers (and not DC), like for listing sessions. In that case, connecting via LDAP to the server should fail, because the LDAP port is not open. This is what this try/except block is for.

But in your case, the LDAP port was open, so there was no socket.error raised, and the NetRequester tried to authenticate, which caused the exception. It seems that you had an LDAP server which was not a DC on your range.

Do you have an nmap scan of your range? I'm curious as to why there is a non-DC LDAP server on the network.

As for a fix, it should be pretty easy, I'll just have to except on IndexError, as well as socket.error. It's a shame that you don't have access to the environment anymore to test the fix 😞

[Edit] It's also possible that the LDAP port was open, but that the service behind it was not an LDAP server, which would explain the error in the impacket call.

from pywerview.

ThePirateWhoSmellsOfSunflowers avatar ThePirateWhoSmellsOfSunflowers commented on May 23, 2024

Ok, I think I get it.
Within the small domain, there was a DC for another domain (mycompany.local), so the credentials (domain.local\myuser:password) are not valid for the LDAP connection on this DC.
Mystery solved, Scooby Doo ending ! 🐕

from pywerview.

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.