trustedsec / ptf

The Penetration Testers Framework (PTF) is a way for modular support for up-to-date tools.
5.16k stars 1.24k forks source link

The msfconsole is not working #612

Closed nicklm0 closed 11 months ago

nicklm0 commented 1 year ago

after installing the script I go to /pentest/exploitation/metasploit, the contents of the folder are as follows: Metasploit is located under /opt/metasploit-framework. However, you can launch it from anywhere by typing 'msfconsole,' and so on.

And when I go to the /opt directory, the contents are as follows: 'database.yml,' 'google,' 'pg-utf8.sql,' and 'SmartBear there is no /metasploit-framework directory

BustedSec commented 1 year ago

What Linux distro are you running and did you get any error messages when running the module to install metasploit?

nicklm0 commented 1 year ago

Hello, Sir,

I am currently running Linux Mint XFCE. I encountered an error message stating that 'msfconsole' is not installed. To resolve this, I ran 'sudo su' to gain superuser privileges and then used 'ptf.' However, when I tried to install it using '(modules/exploitation/metasploit)>install,' it began the installation process but did not run the 'msfconsole' command as expected. I tried installing it again, and after multiple attempts, it magically started working. Screenshot_2023-11-07_16-13-30

BustedSec commented 1 year ago

I'm glad you managed to get it working, would you mind attaching any additional console output you have and any related logs so I can attempt to replicate the issue and make any chances needed to fix the issue so others don't have it? Thanks.

jeffmcjunkin commented 1 year ago

There's been a few times that the Rapid7 team has accidentally broken their nightly package repositories, IIRC by not copying the latest .deb files and such that the index points to over in a timely fashion. I ran into this with some automated builds.

Unless there are more details, I wouldn't worry too much about this issue.

nicklm0 commented 1 year ago

@BustedSec I apologize that I forgot to document the error; however I still remember The error began when I used 'modules/install_update_all' command on the PTF and the script updated and pulled all the repos. It took three hours to finish, and once the PTF installation was complete, I exited and cd'd into the '/pentest' folder. Metasploit was located in the 'modules/exploitation/metasploit' directory. I then ran 'ls -alh' on it, and the README showed that Metasploit was actually located in the '/opt/metasploit' directory. However, I was unable to run it inside of the PTF. What I did was type 'msfconsole' with sudo on the CLI, but the CLI returned 'msfconsole is not installed'. As a result, I had to reinstall Metasploit on the PTF again and again until it runs yesterday.

nicklm0 commented 1 year ago

@jeffmcjunkin your advice is very helpful thank you so much