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

Ntlmrelayx - something broken on latest/greatest Kali? #446

Closed
7MinSec opened this issue May 4, 2018 · 4 comments
Closed

Ntlmrelayx - something broken on latest/greatest Kali? #446

7MinSec opened this issue May 4, 2018 · 4 comments

Comments

@7MinSec
Copy link

7MinSec commented May 4, 2018

Hello,

I just spun up a brand new Kali box running the latest distro, and a full round of apt-get update/upgrade. I've installed Impacket and run pip install . for dependencies. However, when I run ntlmrelayx.py the output is:

Traceback (most recent call last):
  File "examples/ntlmrelayx.py", line 45, in <module>
    from impacket.examples.ntlmrelayx.servers import SMBRelayServer, HTTPRelayServer
  File "/usr/lib/python2.7/dist-packages/impacket/examples/ntlmrelayx/servers/__init__.py", line 1, in <module>
    from httprelayserver import HTTPRelayServer
  File "/usr/lib/python2.7/dist-packages/impacket/examples/ntlmrelayx/servers/httprelayserver.py", line 27, in <module>
    from impacket.examples.ntlmrelayx.clients import SMBRelayClient, MSSQLRelayClient, LDAPRelayClient, HTTPRelayClient
  File "/usr/lib/python2.7/dist-packages/impacket/examples/ntlmrelayx/clients/__init__.py", line 3, in <module>
    from ldaprelayclient import LDAPRelayClient
  File "/usr/lib/python2.7/dist-packages/impacket/examples/ntlmrelayx/clients/ldaprelayclient.py", line 17, in <module>
    from ldap3 import Server, Connection, ALL, NTLM, RESULT_SUCCESS, MODIFY_ADD
ImportError: cannot import name RESULT_SUCCESS

Result of pip install . is:


Processing /opt/impacket
Requirement already satisfied: flask in /usr/lib/python2.7/dist-packages (from impacket==0.9.17.dev0) (0.12.2)
Requirement already satisfied: ldap3>=2.5.0 in /usr/local/lib/python2.7/dist-packages (from impacket==0.9.17.dev0) (2.5)
Requirement already satisfied: ldapdomaindump in /usr/local/lib/python2.7/dist-packages (from impacket==0.9.17.dev0) (0.8.5)
Requirement already satisfied: pyOpenSSL>=0.13.1 in /usr/local/lib/python2.7/dist-packages (from impacket==0.9.17.dev0) (17.2.0)
Requirement already satisfied: pyasn1>=0.2.3 in /usr/lib/python2.7/dist-packages (from impacket==0.9.17.dev0) (0.4.2)
Requirement already satisfied: pycrypto>=2.6.1 in /usr/lib/python2.7/dist-packages (from impacket==0.9.17.dev0) (2.6.1)
Requirement already satisfied: six in /usr/lib/python2.7/dist-packages (from impacket==0.9.17.dev0) (1.11.0)
Requirement already satisfied: dnspython in /usr/lib/python2.7/dist-packages (from ldapdomaindump->impacket==0.9.17.dev0) (1.15.0)
Requirement already satisfied: cryptography>=1.9 in /usr/lib/python2.7/dist-packages (from pyOpenSSL>=0.13.1->impacket==0.9.17.dev0) (2.1.4)
Building wheels for collected packages: impacket
  Running setup.py bdist_wheel for impacket ... done
  Stored in directory: /tmp/pip-ephem-wheel-cache-9Yh7Zt/wheels/13/d2/47/38faf6f80eda8cedc1cf72eeb020cf0aee2559d6d71f986604
Successfully built impacket
Installing collected packages: impacket
  Found existing installation: impacket 0.9.15
Cannot uninstall 'impacket'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

Any thoughts to what I'm missing?

Thanks,
Brian

@asolino
Copy link
Collaborator

asolino commented May 4, 2018

Hey @braimee:
Looks like you have an old impacket version installed:
Installing collected packages: impacket Found existing installation: impacket 0.9.15 Cannot uninstall 'impacket'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
You need to remove that one first before installing the new version, since the files that are being loaded belong to impacket 0.9.15.

@7MinSec
Copy link
Author

7MinSec commented May 4, 2018

Argh, thanks @asolino. Heh, my newbness interpreted that message as "Hey, we won't be able to uninstall this cleanly just FYI" not "Hey I wasn't able to uninstall the old version."

Once I did:

sudo apt-get remove python-impacket
pip install .

...I'm good to go - thanks!

@asolino
Copy link
Collaborator

asolino commented May 4, 2018

That is great to know @braimee, thanks for the feedback. Closing.

@asolino asolino closed this as completed May 4, 2018
@0xdf-0xdf
Copy link

Just an FYI - when you apt remove python-impacket, there's a bunch of stuff that goes along with it:

The following packages will be REMOVED:
  enum4linux kali-linux-full keimpx polenum python-impacket set smbmap sparta wol-e

I think that's because they depend on impacket. Just make sure to reinstall them if you use them.

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

3 participants