Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation script messes up crackmapexec (oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto) #17

Closed
ernestang98 opened this issue Aug 30, 2023 · 2 comments

Comments

@ernestang98
Copy link

When I ran ./install.sh, it overrides the existing installation of cme and results in the following error:

Traceback (most recent call last):
  File "/usr/bin/crackmapexec", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3/dist-packages/cme/crackmapexec.py", line 117, in main
    args = gen_cli_args()
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/cme/cli.py", line 76, in gen_cli_args
    protocol_object = p_loader.load_protocol(protocols[protocol]['path'])
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/cme/loaders/protocol_loader.py", line 15, in load_protocol
    protocol = imp.load_source('protocol', protocol_path)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 621, in _exec
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3/dist-packages/cme/protocols/rdp.py", line 11, in <module>
    from aardwolf.commons.factory import RDPConnectionFactory
  File "/usr/lib/python3/dist-packages/aardwolf/commons/factory.py", line 7, in <module>
    from asyauth.common.credentials import UniCredential
  File "/usr/lib/python3/dist-packages/asyauth/common/credentials/__init__.py", line 182, in <module>
    from asyauth.common.credentials.kerberos import KerberosCredential
  File "/usr/lib/python3/dist-packages/asyauth/common/credentials/kerberos.py", line 9, in <module>
    from minikerberos.common.creds import KerberosCredential as KCRED
  File "/usr/lib/python3/dist-packages/minikerberos/common/creds.py", line 21, in <module>
    from oscrypto.asymmetric import rsa_pkcs1v15_sign, load_private_key
  File "/home/kali/.local/lib/python3.11/site-packages/oscrypto/asymmetric.py", line 19, in <module>
    from ._asymmetric import _unwrap_private_key_info
  File "/home/kali/.local/lib/python3.11/site-packages/oscrypto/_asymmetric.py", line 27, in <module>
    from .kdf import pbkdf1, pbkdf2, pkcs12_kdf
  File "/home/kali/.local/lib/python3.11/site-packages/oscrypto/kdf.py", line 9, in <module>
    from .util import rand_bytes
  File "/home/kali/.local/lib/python3.11/site-packages/oscrypto/util.py", line 14, in <module>
    from ._openssl.util import rand_bytes
  File "/home/kali/.local/lib/python3.11/site-packages/oscrypto/_openssl/util.py", line 6, in <module>
    from ._libcrypto import libcrypto, libcrypto_version_info, handle_openssl_error
  File "/home/kali/.local/lib/python3.11/site-packages/oscrypto/_openssl/_libcrypto.py", line 9, in <module>
    from ._libcrypto_cffi import (
  File "/home/kali/.local/lib/python3.11/site-packages/oscrypto/_openssl/_libcrypto_cffi.py", line 46, in <module>
    raise LibraryNotFoundError('Error detecting the version of libcrypto')
oscrypto.errors.LibraryNotFoundError: Error detecting the version of libcrypto

I suggest removing the line pipx install git+https://github.com/mpgn/CrackMapExec.git --force

Relevant Links:

dbt-labs/dbt-core#3366

wbond/oscrypto#78

https://github.com/mpgn/CrackMapExec/issues/108

wbond/oscrypto#78

@lefayjey
Copy link
Owner

lefayjey commented Sep 5, 2023

Thanks for you comment. I would suggest uninstalling the existing installation of cme, since it does not have the --log option.
For that, the installation of the latest crackmapexec is needed to use the linWinPwn tool.

@lefayjey
Copy link
Owner

lefayjey commented Oct 4, 2023

As crackmapexec has been replaced with NetExec, I will close this issue.

@lefayjey lefayjey closed this as completed Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants