Commit Graph

33 Commits

Author SHA1 Message Date
Pearce Barry 4cc12f1890 Land #12740, Remove method call side-effects 2019-12-17 18:17:34 -06:00
Jeffrey Martin aaddc9d8a5 don't rely on side-effects in db util function 2019-12-17 14:11:58 -06:00
Jeffrey Martin 31ed5d553f ensure ref name exists 2019-12-17 11:00:00 -06:00
Jeffrey Martin b786a44c2e support Mdm::Module::Ref object when linking vulns 2019-12-16 17:16:01 -06:00
James Barnett e9931fa70e Fix bug when updating Mdm::Vuln.refs 2019-01-04 15:10:19 -06:00
James Barnett 2ef639f99e opts[:id] could sometimes be an integer, so cast to string 2018-07-31 10:58:01 -05:00
James Barnett 4da27d2bff Enable GET for /endpoint/ID for each model 2018-07-18 15:18:22 -05:00
James Barnett b569498250 Address more code review comments 2018-04-17 10:52:56 -05:00
James Barnett 90542779ff Audit models to ensure :workspace is passed only when needed 2018-04-09 14:50:37 -05:00
James Barnett def0e4d93b Merge branch 'goliath' into MS-3062_workspaces 2018-03-23 11:37:01 -05:00
James Barnett 466c97f114 WIP: move tracking active workspace to client side
* Move the @current_workspace tracking to workspace proxy
* Create helper for handling workspace value in opts
* Call framework.db.proxy across dbmanager files now that active ws is tracked in proxy

NOTE: This commit throws an exception when adding a remote data service.
2018-03-22 21:00:06 -05:00
Matthew Kienow fc83220aa7 Fix report_vuln duplicate VulnRef record creation
Multiple calls to report_vuln for the same vuln results in the creation
of duplicate VulnRef records, except for the CVE refs
2018-03-16 17:53:07 -04:00
Matthew Kienow f365e6fc28 Remove stderr debug output 2018-03-16 17:50:49 -04:00
Matthew Kienow 636284d530 Update session inferred vuln handling
Add remote vuln attempt
2018-03-12 14:26:03 -04:00
Matthew Kienow ecad74cf99 Add cmd_vulns search and delete operations 2018-02-22 19:05:18 -05:00
Matthew Kienow 22752518ea WIP remote vuln read, update, delete 2018-02-22 13:53:22 -05:00
James Barnett 3005a8b7ce Merge branch 'rapid7/master' into goliath 2018-02-21 11:16:05 -06:00
Sliim 95e9707349 Call db event handlers
Implemented plugins handlers defined in
lib/msf/core/database_event.rb:
- on_db_client
- on_db_host
- on_db_service
- on_db_vuln
- on_db_host_state
- on_db_ref
- on_db_service_state
2018-01-21 19:35:55 +01:00
James Barnett f88840e5b7 Move normaliize_host to a library method
This method was in Msf::DbManager class but doesn't actually use the DB.
This required you to have a DB connection just to do the check.
Moved it out to a helper library so we have access to it without forcing
a DB connection.
2017-09-28 16:59:44 -05:00
christopher lee 53530b358b Bug fixes 2017-07-13 10:46:54 -05:00
christopher lee b81e9a4d2a Pass 1: externalize database 2017-07-07 13:33:42 -05:00
William Vu c642057fa0 Clean up module 2015-10-13 12:03:41 -05:00
dmohanty-r7 8b10cbe3fd Query for vulns without specifying service when service is nil
MSP-13284
2015-09-22 10:50:23 -05:00
Fernando Arias 0bb03db786 Rework vuln lookup logic to account for vuln with no service (nexpose import vuln with -1 port)
MSP-13234
2015-09-09 13:21:05 -05:00
David Maloney 18874fe384 fixes Issue #5272 on report_vuln
use includes instead of joins so that refs on
the vuln are not marked as readonly
2015-04-30 15:21:56 -05:00
David Maloney a72d49678a only match by CVE refs
the other refs can be non-specific and refer
to multiple distinct vulns, resulting in
incorrect refs being attached to a vuln leading to
a snowball effect with more and more vulns being
misidentified.

MSP-12183
2015-02-26 14:57:16 -06:00
David Maloney 8351920d1e don't match based on URL refs
multiple vulns may be listed for
the same URL making matches based on
these refs entirely unreliable

MSP-12183
2015-02-26 11:40:15 -06:00
Christian Catalan dc6a365a13 Fix finder query in Msf::DBManager::Vuln
MSP-12152

* This is part of updating finder queries to be Rails 4 compatibile
* In #find_vuln_by_details, pass in conditons hash crit rather than symbol :crit
2015-02-13 13:21:25 -06:00
Matt Buck f0bf881cc3 Land #4720, update Rails 3-style .find(:first)
Eliminate the Rails 3-style .find(:first) calls, and replace with
Rails 4-compatible .first().

Fixes #4720, also see MSP-12012
2015-02-12 14:30:13 -06:00
Sonny Gonzalez 1051f0fb82 Rails 4 finder conversion
MSP-12012

* convert find(:first, options) by mapping options
  to methods
2015-02-06 10:15:50 -06:00
Christian Catalan 797b5d0d55 Convert #find_or_create_by_x to #where().first_or_create
MSP-12016
2015-02-02 12:22:26 -06:00
Christian Catalan 7d1090baca Convert #find(:all) to #where or #all 2015-02-01 00:31:58 -06:00
Luke Imhoff 08aee23966 Extract Msf::DBManager::Vuln
MSP-11124

Extract all methods related to `Mdm::Vuln`s from `Msf::DBManager`.
2014-10-09 15:47:34 -05:00