[KALI LINUX] How to add new exploit to Metasploits


How to add new exploit to Metasploits
First of all, to find the new exploits for your metasploit, you can find it at Exploit-DB or 1337day and download the exploit. It might be in .rb (ruby) or either .py (python).



1- Once you have downloaded the exploit(s), put it on /root folder.

2- Open up terminal and type
root@kali:~#cd .msf4
This will change your current directory into the hidden Metasploit directory.

3- If you ls , you can see all the files and folders in the directory.

4- Now we are going to create a new folder for all new exploits. Type in
root@kali:~#mkdir exploits

5- cd into exploits folder
root@kali:~#cd exploits

6- As there is nothing in the directory, we going to create a folder for the new exploits. For example, the exploit that i've downloaded is an remote exploit. So i created a remote folder.
root@kali:~#mkdir remote

7- cd into remote folder
root@kali:~#cd remote

8- Copy and paste downloaded exploit from /root directory into the folder
root@kali:~#cp exploit.rb newname.rb

9- Now, to load the exploit module, open up your Metasploit Console by typing this command in the terminal
root@kali:~#msfconsole

10- Search for the exploit
msf>search exploitname

11- Load the exploit module
msf> use /exploit/remote/exploitname



That's it! Now you're ready to go!