{"id":11519,"date":"2022-02-10T18:57:44","date_gmt":"2022-02-10T15:57:44","guid":{"rendered":"https:\/\/kifarunix.com\/?p=11519"},"modified":"2024-03-09T09:53:44","modified_gmt":"2024-03-09T06:53:44","slug":"install-metasploit-on-debian","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-metasploit-on-debian\/","title":{"rendered":"Install Metasploit on Debian 11\/Debian 10"},"content":{"rendered":"\n<p>Follow through this guide to learn how to install Metasploit on Debian 11\/Debian 10. <a href=\"https:\/\/docs.rapid7.com\/metasploit\/msf-overview\/\" target=\"_blank\" rel=\"noreferrer noopener\">Metasploit Framework<\/a> provides a platform and tools for performing deep system security auditing as well as penetration testing to unearth, exploit and validate every other would-be vulnerability.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#install-metasploit-on-debian-11-debian-10\">Install Metasploit on Debian 11\/Debian 10<\/a><ul><li><a href=\"#run-system-update\">Run System Update<\/a><\/li><li><a href=\"#download-metasploit-pro-installer\">Download Metasploit Pro Installer<\/a><\/li><li><a href=\"#install-metasploit\">Install Metasploit<\/a><\/li><li><a href=\"#create-metasploit-initial-user-account\">Create Metasploit Initial User Account<\/a><\/li><li><a href=\"#accessing-metasploit-web-ui\">Accessing Metasploit Web UI<\/a><\/li><li><a href=\"#other-tutorials\">Other Tutorials<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-metasploit-on-debian-11-debian-10\">Install Metasploit on Debian 11\/Debian 10<\/h2>\n\n\n\n<p>Metasploit is available in both the commercial and opensource version (thanks to Rapid 7 for teaming up with OSS community). As such, it is upon you to choose which version to go with.<\/p>\n\n\n\n<p>This guide presents installation of the Metasploit Free trial version. However, if you do not want to take this route, you can use the&nbsp;<a href=\"https:\/\/github.com\/rapid7\/metasploit-framework\/wiki\/Nightly-Installers\" target=\"_blank\" rel=\"noreferrer noopener\">Nightly build versions<\/a>. The Nightly build versions ship with all the dependencies required for a successful installation and all you need to do the installation is just a simple script.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"run-system-update\">Run System Update<\/h3>\n\n\n\n<p>Update and upgrade your system.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"download-metasploit-pro-installer\">Download Metasploit Pro Installer<\/h3>\n\n\n\n<p>On the <a href=\"https:\/\/www.metasploit.com\/download\" target=\"_blank\" rel=\"noreferrer noopener\">download&#8217;s page<\/a>, click Free trial to create an account to enable you download the installer and an activation key for your Metasploit Pro version.<\/p>\n\n\n\n<p>You can as well execute the command below to download Metasploit Pro installer.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/downloads.metasploit.com\/data\/releases\/metasploit-latest-linux-x64-installer.run<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-metasploit\">Install Metasploit<\/h3>\n\n\n\n<p>Once the download completes, make the installer executable by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x metasploit-latest-linux-x64-installer.run<\/code><\/pre>\n\n\n\n<p>Next, launch the Metasploit installer.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/metasploit-latest-linux-x64-installer.run<\/code><\/pre>\n\n\n\n<p>When the installer runs, press Enter and scroll through the License. For the installation to proceed, you need to accept the License.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>----------------------------------------------------------------------------\nWelcome to the Metasploit Setup Wizard.\n\n----------------------------------------------------------------------------\nPlease read the following License Agreement. You must accept the terms of this \nagreement before continuing with the installation.\n\nPress [Enter] to continue: Enter\nRAPID7 END USER LICENSE AGREEMENT\n...\nLast Modified April 2018\n\nPress [Enter] to continue:\n\nDo you accept this license? [y\/n]: y\n\n<\/code><\/pre>\n\n\n\n<p>Next, choose the installation folder. Press Enter to accept the default,&nbsp;<code>\/opt\/metasploit<\/code>.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>----------------------------------------------------------------------------\nInstallation folder\n\nPlease, choose a folder to install Metasploit\n\nSelect a folder [\/opt\/metasploit]: \n\n----------------------------------------------------------------------------\n\n<\/code><\/pre>\n\n\n\n<p>Install Metasploit as a service to make it easy to start started on system reboot.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>----------------------------------------------------------------------------\nInstall as a service\n\nYou can optionally register Metasploit as a service. This way it will \nautomatically be started every time the machine is started.\n\nInstall Metasploit as a service? [Y\/n]: y\n...\n\n<\/code><\/pre>\n\n\n\n<p>Next, you are asked to disable the anti-virus and firewall solutions if any is installed on the server.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Disable Anti-Virus and Firewall\n\n\n\n*** Disable Anti-Virus! ***\nThis product is not compatible with common anti-virus solutions. Before \ncontinuing, please disable any installed anti-virus software or add an exclusion \nfor the Metasploit installation directory. Failure to do so can lead to a \ncorrupt installation and the malfunctioning of certain exploit modules.\n\n*** Disable Firewall! ***\nThis product is not compatible with common firewall applications. Although it is \npossible to use Metasploit with a firewall in place, a firewall will interfere \nwith the function of certain exploits and payloads. Please ensure that your \nfirewall is disabled prior to using this product for a penetration test.\nPress [Enter] to continue:\n\n----------------------------------------------------------------------------\n<\/code><\/pre>\n\n\n\n<p>Since Metasploit will be running as a service, define a port in which it is listening on. Press Enter to accept TCP port 3790 as the default port.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>----------------------------------------------------------------------------\nMetasploit Service\n\nPlease enter the port that the Metasploit service will use.\n\nSSL Port [3790]: Enter\n\n<\/code><\/pre>\n\n\n\n<p>Set the server FQDN of your server for the purpose of SSL certificate that is generated. Set the validity of the SSL of the certificate. You can press Enter to accept the default period.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>----------------------------------------------------------------------------\nGenerate an SSL Certificate\n\nPlease provide the fully qualified domain name of this system below (e.g. \nmetasploit.example.com). A certificate is generated for a specific server name \nand web browsers will alert users if the name does not match.\n\nServer Name [localhost]: msf.kifarunix-demo.com\n\nDays of validity [3650]: \n\nShould the generated certificate be added to the operating system's trusted \nstore?\n\nYes, trust certificate [Y\/n]: y\n\n\n----------------------------------------------------------------------------\nSetup is now ready to begin installing Metasploit on your computer.\n\nDo you want to continue? [Y\/n]: y\n\n<\/code><\/pre>\n\n\n\n<p>After that, proceed with installing Metasploit on Debian 11\/Debian 10.<\/p>\n\n\n\n<p>Once the installation is done, you will be given a URL to access the Metasploit UI.<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>----------------------------------------------------------------------------\nPlease wait while Setup installs Metasploit on your computer.\n\n Installing\n 0% ______________ 50% ______________ 100%\n #########################################\n\n----------------------------------------------------------------------------\nSetup has finished installing Metasploit on your computer.\n\nInfo: To access Metasploit, go to\n        https:\/\/localhost:3790 from your browser.\n\n<\/code><\/pre>\n\n\n\n<p>The Metasploit is now ready to carry on its Magics.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-metasploit-initial-user-account\">Create Metasploit Initial User Account<\/h3>\n\n\n\n<p>To login to Metasploit UI, you need to create Metasploit initial user account by running the script below. The script will prompt you for the username and auto-generate the password. You are required to reset this password upon login.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/metasploit\/createuser -u kifarunix<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;*] User Creation Script has started, this may take a moment.\n\n&#91;*] Creating user 'kifarunix' with password '?#{S#87P' ...\n\n&#91;*] User kifarunix has been created, please change your password on login.<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"accessing-metasploit-web-ui\">Accessing Metasploit Web UI<\/h3>\n\n\n\n<p>To access Metasploit UI, navigate to&nbsp;<code>https:\/\/&lt;msf-server-IP&gt;:3790<\/code>, if you are not accessing it from the locally.<\/p>\n\n\n\n<p>Note that if UFW is running, you need to open access to port 3790. You can use iptables if need be.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow 3790\/tcp<\/code><\/pre>\n\n\n\n<p>Add the SSL error on the browser to exception and proceed to Metasploit UI.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/metasploit-login.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1878\" height=\"902\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/metasploit-login.png\" alt=\"Install Metasploit on Debian 11\/Debian 10\" class=\"wp-image-11527\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/metasploit-login.png?v=1644508172 1878w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/metasploit-login-768x369.png?v=1644508172 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/metasploit-login-1536x738.png?v=1644508172 1536w\" sizes=\"(max-width: 1878px) 100vw, 1878px\" \/><\/figure><\/a><\/div>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/07\/metasploit-login.png\"><\/a><\/p>\n\n\n\n<p>Enter the activation key. You can obtain the key by&nbsp;<a href=\"https:\/\/www.rapid7.com\/products\/metasploit\/download\/pro\" target=\"_blank\" rel=\"noreferrer noopener\">submitting a request<\/a>.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/activate-metasploit.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1699\" height=\"915\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/activate-metasploit.png\" alt=\"Install Metasploit on Debian 11\/Debian 10\" class=\"wp-image-11529\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/activate-metasploit.png?v=1644508251 1699w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/activate-metasploit-768x414.png?v=1644508251 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/activate-metasploit-1536x827.png?v=1644508251 1536w\" sizes=\"(max-width: 1699px) 100vw, 1699px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Once your activation is successful, you will land on Metasploit Pro web interface.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/metasploit-dashboard.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1705\" height=\"773\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/metasploit-dashboard.png\" alt=\"Install Metasploit on Debian 11\/Debian 10\" class=\"wp-image-11530\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/metasploit-dashboard.png?v=1644508274 1705w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/metasploit-dashboard-768x348.png?v=1644508274 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/metasploit-dashboard-1536x696.png?v=1644508274 1536w\" sizes=\"(max-width: 1705px) 100vw, 1705px\" \/><\/figure><\/a><\/div>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2021\/07\/activate-metasploit.png\"><\/a>Your Metasploit is now ready.<\/p>\n\n\n\n<p>Global Settings;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/global-settings.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1705\" height=\"626\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/global-settings.png\" alt=\"Install Metasploit on Debian 11\/Debian 10\" class=\"wp-image-11531\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/global-settings.png?v=1644508362 1705w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/global-settings-768x282.png?v=1644508362 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/02\/global-settings-1536x564.png?v=1644508362 1536w\" sizes=\"(max-width: 1705px) 100vw, 1705px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>You can now run a phishing campaign, quick pentest, web app test, vulnerability validation,generate payloads, e.t.c.<\/p>\n\n\n\n<p>The Metasploit Framework is also available on command line. To launch it, just execute the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>msfconsole<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>                                                  \n                                   ____________\n [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%| $a,        |%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]\n [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%| $S`?a,     |%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]\n [%%%%%%%%%%%%%%%%%%%%__%%%%%%%%%%|       `?a, |%%%%%%%%__%%%%%%%%%__%%__ %%%%]\n [% .--------..-----.|  |_ .---.-.|       .,a$%|.-----.|  |.-----.|__||  |_ %%]\n [% |        ||  -__||   _||  _  ||  ,,aS$\"\"`  ||  _  ||  ||  _  ||  ||   _|%%]\n [% |__|__|__||_____||____||___._||%$P\"`       ||   __||__||_____||__||____|%%]\n [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%| `\"a,       ||__|%%%%%%%%%%%%%%%%%%%%%%%%%%]\n [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|____`\"a,$$__|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]\n [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%        `\"$   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]\n [%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%]\n\n\n       =[ metasploit v6.1.27-dev                          ]\n+ -- --=[ 2196 exploits - 1162 auxiliary - 400 post       ]\n+ -- --=[ 596 payloads - 45 encoders - 10 nops            ]\n+ -- --=[ 9 evasion                                       ]\n\nMetasploit tip: Save the current environment with the \nsave command, future console restarts will use this \nenvironment again\n\nmsf6 &gt; db_status\n[*] Connected to msf3. Connection type: postgresql.\nmsf6 &gt; \n<\/code><\/pre>\n\n\n\n<p>Great. You can now run you Pentests projects. That is all on installing Metasploit on Debian 11\/Debian 10.<\/p>\n\n\n\n<p>Happy pentesting\u2026<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"other-tutorials\">Other Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-metasploit-framework-on-ubuntu-22-04-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Metasploit Framework on Ubuntu 22.04\/Ubuntu 20.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/installing-metasploit-on-ubuntu-18-04-lts\/\" target=\"_blank\" rel=\"noreferrer noopener\">Installing Metasploit on Ubuntu 18.04 LTS<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Follow through this guide to learn how to install Metasploit on Debian 11\/Debian 10. Metasploit Framework provides a platform and tools for performing deep system<\/p>\n","protected":false},"author":1,"featured_media":9713,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,34],"tags":[4571,3958,4568,4569,313,4570,4559,4566],"class_list":["post-11519","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-security","tag-debian-10-metasplot","tag-debian-11","tag-install-metasploit-on-debian-11-debian-10","tag-install-metasploit-pro-debian-11","tag-metasploit","tag-metasploit-pro-debian-10","tag-msfconsole","tag-msfdb","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/11519"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=11519"}],"version-history":[{"count":9,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/11519\/revisions"}],"predecessor-version":[{"id":20406,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/11519\/revisions\/20406"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/9713"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=11519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=11519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=11519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}