DebianDebian Based

How To Install Metasploit on Debian 12

Install Metasploit on Debian 12

In this tutorial, we will show you how to install Metasploit on Debian 12. Metasploit is a powerful open-source penetration testing framework used by security professionals to find and exploit vulnerabilities in systems and networks. It provides a robust set of tools, modules, and exploits to simulate real-world attacks and assess the security posture of an organization. While Metasploit is commonly associated with Kali Linux, it can be installed on other Linux distributions as well, including Debian 12.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the Metasploit on a Debian 12 (Bookworm).

Prerequisites

Before proceeding with the installation of Metasploit on Debian 12, ensure you meet the following requirements:

  • A server running one of the following operating systems: Debian 12 (Bookworm).
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for the Metasploit.
  • A user account with sudo privileges to execute administrative commands.

Install Metasploit on Debian 12 Bookworm

Step 1. To ensure your Debian 12 installation is up to date, run the following commands in the terminal:

sudo apt update
sudo apt upgrade

The apt update command refreshes the package lists from the repositories, while apt upgrade installs available updates for installed packages. If prompted, review the changes and press “Y” to proceed with the upgrade.

Step 2. Installing Dependencies.

Metasploit Framework relies on several dependencies to function properly. Install them using the following command:

sudo apt install build-essential zlib1g zlib1g-dev libpq-dev libpcap-dev libsqlite3-dev ruby ruby-dev

Step 3. Installing Metasploit on Debian 12.

Rapid7, the company behind Metasploit, provides an installer script to streamline the installation process. Download it using the following command:

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

This command uses curl to download the installer script from the official Rapid7 GitHub repository and saves it as msfinstall in the current directory.

Next, make the installer script executable with the following command:

chmod +x msfinstall

With the installer script downloaded and made executable, we can now run it to install Metasploit Framework. Execute the following command:

sudo ./msfinstall

The installer will start and guide you through the setup process. Here are a few key prompts you may encounter:

  1. License Agreement: Read through the Rapid7 license terms and type “yes” to agree and proceed.
  2. Installation Directory: By default, Metasploit will be installed in /opt/metasploit-framework. Press Enter to accept the default path or specify a custom directory.
  3. Database Configuration: Metasploit uses a PostgreSQL database to store project data. When prompted, type “yes” to set up a new database.
  4. Web Service: The Metasploit web service is optional. If prompted, type “no” to skip setting it up, unless you specifically require this feature.

Step 4. Accessing Metasploit on Debian.

After successfully installing Metasploit, perform some initial configuration steps to ensure smooth operation. Launch Metasploit console:

msfconsole

If prompted, set up a new database by following the on-screen instructions.

Congratulations! You have successfully installed Metasploit. Thanks for using this tutorial to install the latest version of the Metasploit on Debian 12 Bookworm. For additional help or useful information, we recommend you check the official Metasploit website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button