Skip to content
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

Open
DasaniBottled opened this issue Dec 14, 2024 · 8 comments
Open

LoadError when starting msfconsole on windows #19724

DasaniBottled opened this issue Dec 14, 2024 · 8 comments
Labels

Comments

@DasaniBottled
Copy link

Steps to reproduce

How'd you do it?

  1. Used metasploitframework-latest.msi /L*v msf.log in CMD as admin to install Metasploit as double clicking the installer had some issues

  2. Went through the steps of the installer, it finished and I clicked finished

  3. I opened the CMD again going to my C drive, opening the Metasploit framework folder and navigating to the console .bat file

  4. 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)

  5. 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

  6. 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
Capture

@DasaniBottled
Copy link
Author

I checked and I downloaded the Metasploit framework v6.4.41

@ismaws
Copy link

ismaws commented Dec 23, 2024

I get the same error on Ubuntu:

*following https://docs.metasploit.com/docs/development/get-started/setting-up-a-metasploit-development-environment.html

ismael@quiet-lemur:~/metasploit-framework$ sudo ./msfconsole
Metasploit tip: Save the current environment with the save command,
future console restarts will use this environment again
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require': cannot load such file -- rex/powershell/psh_methods (LoadError)
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell.rb:12:in `<top (required)>'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
        from /home/ismael/metasploit-framework/lib/rex.rb:50:in `<top (required)>'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
        from /home/ismael/metasploit-framework/lib/msf/core/session.rb:3:in `<top (required)>'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:26:in `require'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:21:in `<class:CommSink>'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:20:in `<module:CustomNameserverProvider>'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:11:in `<module:DNS>'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:5:in `<module:Proto>'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:4:in `<module:Rex>'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:3:in `<top (required)>'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:26:in `require'
        from /home/ismael/metasploit-framework/lib/msf/ui/console/driver.rb:85:in `initialize'
        from /home/ismael/metasploit-framework/lib/metasploit/framework/command/console.rb:66:in `new'
        from /home/ismael/metasploit-framework/lib/metasploit/framework/command/console.rb:66:in `driver'
        from /home/ismael/metasploit-framework/lib/metasploit/framework/command/console.rb:54:in `start'
        from /home/ismael/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
        from ./msfconsole:23:in `<main>'

@adfoster-r7
Copy link
Contributor

adfoster-r7 commented Dec 23, 2024

@ismaws Thanks for the update;

  1. Could you run and provide the output of:
find /usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100
  1. Could you modify this file /usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell.rb to add an additional line $stdout.puts $LOAD_PATH directly above the require 'rex/powershell/psh_methods' line, i.e. it should look like this (without the + symbol):
  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

@ismaws
Copy link

ismaws commented Dec 23, 2024

output:

ismael@quiet-lemur:~/metasploit-framework$ find /usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/.github
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/.github/workflows
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/.github/workflows/verify.yml
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/.gitignore
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/.rspec
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/.travis.yml
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/CODE_OF_CONDUCT.md
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/Gemfile
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/LICENSE
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/README.md
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/Rakefile
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/cortex.yaml
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/data
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/data/templates
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/data/templates/to_mem_dotnet.ps1.template
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/data/templates/to_mem_msil.ps1.template
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/data/templates/to_mem_pshreflection.ps1.template
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/data/templates/to_mem_rc4.ps1.template
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/command.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/exceptions.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/function.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/obfu.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/output.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/param.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/parser.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/payload.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/script.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/templates.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/version.rb
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/rex-powershell.gemspec
ismael@quiet-lemur:~/metasploit-framework$ vi /usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell.rb
ismael@quiet-lemur:~/metasploit-framework$ sudo vi /usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell.rb
ismael@quiet-lemur:~/metasploit-framework$ sudo ./msfconsole
Metasploit tip: To save all commands executed since start up to a file, use the
makerc command
/home/ismael/metasploit-framework/lib console...-
/home/ismael/metasploit-framework/app/models
/home/ismael/metasploit-framework/app/concerns
/home/ismael/metasploit-framework/app/validators
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit-credential-6.0.11/app/concerns
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit-concern-5.0.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/actionview-7.0.8.6/lib
/usr/local/lib/ruby/gems/3.2.0/gems/bundler-2.5.10/lib
/usr/local/lib/ruby/gems/3.2.0/gems/yard-0.9.37/lib
/usr/local/lib/ruby/gems/3.2.0/gems/timecop-0.9.10/lib
/usr/local/lib/ruby/gems/3.2.0/gems/test-prof-1.4.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/simplecov-0.18.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/simplecov-html-0.13.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/ruby-prof-1.4.2/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/ruby-prof-1.4.2
/usr/local/lib/ruby/gems/3.2.0/gems/rubocop-1.67.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/unicode-display_width-2.6.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/ruby-progressbar-1.13.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rubocop-ast-1.33.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rspec-rerun-1.1.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rspec-rails-7.0.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rspec-3.13.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rspec-mocks-3.13.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/regexp_parser-2.9.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rainbow-3.1.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/pry-byebug-3.10.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/pry-0.14.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/parser-3.3.5.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/parallel-1.26.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/xmlrpc-0.3.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/xdr-3.0.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/winrm-2.3.9/lib
/usr/local/lib/ruby/gems/3.2.0/gems/nori-2.7.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/win32api-0.1.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/warden-1.2.9/lib
/usr/local/lib/ruby/gems/3.2.0/gems/unix-crypt-1.3.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/tzinfo-data-1.2024.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/thin-1.8.2/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/thin-1.8.2
/usr/local/lib/ruby/gems/3.2.0/gems/swagger-blocks-3.0.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/sshkey-3.0.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/sqlite3-1.7.3-x86_64-linux/lib
/usr/local/lib/ruby/gems/3.2.0/gems/sinatra-3.2.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/tilt-2.4.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rack-protection-3.2.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/mustermann-3.0.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/ruby_smb-3.3.13/lib
/usr/local/lib/ruby/gems/3.2.0/gems/windows_error-0.1.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/openssl-cmac-2.0.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/ruby-mysql-4.1.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/ruby-macho-4.1.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-zip-0.1.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-sslscan-0.1.10/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-rop_builder-0.1.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-registry-0.1.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-random_identifier-0.1.13/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-ole-0.1.8/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-nop-0.1.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-mime-0.1.8/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-java-0.1.7/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-exploitation-0.1.40/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-encoder-0.1.7/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-bin_tools-0.1.9/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-struct2-0.1.4/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-arch-0.1.16/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-text-0.2.59/lib
/usr/local/lib/ruby/gems/3.2.0/gems/redcarpet-3.6.0/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/redcarpet-3.6.0
/usr/local/lib/ruby/gems/3.2.0/gems/rb-readline-0.5.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rasn1-0.13.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/strptime-0.2.5/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/strptime-0.2.5
/usr/local/lib/ruby/gems/3.2.0/gems/puma-6.4.3/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/puma-6.4.3
/usr/local/lib/ruby/gems/3.2.0/gems/nio4r-2.7.4/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/nio4r-2.7.4
/usr/local/lib/ruby/gems/3.2.0/gems/pdf-reader-2.12.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/ttfunk-1.8.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/ruby-rc4-0.1.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/patch_finder-1.0.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/packetfu-2.0.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/pcaprub-0.13.3/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/pcaprub-0.13.3
/usr/local/lib/ruby/gems/3.2.0/gems/openvas-omp-0.0.4/lib
/usr/local/lib/ruby/gems/3.2.0/gems/openssl-ccm-1.2.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/octokit-4.25.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/sawyer-0.9.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/nexpose-7.3.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/network_interface-0.0.4/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/network_interface-0.0.4
/usr/local/lib/ruby/gems/3.2.0/gems/net-smtp-0.5.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/net-sftp-4.0.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/net-ldap-0.19.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/net-imap-0.5.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/net-protocol-0.2.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/timeout-0.4.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/nessus_rest-0.1.6/lib
/usr/local/lib/ruby/gems/3.2.0/gems/mutex_m-0.2.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/mqtt-0.6.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit_payloads-mettle-1.0.35/lib
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit-payloads-2.0.189/lib
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit-credential-6.0.11/app/models
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit-credential-6.0.11/app/validators
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit-credential-6.0.11/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rubyzip-2.3.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rubyntlm-0.6.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-socket-0.1.57/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rex-core-0.1.32/lib
/usr/local/lib/ruby/gems/3.2.0/gems/net-ssh-7.3.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit_data_models-6.0.5/app/models
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit_data_models-6.0.5/app/validators
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit_data_models-6.0.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/webrick-1.8.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/recog-3.1.11/lib
/usr/local/lib/ruby/gems/3.2.0/gems/pg-1.5.9/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/pg-1.5.9
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit-model-5.0.2/app/models
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit-model-5.0.2/app/validators
/usr/local/lib/ruby/gems/3.2.0/gems/metasploit-model-5.0.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/metasm-1.0.5
/usr/local/lib/ruby/gems/3.2.0/gems/memory_profiler-1.1.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/logging-2.4.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/multi_json-1.15.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/little-plugger-1.1.4/lib
/usr/local/lib/ruby/gems/3.2.0/gems/language_server-protocol-3.17.0.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/json-2.7.5/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/json-2.7.5
/usr/local/lib/ruby/gems/3.2.0/gems/jsobfu-0.4.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rkelly-remix-0.0.7/lib
/usr/local/lib/ruby/gems/3.2.0/gems/httpclient-2.8.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/http-cookie-1.0.7/lib
/usr/local/lib/ruby/gems/3.2.0/gems/hrr_rb_ssh-ed25519-0.4.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/hrr_rb_ssh-0.4.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/hashery-2.1.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/gyoku-1.4.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rexml-3.3.9/lib
/usr/local/lib/ruby/gems/3.2.0/gems/gssapi-1.3.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/getoptlong-0.2.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/fivemat-1.3.7/lib
/usr/local/lib/ruby/gems/3.2.0/gems/filesize-0.2.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/ffi-1.16.3/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/ffi-1.16.3
/usr/local/lib/ruby/gems/3.2.0/gems/faye-websocket-0.11.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/websocket-driver-0.7.6/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/websocket-driver-0.7.6
/usr/local/lib/ruby/gems/3.2.0/gems/websocket-extensions-0.1.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/faraday-retry-2.2.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/faraday-2.7.11/lib
/usr/local/lib/ruby/gems/3.2.0/gems/faraday-2.7.11/spec/external_adapters
/usr/local/lib/ruby/gems/3.2.0/gems/ruby2_keywords-0.0.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/faraday-net_http-3.0.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/faker-3.5.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/factory_bot_rails-6.4.4/lib
/usr/local/lib/ruby/gems/3.2.0/gems/railties-7.0.8.6/lib
/usr/local/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.18/lib
/usr/local/lib/ruby/gems/3.2.0/gems/thor-1.3.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/method_source-1.1.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/factory_bot-6.5.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/em-http-request-1.1.7/lib
/usr/local/lib/ruby/gems/3.2.0/gems/http_parser.rb-0.8.0/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/http_parser.rb-0.8.0
/usr/local/lib/ruby/gems/3.2.0/gems/em-socksify-0.3.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/eventmachine-1.2.7/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/eventmachine-1.2.7
/usr/local/lib/ruby/gems/3.2.0/gems/elftools-1.3.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/ed25519-1.3.0/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/ed25519-1.3.0
/usr/local/lib/ruby/gems/3.2.0/gems/drb-2.2.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/domain_name-0.6.20240107/lib
/usr/local/lib/ruby/gems/3.2.0/gems/docile-1.4.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/dnsruby-1.72.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/simpleidn-0.2.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/debug-1.8.0/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/debug-1.8.0
/usr/local/lib/ruby/gems/3.2.0/gems/irb-1.7.4/lib
/usr/local/lib/ruby/gems/3.2.0/gems/reline-0.5.10/lib
/usr/local/lib/ruby/gems/3.2.0/gems/io-console-0.7.2/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/io-console-0.7.2
/usr/local/lib/ruby/gems/3.2.0/gems/date-3.3.4/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/date-3.3.4
/usr/local/lib/ruby/gems/3.2.0/gems/daemons-1.4.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/csv-3.3.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/cookiejar-0.3.4/lib
/usr/local/lib/ruby/gems/3.2.0/gems/coderay-1.1.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/chunky_png-1.4.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/byebug-11.1.3/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/byebug-11.1.3
/usr/local/lib/ruby/gems/3.2.0/gems/bson-5.0.1/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/bson-5.0.1
/usr/local/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/bootsnap-1.18.4
/usr/local/lib/ruby/gems/3.2.0/gems/msgpack-1.6.1/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/msgpack-1.6.1
/usr/local/lib/ruby/gems/3.2.0/gems/bindata-2.4.15/lib
/usr/local/lib/ruby/gems/3.2.0/gems/bigdecimal-3.1.8/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/bigdecimal-3.1.8
/usr/local/lib/ruby/gems/3.2.0/gems/bcrypt_pbkdf-1.1.1/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/bcrypt_pbkdf-1.1.1
/usr/local/lib/ruby/gems/3.2.0/gems/bcrypt-3.1.20/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/bcrypt-3.1.20
/usr/local/lib/ruby/gems/3.2.0/gems/base64-0.2.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/aws-sdk-ssm-1.183.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/aws-sdk-s3-1.169.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/aws-sdk-kms-1.95.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/aws-sdk-iam-1.112.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/aws-sdk-ec2instanceconnect-1.52.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/aws-sdk-ec2-1.486.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/aws-sdk-core-3.211.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/jmespath-1.6.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/aws-sigv4-1.10.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/aws-partitions-1.999.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/aws-eventstream-1.3.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/ast-2.4.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/arel-helpers-2.15.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/allure-rspec-2.24.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rspec-core-3.13.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/allure-ruby-commons-2.24.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/uuid-2.3.9/lib
/usr/local/lib/ruby/gems/3.2.0/gems/macaddr-1.7.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/systemu-2.6.5/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rspec-expectations-3.13.3/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rspec-support-3.13.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/diff-lcs-1.5.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/require_all-3.0.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/mime-types-3.6.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/mime-types-data-3.2024.1001/lib
/usr/local/lib/ruby/gems/3.2.0/gems/logger-1.6.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/afm-0.2.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/addressable-2.8.7/lib
/usr/local/lib/ruby/gems/3.2.0/gems/public_suffix-6.0.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/activerecord-7.0.8.6/lib
/usr/local/lib/ruby/gems/3.2.0/gems/activemodel-7.0.8.6/lib
/usr/local/lib/ruby/gems/3.2.0/gems/actionpack-7.0.8.6/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rack-test-2.1.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rack-2.2.10/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rails-html-sanitizer-1.6.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/loofah-2.23.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/crass-1.0.6/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rails-dom-testing-2.2.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/nokogiri-1.16.7-x86_64-linux/lib
/usr/local/lib/ruby/gems/3.2.0/gems/erubi-1.13.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/builder-3.3.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/activesupport-7.0.8.6/lib
/usr/local/lib/ruby/gems/3.2.0/gems/tzinfo-2.0.6/lib
/usr/local/lib/ruby/gems/3.2.0/gems/minitest-5.25.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/i18n-1.14.6/lib
/usr/local/lib/ruby/gems/3.2.0/gems/concurrent-ruby-1.3.4/lib/concurrent-ruby
/usr/local/lib/ruby/gems/3.2.0/gems/abbrev-0.1.2/lib
/usr/local/lib/ruby/gems/3.2.0/gems/aarch64-2.1.0/lib
/usr/local/lib/ruby/gems/3.2.0/gems/racc-1.8.1/lib
/usr/local/lib/ruby/gems/3.2.0/extensions/x86_64-linux/3.2.0-static/racc-1.8.1
/usr/local/lib/ruby/gems/3.2.0/gems/Ascii85-1.1.1/lib
/usr/local/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib
/usr/local/lib/ruby/site_ruby/3.2.0
/usr/local/lib/ruby/site_ruby/3.2.0/x86_64-linux
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/vendor_ruby/3.2.0
/usr/local/lib/ruby/vendor_ruby/3.2.0/x86_64-linux
/usr/local/lib/ruby/vendor_ruby
/usr/local/lib/ruby/3.2.0
/usr/local/lib/ruby/3.2.0/x86_64-linux
<internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require': cannot load such file -- rex/powershell/psh_methods (LoadError)
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell.rb:13:in `<top (required)>'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
        from /home/ismael/metasploit-framework/lib/rex.rb:50:in `<top (required)>'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:34:in `require'
        from /home/ismael/metasploit-framework/lib/msf/core/session.rb:3:in `<top (required)>'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:26:in `require'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:21:in `<class:CommSink>'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:20:in `<module:CustomNameserverProvider>'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:11:in `<module:DNS>'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:5:in `<module:Proto>'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:4:in `<module:Rex>'
        from /home/ismael/metasploit-framework/lib/rex/proto/dns/custom_nameserver_provider.rb:3:in `<top (required)>'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from <internal:/usr/local/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
        from /usr/local/lib/ruby/gems/3.2.0/gems/zeitwerk-2.6.18/lib/zeitwerk/kernel.rb:26:in `require'
        from /home/ismael/metasploit-framework/lib/msf/ui/console/driver.rb:85:in `initialize'
        from /home/ismael/metasploit-framework/lib/metasploit/framework/command/console.rb:66:in `new'
        from /home/ismael/metasploit-framework/lib/metasploit/framework/command/console.rb:66:in `driver'
        from /home/ismael/metasploit-framework/lib/metasploit/framework/command/console.rb:54:in `start'
        from /home/ismael/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
        from ./msfconsole:23:in `<main>'

@adfoster-r7
Copy link
Contributor

adfoster-r7 commented Dec 23, 2024

Looks like these two files are missing from the rex-powershell gem:

gems/rex-powershell-0.1.100/data/templates/to_mem_old.ps1.template
gems/rex-powershell-0.1.100/lib/rex/powershell/psh_methods.rb

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:

curl https://raw.githubusercontent.com/rapid7/rex-powershell/refs/tags/v0.1.100/lib/rex/powershell/psh_methods.rb > /usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/psh_methods.rb


curl https://raw.githubusercontent.com/rapid7/rex-powershell/refs/tags/v0.1.100/data/templates/to_mem_old.ps1.template > /usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/data/templates/to_mem_old.ps1.template

@ismaws
Copy link

ismaws commented Dec 24, 2024

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?

`root@quiet-lemur:/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell# ls -lrt
total 72
-rw-r--r-- 1 root root    65 Dec 23 00:05 version.rb
-rw-r--r-- 1 root root   983 Dec 23 00:05 templates.rb
-rw-r--r-- 1 root root  3721 Dec 23 00:05 script.rb
-rw-r--r-- 1 root root  4550 Dec 23 00:05 payload.rb
-rw-r--r-- 1 root root  4245 Dec 23 00:05 parser.rb
-rw-r--r-- 1 root root   341 Dec 23 00:05 param.rb
-rw-r--r-- 1 root root  5590 Dec 23 00:05 output.rb
-rw-r--r-- 1 root root  6259 Dec 23 00:05 obfu.rb
-rw-r--r-- 1 root root  1396 Dec 23 00:05 function.rb
-rw-r--r-- 1 root root   195 Dec 23 00:05 exceptions.rb
-rw-r--r-- 1 root root 14682 Dec 23 00:05 command.rb
root@quiet-lemur:/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell# wget https://raw.githubusercontent.com/rapid7/rex-powershell/refs/tags/v0.1.100/lib/rex/powershell/psh_methods.rb
--2024-12-24 01:34:39--  https://raw.githubusercontent.com/rapid7/rex-powershell/refs/tags/v0.1.100/lib/rex/powershell/psh_methods.rb
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.108.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6897 (6.7K) [text/plain]
Saving to: ‘psh_methods.rb’

psh_methods.rb                    100%[==========================================================>]   6.74K  --.-KB/s    in 0s

2024-12-24 01:34:39 (140 MB/s) - ‘psh_methods.rb’ saved [6897/6897]

root@quiet-lemur:/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell# ls -lrt
total 72
-rw-r--r-- 1 root root    65 Dec 23 00:05 version.rb
-rw-r--r-- 1 root root   983 Dec 23 00:05 templates.rb
-rw-r--r-- 1 root root  3721 Dec 23 00:05 script.rb
-rw-r--r-- 1 root root  4550 Dec 23 00:05 payload.rb
-rw-r--r-- 1 root root  4245 Dec 23 00:05 parser.rb
-rw-r--r-- 1 root root   341 Dec 23 00:05 param.rb
-rw-r--r-- 1 root root  5590 Dec 23 00:05 output.rb
-rw-r--r-- 1 root root  6259 Dec 23 00:05 obfu.rb
-rw-r--r-- 1 root root  1396 Dec 23 00:05 function.rb
-rw-r--r-- 1 root root   195 Dec 23 00:05 exceptions.rb
-rw-r--r-- 1 root root 14682 Dec 23 00:05 command.rb
root@quiet-lemur:/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell# curl https://raw.githubusercontent.com/rapid7/rex-powershell/refs/tags/v0.1.100/lib/rex/powershell/psh_methods.rb > /usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell/psh_methods.rb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6897  100  6897    0     0   118k      0 --:--:-- --:--:-- --:--:--  120k
root@quiet-lemur:/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell# ls -lrt
total 72
-rw-r--r-- 1 root root    65 Dec 23 00:05 version.rb
-rw-r--r-- 1 root root   983 Dec 23 00:05 templates.rb
-rw-r--r-- 1 root root  3721 Dec 23 00:05 script.rb
-rw-r--r-- 1 root root  4550 Dec 23 00:05 payload.rb
-rw-r--r-- 1 root root  4245 Dec 23 00:05 parser.rb
-rw-r--r-- 1 root root   341 Dec 23 00:05 param.rb
-rw-r--r-- 1 root root  5590 Dec 23 00:05 output.rb
-rw-r--r-- 1 root root  6259 Dec 23 00:05 obfu.rb
-rw-r--r-- 1 root root  1396 Dec 23 00:05 function.rb
-rw-r--r-- 1 root root   195 Dec 23 00:05 exceptions.rb
-rw-r--r-- 1 root root 14682 Dec 23 00:05 command.rb
root@quiet-lemur:/usr/local/lib/ruby/gems/3.2.0/gems/rex-powershell-0.1.100/lib/rex/powershell#`

@ismaws
Copy link

ismaws commented Dec 24, 2024

I will check the AV settings now...

@ismaws
Copy link

ismaws commented Dec 24, 2024

...so yeah I had to disable MSFT defender and reinstall the gem again, it works now thanks!
$ gem install rex-powershell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

3 participants