Skip to main content

Importing Exploit-DB Exploits into Metasploit in Kali Linux for Offline Access

You're going to need three terminals open for this.

Terminal 1 for starting metasploit

Terminal 2 for importing the exploit to local Metasploit repository

Terminal 3 for searchsploit which we will use to search for the exploit instead of opening your browser and looking in exploitdb.

Let's be done with it!

1. First, open the first terminal to run metasploit with the following commands:

> service postgresql start
> msfconsole

 2. Go to Terminal 3 and run the following command to update its database:

> searchsploit -u

3. Open Terminal 2, then go to the metasploit modules directory by:

> cd .msf4/modules

4. Then create a directory inside the msf4 modules folder:

> mkdir exploits

5. Now, back to the Terminal 3. We will to search for an exploit we want to import. Let's first try to look for the explore ms15-100 by typing:

> searchsploit msf15-100

After pressing Enter, you should be able to see the search result. It will be a table with two columns -- Exploit Title and Path. We are interested in the path for now for the next step.

6. In the Terminal 2, I assume that you are still in .msf4/modules/exploits. Now we want to create the same directory structure as the one in the searchsploit result for ms15-100. There are two. Let's get the one with the Ruby for now. Using the terminal, create the same folder structure:

> mkdir windows
> cd windows
>mkdir remote
>cd remote

7. Now let's copy the exploit into our newly created folder. The exploit should be inside the /usr/share/exploitdb/ folder as stated in searchsploit results. So go ahead and type:

> cp /usr/share/exploitdb/exploits/windows/remote/38195.rb /root/.msf4/modules/exploits/windows/remote/

8. Now if you type the ls command, you should see the newly pasted file 38195.rb

9. Now, in order to use the newly imported exploit in msfconsole, we need to update the kali folder directory with:

>updatedb

10. No, in the Terminal 1 restart the msconsole:

> exit
>msfconsole

11. Now in the same Terminal 1 when msfconsole started successfully, you can search the ms15-100 exploit:

>search ms15-100

You will find that it is located in our folder exploit/windows/remote/38195.

You can now use it without the internet.

Popular posts from this blog

Different ways Product Managers can add value

Product Management is NOT about adding new features to your product! It's about adding VALUE! 𝗛𝗲𝗿𝗲 𝗮𝗿𝗲 𝟴 𝗱𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝘄𝗮𝘆𝘀 𝘆𝗼𝘂 𝗰𝗮𝗻 𝗮𝗱𝗱 𝘃𝗮𝗹𝘂𝗲 𝘁𝗼 𝘆𝗼𝘂𝗿 𝗽𝗿𝗼𝗱𝘂𝗰𝘁: 𝘝𝘢𝘭𝘶𝘦 𝘢𝘴 𝘋𝘪𝘳𝘦𝘤𝘵 𝘮𝘦𝘵𝘳𝘪𝘤𝘴’ 𝘨𝘳𝘰𝘸𝘵𝘩  -  This most basic, business-driven aspect of the “value” concept. It will often drive your product goals, and it’s easy (and mandatory!) to measure. New features will mostly fall under this category! 𝘝𝘢𝘭𝘶𝘦 𝘢𝘴 𝘱𝘳𝘦𝘷𝘦𝘯𝘵𝘪𝘯𝘨 𝘢 𝘱𝘳𝘰𝘣𝘢𝘣𝘭𝘦 𝘧𝘶𝘵𝘶𝘳𝘦 𝘥𝘳𝘰𝘱 𝘪𝘯 𝘮𝘦𝘵𝘳𝘪𝘤𝘴 -  Any product is like a house; if not maintained and fixed, it will eventually collapse. This aspect translated into quality that the client/user often doesn’t get to appreciate until it’s too late. To achieve this kind of value, you will have your development team fixing bugs, making products scalable, and introducing/replacing old technologies in favour of newer ones. 𝘝𝘢𝘭𝘶𝘦 𝘢𝘴 𝘵𝘩𝘦 𝘢𝘣𝘪𝘭𝘪𝘵𝘺 𝘵𝘰 𝘵𝘳𝘢?...

List of Websites that can be very useful to anyone

1. screenr.com – record movies of your desktop and send them straight to YouTube. 2. ctrlq.org/screenshots – for capturing screenshots of web pages on mobile and desktops. 3. goo.gl – shorten long URLs and convert URLs into QR codes. 4. unfurlr.com – find the original URL that's hiding behind a short URL. 5. qClock – find the local time of a city using a Google Map. 6. copypastecharacter.com – copy special characters that aren't on your keyboard. 7. postpost.com – a better search engine for twitter. 8. lovelycharts.com – create flowcharts, network diagrams, sitemaps, etc. 9. iconfinder.com – the best place to find icons of all sizes. 10. office.com – download templates, clipart and images for your Office documents. 11. followupthen.com – the easiest way to setup email reminders. 12. jotti.org – scan any suspicious file or email attachment for viruses. 13. wolframalpha.com – gets answers directly without searching - see...