byt3bl33d3r / CrackMapExec

A swiss army knife for pentesting networks
BSD 2-Clause "Simplified" License
8.35k stars 1.64k forks source link

Ubuntu 22.04.1 LTS - Poetry installation : Installing aardwolf (0.2.2 34cf53a): Failed #727

Closed 4zuk4m closed 1 year ago

4zuk4m commented 1 year ago

When trying to install dependencies with poetry, "aardwolf" could not be built, hence cme is not able to start. Am I the only one to get this issue ? Is this a problem related to my own setup or not ? Thank you in advance !

Steps done

  1. git clone https://github.com/Porchetta-Industries/CrackMapExec
  2. cd CrackMapExec
  3. poetry install --> error for aardwolf :
Installing aardwolf (0.2.2 34cf53a): Failed

  CalledProcessError

  Command '['/home/random/.cache/pypoetry/virtualenvs/crackmapexec-i2xb4CBP-py3.10/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/home/obfuscateduser/.cache/pypoetry/virtualenvs/crackmapexec-i2xb4CBP-py3.10', '--upgrade', '--no-deps', '/home/obfuscateduser/.cache/pypoetry/virtualenvs/crackmapexec-i2xb4CBP-py3.10/src/aardwolf']' returned non-zero exit status 1.

  at /usr/lib/python3.10/subprocess.py:524 in run
       520│             # We don't call process.wait() as .__exit__ does that for us.
       521│             raise
       522│         retcode = process.poll()
       523│         if check and retcode:
    →  524│             raise CalledProcessError(retcode, process.args,
       525│                                      output=stdout, stderr=stderr)
       526│     return CompletedProcess(process.args, retcode, stdout, stderr)
       527│
       528│

...

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for aardwolf
  Failed to build aardwolf
  ERROR: Could not build wheels for aardwolf, which is required to install pyproject.toml-based projects

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1540 in _run
      1536│                 output = subprocess.check_output(
      1537│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
      1538│                 )
      1539│         except CalledProcessError as e:
    → 1540│             raise EnvCommandError(e, input=input_)
      1541│
      1542│         return decode(output)
      1543│
      1544│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:

  PoetryException

  Failed to install /home/obfuscateduser/.cache/pypoetry/virtualenvs/crackmapexec-i2xb4CBP-py3.10/src/aardwolf

  at ~/.local/share/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:58 in pip_install
       54│
       55│     try:
       56│         return environment.run_pip(*args)
       57│     except EnvCommandError as e:
    →  58│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
       59│
  1. When trying to start cme : poetry run crackmapexec :
    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/home/obfuscateduser/Documents/Tools/CrackMapExec/cme/crackmapexec.py", line 117, in main
    args = gen_cli_args()
    File "/home/obfuscateduser/Documents/Tools/CrackMapExec/cme/cli.py", line 76, in gen_cli_args
    protocol_object = p_loader.load_protocol(protocols[protocol]['path'])
    File "/home/obfuscateduser/Documents/Tools/CrackMapExec/cme/loaders/protocol_loader.py", line 15, in load_protocol
    protocol = imp.load_source('protocol', protocol_path)
    File "/usr/lib/python3.10/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
    File "<frozen importlib._bootstrap>", line 619, in _exec
    File "<frozen importlib._bootstrap_external>", line 883, in exec_module
    File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
    File "/home/obfuscateduser/Documents/Tools/CrackMapExec/cme/protocols/rdp.py", line 10, in <module>
    from aardwolf import logger
    ModuleNotFoundError: No module named 'aardwolf'

Crackmapexec info

Additional context My ubuntu host has been installed from Ubuntu official iso 2 days ago.

NeffIsBack commented 1 year ago

Did you install rust?

#~ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
#~ pip install setuptools_rust
4zuk4m commented 1 year ago

Yes I installed it following those commands.

I uninstalled everything and began the steps again from 0. Seems to be working now. Something must have gone wrong with rust installation in first place I guess. Thank you for your answer and sorry for this waste of time.

H4ppy h4ck1ng 3v3ry 0n3