BlackArch / blackarch

An ArchLinux based distribution for penetration testers and security researchers.
https://www.blackarch.org
Other
2.83k stars 570 forks source link

Impacket / Cryptodome not properly installed? #2243

Closed Talanor closed 5 years ago

Talanor commented 5 years ago

Bug description

I get this error message: https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/smb/ms17_010_eternalblue_win8.py#L672 when trying to run the ms17_010_eternalblue_win8 exploit from metasploit. By quickly looking at the source code, we can see that it comes from this line: https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/windows/smb/ms17_010_eternalblue_win8.py#L9.

Steps to reproduce

either:

msf5 exploit(windows/smb/ms17_010_eternalblue) > use exploit/windows/smb/ms17_010_eternalblue_win8
msf5 exploit(windows/smb/ms17_010_eternalblue_win8) > set rhosts XX.XX.XX.XX
msf5 exploit(windows/smb/ms17_010_eternalblue_win8) > exploit

[*] Started reverse TCP handler on XX.XX.XX.XX:4444 
[-] Module dependencies (impacket) missing, cannot continue
[-] Exploit aborted due to failure: unknown: Module exited abnormally
[*] Exploit completed, but no session was created.

or:

$> python2
Python 2.7.15 (default, Jan 10 2019, 23:20:52) 
[GCC 8.2.1 20181127] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from impacket import smb, ntlm
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/impacket/smb.py", line 54, in <module>
    from impacket.krb5.gssapi import KRB5_AP_REQ
  File "/usr/lib/python2.7/site-packages/impacket/krb5/gssapi.py", line 19, in <module>
    from Cryptodome.Hash import HMAC, MD5
ImportError: No module named Cryptodome.Hash
>>> 

Actual result: Import unsuccessful Expected result: Import successful

It happens on a fresh install. Regards,

Edu4rdSHL commented 5 years ago

Report the bug in upstream, please. Because it's a exploit-specific issue we can't do much. Anyways, install the package impacket and see if it's fixed.

Edu4rdSHL commented 5 years ago

JFYI: See https://github.com/BlackArch/blackarch/issues/2325#issuecomment-492491218

Torxed commented 5 years ago

@Edu4rdSHL FYI: You're missing a dependency in the PKGBUILD: python-pycryptodomex