Commit Graph

642 Commits

Author SHA1 Message Date
Jeffrey Martin ca0deec2c1 typo fix for error logged in import
`print_error` is not commonly used in import classes, this may not
be the best solution, however the typo needs to be addressed.
2020-12-21 10:21:38 -06:00
dwelch-r7 450193ed6a Send sessions records instead of IDs 2020-12-18 11:00:55 +00:00
dwelch-r7 f4e0278125 Add remote data service support for autoroute 2020-12-18 11:00:55 +00:00
Jeffrey Martin 5440415020 force active record object load
In some cases when `empty?` returns true `first` will fail to get db connection
2020-12-09 15:46:27 -06:00
dwelch-r7 1617b3ec9b Use zeitwerk for lib/msf/core folder 2020-12-07 10:31:45 +00:00
Grant Willcox fd4749488f Land #14445, Update XML import to utilize base64 decoding on the body 2020-12-04 11:06:12 -06:00
Matthew Hagan a232839a81 Update Unserialized Body For Binary Type
Co-authored-by: acammack-r7 <adam_cammack@rapid7.com>
2020-12-03 09:18:16 -07:00
Matthew Hagan a06f605675 Updated XML Import To Utilize Base64 Decoding On The Body 2020-11-25 11:48:58 -07:00
Spencer McIntyre 291c883db8 Don't alter the os_name or os_flavor keys in report_host 2020-10-23 09:48:33 -04:00
Spencer McIntyre 69f0234e48 Use #address as the host address instead of the MDM object 2020-09-30 14:28:09 -04:00
Adam Galway a0d6431ed5 adds protocol to search terms 2020-09-22 12:44:32 +01:00
Adam Galway 4918ecf826 replaced get_service calls with services calls 2020-09-16 12:29:15 +01:00
Matthew Hagan 97eb04a1e3 Fixing zip import errors
in particular:
•passed workspace as an object instead of calling `.name`
*loot and task processing now consumes `wspace` parameter
*fixed typo in `.delete` method
2020-08-25 17:45:30 -05:00
gwillcox-r7 c79f293e52 Land #13846, Add support for import Nmap vulners script output 2020-08-13 12:21:31 -05:00
Christophe De La Fuente 5b51c338fa Make sure mode is a symbol 2020-08-06 19:00:39 +02:00
Jeffrey Martin 1fdcde9d03 adjust vuln logic as nil service should be valid 2020-07-31 11:57:43 -05:00
Jeffrey Martin 0b65266ac1 adjust migration to proxy call to ActiveRecord
By adding proxy method the call to ActiveRecord::Migrator.migrations_paths
is decoupled from the migration task allowing more flexibility for the
underlying migration set selection to change in future Rails versions.
2020-07-31 11:56:51 -05:00
Jeffrey Martin 2c92d17ed9 refactor migration process for Rails 5
As noted in https://github.com/rails/rails/issues/36544 using
ActiveRecord migrations internally is not truly supported. This
workaround is valid for Rails 5 and might be easily adjusted
in Rails 6 although that is still TBD.
2020-07-31 11:56:51 -05:00
Jeffrey Martin 5d1c4dafa1 begin adjust migrations and remove old test
removed connection tests are from rails 3 expectations
2020-07-31 11:56:50 -05:00
Jeffrey Martin aeb6247e8e adjust vuln connection boundaries for rails 5 2020-07-31 11:56:50 -05:00
Jeffrey Martin 07cbe426e2 Rails 5, all models inherit from ApplicationRecord
ApplicationRecord is a new superclass for all app models, analogous to app controllers subclassing ApplicationController instead of ActionController::Base. This gives apps a single spot to configure app-wide model behavior.
https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#active-record-models-now-inherit-from-applicationrecord-by-default

Deprecated Relation#uniq use Relation#distinct instead.
https://edgeguides.rubyonrails.org/5_0_release_notes.html#active-record-deprecations
2020-07-31 11:56:49 -05:00
Jeffrey Martin 8fac591f7a rails 5.2 update 2020-07-31 11:56:42 -05:00
dwelch-r7 02b8d436c8 Import vulns discovered from nmap 2020-07-14 13:22:09 +01:00
Adam Galway 1a2bf98222 creates standard elog & updates exisiting usages 2020-06-22 12:48:39 +01:00
Adam Galway 0bd43096f1 PRC return tags for del & add, simplified DB call 2020-04-23 17:01:32 +01:00
Adam Galway 789b5dec00 adds tag functionality for hosts 2020-04-22 16:47:23 +01:00
Auxilus 26b2ec3d84 remove spaces at EOL 2020-03-24 18:08:34 +05:30
Pearce Barry 4cc12f1890 Land #12740, Remove method call side-effects 2019-12-17 18:17:34 -06:00
Jeffrey Martin 0aaa4265be do not remove workspace needed for other reports 2019-12-17 14:11:59 -06:00
Jeffrey Martin e5ce6dc8de do not delete workspace reference 2019-12-17 14:11:58 -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
Jeffrey Martin ba06624e57 consistent usage of :workspace key 2019-11-22 11:16:22 -06:00
Brent Cook 3e951b3f4b Land #12457, consolidate workspace actions 2019-11-19 17:10:36 -06:00
Jeffrey Martin 7505e1bf71 Consolidate logic for actions taken on a workspace
* When renaming a workspace allow validation to handle all cases the same
* Do not display backtrace on console for rename failure, this is still logged to framework.log
2019-10-15 16:12:11 -05:00
Jeffrey Martin b494bf5d65 cred imports need a workspace object passed to lib
Metasploit::Credential importers expect an Mdm::Workspace object.
2019-10-15 14:51:53 -05:00
Adam Cammack bd6a0c872f Remove workspace reqs from remote db payloads
The requirements had already been removed from local payloads in
865f214a85
2019-07-26 17:55:57 -05:00
bwatters-r7 93f8d94154 Changes to venom to handle pingbacks and really delete extra files, this time. 2019-07-25 19:45:10 -05:00
bwatters-r7 8af6cad862 fix copy/pasta error on payload data read 2019-07-25 19:45:10 -05:00
Aaron Soto 67d3bf5e01 WIP: REST API for async-callbacks, added UUID search 2019-07-25 19:42:25 -05:00
Aaron Soto 353e8e6be9 WIP: Remove PUT and DELETE endpoints 2019-07-25 19:42:25 -05:00
Aaron Soto a1b51361b0 Bring pingback-payload changes into public framework 2019-07-25 19:42:25 -05:00
Matthew Kienow 4e11dcfee1 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.
2019-07-01 15:58:36 -04:00
Brent Cook fa09b239e8 Land #11941, add support for module aliases 2019-06-11 12:57:01 -05:00
Brent Cook 5aed1f7dfe Land #11914, Fix external file import via web service 2019-06-07 06:03:42 -05:00
William Vu 53ea7e577f Add sanitized new XML format 2019-06-07 00:07:50 -05:00
William Vu 10dccfcedb Remove warning
<context> provides service info now:

<context>TCP:443 ([redacted]), SHA256[=][redacted], Serial[=][redacted]</context>
2019-06-06 23:45:07 -05:00
William Vu 40eeae541b Fix style 2019-06-06 23:38:41 -05:00
Jeffrey Martin f646a973a7 Update retina imports to better handle parsing 2019-06-06 19:13:06 -05:00