Git Product home page Git Product logo

Comments (7)

7MinSec avatar 7MinSec commented on August 27, 2024

Digging around now it looks like it might be a python version thing. Will update with what I find.

from certipy.

ly4k avatar ly4k commented on August 27, 2024

Hello @braimee. Thanks for reporting. I'm looking into it. It seems like this is caused by Python 3.10 (https://bugs.python.org/issue40943). Nonetheless, I'll try to debug it and see if there's a way around. If you haven't found a temporary solution, I can recommend creating the NT hash yourself and pass it to Certipy with -hashes. It's an MD4 sum of the utf16-le encoded password. So you encode the password as utf16-le (little endian) and then hash it with MD4.

from certipy.

ly4k avatar ly4k commented on August 27, 2024

Can you please try in a clean Python virtual environment? I cannot reproduce with Python 3.10

from certipy.

7MinSec avatar 7MinSec commented on August 27, 2024

Hey pardon the delay, I started another test and used python3.9 to run the setup file. This time when I do a certipy find I get:

[*] Finding certificate templates
[+] Authenticating to LDAP server
[-] Got error: unsupported hash type MD4
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ldap3/utils/ntlm.py", line 500, in ntowf_v2
    from Crypto.Hash import MD4  # try with the Crypto library if present
ModuleNotFoundError: No module named 'Crypto'

Googling this error it looks like I might want to install pycryptodome but I did that, and no love. I'll keep looking but any ideas based on the info above?

I'll also try the python virtual environment but I'm a newb at that so will need to research a bit.

from certipy.

7MinSec avatar 7MinSec commented on August 27, 2024

Hello, I'm thinking it's "just a me thing," but in the meantime I did get around this by requesting a TGT using impacket toolkit first, and then got my certipy req to run using -k -no-pass params.

from certipy.

ly4k avatar ly4k commented on August 27, 2024

Hello @braimee Thanks for returning back. I'm glad you resolved your issue. And even if it has something to do with your Python environment, I would be happy to see if I can do something about it by either specifying a fixed version of something to force it to be compatible. However, I cannot reproduce this error, even in a virtual environment unfortunately.

from certipy.

nionios avatar nionios commented on August 27, 2024

Hello @7MinSec, this was not just a you thing, this still happens in 2023 in my macOS 13.6.1 with Python 3.11.6 . pycryptodome-only installations output ValueError: unsupported hash type MD4 error, while installations with pycrypto output SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats error.

from certipy.

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.