metasploit_data_models 5.0.1 → 5.0.2
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 +2 -5
- data.tar.gz.sig +0 -0
- data/app/models/mdm/event.rb +2 -0
- data/app/models/mdm/exploit_attempt.rb +4 -0
- data/app/models/mdm/loot.rb +2 -0
- data/app/models/mdm/note.rb +3 -0
- data/app/models/mdm/session.rb +1 -0
- data/app/models/mdm/tag.rb +1 -0
- data/app/models/mdm/vuln.rb +3 -0
- data/app/models/mdm/vuln_attempt.rb +2 -0
- data/app/models/mdm/vuln_detail.rb +1 -0
- data/app/models/mdm/workspace.rb +1 -1
- data/app/models/metasploit_data_models/automatic_exploitation/match.rb +1 -0
- data/app/models/metasploit_data_models/module_run.rb +2 -0
- data/lib/metasploit_data_models/version.rb +1 -1
- data/spec/app/models/mdm/event_spec.rb +2 -2
- data/spec/app/models/mdm/loot_spec.rb +2 -2
- data/spec/app/models/mdm/note_spec.rb +3 -3
- data/spec/app/models/mdm/session_spec.rb +1 -1
- data/spec/app/models/mdm/tag_spec.rb +1 -1
- data/spec/app/models/mdm/vuln_spec.rb +3 -3
- data/spec/app/models/mdm/workspace_spec.rb +3 -3
- data/spec/app/models/metasploit_data_models/module_run_spec.rb +8 -8
- data/spec/dummy/config/application.rb +3 -0
- data/spec/factories/mdm/sessions.rb +1 -0
- data/spec/factories/mdm/tags.rb +1 -0
- data/spec/factories/mdm/vuln_refs.rb +2 -0
- data/spec/factories/metasploit_data_models/automatic_exploitation/runs.rb +1 -0
- data/spec/factories/module_runs.rb +2 -2
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 232b057420ed2ce662db4ebc490d34ef13bbb0ac57e2e35e516f886b7dfb9e0b
|
4
|
+
data.tar.gz: 644cade6aa4791d599c6405d61581bba496a8ae07c6d0b1d69579fc2d2867fc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee21837a8af1f62fdfdec43615eb5dba2d62edc5bbc521627d97cd59d69fd78b06b13f1c94ca693810871ec24e0f0401449176fc53ca0ec3ea65ccabefc31e68
|
7
|
+
data.tar.gz: 0b95c36f7521b2e2cd503df6ad05d49b355550f102eec2df2ac9df03d8ec150575770561e0cba34297ab649bc987219b4eed9059a8445056e3ac4ce57a0b88d9
|
checksums.yaml.gz.sig
CHANGED
@@ -1,5 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
)�x��s�u,��畼Zp�;�C���k�ﺥ�q@?���DB�"Z�A�`�>`�;
|
4
|
-
���,����P=6y�n �I�`�w��
|
5
|
-
K�D�έ��\���('�J�E�g���ț�s�1w�Nt
|
1
|
+
���M}�͝�ʊ�}��N�!�1
|
2
|
+
��DO�6u�7)X�c����o��w���Nd�U� �C�n��2���B�����V�� ��>�p���Z���}&+-�q5&��b�sBP����~f�Q �hA).S���$ڄ9k��b���@�|ک��{��s!s��
|
data.tar.gz.sig
CHANGED
Binary file
|
data/app/models/mdm/event.rb
CHANGED
@@ -11,12 +11,14 @@ class Mdm::Event < ApplicationRecord
|
|
11
11
|
# @return [nil] if event did not occur on a host.
|
12
12
|
belongs_to :host,
|
13
13
|
class_name: 'Mdm::Host',
|
14
|
+
optional: true,
|
14
15
|
inverse_of: :events
|
15
16
|
|
16
17
|
# {Mdm::Workspace} in which this event occured. If {#host} is present, then this will match
|
17
18
|
# {Mdm::Host#workspace `host.workspace`}.
|
18
19
|
belongs_to :workspace,
|
19
20
|
class_name: 'Mdm::Workspace',
|
21
|
+
optional: true,
|
20
22
|
inverse_of: :events
|
21
23
|
|
22
24
|
#
|
@@ -18,6 +18,7 @@ class Mdm::ExploitAttempt < ApplicationRecord
|
|
18
18
|
# @return [Mdm::Loot, nil]
|
19
19
|
belongs_to :loot,
|
20
20
|
class_name: 'Mdm::Loot',
|
21
|
+
optional: true,
|
21
22
|
inverse_of: :exploit_attempt
|
22
23
|
|
23
24
|
# The service being exploited on {#host}.
|
@@ -25,6 +26,7 @@ class Mdm::ExploitAttempt < ApplicationRecord
|
|
25
26
|
# @return [Mdm::Service, nil]
|
26
27
|
belongs_to :service,
|
27
28
|
class_name: 'Mdm::Service',
|
29
|
+
optional: true,
|
28
30
|
inverse_of: :exploit_attempts
|
29
31
|
|
30
32
|
# The session that was established when this attempt was successful.
|
@@ -33,6 +35,7 @@ class Mdm::ExploitAttempt < ApplicationRecord
|
|
33
35
|
# @return [nil] if session was not established.
|
34
36
|
belongs_to :session,
|
35
37
|
class_name: 'Mdm::Session',
|
38
|
+
optional: true,
|
36
39
|
inverse_of: :exploit_attempt
|
37
40
|
|
38
41
|
# The vulnerability that was attempted to be exploited.
|
@@ -40,6 +43,7 @@ class Mdm::ExploitAttempt < ApplicationRecord
|
|
40
43
|
# @return [Mdm::Vuln, nil]
|
41
44
|
belongs_to :vuln,
|
42
45
|
class_name: 'Mdm::Vuln',
|
46
|
+
optional: true,
|
43
47
|
inverse_of: :exploit_attempts
|
44
48
|
|
45
49
|
#
|
data/app/models/mdm/loot.rb
CHANGED
@@ -40,6 +40,7 @@ class Mdm::Loot < ApplicationRecord
|
|
40
40
|
belongs_to :module_run,
|
41
41
|
class_name: 'MetasploitDataModels::ModuleRun',
|
42
42
|
foreign_key: :module_run_id,
|
43
|
+
optional: true, # allow for manually stored loot?
|
43
44
|
inverse_of: :loots
|
44
45
|
|
45
46
|
# @!attribute [rw] service
|
@@ -48,6 +49,7 @@ class Mdm::Loot < ApplicationRecord
|
|
48
49
|
# @return [Mdm::Service]
|
49
50
|
belongs_to :service,
|
50
51
|
class_name: 'Mdm::Service',
|
52
|
+
optional: true,
|
51
53
|
inverse_of: :loots
|
52
54
|
|
53
55
|
# @!attribute vuln_attempt
|
data/app/models/mdm/note.rb
CHANGED
@@ -13,6 +13,7 @@ class Mdm::Note < ApplicationRecord
|
|
13
13
|
belongs_to :host,
|
14
14
|
class_name: 'Mdm::Host',
|
15
15
|
counter_cache: :note_count,
|
16
|
+
optional: true,
|
16
17
|
inverse_of: :notes
|
17
18
|
|
18
19
|
# @!attribute [rw] service
|
@@ -22,6 +23,7 @@ class Mdm::Note < ApplicationRecord
|
|
22
23
|
# @return [nil] if not is attached to an {Mdm::Host}.
|
23
24
|
belongs_to :service,
|
24
25
|
class_name: 'Mdm::Service',
|
26
|
+
optional: true,
|
25
27
|
inverse_of: :notes
|
26
28
|
|
27
29
|
# @!attribute [rw] vuln
|
@@ -31,6 +33,7 @@ class Mdm::Note < ApplicationRecord
|
|
31
33
|
# @return [nil] if not is attached to an {Mdm::Host}.
|
32
34
|
belongs_to :vuln,
|
33
35
|
class_name: 'Mdm::Vuln',
|
36
|
+
optional: true,
|
34
37
|
inverse_of: :notes
|
35
38
|
|
36
39
|
# @!attribute [rw] workspace
|
data/app/models/mdm/session.rb
CHANGED
@@ -47,6 +47,7 @@ class Mdm::Session < ApplicationRecord
|
|
47
47
|
# @return [MetasploitDataModels::ModuleRun]
|
48
48
|
belongs_to :originating_module_run,
|
49
49
|
class_name: 'MetasploitDataModels::ModuleRun',
|
50
|
+
optional: true, # no code currently generates a module_run
|
50
51
|
foreign_key: :module_run_id,
|
51
52
|
inverse_of: :spawned_session
|
52
53
|
|
data/app/models/mdm/tag.rb
CHANGED
data/app/models/mdm/vuln.rb
CHANGED
@@ -20,6 +20,7 @@ class Mdm::Vuln < ApplicationRecord
|
|
20
20
|
belongs_to :host,
|
21
21
|
class_name: 'Mdm::Host',
|
22
22
|
counter_cache: :vuln_count,
|
23
|
+
optional: true,
|
23
24
|
inverse_of: :vulns
|
24
25
|
|
25
26
|
# @!attribute [rw] matches
|
@@ -36,6 +37,7 @@ class Mdm::Vuln < ApplicationRecord
|
|
36
37
|
# @return [Mdm::Service]
|
37
38
|
belongs_to :service,
|
38
39
|
class_name: 'Mdm::Service',
|
40
|
+
optional: true,
|
39
41
|
inverse_of: :vulns
|
40
42
|
|
41
43
|
# @!attribute [rw] origin
|
@@ -44,6 +46,7 @@ class Mdm::Vuln < ApplicationRecord
|
|
44
46
|
#
|
45
47
|
# @return [ActiveRecord::Relation<origin>]
|
46
48
|
belongs_to :origin,
|
49
|
+
optional: true,
|
47
50
|
polymorphic: true
|
48
51
|
|
49
52
|
# @!attribute [rw] vuln_attempts
|
@@ -11,6 +11,7 @@ class Mdm::VulnAttempt < ApplicationRecord
|
|
11
11
|
# @return [nil] if {#exploited} is `false`.
|
12
12
|
belongs_to :loot,
|
13
13
|
class_name: 'Mdm::Loot',
|
14
|
+
optional: true,
|
14
15
|
inverse_of: :vuln_attempt
|
15
16
|
|
16
17
|
# The session opened by this attempt.
|
@@ -19,6 +20,7 @@ class Mdm::VulnAttempt < ApplicationRecord
|
|
19
20
|
# @return [nil] if {#exploited} is `false`.
|
20
21
|
belongs_to :session,
|
21
22
|
class_name: 'Mdm::Session',
|
23
|
+
optional: true,
|
22
24
|
inverse_of: :vuln_attempt
|
23
25
|
|
24
26
|
# The {Mdm::Vuln vulnerability} that this attempt was exploiting.
|
data/app/models/mdm/workspace.rb
CHANGED
@@ -36,7 +36,7 @@ class Mdm::Workspace < ApplicationRecord
|
|
36
36
|
|
37
37
|
# User that owns this workspace and has full permissions within this workspace even if they are not an
|
38
38
|
# {Mdm::User#admin administrator}.
|
39
|
-
belongs_to :owner, :class_name => 'Mdm::User', :foreign_key => 'owner_id'
|
39
|
+
belongs_to :owner, :class_name => 'Mdm::User', :foreign_key => 'owner_id', optional: true
|
40
40
|
|
41
41
|
# Tasks run inside this workspace.
|
42
42
|
has_many :tasks,
|
@@ -17,6 +17,7 @@ class MetasploitDataModels::AutomaticExploitation::Match < ApplicationRecord
|
|
17
17
|
# The {MatchSet} this match is part of
|
18
18
|
belongs_to :match_set,
|
19
19
|
class_name: 'MetasploitDataModels::AutomaticExploitation::MatchSet',
|
20
|
+
optional: true,
|
20
21
|
inverse_of: :matches
|
21
22
|
|
22
23
|
# The Metasploit Module that this match connects to
|
@@ -109,6 +109,7 @@ class MetasploitDataModels::ModuleRun < ApplicationRecord
|
|
109
109
|
belongs_to :target_session,
|
110
110
|
class_name: 'Mdm::Session',
|
111
111
|
foreign_key: :session_id,
|
112
|
+
optional: true,
|
112
113
|
inverse_of: :target_module_runs
|
113
114
|
|
114
115
|
|
@@ -130,6 +131,7 @@ class MetasploitDataModels::ModuleRun < ApplicationRecord
|
|
130
131
|
belongs_to :user,
|
131
132
|
class_name: 'Mdm::User',
|
132
133
|
foreign_key: 'user_id',
|
134
|
+
optional: true,
|
133
135
|
inverse_of: :module_runs
|
134
136
|
|
135
137
|
|
@@ -2,8 +2,8 @@ RSpec.describe Mdm::Event, type: :model do
|
|
2
2
|
it_should_behave_like 'Metasploit::Concern.run'
|
3
3
|
|
4
4
|
context 'associations' do
|
5
|
-
it { is_expected.to belong_to(:host).class_name('Mdm::Host') }
|
6
|
-
it { is_expected.to belong_to(:workspace).class_name('Mdm::Workspace') }
|
5
|
+
it { is_expected.to belong_to(:host).optional.class_name('Mdm::Host') }
|
6
|
+
it { is_expected.to belong_to(:workspace).optional.class_name('Mdm::Workspace') }
|
7
7
|
end
|
8
8
|
|
9
9
|
context 'database' do
|
@@ -3,9 +3,9 @@ RSpec.describe Mdm::Loot, type: :model do
|
|
3
3
|
|
4
4
|
context 'associations' do
|
5
5
|
it { is_expected.to belong_to(:workspace).class_name('Mdm::Workspace') }
|
6
|
-
it { is_expected.to belong_to(:service).class_name('Mdm::Service') }
|
6
|
+
it { is_expected.to belong_to(:service).optional.class_name('Mdm::Service') }
|
7
7
|
it { is_expected.to belong_to(:host).class_name('Mdm::Host') }
|
8
|
-
it { is_expected.to belong_to(:module_run).class_name('MetasploitDataModels::ModuleRun') }
|
8
|
+
it { is_expected.to belong_to(:module_run).optional.class_name('MetasploitDataModels::ModuleRun') }
|
9
9
|
end
|
10
10
|
|
11
11
|
context 'database' do
|
@@ -41,9 +41,9 @@ RSpec.describe Mdm::Note, type: :model do
|
|
41
41
|
|
42
42
|
context 'associations' do
|
43
43
|
it { is_expected.to belong_to(:workspace).class_name('Mdm::Workspace') }
|
44
|
-
it { is_expected.to belong_to(:host).class_name('Mdm::Host') }
|
45
|
-
it { is_expected.to belong_to(:service).class_name('Mdm::Service') }
|
46
|
-
it { is_expected.to belong_to(:vuln).class_name('Mdm::Vuln') }
|
44
|
+
it { is_expected.to belong_to(:host).optional.class_name('Mdm::Host') }
|
45
|
+
it { is_expected.to belong_to(:service).optional.class_name('Mdm::Service') }
|
46
|
+
it { is_expected.to belong_to(:vuln).optional.class_name('Mdm::Vuln') }
|
47
47
|
end
|
48
48
|
|
49
49
|
context 'scopes' do
|
@@ -45,7 +45,7 @@ RSpec.describe Mdm::Session, type: :model do
|
|
45
45
|
context 'associations' do
|
46
46
|
it { is_expected.to have_many(:events).class_name('Mdm::SessionEvent').dependent(:delete_all) }
|
47
47
|
it { is_expected.to belong_to(:host).class_name('Mdm::Host') }
|
48
|
-
it { is_expected.to belong_to(:originating_module_run).class_name('MetasploitDataModels::ModuleRun') }
|
48
|
+
it { is_expected.to belong_to(:originating_module_run).optional.class_name('MetasploitDataModels::ModuleRun') }
|
49
49
|
it { is_expected.to have_many(:routes).class_name('Mdm::Route').dependent(:delete_all) }
|
50
50
|
it { is_expected.to have_many(:target_module_runs).class_name('MetasploitDataModels::ModuleRun') }
|
51
51
|
it { is_expected.to have_many(:tasks).class_name('Mdm::Task').through(:task_sessions)}
|
@@ -6,7 +6,7 @@ RSpec.describe Mdm::Tag, type: :model do
|
|
6
6
|
context 'associations' do
|
7
7
|
it { is_expected.to have_many(:hosts_tags).class_name('Mdm::HostTag') }
|
8
8
|
it { is_expected.to have_many(:hosts).class_name('Mdm::Host').through(:hosts_tags) }
|
9
|
-
it { is_expected.to belong_to(:user).class_name('Mdm::User') }
|
9
|
+
it { is_expected.to belong_to(:user).optional.class_name('Mdm::User') }
|
10
10
|
end
|
11
11
|
|
12
12
|
context 'database' do
|
@@ -31,9 +31,9 @@ RSpec.describe Mdm::Vuln, type: :model do
|
|
31
31
|
|
32
32
|
|
33
33
|
context 'associations' do
|
34
|
-
it { is_expected.to belong_to(:host).class_name('Mdm::Host') }
|
35
|
-
it { is_expected.to belong_to(:origin) }
|
36
|
-
it { is_expected.to belong_to(:service).class_name('Mdm::Service') }
|
34
|
+
it { is_expected.to belong_to(:host).optional.class_name('Mdm::Host') }
|
35
|
+
it { is_expected.to belong_to(:origin).optional }
|
36
|
+
it { is_expected.to belong_to(:service).optional.class_name('Mdm::Service') }
|
37
37
|
it { is_expected.to have_many(:module_refs).class_name('Mdm::Module::Ref').through(:refs) }
|
38
38
|
it { is_expected.to have_many(:module_runs).class_name('MetasploitDataModels::ModuleRun') }
|
39
39
|
it { is_expected.to have_many(:refs).class_name('Mdm::Ref').through(:vulns_refs) }
|
@@ -46,7 +46,7 @@ RSpec.describe Mdm::Workspace, type: :model do
|
|
46
46
|
it { is_expected.to have_many(:listeners).class_name('Mdm::Listener').dependent(:destroy) }
|
47
47
|
it { is_expected.to have_many(:loots).class_name('Mdm::Loot').through(:hosts) }
|
48
48
|
it { is_expected.to have_many(:notes).class_name('Mdm::Note') }
|
49
|
-
it { is_expected.to belong_to(:owner).class_name('Mdm::User').with_foreign_key('owner_id') }
|
49
|
+
it { is_expected.to belong_to(:owner).optional.class_name('Mdm::User').with_foreign_key('owner_id') }
|
50
50
|
it { is_expected.to have_many(:services).class_name('Mdm::Service').through(:hosts).with_foreign_key('service_id') }
|
51
51
|
it { is_expected.to have_many(:sessions).class_name('Mdm::Session').through(:hosts) }
|
52
52
|
it { is_expected.to have_many(:tasks).class_name('Mdm::Task').dependent(:destroy).order('created_at DESC') }
|
@@ -185,7 +185,7 @@ RSpec.describe Mdm::Workspace, type: :model do
|
|
185
185
|
before(:example) do
|
186
186
|
FactoryBot.create(
|
187
187
|
:mdm_workspace,
|
188
|
-
:name =>
|
188
|
+
:name => Mdm::Workspace::DEFAULT
|
189
189
|
)
|
190
190
|
end
|
191
191
|
|
@@ -220,7 +220,7 @@ RSpec.describe Mdm::Workspace, type: :model do
|
|
220
220
|
|
221
221
|
context 'with DEFAULT name' do
|
222
222
|
before(:example) do
|
223
|
-
workspace.name =
|
223
|
+
workspace.name = Mdm::Workspace::DEFAULT
|
224
224
|
end
|
225
225
|
|
226
226
|
it { is_expected.to eq(true) }
|
@@ -18,10 +18,10 @@ RSpec.describe MetasploitDataModels::ModuleRun, type: :model do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
context "associations" do
|
21
|
-
it { is_expected.to belong_to(:user).class_name('Mdm::User') }
|
22
|
-
it { is_expected.to belong_to(:user).inverse_of(:module_runs) }
|
23
|
-
it { is_expected.to belong_to(:target_session).class_name('Mdm::Session') }
|
24
|
-
it { is_expected.to belong_to(:target_session).inverse_of(:target_module_runs) }
|
21
|
+
it { is_expected.to belong_to(:user).optional.class_name('Mdm::User') }
|
22
|
+
it { is_expected.to belong_to(:user).optional.inverse_of(:module_runs) }
|
23
|
+
it { is_expected.to belong_to(:target_session).optional.class_name('Mdm::Session') }
|
24
|
+
it { is_expected.to belong_to(:target_session).optional.inverse_of(:target_module_runs) }
|
25
25
|
it { is_expected.to belong_to(:trackable) }
|
26
26
|
it { is_expected.to belong_to(:module_detail).class_name('Mdm::Module::Detail') }
|
27
27
|
it { is_expected.to belong_to(:module_detail).inverse_of(:module_runs) }
|
@@ -40,7 +40,7 @@ RSpec.describe MetasploitDataModels::ModuleRun, type: :model do
|
|
40
40
|
context "when the module is an exploit" do
|
41
41
|
context "and that exploit IS NOT local" do
|
42
42
|
before(:example) do
|
43
|
-
module_run.
|
43
|
+
module_run.module_detail = FactoryBot.create(:mdm_module_detail, fullname: 'exploit/windows/mah-crazy-exploit')
|
44
44
|
end
|
45
45
|
|
46
46
|
it { is_expected.to_not be_valid }
|
@@ -48,7 +48,7 @@ RSpec.describe MetasploitDataModels::ModuleRun, type: :model do
|
|
48
48
|
|
49
49
|
context "and that exploit IS local" do
|
50
50
|
before(:example) do
|
51
|
-
module_run.
|
51
|
+
module_run.module_detail = FactoryBot.create(:mdm_module_detail, fullname: 'exploit/windows/local/mah-crazy-exploit')
|
52
52
|
end
|
53
53
|
|
54
54
|
it { is_expected.to be_valid }
|
@@ -65,7 +65,7 @@ RSpec.describe MetasploitDataModels::ModuleRun, type: :model do
|
|
65
65
|
|
66
66
|
context "and it IS NOT a login scanner" do
|
67
67
|
before(:example) do
|
68
|
-
module_run.
|
68
|
+
module_run.module_detail = FactoryBot.create(:mdm_module_detail, fullname: 'post/multi/gather/steal-minecraft-maps')
|
69
69
|
end
|
70
70
|
|
71
71
|
it { is_expected.to_not be_valid }
|
@@ -73,7 +73,7 @@ RSpec.describe MetasploitDataModels::ModuleRun, type: :model do
|
|
73
73
|
|
74
74
|
context "and it IS a login scanner" do
|
75
75
|
before(:example) do
|
76
|
-
module_run.
|
76
|
+
module_run.module_detail = FactoryBot.create(:mdm_module_detail, fullname: 'auxiliary/scanner/ssh/ssh_login')
|
77
77
|
end
|
78
78
|
|
79
79
|
it { is_expected.to be_valid }
|
@@ -51,6 +51,9 @@ module Dummy
|
|
51
51
|
# like if you have constraints or database-specific column types
|
52
52
|
config.active_record.schema_format = :sql
|
53
53
|
|
54
|
+
# 5.x change to belongs_to
|
55
|
+
config.active_record.belongs_to_required_by_default = true
|
56
|
+
|
54
57
|
# Enable the asset pipeline
|
55
58
|
config.assets.enabled = false
|
56
59
|
|
data/spec/factories/mdm/tags.rb
CHANGED
@@ -2,5 +2,6 @@ FactoryBot.define do
|
|
2
2
|
factory :automatic_exploitation_run, :class => MetasploitDataModels::AutomaticExploitation::Run do
|
3
3
|
association :workspace, factory: :mdm_workspace
|
4
4
|
association :user, factory: :mdm_user
|
5
|
+
association :match_set, factory: :automatic_exploitation_match_set
|
5
6
|
end
|
6
7
|
end
|
@@ -4,6 +4,8 @@ FactoryBot.define do
|
|
4
4
|
factory :metasploit_data_models_module_run, class: MetasploitDataModels::ModuleRun do
|
5
5
|
|
6
6
|
association :user, factory: :mdm_user
|
7
|
+
association :module_detail, factory: :mdm_module_detail
|
8
|
+
association :trackable, factory: :mdm_host
|
7
9
|
|
8
10
|
trait :failed do
|
9
11
|
status { MetasploitDataModels::ModuleRun::FAIL }
|
@@ -18,13 +20,11 @@ FactoryBot.define do
|
|
18
20
|
end
|
19
21
|
|
20
22
|
attempted_at { Time.now }
|
21
|
-
session_id { 1 }
|
22
23
|
port { generate :port }
|
23
24
|
proto { "tcp" }
|
24
25
|
fail_detail { generate :module_run_fail_detail }
|
25
26
|
status { MetasploitDataModels::ModuleRun::SUCCEED }
|
26
27
|
username { "joefoo" }
|
27
|
-
module_fullname { generate :module_run_module_fullname }
|
28
28
|
end
|
29
29
|
|
30
30
|
sequence :module_run_module_fullname do |n|
|
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: 5.0.
|
4
|
+
version: 5.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Metasploit Hackers
|
@@ -93,7 +93,7 @@ cert_chain:
|
|
93
93
|
EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
|
94
94
|
9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
|
95
95
|
-----END CERTIFICATE-----
|
96
|
-
date: 2021-
|
96
|
+
date: 2021-06-07 00:00:00.000000000 Z
|
97
97
|
dependencies:
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: metasploit-yard
|
metadata.gz.sig
CHANGED
Binary file
|