metasploit_data_models 6.0.4 → 6.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/app/models/mdm/event.rb +5 -1
- data/app/models/mdm/listener.rb +5 -1
- data/app/models/mdm/loot.rb +5 -1
- data/app/models/mdm/macro.rb +10 -2
- data/app/models/mdm/nexpose_console.rb +6 -2
- data/app/models/mdm/note.rb +6 -2
- data/app/models/mdm/profile.rb +5 -1
- data/app/models/mdm/session.rb +6 -2
- data/app/models/mdm/task.rb +15 -3
- data/app/models/mdm/user.rb +6 -2
- data/app/models/mdm/web_form.rb +6 -2
- data/app/models/mdm/web_page.rb +10 -2
- data/app/models/mdm/web_site.rb +6 -2
- data/app/models/mdm/web_vuln.rb +6 -2
- data/cortex.yaml +2 -0
- data/lib/metasploit_data_models/base64_serializer.rb +26 -2
- data/lib/metasploit_data_models/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8729f3b36a9dba01a242ef1771a411729d487ea4a46cdef91738089c9d6844dc
|
4
|
+
data.tar.gz: 7cf123db2f63c885f9b6ba349310a93f14ce594929975df5d83b5dc0376757b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27a0720202b2b0b528ad7018fedbe095432f36be5fc2a3c8f6adc3f7aead9465930fdf0a0a69d373bdf83070a824a8e10b2ce0ce812f7e3f72c801920fe14b76
|
7
|
+
data.tar.gz: 6c8e79021ddb0d9b9cefbd1944f2b6d1f92c2dd51866373975996a7ea4c18c058e0acfc7b4c8b6283425def448a75956bced3fa9343b4716d5c333f44da6a3e8
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/app/models/mdm/event.rb
CHANGED
@@ -72,7 +72,11 @@ class Mdm::Event < ApplicationRecord
|
|
72
72
|
# {#name}-specific information about this event.
|
73
73
|
#
|
74
74
|
# @return [Hash]
|
75
|
-
|
75
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
76
|
+
serialize :info, coder: MetasploitDataModels::Base64Serializer.new(coerce: true)
|
77
|
+
else
|
78
|
+
serialize :info, MetasploitDataModels::Base64Serializer.new(coerce: true)
|
79
|
+
end
|
76
80
|
|
77
81
|
#
|
78
82
|
# Validations
|
data/app/models/mdm/listener.rb
CHANGED
@@ -69,7 +69,11 @@ class Mdm::Listener < ApplicationRecord
|
|
69
69
|
# Options used to spawn this listener.
|
70
70
|
#
|
71
71
|
# @return [Hash]
|
72
|
-
|
72
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
73
|
+
serialize :options, coder: MetasploitDataModels::Base64Serializer.new(coerce: true)
|
74
|
+
else
|
75
|
+
serialize :options, MetasploitDataModels::Base64Serializer.new(coerce: true)
|
76
|
+
end
|
73
77
|
|
74
78
|
#
|
75
79
|
# Validations
|
data/app/models/mdm/loot.rb
CHANGED
@@ -140,7 +140,11 @@ class Mdm::Loot < ApplicationRecord
|
|
140
140
|
# Serializations
|
141
141
|
#
|
142
142
|
|
143
|
-
|
143
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
144
|
+
serialize :data, coder: MetasploitDataModels::Base64Serializer.new
|
145
|
+
else
|
146
|
+
serialize :data, MetasploitDataModels::Base64Serializer.new
|
147
|
+
end
|
144
148
|
|
145
149
|
private
|
146
150
|
|
data/app/models/mdm/macro.rb
CHANGED
@@ -39,12 +39,20 @@ class Mdm::Macro < ApplicationRecord
|
|
39
39
|
#
|
40
40
|
# @return [Array<Hash{Symbol=>Object}>] Array of action hashes. Each action hash is have key :module with value
|
41
41
|
# of an {Mdm::Module::Detail#fullname} and and key :options with value of options used to the run the module.
|
42
|
-
|
42
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
43
|
+
serialize :actions, coder: MetasploitDataModels::Base64Serializer.new
|
44
|
+
else
|
45
|
+
serialize :actions, MetasploitDataModels::Base64Serializer.new
|
46
|
+
end
|
43
47
|
|
44
48
|
# Preference for this macro, shared across all actions.
|
45
49
|
#
|
46
50
|
# @return [Hash]
|
47
|
-
|
51
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
52
|
+
serialize :prefs, coder: MetasploitDataModels::Base64Serializer.new
|
53
|
+
else
|
54
|
+
serialize :prefs, MetasploitDataModels::Base64Serializer.new
|
55
|
+
end
|
48
56
|
|
49
57
|
# The maximum number of seconds that this macro is allowed to run.
|
50
58
|
#
|
@@ -89,7 +89,11 @@ class Mdm::NexposeConsole < ApplicationRecord
|
|
89
89
|
# List of sites known to Nexpose.
|
90
90
|
#
|
91
91
|
# @return [Array<String>] Array of site names.
|
92
|
-
|
92
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
93
|
+
serialize :cached_sites, coder: MetasploitDataModels::Base64Serializer.new
|
94
|
+
else
|
95
|
+
serialize :cached_sites, MetasploitDataModels::Base64Serializer.new
|
96
|
+
end
|
93
97
|
|
94
98
|
#
|
95
99
|
# Validations
|
@@ -113,7 +117,7 @@ class Mdm::NexposeConsole < ApplicationRecord
|
|
113
117
|
#
|
114
118
|
# @return [void]
|
115
119
|
def strip_protocol
|
116
|
-
self.address.gsub!(/^http(s)*:\/\//i,'') unless self.address.nil?
|
120
|
+
self.address.gsub!(/^http(s)*:\/\//i,'') unless self.address.nil?
|
117
121
|
end
|
118
122
|
|
119
123
|
Metasploit::Concern.run(self)
|
data/app/models/mdm/note.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Data gathered or derived from the {#host} or {#service} such as its {#ntype fingerprint}.
|
2
2
|
class Mdm::Note < ApplicationRecord
|
3
|
-
|
3
|
+
|
4
4
|
#
|
5
5
|
# Associations
|
6
6
|
#
|
@@ -107,7 +107,11 @@ class Mdm::Note < ApplicationRecord
|
|
107
107
|
# Serializations
|
108
108
|
#
|
109
109
|
|
110
|
-
|
110
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
111
|
+
serialize :data, coder: ::MetasploitDataModels::Base64Serializer.new
|
112
|
+
else
|
113
|
+
serialize :data, ::MetasploitDataModels::Base64Serializer.new
|
114
|
+
end
|
111
115
|
|
112
116
|
private
|
113
117
|
|
data/app/models/mdm/profile.rb
CHANGED
@@ -38,7 +38,11 @@ class Mdm::Profile < ApplicationRecord
|
|
38
38
|
# Global settings.
|
39
39
|
#
|
40
40
|
# @return [Hash]
|
41
|
-
|
41
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
42
|
+
serialize :settings, coder: MetasploitDataModels::Base64Serializer.new
|
43
|
+
else
|
44
|
+
serialize :settings, MetasploitDataModels::Base64Serializer.new
|
45
|
+
end
|
42
46
|
|
43
47
|
Metasploit::Concern.run(self)
|
44
48
|
end
|
data/app/models/mdm/session.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# A session opened on a {#host} using an {#via_exploit exploit} and controlled through a {#via_payload payload} to
|
2
2
|
# connect back to the local host using meterpreter or a cmd shell.
|
3
3
|
class Mdm::Session < ApplicationRecord
|
4
|
-
|
4
|
+
|
5
5
|
#
|
6
6
|
# Associations
|
7
7
|
#
|
@@ -172,7 +172,11 @@ class Mdm::Session < ApplicationRecord
|
|
172
172
|
# Serializations
|
173
173
|
#
|
174
174
|
|
175
|
-
|
175
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
176
|
+
serialize :datastore, coder: ::MetasploitDataModels::Base64Serializer.new(coerce: true)
|
177
|
+
else
|
178
|
+
serialize :datastore, ::MetasploitDataModels::Base64Serializer.new(coerce: true)
|
179
|
+
end
|
176
180
|
|
177
181
|
# Returns whether the session can be upgraded to a meterpreter session from a shell session on Windows.
|
178
182
|
#
|
data/app/models/mdm/task.rb
CHANGED
@@ -130,17 +130,29 @@ class Mdm::Task < ApplicationRecord
|
|
130
130
|
# Options passed to `#module`.
|
131
131
|
#
|
132
132
|
# @return [Hash]
|
133
|
-
|
133
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
134
|
+
serialize :options, coder: MetasploitDataModels::Base64Serializer.new(coerce: true)
|
135
|
+
else
|
136
|
+
serialize :options, MetasploitDataModels::Base64Serializer.new(coerce: true)
|
137
|
+
end
|
134
138
|
|
135
139
|
# Result of task running.
|
136
140
|
#
|
137
141
|
# @return [Hash]
|
138
|
-
|
142
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
143
|
+
serialize :result, coder: MetasploitDataModels::Base64Serializer.new(coerce: true)
|
144
|
+
else
|
145
|
+
serialize :result, MetasploitDataModels::Base64Serializer.new(coerce: true)
|
146
|
+
end
|
139
147
|
|
140
148
|
# Settings used to configure this task outside of the {#options module options}.
|
141
149
|
#
|
142
150
|
# @return [Hash]
|
143
|
-
|
151
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
152
|
+
serialize :settings, coder: MetasploitDataModels::Base64Serializer.new(coerce: true)
|
153
|
+
else
|
154
|
+
serialize :settings, MetasploitDataModels::Base64Serializer.new(coerce: true)
|
155
|
+
end
|
144
156
|
|
145
157
|
#
|
146
158
|
# Instance Methods
|
data/app/models/mdm/user.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# A user of metasploit-framework or metasploit-pro.
|
2
2
|
class Mdm::User < ApplicationRecord
|
3
3
|
extend MetasploitDataModels::SerializedPrefs
|
4
|
-
|
4
|
+
|
5
5
|
#
|
6
6
|
# Associations
|
7
7
|
#
|
@@ -109,7 +109,11 @@ class Mdm::User < ApplicationRecord
|
|
109
109
|
# Hash of user preferences
|
110
110
|
#
|
111
111
|
# @return [Hash]
|
112
|
-
|
112
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
113
|
+
serialize :prefs, coder: MetasploitDataModels::Base64Serializer.new
|
114
|
+
else
|
115
|
+
serialize :prefs, MetasploitDataModels::Base64Serializer.new
|
116
|
+
end
|
113
117
|
|
114
118
|
# @!attribute time_zone
|
115
119
|
# User's preferred time zone.
|
data/app/models/mdm/web_form.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# A filled-in form on a {#web_site}.
|
2
2
|
class Mdm::WebForm < ApplicationRecord
|
3
|
-
|
3
|
+
|
4
4
|
#
|
5
5
|
# Associations
|
6
6
|
#
|
@@ -46,7 +46,11 @@ class Mdm::WebForm < ApplicationRecord
|
|
46
46
|
# Parameters submitted in this form.
|
47
47
|
#
|
48
48
|
# @return [Array<Array(String, String)>>]
|
49
|
-
|
49
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
50
|
+
serialize :params, coder: MetasploitDataModels::Base64Serializer.new
|
51
|
+
else
|
52
|
+
serialize :params, MetasploitDataModels::Base64Serializer.new
|
53
|
+
end
|
50
54
|
|
51
55
|
Metasploit::Concern.run(self)
|
52
56
|
end
|
data/app/models/mdm/web_page.rb
CHANGED
@@ -81,12 +81,20 @@ class Mdm::WebPage < ApplicationRecord
|
|
81
81
|
# Headers sent from server.
|
82
82
|
#
|
83
83
|
# @return [Hash{String => String}]
|
84
|
-
|
84
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
85
|
+
serialize :headers, coder: MetasploitDataModels::Base64Serializer.new
|
86
|
+
else
|
87
|
+
serialize :headers, MetasploitDataModels::Base64Serializer.new
|
88
|
+
end
|
85
89
|
|
86
90
|
# Cookies sent from server.
|
87
91
|
#
|
88
92
|
# @return [Hash{String => String}]
|
89
|
-
|
93
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
94
|
+
serialize :cookie, coder: MetasploitDataModels::Base64Serializer.new
|
95
|
+
else
|
96
|
+
serialize :cookie, MetasploitDataModels::Base64Serializer.new
|
97
|
+
end
|
90
98
|
Metasploit::Concern.run(self)
|
91
99
|
end
|
92
100
|
|
data/app/models/mdm/web_site.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# A Web Site running on a {#service}.
|
2
2
|
class Mdm::WebSite < ApplicationRecord
|
3
|
-
|
3
|
+
|
4
4
|
#
|
5
5
|
# Associations
|
6
6
|
#
|
@@ -60,7 +60,11 @@ class Mdm::WebSite < ApplicationRecord
|
|
60
60
|
|
61
61
|
# @!attribute [rw] options
|
62
62
|
# @todo Determine format and purpose of Mdm::WebSite#options.
|
63
|
-
|
63
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
64
|
+
serialize :options, coder: ::MetasploitDataModels::Base64Serializer.new
|
65
|
+
else
|
66
|
+
serialize :options, ::MetasploitDataModels::Base64Serializer.new
|
67
|
+
end
|
64
68
|
|
65
69
|
#
|
66
70
|
# Instance Methods
|
data/app/models/mdm/web_vuln.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
# end
|
12
12
|
# end
|
13
13
|
class Mdm::WebVuln < ApplicationRecord
|
14
|
-
|
14
|
+
|
15
15
|
#
|
16
16
|
# CONSTANTS
|
17
17
|
#
|
@@ -141,7 +141,11 @@ class Mdm::WebVuln < ApplicationRecord
|
|
141
141
|
# Parameters sent as part of request
|
142
142
|
#
|
143
143
|
# @return [Array<Array(String, String)>] Array of parameter key value pairs
|
144
|
-
|
144
|
+
if ActiveRecord::VERSION::MAJOR >= 7 && ActiveRecord::VERSION::MINOR >= 1
|
145
|
+
serialize :params, coder: MetasploitDataModels::Base64Serializer.new(default: DEFAULT_PARAMS)
|
146
|
+
else
|
147
|
+
serialize :params, MetasploitDataModels::Base64Serializer.new(default: DEFAULT_PARAMS)
|
148
|
+
end
|
145
149
|
|
146
150
|
#
|
147
151
|
# Methods
|
data/cortex.yaml
CHANGED
@@ -15,6 +15,10 @@ class MetasploitDataModels::Base64Serializer
|
|
15
15
|
|
16
16
|
# The default for {#default}
|
17
17
|
DEFAULT = {}
|
18
|
+
|
19
|
+
# The default for {#coerce}
|
20
|
+
COERCE_DEFAULT = false
|
21
|
+
|
18
22
|
# Deserializers for {#load}
|
19
23
|
# 1. Base64 decoding and then unmarshalling the value.
|
20
24
|
# 2. Parsing the value as YAML.
|
@@ -47,6 +51,24 @@ class MetasploitDataModels::Base64Serializer
|
|
47
51
|
end
|
48
52
|
|
49
53
|
attr_writer :default
|
54
|
+
attr_writer :coerce
|
55
|
+
|
56
|
+
# Recursively coerce the object that has been passed in, keeping primitive types as their original type,
|
57
|
+
# while changing objects that cannot be serialized into a string representation of the object data.
|
58
|
+
def coerce_object(value)
|
59
|
+
case value
|
60
|
+
when Hash
|
61
|
+
value.transform_values { |v| coerce_object(v) }
|
62
|
+
when Array
|
63
|
+
value.map { |v| coerce_object(v) }
|
64
|
+
when File, IO
|
65
|
+
value.inspect
|
66
|
+
when String, Integer, Float, TrueClass, FalseClass, NilClass, Symbol
|
67
|
+
value
|
68
|
+
else
|
69
|
+
value.to_s
|
70
|
+
end
|
71
|
+
end
|
50
72
|
|
51
73
|
# Serializes the value by marshalling the value and then base64 encodes the marshaled value.
|
52
74
|
#
|
@@ -54,7 +76,8 @@ class MetasploitDataModels::Base64Serializer
|
|
54
76
|
# @return [String]
|
55
77
|
def dump(value)
|
56
78
|
# Always store data back in the Marshal format
|
57
|
-
|
79
|
+
to_serialize = @coerce ? coerce_object(value) : value
|
80
|
+
marshalled = Marshal.dump(to_serialize)
|
58
81
|
base64_encoded = [ marshalled ].pack('m')
|
59
82
|
|
60
83
|
base64_encoded
|
@@ -63,9 +86,10 @@ class MetasploitDataModels::Base64Serializer
|
|
63
86
|
# @param attributes [Hash] attributes
|
64
87
|
# @option attributes [Object] :default ({}) Value to use for {#default}.
|
65
88
|
def initialize(attributes={})
|
66
|
-
attributes.assert_valid_keys(:default)
|
89
|
+
attributes.assert_valid_keys(:default, :coerce)
|
67
90
|
|
68
91
|
@default = attributes.fetch(:default, DEFAULT)
|
92
|
+
@coerce = attributes.fetch(:coerce, COERCE_DEFAULT)
|
69
93
|
end
|
70
94
|
|
71
95
|
# Deserializes the value by either
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metasploit_data_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Metasploit Hackers
|
@@ -34,7 +34,7 @@ cert_chain:
|
|
34
34
|
DgscAao7wB3xW2BWEp1KnaDWkf1x9ttgoBEYyuYwU7uatB67kBQG1PKvLt79wHvz
|
35
35
|
Dxs+KOjGbBRfMnPgVGYkORKVrZIwlaboHbDKxcVW5xv+oZc7KYXWGg==
|
36
36
|
-----END CERTIFICATE-----
|
37
|
-
date:
|
37
|
+
date: 2025-02-13 00:00:00.000000000 Z
|
38
38
|
dependencies:
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: metasploit-yard
|
@@ -727,7 +727,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
727
727
|
- !ruby/object:Gem::Version
|
728
728
|
version: '0'
|
729
729
|
requirements: []
|
730
|
-
rubygems_version: 3.3.
|
730
|
+
rubygems_version: 3.3.3
|
731
731
|
signing_key:
|
732
732
|
specification_version: 4
|
733
733
|
summary: Database code for MSF and Metasploit Pro
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,4 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
`�U��3uEh?�v��N>���I��&z)_ ����&�(WBͭ�J�b�iNb�R�4D��>;4�6�5���4D���Z����ޤ�7�y�z���4�^N
|
2
|
+
��
|
3
|
+
���}R�r)�B�eo�G����5���Xw��U ���hWXefI�sOԅ���@�T{�L���>�>�b�z�ȧ�S���d�����-��k��7NXb�P�=���+w���ԭ��,G��%k;���
|
4
|
+
T�8�\���//�r�i>�%FE���V�����G�Սk�� g/R
|