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

Fix OpenVAS import issue caused by missing wspace key #12036

Merged
merged 1 commit into from Jul 2, 2019

Conversation

Projects
None yet
3 participants
@mkienow-r7
Copy link
Contributor

commented Jul 1, 2019

Fixes #11851, an OpenVAS import issue caused by missing wspace arguments key. Modifying the Msf::DBManager::Import::OpenVAS module to implement a pattern observed in other Msf::DBManager::Import::* modules where there are both import_<type> and import_<type>_noko_stream methods.

Database status before import:

msf5 > db_status
[*] Connected to remote_data_service: (https://localhost:5443). Connection type: http. Connection name: local-https-data-service.
msf5 > workspace -v

Workspaces
==========

current  name     hosts  services  vulns  creds  loots  notes
-------  ----     -----  --------  -----  -----  -----  -----
*        default  0      0         0      0      0      0

Import OpenVAS data file and confirm:

msf5 > db_import /home/msfdev/openvas_download.xml
[*] Successfully imported /home/msfdev/openvas_download.xml
msf5 > workspace -v

Workspaces
==========

current  name     hosts  services  vulns  creds  loots  notes
-------  ----     -----  --------  -----  -----  -----  -----
*        default  1      24        23     0      0      0

Verification

  • Download openvas_download.txt file from #11851
  • Rename openvas_download.txt to openvas_download.xml
  • Start msfconsole
  • Run db_import openvas_download.xml
  • Verify the db_import command ran successfully and imported a host, services and vulns.
Fix import issue caused by missing wspace key
Modify import module to follow pattern used in other Msf::DBManager
import modules. Test module updated for method name changes.

@wvu-r7 wvu-r7 self-assigned this Jul 2, 2019

@wvu-r7

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2019

msf5 > db_import ~/Downloads/openvas_download.xml
[*] Importing 'OpenVAS XML' data
[*] Successfully imported /Users/wvu/Downloads/openvas_download.xml
msf5 > workspace -v

Workspaces
==========

current  name     hosts  services  vulns  creds  loots  notes
-------  ----     -----  --------  -----  -----  -----  -----
*        default  1      24        23     0      0      0

msf5 >

@wvu-r7 wvu-r7 merged commit 4e11dcf into rapid7:master Jul 2, 2019

3 checks passed

Metasploit Automation - Sanity Test Execution Successfully completed all tests.
Details
Metasploit Automation - Test Execution Successfully completed all tests.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

wvu-r7 added a commit that referenced this pull request Jul 2, 2019

@wvu-r7

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2019

Release Notes

This fixes a missing workspace bug in the OpenVAS importer.

@mkienow-r7 mkienow-r7 deleted the mkienow-r7:bug/openvas-db-import branch Jul 3, 2019

@jmartin-r7 jmartin-r7 added the msf5 label Jul 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.