metasploit-model 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +2 -0
- data/.travis.yml +3 -0
- data/Gemfile +8 -11
- data/lib/metasploit/model/version.rb +1 -1
- data/metasploit-model.gemspec +5 -5
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config/application.rb +2 -2
- data/spec/dummy/config/boot.rb +3 -9
- data/spec/dummy/config/database.yml.example +37 -0
- data/spec/dummy/config/database.yml.travis +22 -0
- data/spec/dummy/config/environment.rb +3 -3
- data/spec/dummy/config/environments/development.rb +21 -7
- data/spec/dummy/config/environments/production.rb +42 -26
- data/spec/dummy/config/environments/test.rb +19 -11
- data/spec/dummy/config/initializers/assets.rb +8 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +6 -5
- data/spec/dummy/config/initializers/mime_types.rb +0 -1
- data/spec/dummy/config/initializers/session_store.rb +1 -1
- data/spec/dummy/config/initializers/wrap_parameters.rb +7 -2
- data/spec/dummy/db/schema.rb +4 -692
- metadata +48 -36
- metadata.gz.sig +0 -0
@@ -1,15 +1,16 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
# Add new inflection rules using the following format
|
4
|
-
#
|
5
|
-
#
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
6
7
|
# inflect.plural /^(ox)$/i, '\1en'
|
7
8
|
# inflect.singular /^(ox)en/i, '\1'
|
8
9
|
# inflect.irregular 'person', 'people'
|
9
10
|
# inflect.uncountable %w( fish sheep )
|
10
11
|
# end
|
11
|
-
|
12
|
+
|
12
13
|
# These inflection rules are supported but not enabled by default:
|
13
|
-
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
14
15
|
# inflect.acronym 'RESTful'
|
15
16
|
# end
|
@@ -1,9 +1,14 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
|
-
|
2
|
+
|
3
3
|
# This file contains settings for ActionController::ParamsWrapper which
|
4
4
|
# is enabled by default.
|
5
5
|
|
6
6
|
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
7
|
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json]
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
9
|
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -9,699 +9,11 @@
|
|
9
9
|
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
10
|
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
11
|
#
|
12
|
-
# It's strongly recommended
|
12
|
+
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:
|
14
|
+
ActiveRecord::Schema.define(version: 0) do
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
t.datetime "created_at", :null => false
|
19
|
-
t.datetime "updated_at", :null => false
|
20
|
-
end
|
21
|
-
|
22
|
-
add_index "api_keys", ["token"], :name => "index_api_keys_on_token", :unique => true
|
23
|
-
|
24
|
-
create_table "architectures", :force => true do |t|
|
25
|
-
t.integer "bits"
|
26
|
-
t.string "abbreviation", :null => false
|
27
|
-
t.string "endianness"
|
28
|
-
t.string "family"
|
29
|
-
t.string "summary", :null => false
|
30
|
-
end
|
31
|
-
|
32
|
-
add_index "architectures", ["abbreviation"], :name => "index_architectures_on_abbreviation", :unique => true
|
33
|
-
add_index "architectures", ["family", "bits", "endianness"], :name => "index_architectures_on_family_and_bits_and_endianness", :unique => true
|
34
|
-
add_index "architectures", ["summary"], :name => "index_architectures_on_summary", :unique => true
|
35
|
-
|
36
|
-
create_table "authorities", :force => true do |t|
|
37
|
-
t.string "abbreviation", :null => false
|
38
|
-
t.boolean "obsolete", :default => false, :null => false
|
39
|
-
t.string "summary"
|
40
|
-
t.text "url"
|
41
|
-
end
|
42
|
-
|
43
|
-
add_index "authorities", ["abbreviation"], :name => "index_authorities_on_abbreviation", :unique => true
|
44
|
-
add_index "authorities", ["summary"], :name => "index_authorities_on_summary", :unique => true
|
45
|
-
add_index "authorities", ["url"], :name => "index_authorities_on_url", :unique => true
|
46
|
-
|
47
|
-
create_table "authors", :force => true do |t|
|
48
|
-
t.string "name", :null => false
|
49
|
-
end
|
50
|
-
|
51
|
-
add_index "authors", ["name"], :name => "index_authors_on_name", :unique => true
|
52
|
-
|
53
|
-
create_table "clients", :force => true do |t|
|
54
|
-
t.integer "host_id"
|
55
|
-
t.datetime "created_at"
|
56
|
-
t.string "ua_string", :limit => 1024, :null => false
|
57
|
-
t.string "ua_name", :limit => 64
|
58
|
-
t.string "ua_ver", :limit => 32
|
59
|
-
t.datetime "updated_at"
|
60
|
-
end
|
61
|
-
|
62
|
-
create_table "creds", :force => true do |t|
|
63
|
-
t.integer "service_id", :null => false
|
64
|
-
t.datetime "created_at", :null => false
|
65
|
-
t.datetime "updated_at", :null => false
|
66
|
-
t.string "user", :limit => 2048
|
67
|
-
t.string "pass", :limit => 4096
|
68
|
-
t.boolean "active", :default => true
|
69
|
-
t.string "proof", :limit => 4096
|
70
|
-
t.string "ptype", :limit => 256
|
71
|
-
t.integer "source_id"
|
72
|
-
t.string "source_type"
|
73
|
-
end
|
74
|
-
|
75
|
-
create_table "email_addresses", :force => true do |t|
|
76
|
-
t.string "domain", :null => false
|
77
|
-
t.string "local", :null => false
|
78
|
-
end
|
79
|
-
|
80
|
-
add_index "email_addresses", ["domain", "local"], :name => "index_email_addresses_on_domain_and_local", :unique => true
|
81
|
-
add_index "email_addresses", ["domain"], :name => "index_email_addresses_on_domain"
|
82
|
-
add_index "email_addresses", ["local"], :name => "index_email_addresses_on_local"
|
83
|
-
|
84
|
-
create_table "events", :force => true do |t|
|
85
|
-
t.integer "workspace_id"
|
86
|
-
t.integer "host_id"
|
87
|
-
t.datetime "created_at"
|
88
|
-
t.string "name"
|
89
|
-
t.datetime "updated_at"
|
90
|
-
t.boolean "critical"
|
91
|
-
t.boolean "seen"
|
92
|
-
t.string "username"
|
93
|
-
t.text "info"
|
94
|
-
end
|
95
|
-
|
96
|
-
create_table "exploit_attempts", :force => true do |t|
|
97
|
-
t.integer "host_id"
|
98
|
-
t.integer "service_id"
|
99
|
-
t.integer "vuln_id"
|
100
|
-
t.datetime "attempted_at"
|
101
|
-
t.boolean "exploited"
|
102
|
-
t.string "fail_reason"
|
103
|
-
t.string "username"
|
104
|
-
t.text "module"
|
105
|
-
t.integer "session_id"
|
106
|
-
t.integer "loot_id"
|
107
|
-
t.integer "port"
|
108
|
-
t.string "proto"
|
109
|
-
t.text "fail_detail"
|
110
|
-
end
|
111
|
-
|
112
|
-
create_table "exploited_hosts", :force => true do |t|
|
113
|
-
t.integer "host_id", :null => false
|
114
|
-
t.integer "service_id"
|
115
|
-
t.string "session_uuid", :limit => 8
|
116
|
-
t.string "name", :limit => 2048
|
117
|
-
t.string "payload", :limit => 2048
|
118
|
-
t.datetime "created_at", :null => false
|
119
|
-
t.datetime "updated_at", :null => false
|
120
|
-
end
|
121
|
-
|
122
|
-
create_table "host_details", :force => true do |t|
|
123
|
-
t.integer "host_id"
|
124
|
-
t.integer "nx_console_id"
|
125
|
-
t.integer "nx_device_id"
|
126
|
-
t.string "src"
|
127
|
-
t.string "nx_site_name"
|
128
|
-
t.string "nx_site_importance"
|
129
|
-
t.string "nx_scan_template"
|
130
|
-
t.float "nx_risk_score"
|
131
|
-
end
|
132
|
-
|
133
|
-
create_table "host_tags", :force => true do |t|
|
134
|
-
t.integer "host_id", :null => false
|
135
|
-
t.integer "tag_id", :null => false
|
136
|
-
end
|
137
|
-
|
138
|
-
add_index "host_tags", ["host_id", "tag_id"], :name => "index_host_tags_on_host_id_and_tag_id", :unique => true
|
139
|
-
add_index "host_tags", ["host_id"], :name => "index_host_tags_on_host_id"
|
140
|
-
add_index "host_tags", ["tag_id"], :name => "index_host_tags_on_tag_id"
|
141
|
-
|
142
|
-
create_table "hosts", :force => true do |t|
|
143
|
-
t.datetime "created_at"
|
144
|
-
t.string "address", :limit => nil, :null => false
|
145
|
-
t.string "mac"
|
146
|
-
t.string "comm"
|
147
|
-
t.string "name"
|
148
|
-
t.string "state"
|
149
|
-
t.string "os_name"
|
150
|
-
t.string "os_flavor"
|
151
|
-
t.string "os_sp"
|
152
|
-
t.string "os_lang"
|
153
|
-
t.integer "workspace_id", :null => false
|
154
|
-
t.datetime "updated_at"
|
155
|
-
t.text "purpose"
|
156
|
-
t.string "info", :limit => 65536
|
157
|
-
t.text "comments"
|
158
|
-
t.text "scope"
|
159
|
-
t.text "virtual_host"
|
160
|
-
t.integer "note_count", :default => 0
|
161
|
-
t.integer "vuln_count", :default => 0
|
162
|
-
t.integer "service_count", :default => 0
|
163
|
-
t.integer "host_detail_count", :default => 0
|
164
|
-
t.integer "exploit_attempt_count", :default => 0
|
165
|
-
t.integer "cred_count", :default => 0
|
166
|
-
t.integer "architecture_id"
|
167
|
-
end
|
168
|
-
|
169
|
-
add_index "hosts", ["architecture_id"], :name => "index_hosts_on_architecture_id"
|
170
|
-
add_index "hosts", ["name"], :name => "index_hosts_on_name"
|
171
|
-
add_index "hosts", ["os_flavor"], :name => "index_hosts_on_os_flavor"
|
172
|
-
add_index "hosts", ["os_name"], :name => "index_hosts_on_os_name"
|
173
|
-
add_index "hosts", ["purpose"], :name => "index_hosts_on_purpose"
|
174
|
-
add_index "hosts", ["state"], :name => "index_hosts_on_state"
|
175
|
-
add_index "hosts", ["workspace_id", "address"], :name => "index_hosts_on_workspace_id_and_address", :unique => true
|
176
|
-
|
177
|
-
create_table "listeners", :force => true do |t|
|
178
|
-
t.datetime "created_at", :null => false
|
179
|
-
t.datetime "updated_at", :null => false
|
180
|
-
t.integer "workspace_id", :default => 1, :null => false
|
181
|
-
t.integer "task_id"
|
182
|
-
t.boolean "enabled", :default => true
|
183
|
-
t.text "owner"
|
184
|
-
t.text "payload"
|
185
|
-
t.text "address"
|
186
|
-
t.integer "port"
|
187
|
-
t.binary "options"
|
188
|
-
t.text "macro"
|
189
|
-
end
|
190
|
-
|
191
|
-
create_table "loots", :force => true do |t|
|
192
|
-
t.integer "workspace_id", :default => 1, :null => false
|
193
|
-
t.integer "host_id"
|
194
|
-
t.integer "service_id"
|
195
|
-
t.string "ltype", :limit => 512
|
196
|
-
t.string "path", :limit => 1024
|
197
|
-
t.text "data"
|
198
|
-
t.datetime "created_at", :null => false
|
199
|
-
t.datetime "updated_at", :null => false
|
200
|
-
t.string "content_type"
|
201
|
-
t.text "name"
|
202
|
-
t.text "info"
|
203
|
-
end
|
204
|
-
|
205
|
-
create_table "macros", :force => true do |t|
|
206
|
-
t.datetime "created_at", :null => false
|
207
|
-
t.datetime "updated_at", :null => false
|
208
|
-
t.text "owner"
|
209
|
-
t.text "name"
|
210
|
-
t.text "description"
|
211
|
-
t.binary "actions"
|
212
|
-
t.binary "prefs"
|
213
|
-
end
|
214
|
-
|
215
|
-
create_table "module_actions", :force => true do |t|
|
216
|
-
t.text "name", :null => false
|
217
|
-
t.integer "module_instance_id", :null => false
|
218
|
-
end
|
219
|
-
|
220
|
-
add_index "module_actions", ["module_instance_id", "name"], :name => "index_module_actions_on_module_instance_id_and_name", :unique => true
|
221
|
-
|
222
|
-
create_table "module_ancestors", :force => true do |t|
|
223
|
-
t.text "full_name", :null => false
|
224
|
-
t.string "handler_type"
|
225
|
-
t.string "module_type", :null => false
|
226
|
-
t.string "payload_type"
|
227
|
-
t.text "reference_name", :null => false
|
228
|
-
t.text "real_path", :null => false
|
229
|
-
t.datetime "real_path_modified_at", :null => false
|
230
|
-
t.string "real_path_sha1_hex_digest", :limit => 40, :null => false
|
231
|
-
t.integer "parent_path_id", :null => false
|
232
|
-
end
|
233
|
-
|
234
|
-
add_index "module_ancestors", ["full_name"], :name => "index_module_ancestors_on_full_name", :unique => true
|
235
|
-
add_index "module_ancestors", ["module_type", "reference_name"], :name => "index_module_ancestors_on_module_type_and_reference_name", :unique => true
|
236
|
-
add_index "module_ancestors", ["parent_path_id"], :name => "index_module_ancestors_on_parent_path_id"
|
237
|
-
add_index "module_ancestors", ["real_path"], :name => "index_module_ancestors_on_real_path", :unique => true
|
238
|
-
add_index "module_ancestors", ["real_path_sha1_hex_digest"], :name => "index_module_ancestors_on_real_path_sha1_hex_digest", :unique => true
|
239
|
-
|
240
|
-
create_table "module_architectures", :force => true do |t|
|
241
|
-
t.integer "architecture_id", :null => false
|
242
|
-
t.integer "module_instance_id", :null => false
|
243
|
-
end
|
244
|
-
|
245
|
-
add_index "module_architectures", ["module_instance_id", "architecture_id"], :name => "index_unique_module_architectures", :unique => true
|
246
|
-
|
247
|
-
create_table "module_authors", :force => true do |t|
|
248
|
-
t.integer "author_id", :null => false
|
249
|
-
t.integer "email_address_id"
|
250
|
-
t.integer "module_instance_id", :null => false
|
251
|
-
end
|
252
|
-
|
253
|
-
add_index "module_authors", ["author_id"], :name => "index_module_authors_on_author_id"
|
254
|
-
add_index "module_authors", ["email_address_id"], :name => "index_module_authors_on_email_address_id"
|
255
|
-
add_index "module_authors", ["module_instance_id", "author_id"], :name => "index_module_authors_on_module_instance_id_and_author_id", :unique => true
|
256
|
-
add_index "module_authors", ["module_instance_id"], :name => "index_module_authors_on_module_instance_id"
|
257
|
-
|
258
|
-
create_table "module_classes", :force => true do |t|
|
259
|
-
t.text "full_name", :null => false
|
260
|
-
t.string "module_type", :null => false
|
261
|
-
t.string "payload_type"
|
262
|
-
t.text "reference_name", :null => false
|
263
|
-
t.integer "rank_id", :null => false
|
264
|
-
end
|
265
|
-
|
266
|
-
add_index "module_classes", ["full_name"], :name => "index_module_classes_on_full_name", :unique => true
|
267
|
-
add_index "module_classes", ["module_type", "reference_name"], :name => "index_module_classes_on_module_type_and_reference_name", :unique => true
|
268
|
-
add_index "module_classes", ["rank_id"], :name => "index_module_classes_on_rank_id"
|
269
|
-
|
270
|
-
create_table "module_instances", :force => true do |t|
|
271
|
-
t.text "description", :null => false
|
272
|
-
t.date "disclosed_on"
|
273
|
-
t.string "license", :null => false
|
274
|
-
t.text "name", :null => false
|
275
|
-
t.boolean "privileged", :null => false
|
276
|
-
t.string "stance"
|
277
|
-
t.integer "default_action_id"
|
278
|
-
t.integer "default_target_id"
|
279
|
-
t.integer "module_class_id", :null => false
|
280
|
-
end
|
281
|
-
|
282
|
-
add_index "module_instances", ["default_action_id"], :name => "index_module_instances_on_default_action_id", :unique => true
|
283
|
-
add_index "module_instances", ["default_target_id"], :name => "index_module_instances_on_default_target_id", :unique => true
|
284
|
-
add_index "module_instances", ["module_class_id"], :name => "index_module_instances_on_module_class_id", :unique => true
|
285
|
-
|
286
|
-
create_table "module_paths", :force => true do |t|
|
287
|
-
t.string "gem"
|
288
|
-
t.string "name"
|
289
|
-
t.text "real_path", :null => false
|
290
|
-
end
|
291
|
-
|
292
|
-
add_index "module_paths", ["gem", "name"], :name => "index_module_paths_on_gem_and_name", :unique => true
|
293
|
-
add_index "module_paths", ["real_path"], :name => "index_module_paths_on_real_path", :unique => true
|
294
|
-
|
295
|
-
create_table "module_platforms", :force => true do |t|
|
296
|
-
t.integer "module_instance_id", :null => false
|
297
|
-
t.integer "platform_id", :null => false
|
298
|
-
end
|
299
|
-
|
300
|
-
add_index "module_platforms", ["module_instance_id", "platform_id"], :name => "index_module_platforms_on_module_instance_id_and_platform_id", :unique => true
|
301
|
-
|
302
|
-
create_table "module_ranks", :force => true do |t|
|
303
|
-
t.string "name", :null => false
|
304
|
-
t.integer "number", :null => false
|
305
|
-
end
|
306
|
-
|
307
|
-
add_index "module_ranks", ["name"], :name => "index_module_ranks_on_name", :unique => true
|
308
|
-
add_index "module_ranks", ["number"], :name => "index_module_ranks_on_number", :unique => true
|
309
|
-
|
310
|
-
create_table "module_references", :force => true do |t|
|
311
|
-
t.integer "module_instance_id", :null => false
|
312
|
-
t.integer "reference_id", :null => false
|
313
|
-
end
|
314
|
-
|
315
|
-
add_index "module_references", ["module_instance_id", "reference_id"], :name => "index_module_references_on_module_instance_id_and_reference_id", :unique => true
|
316
|
-
|
317
|
-
create_table "module_relationships", :force => true do |t|
|
318
|
-
t.integer "ancestor_id", :null => false
|
319
|
-
t.integer "descendant_id", :null => false
|
320
|
-
end
|
321
|
-
|
322
|
-
add_index "module_relationships", ["descendant_id", "ancestor_id"], :name => "index_module_relationships_on_descendant_id_and_ancestor_id", :unique => true
|
323
|
-
|
324
|
-
create_table "module_targets", :force => true do |t|
|
325
|
-
t.integer "index", :null => false
|
326
|
-
t.text "name", :null => false
|
327
|
-
t.integer "module_instance_id", :null => false
|
328
|
-
end
|
329
|
-
|
330
|
-
add_index "module_targets", ["module_instance_id", "index"], :name => "index_module_targets_on_module_instance_id_and_index", :unique => true
|
331
|
-
add_index "module_targets", ["module_instance_id", "name"], :name => "index_module_targets_on_module_instance_id_and_name", :unique => true
|
332
|
-
|
333
|
-
create_table "nexpose_consoles", :force => true do |t|
|
334
|
-
t.datetime "created_at", :null => false
|
335
|
-
t.datetime "updated_at", :null => false
|
336
|
-
t.boolean "enabled", :default => true
|
337
|
-
t.text "owner"
|
338
|
-
t.text "address"
|
339
|
-
t.integer "port", :default => 3780
|
340
|
-
t.text "username"
|
341
|
-
t.text "password"
|
342
|
-
t.text "status"
|
343
|
-
t.text "version"
|
344
|
-
t.text "cert"
|
345
|
-
t.binary "cached_sites"
|
346
|
-
t.text "name"
|
347
|
-
end
|
348
|
-
|
349
|
-
create_table "notes", :force => true do |t|
|
350
|
-
t.datetime "created_at"
|
351
|
-
t.string "ntype", :limit => 512
|
352
|
-
t.integer "workspace_id", :default => 1, :null => false
|
353
|
-
t.integer "service_id"
|
354
|
-
t.integer "host_id"
|
355
|
-
t.datetime "updated_at"
|
356
|
-
t.boolean "critical"
|
357
|
-
t.boolean "seen"
|
358
|
-
t.text "data"
|
359
|
-
end
|
360
|
-
|
361
|
-
add_index "notes", ["ntype"], :name => "index_notes_on_ntype"
|
362
|
-
|
363
|
-
create_table "platforms", :force => true do |t|
|
364
|
-
t.text "name", :null => false
|
365
|
-
end
|
366
|
-
|
367
|
-
add_index "platforms", ["name"], :name => "index_platforms_on_name", :unique => true
|
368
|
-
|
369
|
-
create_table "profiles", :force => true do |t|
|
370
|
-
t.datetime "created_at", :null => false
|
371
|
-
t.datetime "updated_at", :null => false
|
372
|
-
t.boolean "active", :default => true
|
373
|
-
t.text "name"
|
374
|
-
t.text "owner"
|
375
|
-
t.binary "settings"
|
376
|
-
end
|
377
|
-
|
378
|
-
create_table "references", :force => true do |t|
|
379
|
-
t.string "designation"
|
380
|
-
t.text "url"
|
381
|
-
t.integer "authority_id"
|
382
|
-
end
|
383
|
-
|
384
|
-
add_index "references", ["authority_id", "designation"], :name => "index_references_on_authority_id_and_designation", :unique => true
|
385
|
-
add_index "references", ["url"], :name => "index_references_on_url", :unique => true
|
386
|
-
|
387
|
-
create_table "report_templates", :force => true do |t|
|
388
|
-
t.integer "workspace_id", :default => 1, :null => false
|
389
|
-
t.string "created_by"
|
390
|
-
t.string "path", :limit => 1024
|
391
|
-
t.text "name"
|
392
|
-
t.datetime "created_at", :null => false
|
393
|
-
t.datetime "updated_at", :null => false
|
394
|
-
end
|
395
|
-
|
396
|
-
create_table "reports", :force => true do |t|
|
397
|
-
t.integer "workspace_id", :default => 1, :null => false
|
398
|
-
t.string "created_by"
|
399
|
-
t.string "rtype"
|
400
|
-
t.string "path", :limit => 1024
|
401
|
-
t.text "options"
|
402
|
-
t.datetime "created_at", :null => false
|
403
|
-
t.datetime "updated_at", :null => false
|
404
|
-
t.datetime "downloaded_at"
|
405
|
-
t.integer "task_id"
|
406
|
-
t.string "name", :limit => 63
|
407
|
-
end
|
408
|
-
|
409
|
-
create_table "routes", :force => true do |t|
|
410
|
-
t.integer "session_id"
|
411
|
-
t.string "subnet"
|
412
|
-
t.string "netmask"
|
413
|
-
end
|
414
|
-
|
415
|
-
create_table "services", :force => true do |t|
|
416
|
-
t.integer "host_id"
|
417
|
-
t.datetime "created_at"
|
418
|
-
t.integer "port", :null => false
|
419
|
-
t.string "proto", :limit => 16, :null => false
|
420
|
-
t.string "state"
|
421
|
-
t.string "name"
|
422
|
-
t.datetime "updated_at"
|
423
|
-
t.text "info"
|
424
|
-
end
|
425
|
-
|
426
|
-
add_index "services", ["name"], :name => "index_services_on_name"
|
427
|
-
add_index "services", ["port"], :name => "index_services_on_port"
|
428
|
-
add_index "services", ["proto"], :name => "index_services_on_proto"
|
429
|
-
add_index "services", ["state"], :name => "index_services_on_state"
|
430
|
-
|
431
|
-
create_table "session_events", :force => true do |t|
|
432
|
-
t.integer "session_id"
|
433
|
-
t.string "etype"
|
434
|
-
t.binary "command"
|
435
|
-
t.binary "output"
|
436
|
-
t.string "remote_path"
|
437
|
-
t.string "local_path"
|
438
|
-
t.datetime "created_at"
|
439
|
-
end
|
440
|
-
|
441
|
-
create_table "sessions", :force => true do |t|
|
442
|
-
t.integer "host_id"
|
443
|
-
t.string "stype"
|
444
|
-
t.string "via_exploit"
|
445
|
-
t.string "via_payload"
|
446
|
-
t.string "desc"
|
447
|
-
t.integer "port"
|
448
|
-
t.string "platform"
|
449
|
-
t.text "datastore"
|
450
|
-
t.datetime "opened_at", :null => false
|
451
|
-
t.datetime "closed_at"
|
452
|
-
t.string "close_reason"
|
453
|
-
t.integer "local_id"
|
454
|
-
t.datetime "last_seen"
|
455
|
-
end
|
456
|
-
|
457
|
-
create_table "tags", :force => true do |t|
|
458
|
-
t.integer "user_id"
|
459
|
-
t.string "name", :limit => 1024
|
460
|
-
t.text "desc"
|
461
|
-
t.boolean "report_summary", :default => false, :null => false
|
462
|
-
t.boolean "report_detail", :default => false, :null => false
|
463
|
-
t.boolean "critical", :default => false, :null => false
|
464
|
-
t.datetime "created_at", :null => false
|
465
|
-
t.datetime "updated_at", :null => false
|
466
|
-
end
|
467
|
-
|
468
|
-
create_table "task_creds", :force => true do |t|
|
469
|
-
t.integer "task_id", :null => false
|
470
|
-
t.integer "cred_id", :null => false
|
471
|
-
t.datetime "created_at", :null => false
|
472
|
-
t.datetime "updated_at", :null => false
|
473
|
-
end
|
474
|
-
|
475
|
-
add_index "task_creds", ["task_id", "cred_id"], :name => "index_task_creds_on_task_id_and_cred_id", :unique => true
|
476
|
-
|
477
|
-
create_table "task_hosts", :force => true do |t|
|
478
|
-
t.integer "task_id", :null => false
|
479
|
-
t.integer "host_id", :null => false
|
480
|
-
t.datetime "created_at", :null => false
|
481
|
-
t.datetime "updated_at", :null => false
|
482
|
-
end
|
483
|
-
|
484
|
-
add_index "task_hosts", ["task_id", "host_id"], :name => "index_task_hosts_on_task_id_and_host_id", :unique => true
|
485
|
-
|
486
|
-
create_table "task_services", :force => true do |t|
|
487
|
-
t.integer "task_id", :null => false
|
488
|
-
t.integer "service_id", :null => false
|
489
|
-
t.datetime "created_at", :null => false
|
490
|
-
t.datetime "updated_at", :null => false
|
491
|
-
end
|
492
|
-
|
493
|
-
add_index "task_services", ["task_id", "service_id"], :name => "index_task_services_on_task_id_and_service_id", :unique => true
|
494
|
-
|
495
|
-
create_table "task_sessions", :force => true do |t|
|
496
|
-
t.integer "task_id", :null => false
|
497
|
-
t.integer "session_id", :null => false
|
498
|
-
t.datetime "created_at", :null => false
|
499
|
-
t.datetime "updated_at", :null => false
|
500
|
-
end
|
501
|
-
|
502
|
-
add_index "task_sessions", ["task_id", "session_id"], :name => "index_task_sessions_on_task_id_and_session_id", :unique => true
|
503
|
-
|
504
|
-
create_table "tasks", :force => true do |t|
|
505
|
-
t.integer "workspace_id", :default => 1, :null => false
|
506
|
-
t.string "created_by"
|
507
|
-
t.string "module"
|
508
|
-
t.datetime "completed_at"
|
509
|
-
t.string "path", :limit => 1024
|
510
|
-
t.string "info"
|
511
|
-
t.string "description"
|
512
|
-
t.integer "progress"
|
513
|
-
t.text "options"
|
514
|
-
t.text "error"
|
515
|
-
t.datetime "created_at", :null => false
|
516
|
-
t.datetime "updated_at", :null => false
|
517
|
-
t.text "result"
|
518
|
-
t.string "module_uuid", :limit => 8
|
519
|
-
t.binary "settings"
|
520
|
-
end
|
521
|
-
|
522
|
-
create_table "users", :force => true do |t|
|
523
|
-
t.string "username"
|
524
|
-
t.string "crypted_password"
|
525
|
-
t.string "password_salt"
|
526
|
-
t.string "persistence_token"
|
527
|
-
t.datetime "created_at", :null => false
|
528
|
-
t.datetime "updated_at", :null => false
|
529
|
-
t.string "fullname"
|
530
|
-
t.string "email"
|
531
|
-
t.string "phone"
|
532
|
-
t.string "company"
|
533
|
-
t.string "prefs", :limit => 524288
|
534
|
-
t.boolean "admin", :default => true, :null => false
|
535
|
-
end
|
536
|
-
|
537
|
-
create_table "vuln_attempts", :force => true do |t|
|
538
|
-
t.integer "vuln_id"
|
539
|
-
t.datetime "attempted_at"
|
540
|
-
t.boolean "exploited"
|
541
|
-
t.string "fail_reason"
|
542
|
-
t.string "username"
|
543
|
-
t.text "module"
|
544
|
-
t.integer "session_id"
|
545
|
-
t.integer "loot_id"
|
546
|
-
t.text "fail_detail"
|
547
|
-
end
|
548
|
-
|
549
|
-
create_table "vuln_details", :force => true do |t|
|
550
|
-
t.integer "vuln_id"
|
551
|
-
t.float "cvss_score"
|
552
|
-
t.string "cvss_vector"
|
553
|
-
t.string "title"
|
554
|
-
t.text "description"
|
555
|
-
t.text "solution"
|
556
|
-
t.binary "proof"
|
557
|
-
t.integer "nx_console_id"
|
558
|
-
t.integer "nx_device_id"
|
559
|
-
t.string "nx_vuln_id"
|
560
|
-
t.float "nx_severity"
|
561
|
-
t.float "nx_pci_severity"
|
562
|
-
t.datetime "nx_published"
|
563
|
-
t.datetime "nx_added"
|
564
|
-
t.datetime "nx_modified"
|
565
|
-
t.text "nx_tags"
|
566
|
-
t.text "nx_vuln_status"
|
567
|
-
t.text "nx_proof_key"
|
568
|
-
t.string "src"
|
569
|
-
t.integer "nx_scan_id"
|
570
|
-
t.datetime "nx_vulnerable_since"
|
571
|
-
t.string "nx_pci_compliance_status"
|
572
|
-
end
|
573
|
-
|
574
|
-
create_table "vuln_references", :force => true do |t|
|
575
|
-
t.integer "reference_id", :null => false
|
576
|
-
t.integer "vuln_id", :null => false
|
577
|
-
end
|
578
|
-
|
579
|
-
add_index "vuln_references", ["vuln_id", "reference_id"], :name => "index_vuln_references_on_vuln_id_and_reference_id", :unique => true
|
580
|
-
|
581
|
-
create_table "vulns", :force => true do |t|
|
582
|
-
t.integer "host_id"
|
583
|
-
t.integer "service_id"
|
584
|
-
t.datetime "created_at"
|
585
|
-
t.string "name"
|
586
|
-
t.datetime "updated_at"
|
587
|
-
t.string "info", :limit => 65536
|
588
|
-
t.datetime "exploited_at"
|
589
|
-
t.integer "vuln_detail_count", :default => 0
|
590
|
-
t.integer "vuln_attempt_count", :default => 0
|
591
|
-
end
|
592
|
-
|
593
|
-
add_index "vulns", ["name"], :name => "index_vulns_on_name"
|
594
|
-
|
595
|
-
create_table "web_forms", :force => true do |t|
|
596
|
-
t.integer "web_site_id", :null => false
|
597
|
-
t.datetime "created_at", :null => false
|
598
|
-
t.datetime "updated_at", :null => false
|
599
|
-
t.text "path"
|
600
|
-
t.string "method", :limit => 1024
|
601
|
-
t.text "params"
|
602
|
-
t.text "query"
|
603
|
-
end
|
604
|
-
|
605
|
-
add_index "web_forms", ["path"], :name => "index_web_forms_on_path"
|
606
|
-
|
607
|
-
create_table "web_pages", :force => true do |t|
|
608
|
-
t.integer "web_site_id", :null => false
|
609
|
-
t.datetime "created_at", :null => false
|
610
|
-
t.datetime "updated_at", :null => false
|
611
|
-
t.text "path"
|
612
|
-
t.text "query"
|
613
|
-
t.integer "code", :null => false
|
614
|
-
t.text "cookie"
|
615
|
-
t.text "auth"
|
616
|
-
t.text "ctype"
|
617
|
-
t.datetime "mtime"
|
618
|
-
t.text "location"
|
619
|
-
t.text "headers"
|
620
|
-
t.binary "body"
|
621
|
-
t.binary "request"
|
622
|
-
end
|
623
|
-
|
624
|
-
add_index "web_pages", ["path"], :name => "index_web_pages_on_path"
|
625
|
-
add_index "web_pages", ["query"], :name => "index_web_pages_on_query"
|
626
|
-
|
627
|
-
create_table "web_sites", :force => true do |t|
|
628
|
-
t.integer "service_id", :null => false
|
629
|
-
t.datetime "created_at", :null => false
|
630
|
-
t.datetime "updated_at", :null => false
|
631
|
-
t.string "vhost", :limit => 2048
|
632
|
-
t.text "comments"
|
633
|
-
t.text "options"
|
634
|
-
end
|
635
|
-
|
636
|
-
add_index "web_sites", ["comments"], :name => "index_web_sites_on_comments"
|
637
|
-
add_index "web_sites", ["options"], :name => "index_web_sites_on_options"
|
638
|
-
add_index "web_sites", ["vhost"], :name => "index_web_sites_on_vhost"
|
639
|
-
|
640
|
-
create_table "web_vulns", :force => true do |t|
|
641
|
-
t.integer "web_site_id", :null => false
|
642
|
-
t.datetime "created_at", :null => false
|
643
|
-
t.datetime "updated_at", :null => false
|
644
|
-
t.text "path", :null => false
|
645
|
-
t.string "method", :limit => 1024, :null => false
|
646
|
-
t.text "params", :null => false
|
647
|
-
t.text "pname", :null => false
|
648
|
-
t.integer "risk", :null => false
|
649
|
-
t.string "name", :limit => 1024, :null => false
|
650
|
-
t.text "query"
|
651
|
-
t.text "category", :null => false
|
652
|
-
t.integer "confidence", :null => false
|
653
|
-
t.text "description"
|
654
|
-
t.text "blame"
|
655
|
-
t.binary "request"
|
656
|
-
t.binary "proof", :null => false
|
657
|
-
t.string "owner"
|
658
|
-
t.text "payload"
|
659
|
-
end
|
660
|
-
|
661
|
-
add_index "web_vulns", ["method"], :name => "index_web_vulns_on_method"
|
662
|
-
add_index "web_vulns", ["name"], :name => "index_web_vulns_on_name"
|
663
|
-
add_index "web_vulns", ["path"], :name => "index_web_vulns_on_path"
|
664
|
-
|
665
|
-
create_table "wmap_requests", :force => true do |t|
|
666
|
-
t.string "host"
|
667
|
-
t.string "address", :limit => nil
|
668
|
-
t.integer "port"
|
669
|
-
t.integer "ssl"
|
670
|
-
t.string "meth", :limit => 32
|
671
|
-
t.text "path"
|
672
|
-
t.text "headers"
|
673
|
-
t.text "query"
|
674
|
-
t.text "body"
|
675
|
-
t.string "respcode", :limit => 16
|
676
|
-
t.text "resphead"
|
677
|
-
t.text "response"
|
678
|
-
t.datetime "created_at"
|
679
|
-
t.datetime "updated_at"
|
680
|
-
end
|
681
|
-
|
682
|
-
create_table "wmap_targets", :force => true do |t|
|
683
|
-
t.string "host"
|
684
|
-
t.string "address", :limit => nil
|
685
|
-
t.integer "port"
|
686
|
-
t.integer "ssl"
|
687
|
-
t.integer "selected"
|
688
|
-
t.datetime "created_at"
|
689
|
-
t.datetime "updated_at"
|
690
|
-
end
|
691
|
-
|
692
|
-
create_table "workspace_members", :id => false, :force => true do |t|
|
693
|
-
t.integer "workspace_id", :null => false
|
694
|
-
t.integer "user_id", :null => false
|
695
|
-
end
|
696
|
-
|
697
|
-
create_table "workspaces", :force => true do |t|
|
698
|
-
t.string "name"
|
699
|
-
t.datetime "created_at", :null => false
|
700
|
-
t.datetime "updated_at", :null => false
|
701
|
-
t.string "boundary", :limit => 4096
|
702
|
-
t.string "description", :limit => 4096
|
703
|
-
t.integer "owner_id"
|
704
|
-
t.boolean "limit_to_network", :default => false, :null => false
|
705
|
-
end
|
16
|
+
# These are extensions that must be enabled in order to support this database
|
17
|
+
enable_extension "plpgsql"
|
706
18
|
|
707
19
|
end
|