File tree Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Expand file tree Collapse file tree 4 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ group :db do
15
15
# Needed for Msf::DbManager
16
16
gem 'activerecord'
17
17
# Database models shared between framework and Pro.
18
- gem 'metasploit_data_models' , '~> 0.15.2 '
18
+ gem 'metasploit_data_models' , '~> 0.16.1 '
19
19
# Needed for module caching in Mdm::ModuleDetails
20
20
gem 'pg' , '>= 0.11'
21
21
end
Original file line number Diff line number Diff line change 23
23
i18n (0.6.1 )
24
24
json (1.7.7 )
25
25
metaclass (0.0.1 )
26
- metasploit_data_models (0.15.2 )
26
+ metasploit_data_models (0.16.1 )
27
27
activerecord (>= 3.2.13 )
28
28
activesupport
29
29
pg
@@ -65,7 +65,7 @@ DEPENDENCIES
65
65
database_cleaner
66
66
factory_girl (>= 4.1.0 )
67
67
json
68
- metasploit_data_models (~> 0.15.2 )
68
+ metasploit_data_models (~> 0.16.1 )
69
69
msgpack
70
70
nokogiri
71
71
pcaprub
Original file line number Diff line number Diff line change @@ -786,6 +786,14 @@ def report_session(opts)
786
786
s = ::Mdm ::Session . new ( sess_data )
787
787
s . save!
788
788
789
+ if session . exploit_task and session . exploit_task . record
790
+ session_task = session . exploit_task . record
791
+ if session_task . class == Mdm ::Task
792
+ Mdm ::TaskSession . create ( :task => session_task , :session => s )
793
+ end
794
+ end
795
+
796
+
789
797
if opts [ :session ]
790
798
session . db_record = s
791
799
end
Original file line number Diff line number Diff line change @@ -270,6 +270,9 @@ def set_from_exploit(m)
270
270
self . user_output = m . user_output if m . user_output
271
271
self . exploit_uuid = m . uuid
272
272
self . exploit = m
273
+ if m [ :task ]
274
+ self . exploit_task = m [ :task ]
275
+ end
273
276
end
274
277
275
278
#
@@ -365,6 +368,10 @@ def alive?
365
368
# The datastore of the exploit that created this session
366
369
#
367
370
attr_accessor :exploit_datastore
371
+ #
372
+ # The task that ran the exploit that got the session (that swallowed the fly)
373
+ #
374
+ attr_accessor :exploit_task
368
375
#
369
376
# The specific identified session info
370
377
#
You can’t perform that action at this time.
0 commit comments