How to install Metasploit on ubuntu20.04 or in Higher versions.
Metasploit is a tool that is used to check the vulnerabilities of websites. In this blog we are going to learn how to install the Metasploit in the server by following the below steps.
1. A server with OS type Ubuntu 20.04 or higher.
2. An user with sudo privileges(For security purposes avoid root user while installation)
Step 1: Log in to the sudo privileged user.
Step 2: Update the packages in your server to the latest versions.
$ sudo apt update -y
Step 3: Install all the required dependencies for the Metasploit installation.
$ sudo apt install gpgv2 autoconf bison build-essential postgresql libaprutil1 libgmp3-dev libpcap-dev openssl libpq-dev libreadline6-dev libsqlite3-dev libssl-dev locate libsvn1 libtool libxml2 libxml2-dev libxslt-dev wget libyaml-dev ncurses-dev postgresql-contrib xsel zlib1g zlib1g-dev -y
Step 4: Download the Metasploit source code by using the following command.
$ sudo curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall
Step 5: Check the downloaded file by running the command,
$ sudo ls -latr msfinstall
Step 6: Change the file permission for msfinstall file to make it executable.
$ sudo chmod 755 msfinstall
Step 7: Then install Metasploit using this command,
$ sudo ./msfinstall
Installation may take some time depending on the server resources, it may be better to run the above command on the screen.
When the installation is completed, you can access the Metasploit console by using this command,
$ sudo msfconsole
By following the above steps we are able to install Metasploit on the server and can access the msf console.