CVE-2017-7494 icon indicating copy to clipboard operation
CVE-2017-7494 copied to clipboard

No module named Util.number

Open 3isenHeiM opened this issue 3 years ago • 2 comments

I've cloned the master branch, I've installed the requirements via a venv, and I get this error when running the exploit.

python2 cve_2017_7494.py -t 192.168.1.84 
Traceback (most recent call last):
  File "cve_2017_7494.py", line 20, in <module>
    from impacket.dcerpc.v5 import transport, srvs
  File "/mnt/VulnHub/EVM/CVE-2017-7494/impacket/dcerpc/v5/transport.py", line 18, in <module>
    from impacket.smbconnection import smb, SMBConnection
  File "/mnt/VulnHub/EVM/CVE-2017-7494/impacket/smbconnection.py", line 20, in <module>
    from impacket import smb, smb3, nmb, nt_errors, LOG
  File "/mnt/VulnHub/EVM/CVE-2017-7494/impacket/smb.py", line 53, in <module>
    from impacket.krb5.gssapi import KRB5_AP_REQ
  File "/mnt/VulnHub/EVM/CVE-2017-7494/impacket/krb5/gssapi.py", line 17, in <module>
    from Crypto.Hash import HMAC, MD5
  File "/mnt/VulnHub/EVM/CVE-2017-7494/impacket/krb5/Crypto.py", line 48, in <module>
    from Crypto.Util.number import GCD as gcd
ImportError: No module named Util.number

I've installed both packages :

# pip install pycrypto
# pip show pycrypto
Name: pycrypto
Version: 2.6.1
Summary: Cryptographic modules for Python.
Home-page: http://www.pycrypto.org/
Author: Dwayne C. Litzenberger
Author-email: [email protected]
License: UNKNOWN
Location: /root/.virtualenvs/CVE-2017-7494/lib/python3.9/site-packages
Requires: 
Required-by: 
# pip install pycryptodome
# pip show pycryptodome
Name: pycryptodome
Version: 3.10.1
Summary: Cryptographic library for Python
Home-page: https://www.pycryptodome.org
Author: Helder Eijs
Author-email: [email protected]
License: BSD, Public Domain
Location: /root/.virtualenvs/CVE-2017-7494/lib/python3.9/site-packages
Requires: 
Required-by: 

What have I done wrong ? Any ideas ? Thanks :)

3isenHeiM avatar Mar 05 '21 15:03 3isenHeiM

Hi there, had the same problem, in my case the impacket folder in the project was missing the utils package. If you want to use your own version of impacket that is already installed on your system, move or rename the folder in the project.

CaroGross avatar Mar 16 '21 04:03 CaroGross

If anyone else finds this from Google --> delete git+git://github.com/opsxcq/impacket.git from requirements.txt before you pip install -r requirements.txt. I installed impacket 0.9.24 instead and now the exploit runs, well it gives me the help menu anyway.

DirectRoot avatar Oct 28 '21 03:10 DirectRoot