我很难将 impacket 安装到 Kali linux 中。有人能指出我正确的方向吗?

我很难将 impacket 安装到 Kali linux 中。有人能指出我正确的方向吗?

我是 kali Linux 的新手,我正在关注 YouTube 视频。起初我确实apt purge doimpacket删除了现有的冲击包,然后我这样做了git clone https://github.com/SecureAuthCorp/impacket.git,但是当我这样做时pip install .(如安装部分所述https://github.com/SecureAuthCorp/impacket)我收到一条错误消息,指出pip未找到该命令。

我尝试了一下sudo apt-get install python-setuptools,然后收到一条错误消息Package python-setuptools is not available

答案1

我建议使用 virtualenv 来确保您不会进入依赖循环,这将导致无法维护任何其他包。然后尝试使用 python3 和 pip3 而不是 python 和 pip 以确保您使用 python3 工具。

$ 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

看看 virtualenv,它是一个很棒的工具。

相关内容