Skip to content

Commit d5030f7

Browse files
committed
Land 5036, vuln push to NX updates into master
2 parents c666d04 + 835a66c commit d5030f7

File tree

12 files changed

+705
-506
lines changed

12 files changed

+705
-506
lines changed

Gemfile.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ PATH
2424
activerecord (>= 3.2.21, < 4.0.0)
2525
metasploit-credential (~> 0.14.3)
2626
metasploit-framework (= 4.11.0.pre.dev)
27-
metasploit_data_models (~> 0.23.0)
27+
metasploit_data_models (~> 0.23.2)
2828
pg (>= 0.11)
2929
metasploit-framework-pcap (4.11.0.pre.dev)
3030
metasploit-framework (= 4.11.0.pre.dev)
@@ -101,11 +101,11 @@ GEM
101101
gherkin (2.11.6)
102102
json (>= 1.7.6)
103103
hike (1.2.3)
104-
i18n (0.6.11)
104+
i18n (0.7.0)
105105
journey (1.0.4)
106106
jsobfu (0.2.1)
107107
rkelly-remix (= 0.0.6)
108-
json (1.8.1)
108+
json (1.8.2)
109109
mail (2.5.4)
110110
mime-types (~> 1.16)
111111
treetop (~> 1.4.8)
@@ -123,7 +123,7 @@ GEM
123123
metasploit-model (0.29.0)
124124
activesupport
125125
railties (< 4.0.0)
126-
metasploit_data_models (0.23.1)
126+
metasploit_data_models (0.23.2)
127127
activerecord (>= 3.2.13, < 4.0.0)
128128
activesupport
129129
arel-helpers
@@ -135,11 +135,11 @@ GEM
135135
meterpreter_bins (0.0.17)
136136
method_source (0.8.2)
137137
mime-types (1.25.1)
138-
mini_portile (0.6.1)
138+
mini_portile (0.6.2)
139139
msgpack (0.5.11)
140140
multi_json (1.0.4)
141141
network_interface (0.0.1)
142-
nokogiri (1.6.5)
142+
nokogiri (1.6.6.2)
143143
mini_portile (~> 0.6.0)
144144
packetfu (1.1.9)
145145
pcaprub (0.11.3)
@@ -154,7 +154,7 @@ GEM
154154
rack (>= 0.4)
155155
rack-ssl (1.3.4)
156156
rack
157-
rack-test (0.6.2)
157+
rack-test (0.6.3)
158158
rack (>= 1.0)
159159
rails (3.2.21)
160160
actionmailer (= 3.2.21)
@@ -175,7 +175,7 @@ GEM
175175
rb-readline-r7 (0.5.2.0)
176176
rdoc (3.12.2)
177177
json (~> 1.4)
178-
recog (1.0.16)
178+
recog (1.0.24)
179179
nokogiri
180180
redcarpet (3.1.2)
181181
rkelly-remix (0.0.6)
@@ -219,7 +219,7 @@ GEM
219219
treetop (1.4.15)
220220
polyglot
221221
polyglot (>= 0.3.1)
222-
tzinfo (0.3.42)
222+
tzinfo (0.3.43)
223223
xpath (2.0.0)
224224
nokogiri (~> 1.3)
225225
yard (0.8.7.4)

db/schema.rb

Lines changed: 81 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,62 @@
1111
#
1212
# It's strongly recommended to check this file into your version control system.
1313

14-
ActiveRecord::Schema.define(:version => 20150212214222) do
14+
ActiveRecord::Schema.define(:version => 20150326183742) do
1515

1616
create_table "api_keys", :force => true do |t|
1717
t.text "token"
1818
t.datetime "created_at", :null => false
1919
t.datetime "updated_at", :null => false
2020
end
2121

22+
create_table "automatic_exploitation_match_results", :force => true do |t|
23+
t.integer "match_id"
24+
t.integer "run_id"
25+
t.string "state", :null => false
26+
t.datetime "created_at", :null => false
27+
t.datetime "updated_at", :null => false
28+
end
29+
30+
add_index "automatic_exploitation_match_results", ["match_id"], :name => "index_automatic_exploitation_match_results_on_match_id"
31+
add_index "automatic_exploitation_match_results", ["run_id"], :name => "index_automatic_exploitation_match_results_on_run_id"
32+
33+
create_table "automatic_exploitation_match_sets", :force => true do |t|
34+
t.integer "workspace_id"
35+
t.integer "user_id"
36+
t.datetime "created_at", :null => false
37+
t.datetime "updated_at", :null => false
38+
end
39+
40+
add_index "automatic_exploitation_match_sets", ["user_id"], :name => "index_automatic_exploitation_match_sets_on_user_id"
41+
add_index "automatic_exploitation_match_sets", ["workspace_id"], :name => "index_automatic_exploitation_match_sets_on_workspace_id"
42+
43+
create_table "automatic_exploitation_matches", :force => true do |t|
44+
t.integer "module_detail_id"
45+
t.string "state"
46+
t.integer "nexpose_data_vulnerability_definition_id"
47+
t.datetime "created_at", :null => false
48+
t.datetime "updated_at", :null => false
49+
t.integer "match_set_id"
50+
t.string "matchable_type"
51+
t.integer "matchable_id"
52+
t.text "module_fullname"
53+
end
54+
55+
add_index "automatic_exploitation_matches", ["module_detail_id"], :name => "index_automatic_exploitation_matches_on_ref_id"
56+
add_index "automatic_exploitation_matches", ["module_fullname"], :name => "index_automatic_exploitation_matches_on_module_fullname"
57+
58+
create_table "automatic_exploitation_runs", :force => true do |t|
59+
t.integer "workspace_id"
60+
t.integer "user_id"
61+
t.integer "match_set_id"
62+
t.datetime "created_at", :null => false
63+
t.datetime "updated_at", :null => false
64+
end
65+
66+
add_index "automatic_exploitation_runs", ["match_set_id"], :name => "index_automatic_exploitation_runs_on_match_set_id"
67+
add_index "automatic_exploitation_runs", ["user_id"], :name => "index_automatic_exploitation_runs_on_user_id"
68+
add_index "automatic_exploitation_runs", ["workspace_id"], :name => "index_automatic_exploitation_runs_on_workspace_id"
69+
2270
create_table "clients", :force => true do |t|
2371
t.integer "host_id"
2472
t.datetime "created_at"
@@ -155,19 +203,22 @@
155203
end
156204

157205
create_table "loots", :force => true do |t|
158-
t.integer "workspace_id", :default => 1, :null => false
206+
t.integer "workspace_id", :default => 1, :null => false
159207
t.integer "host_id"
160208
t.integer "service_id"
161-
t.string "ltype", :limit => 512
162-
t.string "path", :limit => 1024
209+
t.string "ltype", :limit => 512
210+
t.string "path", :limit => 1024
163211
t.text "data"
164-
t.datetime "created_at", :null => false
165-
t.datetime "updated_at", :null => false
212+
t.datetime "created_at", :null => false
213+
t.datetime "updated_at", :null => false
166214
t.string "content_type"
167215
t.text "name"
168216
t.text "info"
217+
t.integer "module_run_id"
169218
end
170219

220+
add_index "loots", ["module_run_id"], :name => "index_loots_on_module_run_id"
221+
171222
create_table "macros", :force => true do |t|
172223
t.datetime "created_at", :null => false
173224
t.datetime "updated_at", :null => false
@@ -359,6 +410,26 @@
359410
add_index "module_refs", ["detail_id"], :name => "index_module_refs_on_module_detail_id"
360411
add_index "module_refs", ["name"], :name => "index_module_refs_on_name"
361412

413+
create_table "module_runs", :force => true do |t|
414+
t.datetime "attempted_at"
415+
t.text "fail_detail"
416+
t.string "fail_reason"
417+
t.text "module_fullname"
418+
t.integer "port"
419+
t.string "proto"
420+
t.integer "session_id"
421+
t.string "status"
422+
t.integer "trackable_id"
423+
t.string "trackable_type"
424+
t.integer "user_id"
425+
t.string "username"
426+
t.datetime "created_at", :null => false
427+
t.datetime "updated_at", :null => false
428+
end
429+
430+
add_index "module_runs", ["session_id"], :name => "index_module_runs_on_session_id"
431+
add_index "module_runs", ["user_id"], :name => "index_module_runs_on_user_id"
432+
362433
create_table "module_targets", :force => true do |t|
363434
t.integer "detail_id"
364435
t.integer "index"
@@ -481,13 +552,16 @@
481552
t.integer "port"
482553
t.string "platform"
483554
t.text "datastore"
484-
t.datetime "opened_at", :null => false
555+
t.datetime "opened_at", :null => false
485556
t.datetime "closed_at"
486557
t.string "close_reason"
487558
t.integer "local_id"
488559
t.datetime "last_seen"
560+
t.integer "module_run_id"
489561
end
490562

563+
add_index "sessions", ["module_run_id"], :name => "index_sessions_on_module_run_id"
564+
491565
create_table "tags", :force => true do |t|
492566
t.integer "user_id"
493567
t.string "name", :limit => 1024

lib/msf/core/db_manager.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
class Msf::DBManager
2424
extend Metasploit::Framework::Require
2525

26+
# Default proto for making new `Mdm::Service`s. This should probably be a
27+
# const on `Mdm::Service`
28+
DEFAULT_SERVICE_PROTO = "tcp"
29+
2630
autoload :Adapter, 'msf/core/db_manager/adapter'
2731
autoload :Client, 'msf/core/db_manager/client'
2832
autoload :Connection, 'msf/core/db_manager/connection'

0 commit comments

Comments
 (0)