-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
msfconsole crashes due to ruby gems errors #16434
Comments
Looks like this might be an issue with gems 3.0.0 since kali uses 2.7.x and msf works fine on there. |
@JudgeMegapolis Hm, that's interesting. Could you run these lines for me please
|
This doesn't look right. Are some of the files supposed to be owned by root?
I ran msf just fine with this version of go since this is the latest version for some reason in the repos and snap for some reason messes up the golang setup. Might need to install a more up to date version. |
Thanks for the update 👍 I haven't verified this yet, but I assume newer versions of Go are now installing the dependencies for Metasploit modules directly into the metasploit-framework directory itself, then Metasploit is trying to load them as Ruby files You might be able to modify this list to ignore the Go folder: metasploit-framework/lib/msf_autoload.rb Lines 52 to 66 in d22065f
Not tested: def ignore_list
[
+ "#{__dir__}/msf/core/modules/external/go/pkg",
"#{__dir__}/msf/core/constants.rb",
"#{__dir__}/msf/core/cert_provider.rb",
"#{__dir__}/msf/core/rpc/json/",
"#{__dir__}/msf/core/modules/external/ruby/metasploit.rb",
"#{__dir__}/msf/core/rpc/v10/constants.rb",
"#{__dir__}/msf/core.rb",
"#{__dir__}/msf/base.rb",
"#{__dir__}/rex/post/",
"#{__dir__}/rex/post.rb",
"#{__dir__}/rex/proto/ssh/hrr_rb_ssh.rb",
"#{__dir__}/rex/proto/ssh/connection.rb",
"#{__dir__}/rex/proto/ssh/connection.rb"
]
end
|
@adfoster-r7 that did the trick. msfconsole no longer crashes and loads with both with sudo and as regular user. |
I'll keep this open until we get a PR in to fix it 👍 |
Steps to reproduce
How'd you do it?
msfconsole
and tried runningsudo msfconsole
sudo apt remove --purge metasploit-framework
andsudo apt install metasploit-framework
. Have also tried usingmsfupdate
This section should also tell us any relevant information about the
environment; for example, if an exploit that used to work is failing,
tell us the victim operating system and service versions.
Were you following a specific guide/tutorial or reading documentation? No.
If yes link the guide/tutorial or documentation you were following here, otherwise you may omit this section.
Expected behavior
What should happen? metasploit should load not crash.
Current behavior
What happens instead?
Metasploit version
metasploit-framework (6.1.38+20220409102605~1rapid7-1)
Additional Information
I cannot start msfconsole so this is the only ouput I can get. I was able to before just purge the packages and reinstall, but now that doesn't seem to work anymore.
My version of Ubuntu is:
Ubuntu 20.04.3 LTS x86_64
and originally installed metasploit via the msfinstall script.The text was updated successfully, but these errors were encountered: