Domanda Problema con msfconsole

ZanelloG

Utente Bronze
9 Agosto 2019
46
14
2
41
Ultima modifica da un moderatore:
Ciao. Evviva, sto utlizzando un manjaro linux. Installo l'amico metasploit con il gestore pacman e l'installazione avviene correttamente. Ho provato anche in ambiente virtuale e tutto funziona per il meglio. Eppure appena provo a lanciarlo riscontro questo errore:

Codice:
[giosue@giosue-hppavilionlaptop ~]$ sudo msfconsole
[sudo] password di giosue:
<internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require': cannot load such file -- erb (LoadError)
Did you mean?  drb
               irb
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/webrick-1.8.1/lib/webrick/httpservlet/erbhandler.rb:14:in `<top (required)>'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/webrick-1.8.1/lib/webrick/httpservlet.rb:15:in `require_relative'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/webrick-1.8.1/lib/webrick/httpservlet.rb:15:in `<top (required)>'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:18:in `require_relative'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:18:in `<top (required)>'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/webrick-1.8.1/lib/webrick.rb:230:in `<top (required)>'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/metasploit_data_models-6.0.3/lib/metasploit_data_models.rb:6:in `<top (required)>'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/metasploit-credential-6.0.9/lib/metasploit/credential.rb:11:in `<top (required)>'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /opt/metasploit/lib/metasploit/framework.rb:12:in `<top (required)>'
    from /usr/lib/ruby/3.2.0/bundler/runtime.rb:73:in `require'
    from /usr/lib/ruby/3.2.0/bundler/runtime.rb:73:in `rescue in block in require'
    from /usr/lib/ruby/3.2.0/bundler/runtime.rb:51:in `block in require'
    from /usr/lib/ruby/3.2.0/bundler/runtime.rb:44:in `each'
    from /usr/lib/ruby/3.2.0/bundler/runtime.rb:44:in `require'
    from /usr/lib/ruby/3.2.0/bundler.rb:207:in `require'
    from /opt/metasploit/config/application.rb:13:in `<top (required)>'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /opt/metasploit/config/environment.rb:2:in `<top (required)>'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /opt/metasploit/lib/msfenv.rb:28:in `<top (required)>'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /opt/metasploit/msfconsole:21:in `<main>'
/usr/lib/ruby/3.2.0/bundler/runtime.rb:60:in `require': cannot load such file -- metasploit-framework (LoadError)
Did you mean?  metasploit/framework
               metasploit/framework/api
    from /usr/lib/ruby/3.2.0/bundler/runtime.rb:60:in `block (2 levels) in require'
    from /usr/lib/ruby/3.2.0/bundler/runtime.rb:55:in `each'
    from /usr/lib/ruby/3.2.0/bundler/runtime.rb:55:in `block in require'
    from /usr/lib/ruby/3.2.0/bundler/runtime.rb:44:in `each'
    from /usr/lib/ruby/3.2.0/bundler/runtime.rb:44:in `require'
    from /usr/lib/ruby/3.2.0/bundler.rb:207:in `require'
    from /opt/metasploit/config/application.rb:13:in `<top (required)>'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /opt/metasploit/config/environment.rb:2:in `<top (required)>'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /opt/metasploit/lib/msfenv.rb:28:in `<top (required)>'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
    from /opt/metasploit/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.18.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
    from /opt/metasploit/msfconsole:21:in `<main>'

Provata disinstallazione e reinstallazione, installazione e aggiornamento ruby gems, ma niente da fare, sempre lo stesso identico codice. chiedo aiuto, grazie!!
(o alternative, anche se vorrei possibilmente integrarlo in un python successivamente, quindi preferirei averlo installato e poi almeno chiamarlo in rcp come funizonasse da locale, grazie).
 
Gli exploit che stanno su quel tool pieno di bug li trovi anche su ExploitDB, anzi ExploitDB ne ha anche di più rispetto al Metasploit. Dato che i codici di ExploitDB sono in plain text li puoi riadattare facilmente per renderli compatibili col listener di Metasploit (se richiedono una reverse shell)

Ma comunque, se proprio vuoi usare Metasploit e la versione che stai installando non funziona puoi provare con quelle vecchie. Io sto con la 6.3.44 pensa tu (l'hanno rilasciata a Novembre 2023)