How to add a module to Metasploit from Exploit-DB

pentest_it
Jan 20, 2019 · 2 min read

Look for the exploit you want to add: searchsploit sonicwall 8.1.0.2-14sv Make a note of the path for the exploit.

searchsploit output

Next, you would need to create a folder in the .msf4/modules directory that correlates with the path in exploit-db. So in this case I will add cgi/webapps.

Go to your newly created folder and copy the exploit:

cp /usr/share/exploitdb/exploits/cgi/webapps/42344.rb /root/.msf4/modules/exploits/cgi/webapps/

Make sure that you specify both, the root path (its specified right underneath the title “Path” in the searchsploit search output) and the relative path.

Once you are done run updatedb

If your msfconsole is running make sure to close it and reopen again after running updatedb. You can now use the exploit.

You will also see that the number of exploits is increased by one.

Profit!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store