CentOS 7.x Install Metasploit

From Notes_Wiki
Revision as of 09:40, 25 August 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > CentOS > CentOS 7.x > VAPT Tools > Metasploit > CentOS 7.x Install Metasploit

To install metasploit use following steps:

  1. Disable firewalld and selinux
    systemctl stop firewalld
    systemctl disable firewalld
    setenforce 0
    #set SELINUX=disabled in below file
    vim /etc/sysconfig/selinux
  2. Copy Linux installer to a Linux machine. chmod +x and run it. Example:
    chmod +x metasploit-latest-linux-x64-installer.run
    #Below requires graphical login (Local or ssh -X)
    ./metasploit-latest-linux-x64-installer.run
    Complete setup with all defaults eg SSL port:3790. The setup takes considerable time, so need to be patient
  3. Reboot the machine for metasploit to startup properly on machine boot. 'systemctl start metasploit' does not seem to help without reboot.
  4. Open https://localhost:3790/ (Note that localhost is required till initial login is created. After that FQDN can be used.)
    If localhost browser access is not feasible (Eg cloud) then in install-path (/opt/metasploit) there is a createuser script which can be used to create user over SSH as follows:
    cd /opt/metasploit
    ./diagnostic_shell
    #On diagnostic shell prompt
    ./createuser
    #Give username eg root and note password
  5. Open https://FQDN:3790/ and login as root user. Activate product with activation key received in email.
  6. Change root password, if desired using "Account - root" -> "User settings" page from top right.
  7. Restart metasploit after activation using:
    systemctl restart metasploit
    systemctl status metasploit


Home > CentOS > CentOS 7.x > VAPT Tools > Metasploit > CentOS 7.x Install Metasploit