Open mkienow-r7 opened 5 years ago
Runtime issue has not been verified, however, the following modules would be means of triggering the issue since they make calls to the framework.db.import
method.
lib/msf/core/rpc/v10/rpc_db.rb
plugins/nessus.rb
plugins/nexpose.rb
plugins/nexpose.rb
plugins/openvas.rb
i can confirm that openvas_report_import does not work with the following error:
msf5 > openvas_report_import a5999e31-9ff6-4ad8-9e38-ed2f92a4a4fa a994b278-1f62-11e1-96ac-406186ea4fc5
[*] Importing report to database.
[-] Error while running command openvas_report_import: undefined method `import' for #<Metasploit::Framework::DataService::RemoteHTTPDataService:0x00005586181a8e40>
Did you mean? import_file
Call stack:
/opt/metasploit-framework/lib/metasploit/framework/data_service/proxy/db_import_data_proxy.rb:6:in `block in import'
/opt/metasploit-framework/lib/metasploit/framework/data_service/proxy/core.rb:166:in `data_service_operation'
/opt/metasploit-framework/lib/metasploit/framework/data_service/proxy/db_import_data_proxy.rb:4:in `import'
/opt/metasploit-framework/plugins/openvas.rb:528:in `cmd_openvas_report_import'
/opt/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:523:in `run_command'
/opt/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:474:in `block in run_single'
/opt/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:468:in `each'
/opt/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:468:in `run_single'
/opt/metasploit-framework/lib/rex/ui/text/shell.rb:151:in `run'
/opt/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
/opt/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
/usr/local/bin/msfconsole:49:in `<main>'
msf5 > version
Framework: 5.0.43-dev-9ea327ecdd
Console : 5.0.43-dev-9ea327ecdd
Remarks: I edited ~/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/openvas-omp-0.0.4/lib/openvas-omp.rb
to get rid of the Object#timeout is depreciated use Timeout.timeout instead message.
The error occured before then, too.
@FalcoGer Thank you for the confirmation
The same error on MacOS version
[] Generating the export data file...
[] Downloading the export data...
[*] Importing Nexpose data...
[-] Error while running command nexpose_site_import: undefined method `import' for #
Call stack:
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/data_service/proxy/db_import_data_proxy.rb:6:in block in import' /opt/metasploit-framework/embedded/framework/lib/metasploit/framework/data_service/proxy/core.rb:166:in
data_service_operation'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/data_service/proxy/db_import_data_proxy.rb:4:in import' /opt/metasploit-framework/embedded/framework/plugins/nexpose.rb:611:in
process_nexpose_data'
/opt/metasploit-framework/embedded/framework/plugins/nexpose.rb:334:in cmd_nexpose_site_import' /opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:523:in
run_command'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:474:in block in run_single' /opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:468:in
each'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:468:in run_single' /opt/metasploit-framework/embedded/framework/lib/rex/ui/text/shell.rb:158:in
run'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/console.rb:48:in start' /opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/base.rb:82:in
start'
/opt/metasploit-framework/bin/../embedded/framework/msfconsole:49:in `
msf5 > version Framework: 5.0.72-dev-0fc1a9ee5fd328bf490bf5b5d893826f381378e6 Console : 5.0.72-dev-0fc1a9ee5fd328bf490bf5b5d893826f381378e6
Hi!
This issue has been left open with no activity for a while now.
We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
Steps to reproduce
Calls to
framework.db.import
will fail when using the remote data service since theDbImportDataProxy
module has bothimport
andimport_file
methods, however, theRemoteDbImportDataService
module only exposes aimport_file
method.Expected behavior
The calling code operates without issue.
Current behavior
The import calling code results in an error. This can be seen in the
~/.msf4/logs/framework.log
log file.System stuff
Metasploit version
I installed Metasploit with:
OS
macOS