Install Metasploit Framework on Ubuntu 22.04 LTS Jammy

Learn the steps to install Metasploit Framework on Ubuntu 22.04 LTS Jammy JellyFish Linux using the command terminal.

What is Metasploit?

Metasploit is an open-source project that provides, among other things, the Metasploit framework. It includes a collection of exploits that can be used to test the security of computer systems. Many times apart from the developers or testers it also is used by hackers.

If we talk through the lawful angle, the framework provided by the Metasploit Open Source project is mainly used to test computer systems for security gaps. It offers a bundle of exploit tools to carry out a wide variety of security and penetration tests that can be carried out on distributed target systems. Even software developers can use it to test their software to find out potential loopholes.

Metasploit Framework developers used Ruby language to create it, and it is available to install on various operating systems. It includes all major Linux and Unix versions, macOS and Windows. Generally, the users need to install it manually, however, penetration Linux distributions such as Kali out of the box offers Metasploit.

In addition to command line-oriented input, graphical user interfaces are available for more effortless operation. The framework is extensible in different languages via add-ons.

The framework offers a modular structure and distinguishes the tasks of developers and attackers. There is a separation between the attack methods (exploits) and the code to be executed. Exploits must be specifically tailored to the different vulnerabilities of software and hardware. The code is used when an attack method has been successful and the system can be infiltrated or compromised.

Steps to install Metasploit on Ubuntu 22.04 LTS

The Rapid7 Metasploit official site offers the setup script that can install the framework on Ubuntu using a few commands, here we learn what are those.

1. Update Ubuntu 22.04

First, run the system update command to get your system’s installed packages’ latest version. Also, this step will rebuild the APT package index.

sudo apt update && sudo apt upgrade

 

2. Download Metasploit Script

Unlike the other common open-source software available to install using the default system repository of Ubuntu, Metasploit is not available to install via APT. However, thanks to the developers of this testing tool, they offer a script to easily install Metasploit on Linux systems, even on Ubuntu 22.04.

sudo apt instal curl
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall

Change the permission of the script to make it executable.

chmod 755 msfinstall

 

3. Install Metasploit on Ubuntu 22.04

Finally, we have the executable script on our system, now we can easily install it by executing it on our system. Here is the command for that.

sudo ./msfinstall

After that, run the system update command once again.

sudo apt update

If you get an error: Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).

Then run:

sudo mv /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/

 

4. Run the initial setup

To set up a database and web service, run the given command.

msfdb init

start configurring Metsploit

 

5. Start msfconsole

The above command will start the Metasploit framework, from where you can start using this tool. For more information refer to the official documentation page. 

Start msfconsole

install metasploit on Ubuntu 22.04 Jammy LTS

 

6. How to update or upgrade

In the future, if you want to get the latest updates for the installed Metasploit, then simply get them by running the system update and upgrade command.

sudo apt update && sudo apt upgrade

 

7. Uninstall Metasploit from Ubuntu 22.04

Well, there may be a time when you don’t require this software due to any reason. If that is the case with you and you want to remove Metasploit from your system then here is the command.

sudo apt autoremove --purge metasploit-framework

 

 

Other Articles:

11 Most Popular Linux distros of the year 2021- To use in 2022
Install Laravel on Ubuntu 22.04 LTS Jammy JellyFish Linux
5 Best free-to-use Linux Server distributions for 2022
How to install SAMBA on Ubuntu 22.04 LTS Jammy…

 

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.