1

I am new to kali Linux, and I was following a youtube video. At first I did apt purge doimpacket to remove the existing impacket, then I did git clone https://github.com/SecureAuthCorp/impacket.git but when I did pip install . (as mentioned in the installing section of https://github.com/SecureAuthCorp/impacket) I get an error message saying that pip command is not found.

I tried sudo apt-get install python-setuptools then I got an error saying that Package python-setuptools is not available

1 Answer 1

1

I suggest using virtualenv to make sure you don't get into a dependency loop that will make it impossible to maintain any other packages. Then try using python3 and pip3 instead of python and pip to make sure you use python3 tools.

$ git clone https://github.com/SecureAuthCorp/impacket.git
$ sudo apt install virtualenv
$ virtualenv impacket-venv
$ source impacket-venv/bin/activate
(impacket-venv) $ cd ~/impacket
(impacket-venv) impacket/$ pip3 install -r requirements.txt
(impacket-venv) impacket/$ pip3 install .
(impacket-venv) impacket/$ cd ~/impacket-venv/bin
(impacket-venv) impacket-venv/bin/$ python3 ./GetADUsers.py
Impacket v0.9.22.dev1+20200428.191254.96c7a512 - Copyright 2020 SecureAuth Corporation

usage: GetADUsers.py [-h] [-user username] [-all] [-ts] [-debug]
                     [-hashes LMHASH:NTHASH] [-no-pass] [-k] [-aesKey hex key]
                     [-dc-ip ip address]
                     target

Queries target domain for users data

positional arguments:
  target                domain/username[:password]

optional arguments:
  -h, --help            show this help message and exit
  -user username        Requests data for specific user
  -all                  Return all users, including those with no email
                        addresses and disabled accounts. When used with -user
                        it will return user's info even if the account is
                        disabled
  -ts                   Adds timestamp to every logging output
  -debug                Turn DEBUG output ON

authentication:
  -hashes LMHASH:NTHASH
                        NTLM hashes, format is LMHASH:NTHASH
  -no-pass              don't ask for password (useful for -k)
  -k                    Use Kerberos authentication. Grabs credentials from
                        ccache file (KRB5CCNAME) based on target parameters.
                        If valid credentials cannot be found, it will use the
                        ones specified in the command line
  -aesKey hex key       AES key to use for Kerberos Authentication (128 or 256
                        bits)
  -dc-ip ip address     IP Address of the domain controller. If ommited it use
                        the domain part (FQDN) specified in the target
                        parameter

Have a look at virtualenv, it's a fabulous tool.

3
  • I am trying to follow your suggestion but 'sudo apt install virtualenv' gives me an error "Unable to locate package virtualenv" Apr 29, 2020 at 20:31
  • The package in the Kali repositories is listed as python-virtualenv. You should try an apt search $string after apt is unable to locate packages to see if there is a different name for a package you are attempting to install. Apr 29, 2020 at 21:05
  • As @GracefulRestart mentioned, the name might vary slightly. the above was tested on an older kali build, so the package names may have changed slightly. Given the option between python- and python3-, go with python3-. Make sure you understand what you are doing and what is happening, otherwise you're learning nothing. I always use virtualenv for crackmapexec, impacket, responder and a few other tools.
    – Pedro
    Apr 30, 2020 at 9:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .