-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
LoadError when starting msfconsole on windows #19724
Comments
I checked and I downloaded the Metasploit framework v6.4.41 |
I get the same error on Ubuntu:
|
@ismaws Thanks for the update;
require 'rex/powershell/version'
require 'rex/powershell/exceptions'
require 'rex/powershell/output'
require 'rex/powershell/parser'
require 'rex/powershell/obfu'
require 'rex/powershell/function'
require 'rex/powershell/param'
require 'rex/powershell/script'
require 'rex/powershell/templates'
require 'rex/powershell/payload'
+ $stdout.puts $LOAD_PATH # Delete the + symbol at the start
require 'rex/powershell/psh_methods'
require 'rex/powershell/command' After modifying that file, reopen msfconsole, and provide the full output |
output:
|
Looks like these two files are missing from the rex-powershell gem:
I'm not sure how that would have happened though - as the files are included in the gem: https://rubygems.org/gems/rex-powershell/versions/0.1.100 Do you have anti-virus enabled, and the file's been removed maybe? 👀 As a workaround you can replace the file locally with:
|
not sure what is happening... upon a fresh boot (to make sure the file was not being used) I cd into the dir and wget the file but still does not show up. Your method did not work either. Maybe the rex-powershell installation is broken?
|
I will check the AV settings now... |
...so yeah I had to disable MSFT defender and reinstall the gem again, it works now thanks! |
Steps to reproduce
How'd you do it?
Used metasploitframework-latest.msi /L*v msf.log in CMD as admin to install Metasploit as double clicking the installer had some issues
Went through the steps of the installer, it finished and I clicked finished
I opened the CMD again going to my C drive, opening the Metasploit framework folder and navigating to the console .bat file
Tried to execute the . bat file and got error internal:c:/metasploit-framework/embedded/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- rex/powershell/psh_methods (LoadError)
I made sure windows defender wasn't blocking anything and as far as I can tell it's not, I then went and uninstalled Metasploit and reinstalled it the same way I stated previously
followed same steps to try and execute the .bat file for the console and got the same error
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?
If yes link the guide/tutorial or documentation you were following here, otherwise you may omit this section.
Expected behavior
.bat file should have opened up proper files and the console should have opened in the command line
Current behavior
i currently can see all files and tried to update the fiels throught the command line but every time i try to open the console i get this error
internal:c:/metasploit-framework/embedded/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- rex/powershell/psh_methods (LoadError)
Metasploit version
im not able to get to the console so im unsure what version i have
Additional Information
OS: Windows 10.0.19045 home
The output I get every time I try to run the console .bat file
The text was updated successfully, but these errors were encountered: