• Home »
  • »
  • Reset Metasploit Pro Web Console Password For msf User

Reset Metasploit Pro Web Console Password For msf User

Awhile back I installed a version of Metasploit Pro while juggling a couple other tasks and unfortunately I noted the password in an encrypted text document and forgot the location which in itself was a fail. Regardless of the mistake I made luckily Metasploit Express and Metasploit Pro make it easy enough to change the msf user web console password without any pain. Use the directions below to modify the msf users login information on your Metasploit Pro or Metasploit Express installation.

Modify Metasploit Pro Web Console Password:

  1. Launch Metasploit Diagnostic Shell: First locate the full path to the Metasploit Diagnostic shell by SSH’ing to the server running Metasploit Pro or Metasploit Express and issuing the “locate diagnostic_shell” from the CLI as shown in the below example image.

    1. root@bt:~# locate diagnostic_shell
    2. /opt/metasploit-4.1.4/diagnostic_shell
    3. root@bt:~#

    When the results are returned which will likely only be a single result launch the diagnostic shell as root to display a new shell prompt as shown in the below example output.


    1. root@bt:~# /opt/metasploit-4.1.4/diagnostic_shell
    2. bash-4.1#
  2. Initiate Meta Pro Password Reset: Now again locate the Metasploit reset password script which is named resetpw and can be located using the below example command from the Metasploit diagnostic shell.

    1. bash-4.1# locate resetpw
    2. /opt/metasploit-4.1.4/resetpw
    3. /opt/metasploit-4.1.4/apps/pro/ui/script/resetpw
    4. bash-4.1#

    Notice above that two resetpw scripts were returned which likely will launch the exact same application however Metasploit notes to run the one in the scripts directory so launch the resetpw script using syntax similar to the below depending on the Metasploit Pro installation PATH. Once the script is launched follow the on screen instructions which will require you to first confirm you want to reset the msf users password by typing yes followed by hitting enter to end the resetpw script.


    1. bash-4.1# /opt/metasploit-4.1.4/apps/pro/ui/script/resetpw
    2. [*] Please wait while the environment is loaded.
    4. ************************************
    5. *                                  *
    6. *    Metasploit Password Reset     *
    7. *                                  *
    8. ************************************
    10. [*] Warning! This tool will reset the password for the 'msf' user account.
    11. [*] To continue, please type "yes"
    13. Continue? (yes/no) > yes
    15. [*] The password for msf has been reset to a random value
    17.     New Password: 12345Aa!
    19. [*] Please change this password on the next login.
    20. [*] Hit enter to exit
    22. bash-4.1#

    Notice the output from the resetpw script includes the new randomly generated password and you are strongly encouraged to change that password immediately to something with double the characters.

  3. Restart Metasploit: It didn’t say this in the instructions from Metasploit but I needed to restart Metasploit to be able to login with the new password that was just reset for the msf user. You can restart Metasploit on Ubuntu or Backtrack Linux using the below syntax.

    1. bash-4.1# /etc/init.d/metasploit restart
    2. prosvc is stopped
    3. nginx is stopped
    4. metasploit is stopped
    5. /opt/metasploit-4.1.4/postgresql/scripts/ctl.sh : postgresql stopped
    6. LOG:  database system was shut down at 2012-05-02 15:05:07 EDT
    7. LOG:  database system is ready to accept connections
    8. LOG:  autovacuum launcher started
    9. /opt/metasploit-4.1.4/postgresql/scripts/ctl.sh : postgresql  started at port 7337
    10. prosvc is running
    11. >> Deleting stale PID file log/thin.pid
    12. metasploit is running
    13. bash-4.1#

    Give it a couple minutes to get all the way started before attempting to login.

You should now be able to login to the Metasploit Pro web console. Please make sure to change the new password right after you login so you don’t forget to do so.

Metasploit: The Penetration Tester’s Guide (Paperback)

List Price: $49.95 USD
New From: $23.97 USD In Stock
Used from: $22.23 USD In Stock