Adding a third party Module into Metasploit Framework
Last Updated :
26 Feb, 2024
Metasploit Framework is a popular open-source tool for security testing and penetration testing. It comes packed with hundreds of ready-to-use exploits, payloads, encoders, and more to help test systems for weaknesses. However, the true power of Metasploit lies in its modular architecture that allows the community to contribute and expand its capabilities. As new vulnerabilities are discovered, third-party modules are developed that can be easily added into Metasploit.
In this article, we will explore through the steps to install a custom third-party module in Metasploit. We will see how to identify module GitHub repositories, download and place the files correctly, load the module and access the new functionality within Metasploit.
How to add a third-party Module to the Metasploit Framework?
Step 1: Download the Module
Locate and download the desired Metasploit module from Exploit-db by searching for "metasploit" or the specific module name. Ensure it suits your requirements and is compatible with your Metasploit version.
Note: We are going to add buffer overflow exploit for VX Search Enterprise v9.5.12. This module exploits a stack-based buffer overflow vulnerability in the web interface of VX Search Enterprise v9.5.12, caused by improper bounds checking of the request path in HTTP GET requests sent to the built-in web server. This module has been tested successfully on Windows 11 x64.

To add the third-party SMB exploit module to the Metasploit Framework, navigate to the Metasploit directory in your terminal, commonly where SMB-related exploit modules are stored. Use the appropriate command to copy or move the new module into this directory for installation.
Command:
cd /usr/share/metasploit-framework/modules/exploits/windows/smb
Output:

Identify the exploit module you wish to add to Metasploit by searching on platforms like exploit-db.com, GitHub, or packetstormsecurity. Copy the link to the page hosting the exploit module for reference during the installation process.
Command:
wget ( exploit link )
Output:

Using wget to download the exploit files directly into the modules directory allows easily adding third party Metasploit modules from any source.
Step 2: Reloading and Searching the Module
After downloading the third-party exploit modules into the Metasploit folders, open the Metasploit Framework using the provided command. Once loaded, you can search for and utilize the newly added exploit modules.
Command:
msfconsole
Output:

After adding new third-party modules to the Metasploit Framework, it's crucial to reload Metasploit for the changes to take effect. Utilize the command specified below to initiate a reload, ensuring that all modules, including the newly added ones, are updated and accessible for use in your penetration testing activities. This step ensures the framework recognizes and incorporates the newly added modules.
Command:
reload_all
Output:

To locate a module in the Metasploit Framework, use the provided command. You can search for modules based on their name or description keywords. For example, the following command displays all modules with "VX" in their name or description:
Command:
search VX
Output:
![Searching for the Moduel [Newly Added]](https://web.archive.org/web/20250404055608im_/https://media.geeksforgeeks.org/wp-content/uploads/20240208155009/6.jpg)
Step 3: Set-Up the Exploit and Check the Information
Set up the exploit by loading the new third-party module using the "use" command in Metasploit. After loading, check the module information using the "info" command to ensure its configuration and parameters are correctly set.
Command:
use exploit/windows/http/vxsrchs_bof
Output:

To check the information of the loaded module, type the command "info" in the Metasploit console and press enter. This command provides details about the module, including its name, description, author, and available options, ensuring you have the necessary information before configuring and running the exploit.
Command:
info
Output:

Conclusion
In conclusion, adding a third-party module to the Metasploit Framework involves identifying, downloading, and placing the module correctly, followed by reloading Metasploit for the changes to take effect. The modular architecture of Metasploit allows for seamless integration of community-contributed modules, expanding its capabilities. By following these steps, users can enhance their penetration testing toolkit with custom exploits, showcasing the flexibility and extensibility of the Metasploit Framework.
Similar Reads
Adding a third party Module into Metasploit Framework
Metasploit Framework is a popular open-source tool for security testing and penetration testing. It comes packed with hundreds of ready-to-use exploits, payloads, encoders, and more to help test systems for weaknesses. However, the true power of Metasploit lies in its modular architecture that allow
4 min read
What is the Metasploit Framework in Linux?
A Metasploit framework is a tool that is used by ethical hackers, security researchers, and pentester to testing of the vulnerability. It helps us to find vulnerabilities in networks, systems, and IoT. It's an open-source tool. It can be customized with the operating system. It's a bunch of exploits
4 min read
List of Auxiliary Module Reference in Metasploit
The Metasploit Project is a computer security project that provides data about security vulnerabilities and assists in penetration testing. It is owned by Rapid7, a US-based cybersecurity firm. A notable subproject of Metasploit is the open-source Metasploit Frameworkâa tool used to develop and run
6 min read
Deploying a Payload with Metasploit in Kali Linux
A Metasploit framework is an open-Source tool that is developed and maintained by rapid7. It is a very powerful tool used by almost all penetration testers to scan for vulnerabilities in their system. Metasploit-framework has about 500+ payloads and over 1677 exploits organized for different platfor
4 min read
Python â Import module from different directory
While working on big projects we may confront a situation where we want to import a module from a different directory. But for some reason, the module may not be imported correctly. Now donât worry if your module is not imported correctly. In this article, we will discuss ways to import a module fro
4 min read
Validating a Vulnerability Metasploit in Kali Linux
Metasploit is a popular open-source platform for developing, testing, and executing exploits and payloads. It is widely used by security professionals and researchers to identify and exploit vulnerabilities in systems and networks. Metasploit consists of a large database of exploits and payloads tha
6 min read
How to Link Kali Linux with Metasploitable 2
Metasploitable 2 is an intentionally vulnerable pentesting environment, that is used for security research also. For a test environment, the user needs to have a Metasploit instance that can access a vulnerable target, and here the target is functioning at our local network which is Metasploitable 2
4 min read
Python - Import module outside directory
Modules are simply a python .py file from which we can use functions, classes, variables in another file. To use these things in another file we need to first import that module into that file. If the module exists in the same directory as the file, we can directly import it using the syntax import
4 min read
Working with Payload Metasploit in Kali Linux
The Metasploit framework is a penetration testing tool for exploiting and validating vulnerabilities. It includes the fundamental architecture, particular content, and tools required for penetration testing and extensive security evaluation. It is a well-known exploitation framework that is routinel
5 min read
How to import a Python module given the full path?
The Python module is a file consisting of Python code with a set of functions, classes, and variable definitions. The module makes the code reusable and easy to understand. The program that needs to use the module should import that particular module. In this article, we will discuss how to import a
5 min read