Irregular Expressions

Nov 13 2012   11:07PM GMT

Adding new exploits to Metasploit

Dan O'Connor Dan O'Connor Profile: Dan O'Connor

So you have downloaded a new exploit and of course need to test your defenses to make sure the exploit will get stopped. So how do you do it?

In most cases you will find everything you need already inside of the MSF, but if you do need to add something it’s very simple.

After your first launch of the MSF it will create a hidden directory in your home directory, this will be called .msf4 ( at least with this version ). This is where your added exploits will go, but you need to create some structure so it’s able to find it.

I grabbed this one as an example, (this may or may not be in there already, I just got it for an example.)

The key line that we are looking for is;
class Metasploit3 < Msf::Exploit::Remote

This tells us what we need to create, under modules do;
mkdir -p exploit/remote

Then put your new exploit in there, vi works good with a copy and paste.
vi name.rb

Ta-da, next time you load up you should have one more to use.

 Comment on this Post

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: