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

Active_Record is Causing Stack Traces When db_import Is Called With Certain Files #14209

Closed
gwillcox-r7 opened this issue Oct 1, 2020 · 7 comments · Fixed by #18243
Closed
Labels
bug confirmed Issues confirmed by a committer not-stale Label to stop an issue from being auto closed

Comments

@gwillcox-r7
Copy link
Contributor

Steps to reproduce

How'd you do it?

  1. Run ./msfdb start and ensure the database is up and running.
  2. Create a new workspace with workspace -a appscan or some name of your choice.
  3. Run db_import ../qa/import_files/appscan.xml (or point it to the location where appscan.xml is located on your disk).
  4. Observe that attempting to perform a database import of appscan.xml will cause the database to crash.
  5. Try this with ../qa/import_files/core2.xml and ../qa/import_files/core1.xml and not that they also cause the database to crash.

Were you following a specific guide/tutorial or reading documentation?

Nope, this was encountered whilst testing another PR.

Expected behavior

These files should import successfully, and when you run hosts and services they should display the hosts and their services.

Current behavior

msf6 > db_import ../qa/import_files/core2.xml
[*] Importing 'CI' data
[*] Import: Parsing with 'Nokogiri v1.10.10'
[*] Importing host 192.168.1.105
[-] Error while running command db_import: PG::InvalidTextRepresentation: ERROR:  invalid input syntax for type inet: "49"
: SELECT  "services".* FROM "services" INNER JOIN "hosts" ON "services"."host_id" = "hosts"."id" WHERE "hosts"."workspace_id" = $1 AND "hosts"."address" = $2 AND "services"."proto" = $3 AND "services"."port" = $4 ORDER BY services.port, services.proto, "hosts"."address", "services"."port" ASC LIMIT $5

Call stack:
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `exec_params'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `block (2 levels) in exec_no_cache'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activesupport-5.2.4.4/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql_adapter.rb:610:in `block in exec_no_cache'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract_adapter.rb:581:in `block (2 levels) in log'
/usr/share/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract_adapter.rb:580:in `block in log'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activesupport-5.2.4.4/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract_adapter.rb:571:in `log'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql_adapter.rb:609:in `exec_no_cache'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `execute_and_clear'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:81:in `exec_query'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/database_statements.rb:478:in `select'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/database_statements.rb:70:in `select_all'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/query_cache.rb:106:in `select_all'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/querying.rb:41:in `find_by_sql'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:560:in `block in exec_queries'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:584:in `skip_query_cache_if_necessary'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:547:in `exec_queries'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/association_relation.rb:34:in `exec_queries'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:422:in `load'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:200:in `records'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:195:in `to_ary'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation/finder_methods.rb:532:in `find_nth_with_limit'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation/finder_methods.rb:517:in `find_nth'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation/finder_methods.rb:125:in `first'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/note.rb:140:in `block in report_note'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/note.rb:81:in `report_note'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/note_data_proxy.rb:40:in `block in report_note'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/core.rb:166:in `data_service_operation'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/note_data_proxy.rb:38:in `report_note'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/nokogiri_doc_mixin.rb:152:in `db_report'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:158:in `block (2 levels) in report_services'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:156:in `each_pair'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:156:in `block in report_services'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:155:in `each_pair'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:155:in `report_services'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:53:in `end_element'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/document.rb:127:in `end_element_namespace'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/parser.rb:110:in `parse_with'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/parser.rb:110:in `parse_memory'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/parser.rb:83:in `parse'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import/ci.rb:11:in `import_ci_noko_stream'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import/ci.rb:24:in `import_ci_xml'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import.rb:100:in `import'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import.rb:219:in `import_file'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/db_import_data_proxy.rb:17:in `block in import_file'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/core.rb:166:in `data_service_operation'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/db_import_data_proxy.rb:15:in `import_file'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1464:in `block (3 levels) in cmd_db_import'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1457:in `each'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1457:in `block (2 levels) in cmd_db_import'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1451:in `each'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1451:in `block in cmd_db_import'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1446:in `cmd_db_import'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:523:in `run_command'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:474:in `block in run_single'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:468:in `each'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:468:in `run_single'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/shell.rb:158:in `run'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
./msfconsole:23:in `<main>'
msf6 >

And also:

msf6 > workspace -a appscan
[*] Added workspace: appscan
[*] Workspace: appscan
msf6 > db_import ../qa/import_files/appscan.xml
[*] Importing 'Appscan' data
[*] Import: Parsing with 'Nokogiri v1.10.10'
[*] Importing host 65.61.137.117
[-] Error while running command db_import: Validation failed: Proof can't be blank

Call stack:
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/validations.rb:80:in `raise_validation_error'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/validations.rb:52:in `save!'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/transactions.rb:315:in `block in save!'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/transactions.rb:387:in `block in with_transaction_returning_status'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `block in transaction'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/usr/share/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/database_statements.rb:267:in `transaction'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/transactions.rb:212:in `transaction'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/transactions.rb:385:in `with_transaction_returning_status'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/transactions.rb:315:in `save!'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/suppressor.rb:48:in `save!'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/web.rb:366:in `block in report_web_vuln'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/web.rb:291:in `report_web_vuln'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/web_data_proxy.rb:35:in `block in report_web_vuln'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/core.rb:166:in `data_service_operation'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/web_data_proxy.rb:34:in `report_web_vuln'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/nokogiri_doc_mixin.rb:152:in `db_report'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/appscan_nokogiri.rb:96:in `report_web_vuln'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/appscan_nokogiri.rb:68:in `end_element'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/document.rb:127:in `end_element_namespace'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/parser.rb:110:in `parse_with'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/parser.rb:110:in `parse_memory'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/parser.rb:83:in `parse'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import/appscan.rb:11:in `import_appscan_noko_stream'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import/appscan.rb:24:in `import_appscan_xml'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import.rb:100:in `import'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import.rb:219:in `import_file'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/db_import_data_proxy.rb:17:in `block in import_file'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/core.rb:166:in `data_service_operation'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/db_import_data_proxy.rb:15:in `import_file'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1464:in `block (3 levels) in cmd_db_import'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1457:in `each'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1457:in `block (2 levels) in cmd_db_import'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1451:in `each'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1451:in `block in cmd_db_import'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1446:in `cmd_db_import'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:523:in `run_command'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:474:in `block in run_single'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:468:in `each'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:468:in `run_single'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/shell.rb:158:in `run'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
./msfconsole:23:in `<main>'
msf6 >

Metasploit version

v6.0.9-dev-49d5d2abf8
Ruby version 2.6.6p146
Running inside a Ubuntu Linux 20.04 VM

@gwillcox-r7 gwillcox-r7 added the bug label Oct 1, 2020
@gwillcox-r7
Copy link
Contributor Author

CC @jmartin-r7 as we were talking about this issue yesterday.

@gwillcox-r7
Copy link
Contributor Author

And one last stack trace just in case it helps at all:

msf6 > workspace -a core1
[*] Added workspace: core1
[*] Workspace: core1
msf6 > db_import ../qa/import_files/core1.xml
[*] Importing 'CI' data
[*] Import: Parsing with 'Nokogiri v1.10.10'
[*] Importing host 192.168.1.100
[-] Error while running command db_import: PG::InvalidTextRepresentation: ERROR:  invalid input syntax for type inet: "48"
: SELECT  "services".* FROM "services" INNER JOIN "hosts" ON "services"."host_id" = "hosts"."id" WHERE "hosts"."workspace_id" = $1 AND "hosts"."address" = $2 AND "services"."proto" = $3 AND "services"."port" = $4 ORDER BY services.port, services.proto, "hosts"."address", "services"."port" ASC LIMIT $5

Call stack:
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `exec_params'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `block (2 levels) in exec_no_cache'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activesupport-5.2.4.4/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activesupport-5.2.4.4/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql_adapter.rb:610:in `block in exec_no_cache'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract_adapter.rb:581:in `block (2 levels) in log'
/usr/share/rvm/rubies/ruby-2.6.6/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract_adapter.rb:580:in `block in log'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activesupport-5.2.4.4/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract_adapter.rb:571:in `log'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql_adapter.rb:609:in `exec_no_cache'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `execute_and_clear'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:81:in `exec_query'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/database_statements.rb:478:in `select'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/database_statements.rb:70:in `select_all'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/query_cache.rb:106:in `select_all'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/querying.rb:41:in `find_by_sql'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:560:in `block in exec_queries'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:584:in `skip_query_cache_if_necessary'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:547:in `exec_queries'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/association_relation.rb:34:in `exec_queries'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:422:in `load'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:200:in `records'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation.rb:195:in `to_ary'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation/finder_methods.rb:532:in `find_nth_with_limit'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation/finder_methods.rb:517:in `find_nth'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/relation/finder_methods.rb:125:in `first'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/note.rb:140:in `block in report_note'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/note.rb:81:in `report_note'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/note_data_proxy.rb:40:in `block in report_note'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/core.rb:166:in `data_service_operation'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/note_data_proxy.rb:38:in `report_note'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/nokogiri_doc_mixin.rb:152:in `db_report'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:158:in `block (2 levels) in report_services'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:156:in `each_pair'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:156:in `block in report_services'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:155:in `each_pair'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:155:in `report_services'
/home/gwillcox/git/metasploit-framework/lib/rex/parser/ci_nokogiri.rb:53:in `end_element'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/document.rb:127:in `end_element_namespace'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/parser.rb:110:in `parse_with'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/parser.rb:110:in `parse_memory'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/nokogiri-1.10.10/lib/nokogiri/xml/sax/parser.rb:83:in `parse'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import/ci.rb:11:in `import_ci_noko_stream'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import/ci.rb:24:in `import_ci_xml'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import.rb:100:in `import'
/home/gwillcox/git/metasploit-framework/lib/msf/core/db_manager/import.rb:219:in `import_file'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/db_import_data_proxy.rb:17:in `block in import_file'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/core.rb:166:in `data_service_operation'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/data_service/proxy/db_import_data_proxy.rb:15:in `import_file'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1464:in `block (3 levels) in cmd_db_import'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1457:in `each'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1457:in `block (2 levels) in cmd_db_import'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1451:in `each'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1451:in `block in cmd_db_import'
/home/gwillcox/.rvm/gems/ruby-2.6.6@metasploit-framework/gems/activerecord-5.2.4.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1446:in `cmd_db_import'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:523:in `run_command'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:474:in `block in run_single'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:468:in `each'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:468:in `run_single'
/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/shell.rb:158:in `run'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
./msfconsole:23:in `<main>'
msf6 >

@github-actions
Copy link

github-actions bot commented Nov 1, 2020

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.

@github-actions github-actions bot added the Stale Marks an issue as stale, to be closed if no action is taken label Nov 1, 2020
@gwillcox-r7 gwillcox-r7 added not-stale Label to stop an issue from being auto closed confirmed Issues confirmed by a committer and removed Stale Marks an issue as stale, to be closed if no action is taken labels Nov 1, 2020
@cgranleese-r7
Copy link
Contributor

Hey @gwillcox-r7, would it be possible you could get us an example .xml file and maybe some more information on how this was generated. Also, do you happen to remember what PR it was you were testing when you found this issue.
Just having these will allow us to recreate the issue 👍

@gwillcox-r7
Copy link
Contributor Author

Hey @gwillcox-r7, would it be possible you could get us an example .xml file and maybe some more information on how this was generated. Also, do you happen to remember what PR it was you were testing when you found this issue.
Just having these will allow us to recreate the issue 👍

Files have been sent over via Jeffery, let me know if you haven't got them.

@cgranleese-r7
Copy link
Contributor

Yea, got the files. Thanks @gwillcox-r7 👍

@adfoster-r7
Copy link
Contributor

@cgranleese-r7 Did you look into this/resolve the issue? 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed Issues confirmed by a committer not-stale Label to stop an issue from being auto closed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants