4

I have added OpenSSH 7.2p2 - Username Enumeration exploit to Metasploit, which is a python exploit. But after so, it does not detect that exploit every way I tried.

I have placed it under the directory /.msf4/modules/exploits/linux/remote and made it executable. Then I ran the command updatedb.

In my locally placed exploit-database it was under the directory exploits/linux/remote.

Before adding it there were 1822 exploits in Metasploit, after adding the new one it should have got increased, but it remained the same. It does not detect the new one.

I have also tried running msfupdate, I thought updating the whole framework could change something. But its all the same.

Version

I'm running metasploit v5.0.0-dev-39aff8d.

I have installed it from https://github.com/rapid7/metasploit-framework.git

OS

My OS is Ubuntu 16.04 LTS

.. .. ..

Some minimum clue would mean great help. Thank you.

2
  • I think this could be better answered on metasploit's github. Anyway, can you provide a link for the module you are trying to import? Oct 30, 2018 at 21:49
  • I tried creating an issue in github, but for some reason the 'submit' button there remains disabled, once I find a solution for that I will post there. And sure, here is it, exploit-db.com/exploits/40136 Thanks for your response. Oct 30, 2018 at 22:31

1 Answer 1

5

After checking the link you provided on comments to the exploit you are trying to import on Metasploit, I must say that it is not compatible to Metasploit. I mean, the script you are trying to import never is going to work on Metasploit. This is the link you provided on the comments: https://www.exploit-db.com/exploits/40136/

Metasploit now has the feature to import python modules, that's true but it is not able to import any python script. The script must have a structure. A python script that can be imported to Metasploit should follow these rules: https://github.com/rapid7/metasploit-framework/wiki/Writing-External-Python-Modules

Bear in mind that the module must be able to "talk" to Metasploit interface. There is a couple of links you can read about how to deal with it:

http://www.primalsecurity.net/python-for-metasploit-automation/

https://www.optiv.com/blog/scripting-metasploit-with-python

2
  • 1
    Thank you very much Sir for such a detailed informative answer and your time. It will help me a lot, I will have thorough read for sure. Thanks again. Oct 31, 2018 at 0:17
  • I just marked it now. :-) Oct 31, 2018 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .