View Issue Details

IDProjectCategoryView StatusLast Update
0006376Kali LinuxGeneral Bugpublic2020-05-14 15:07
ReporterCryptoMaximalist Assigned Tosbrun  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2020.1 
Summary0006376: metasploit will not load python modules on kali2020
Description

This happens with every msf python module I could find on kali2020, fresh install or fully updated

kali2019 installs have no problem with any of these modules, whether fresh or fully updated

As an example, modules/exploits/linux/smtp/haraka.py

If you try to load this module, it says it loaded and then gives a failed to load error. After failing to load, you often can't find it in search anymore. You also can't manually load the module. Reinstalling metasploit does not help

Steps To Reproduce

Install a 2020 release of kali

start up msfconsole

search haraka

use exploits/linux/smtp/haraka.py

Activities

steev

steev

2020-05-13 00:35

manager   ~0012774

Last edited: 2020-05-13 00:36

Looks like it's because these modules in particular call "python" instead of "python3" via "#!/usr/bin/env python"

The list (from a quick grep of "env\ python") looks to be

modules/exploits/windows/smb/ms17_010_eternalblue_win8.py
modules/exploits/linux/smtp/haraka.py
modules/auxiliary/scanner/smb/impacket/wmiexec.py
modules/auxiliary/scanner/smb/impacket/secretsdump.py
modules/auxiliary/scanner/smb/impacket/dcomexec.py
modules/auxiliary/scanner/http/onion_omega2_login.py
modules/auxiliary/dos/tcp/claymore_dos.py
modules/auxiliary/dos/http/slowloris.py
modules/auxiliary/admin/teradata/teradata_odbc_sql.py
modules/auxiliary/gather/get_user_spns.py
vendor/bundle/ruby/2.7.0/gems/recog-2.3.7/update_cpes.py (can probably be ignored?)

and a hardcoded python2 mention

tools/hardware/killerbee_msfrelay.py

Currently, our /usr/bin/python points to /etc/alternatives/python which points to /usr/bin/python2.7

This is probably something that would need to go upstream to metasploit-framework as I'm not sure just pointing the scripts themselves at python3 is the correct answer.

sbrun

sbrun

2020-05-14 15:07

manager   ~0012780

I have patched the Python scripts to fix the issue in Kali: version 5.0.88-0kali2.
And I have reported the issue to Upstream. I really don't know why it doesn't work anymore:

https://github.com/rapid7/metasploit-framework/issues/13458

Issue History

Date Modified Username Field Change
2020-05-12 23:17 CryptoMaximalist New Issue
2020-05-13 00:35 steev Note Added: 0012774
2020-05-13 00:36 steev Note Edited: 0012774
2020-05-13 16:04 sbrun Assigned To => sbrun
2020-05-13 16:04 sbrun Status new => confirmed
2020-05-14 15:07 sbrun Status confirmed => resolved
2020-05-14 15:07 sbrun Resolution open => fixed
2020-05-14 15:07 sbrun Note Added: 0012780