Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/db/schema.rb
19715 views
1
# This file is auto-generated from the current state of the database. Instead
2
# of editing this file, please use the migrations feature of Active Record to
3
# incrementally modify your database, and then regenerate this schema definition.
4
#
5
# This file is the source Rails uses to define your schema when running `bin/rails
6
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
7
# be faster and is potentially less error prone than running all of your
8
# migrations from scratch. Old migrations may fail to apply correctly if those
9
# migrations use external dependencies or application code.
10
#
11
# It's strongly recommended that you check this file into your version control system.
12
13
ActiveRecord::Schema[7.1].define(version: 2025_02_04_172657) do
14
# These are extensions that must be enabled in order to support this database
15
enable_extension "plpgsql"
16
17
create_table "api_keys", id: :serial, force: :cascade do |t|
18
t.text "token"
19
t.datetime "created_at", precision: nil, null: false
20
t.datetime "updated_at", precision: nil, null: false
21
end
22
23
create_table "async_callbacks", id: :serial, force: :cascade do |t|
24
t.string "uuid", null: false
25
t.integer "timestamp", null: false
26
t.string "listener_uri"
27
t.string "target_host"
28
t.string "target_port"
29
t.datetime "created_at", precision: nil, null: false
30
t.datetime "updated_at", precision: nil, null: false
31
end
32
33
create_table "automatic_exploitation_match_results", id: :serial, force: :cascade do |t|
34
t.integer "match_id"
35
t.integer "run_id"
36
t.string "state", null: false
37
t.datetime "created_at", precision: nil, null: false
38
t.datetime "updated_at", precision: nil, null: false
39
t.index ["match_id"], name: "index_automatic_exploitation_match_results_on_match_id"
40
t.index ["run_id"], name: "index_automatic_exploitation_match_results_on_run_id"
41
end
42
43
create_table "automatic_exploitation_match_sets", id: :serial, force: :cascade do |t|
44
t.integer "workspace_id"
45
t.integer "user_id"
46
t.datetime "created_at", precision: nil, null: false
47
t.datetime "updated_at", precision: nil, null: false
48
t.index ["user_id"], name: "index_automatic_exploitation_match_sets_on_user_id"
49
t.index ["workspace_id"], name: "index_automatic_exploitation_match_sets_on_workspace_id"
50
end
51
52
create_table "automatic_exploitation_matches", id: :serial, force: :cascade do |t|
53
t.integer "module_detail_id"
54
t.string "state"
55
t.integer "nexpose_data_vulnerability_definition_id"
56
t.datetime "created_at", precision: nil, null: false
57
t.datetime "updated_at", precision: nil, null: false
58
t.integer "match_set_id"
59
t.string "matchable_type"
60
t.integer "matchable_id"
61
t.text "module_fullname"
62
t.index ["module_detail_id"], name: "index_automatic_exploitation_matches_on_module_detail_id"
63
t.index ["module_fullname"], name: "index_automatic_exploitation_matches_on_module_fullname"
64
end
65
66
create_table "automatic_exploitation_runs", id: :serial, force: :cascade do |t|
67
t.integer "workspace_id"
68
t.integer "user_id"
69
t.integer "match_set_id"
70
t.datetime "created_at", precision: nil, null: false
71
t.datetime "updated_at", precision: nil, null: false
72
t.index ["match_set_id"], name: "index_automatic_exploitation_runs_on_match_set_id"
73
t.index ["user_id"], name: "index_automatic_exploitation_runs_on_user_id"
74
t.index ["workspace_id"], name: "index_automatic_exploitation_runs_on_workspace_id"
75
end
76
77
create_table "clients", id: :serial, force: :cascade do |t|
78
t.integer "host_id"
79
t.datetime "created_at", precision: nil
80
t.string "ua_string", limit: 1024, null: false
81
t.string "ua_name", limit: 64
82
t.string "ua_ver", limit: 32
83
t.datetime "updated_at", precision: nil
84
end
85
86
create_table "credential_cores_tasks", id: false, force: :cascade do |t|
87
t.integer "core_id"
88
t.integer "task_id"
89
end
90
91
create_table "credential_logins_tasks", id: false, force: :cascade do |t|
92
t.integer "login_id"
93
t.integer "task_id"
94
end
95
96
create_table "creds", id: :serial, force: :cascade do |t|
97
t.integer "service_id", null: false
98
t.datetime "created_at", precision: nil, null: false
99
t.datetime "updated_at", precision: nil, null: false
100
t.string "user", limit: 2048
101
t.string "pass", limit: 4096
102
t.boolean "active", default: true
103
t.string "proof", limit: 4096
104
t.string "ptype", limit: 256
105
t.integer "source_id"
106
t.string "source_type"
107
end
108
109
create_table "events", id: :serial, force: :cascade do |t|
110
t.integer "workspace_id"
111
t.integer "host_id"
112
t.datetime "created_at", precision: nil
113
t.string "name"
114
t.datetime "updated_at", precision: nil
115
t.boolean "critical"
116
t.boolean "seen"
117
t.string "username"
118
t.text "info"
119
end
120
121
create_table "exploit_attempts", id: :serial, force: :cascade do |t|
122
t.integer "host_id"
123
t.integer "service_id"
124
t.integer "vuln_id"
125
t.datetime "attempted_at", precision: nil
126
t.boolean "exploited"
127
t.string "fail_reason"
128
t.string "username"
129
t.text "module"
130
t.integer "session_id"
131
t.integer "loot_id"
132
t.integer "port"
133
t.string "proto"
134
t.text "fail_detail"
135
end
136
137
create_table "exploited_hosts", id: :serial, force: :cascade do |t|
138
t.integer "host_id", null: false
139
t.integer "service_id"
140
t.string "session_uuid", limit: 8
141
t.string "name", limit: 2048
142
t.string "payload", limit: 2048
143
t.datetime "created_at", precision: nil, null: false
144
t.datetime "updated_at", precision: nil, null: false
145
end
146
147
create_table "host_details", id: :serial, force: :cascade do |t|
148
t.integer "host_id"
149
t.integer "nx_console_id"
150
t.integer "nx_device_id"
151
t.string "src"
152
t.string "nx_site_name"
153
t.string "nx_site_importance"
154
t.string "nx_scan_template"
155
t.float "nx_risk_score"
156
end
157
158
create_table "hosts", id: :serial, force: :cascade do |t|
159
t.datetime "created_at", precision: nil
160
t.inet "address", null: false
161
t.string "mac"
162
t.string "comm"
163
t.string "name"
164
t.string "state"
165
t.string "os_name"
166
t.string "os_flavor"
167
t.string "os_sp"
168
t.string "os_lang"
169
t.string "arch"
170
t.integer "workspace_id", null: false
171
t.datetime "updated_at", precision: nil
172
t.text "purpose"
173
t.string "info", limit: 65536
174
t.text "comments"
175
t.text "scope"
176
t.text "virtual_host"
177
t.integer "note_count", default: 0
178
t.integer "vuln_count", default: 0
179
t.integer "service_count", default: 0
180
t.integer "host_detail_count", default: 0
181
t.integer "exploit_attempt_count", default: 0
182
t.integer "cred_count", default: 0
183
t.string "detected_arch"
184
t.string "os_family"
185
t.index ["name"], name: "index_hosts_on_name"
186
t.index ["os_flavor"], name: "index_hosts_on_os_flavor"
187
t.index ["os_name"], name: "index_hosts_on_os_name"
188
t.index ["purpose"], name: "index_hosts_on_purpose"
189
t.index ["state"], name: "index_hosts_on_state"
190
t.index ["workspace_id", "address"], name: "index_hosts_on_workspace_id_and_address", unique: true
191
end
192
193
create_table "hosts_tags", id: :serial, force: :cascade do |t|
194
t.integer "host_id"
195
t.integer "tag_id"
196
end
197
198
create_table "listeners", id: :serial, force: :cascade do |t|
199
t.datetime "created_at", precision: nil, null: false
200
t.datetime "updated_at", precision: nil, null: false
201
t.integer "workspace_id", default: 1, null: false
202
t.integer "task_id"
203
t.boolean "enabled", default: true
204
t.text "owner"
205
t.text "payload"
206
t.text "address"
207
t.integer "port"
208
t.binary "options"
209
t.text "macro"
210
end
211
212
create_table "loots", id: :serial, force: :cascade do |t|
213
t.integer "workspace_id", default: 1, null: false
214
t.integer "host_id"
215
t.integer "service_id"
216
t.string "ltype", limit: 512
217
t.string "path", limit: 1024
218
t.text "data"
219
t.datetime "created_at", precision: nil, null: false
220
t.datetime "updated_at", precision: nil, null: false
221
t.string "content_type"
222
t.text "name"
223
t.text "info"
224
t.integer "module_run_id"
225
t.index ["module_run_id"], name: "index_loots_on_module_run_id"
226
end
227
228
create_table "macros", id: :serial, force: :cascade do |t|
229
t.datetime "created_at", precision: nil, null: false
230
t.datetime "updated_at", precision: nil, null: false
231
t.text "owner"
232
t.text "name"
233
t.text "description"
234
t.binary "actions"
235
t.binary "prefs"
236
end
237
238
create_table "metasploit_credential_cores", id: :serial, force: :cascade do |t|
239
t.string "origin_type", null: false
240
t.integer "origin_id", null: false
241
t.integer "private_id"
242
t.integer "public_id"
243
t.integer "realm_id"
244
t.integer "workspace_id", null: false
245
t.datetime "created_at", precision: nil, null: false
246
t.datetime "updated_at", precision: nil, null: false
247
t.integer "logins_count", default: 0
248
t.index ["origin_type", "origin_id"], name: "index_metasploit_credential_cores_on_origin_type_and_origin_id"
249
t.index ["private_id"], name: "index_metasploit_credential_cores_on_private_id"
250
t.index ["public_id"], name: "index_metasploit_credential_cores_on_public_id"
251
t.index ["realm_id"], name: "index_metasploit_credential_cores_on_realm_id"
252
t.index ["workspace_id", "private_id"], name: "unique_private_metasploit_credential_cores", unique: true, where: "((realm_id IS NULL) AND (public_id IS NULL) AND (private_id IS NOT NULL))"
253
t.index ["workspace_id", "public_id", "private_id"], name: "unique_realmless_metasploit_credential_cores", unique: true, where: "((realm_id IS NULL) AND (public_id IS NOT NULL) AND (private_id IS NOT NULL))"
254
t.index ["workspace_id", "public_id"], name: "unique_public_metasploit_credential_cores", unique: true, where: "((realm_id IS NULL) AND (public_id IS NOT NULL) AND (private_id IS NULL))"
255
t.index ["workspace_id", "realm_id", "private_id"], name: "unique_publicless_metasploit_credential_cores", unique: true, where: "((realm_id IS NOT NULL) AND (public_id IS NULL) AND (private_id IS NOT NULL))"
256
t.index ["workspace_id", "realm_id", "public_id", "private_id"], name: "unique_complete_metasploit_credential_cores", unique: true, where: "((realm_id IS NOT NULL) AND (public_id IS NOT NULL) AND (private_id IS NOT NULL))"
257
t.index ["workspace_id", "realm_id", "public_id"], name: "unique_privateless_metasploit_credential_cores", unique: true, where: "((realm_id IS NOT NULL) AND (public_id IS NOT NULL) AND (private_id IS NULL))"
258
t.index ["workspace_id"], name: "index_metasploit_credential_cores_on_workspace_id"
259
end
260
261
create_table "metasploit_credential_logins", id: :serial, force: :cascade do |t|
262
t.integer "core_id", null: false
263
t.integer "service_id", null: false
264
t.string "access_level"
265
t.string "status", null: false
266
t.datetime "last_attempted_at", precision: nil
267
t.datetime "created_at", precision: nil, null: false
268
t.datetime "updated_at", precision: nil, null: false
269
t.index ["core_id", "service_id"], name: "index_metasploit_credential_logins_on_core_id_and_service_id", unique: true
270
t.index ["service_id", "core_id"], name: "index_metasploit_credential_logins_on_service_id_and_core_id", unique: true
271
end
272
273
create_table "metasploit_credential_origin_cracked_passwords", id: :serial, force: :cascade do |t|
274
t.integer "metasploit_credential_core_id", null: false
275
t.datetime "created_at", precision: nil, null: false
276
t.datetime "updated_at", precision: nil, null: false
277
t.index ["metasploit_credential_core_id"], name: "originating_credential_cores"
278
end
279
280
create_table "metasploit_credential_origin_imports", id: :serial, force: :cascade do |t|
281
t.text "filename", null: false
282
t.integer "task_id"
283
t.datetime "created_at", precision: nil, null: false
284
t.datetime "updated_at", precision: nil, null: false
285
t.index ["task_id"], name: "index_metasploit_credential_origin_imports_on_task_id"
286
end
287
288
create_table "metasploit_credential_origin_manuals", id: :serial, force: :cascade do |t|
289
t.integer "user_id", null: false
290
t.datetime "created_at", precision: nil, null: false
291
t.datetime "updated_at", precision: nil, null: false
292
t.index ["user_id"], name: "index_metasploit_credential_origin_manuals_on_user_id"
293
end
294
295
create_table "metasploit_credential_origin_services", id: :serial, force: :cascade do |t|
296
t.integer "service_id", null: false
297
t.text "module_full_name", null: false
298
t.datetime "created_at", precision: nil, null: false
299
t.datetime "updated_at", precision: nil, null: false
300
t.index ["service_id", "module_full_name"], name: "unique_metasploit_credential_origin_services", unique: true
301
end
302
303
create_table "metasploit_credential_origin_sessions", id: :serial, force: :cascade do |t|
304
t.text "post_reference_name", null: false
305
t.integer "session_id", null: false
306
t.datetime "created_at", precision: nil, null: false
307
t.datetime "updated_at", precision: nil, null: false
308
t.index ["session_id", "post_reference_name"], name: "unique_metasploit_credential_origin_sessions", unique: true
309
end
310
311
create_table "metasploit_credential_privates", id: :serial, force: :cascade do |t|
312
t.string "type", null: false
313
t.text "data", null: false
314
t.datetime "created_at", precision: nil, null: false
315
t.datetime "updated_at", precision: nil, null: false
316
t.string "jtr_format"
317
t.jsonb "metadata", default: {}, null: false
318
t.index "type, decode(md5(data), 'hex'::text)", name: "index_metasploit_credential_privates_on_type_and_data_pkcs12", unique: true, where: "((type)::text = 'Metasploit::Credential::Pkcs12'::text)"
319
t.index "type, decode(md5(data), 'hex'::text)", name: "index_metasploit_credential_privates_on_type_and_data_sshkey", unique: true, where: "((type)::text = 'Metasploit::Credential::SSHKey'::text)"
320
t.index ["type", "data"], name: "index_metasploit_credential_privates_on_type_and_data", unique: true, where: "(NOT (((type)::text = 'Metasploit::Credential::SSHKey'::text) OR ((type)::text = 'Metasploit::Credential::Pkcs12'::text)))"
321
end
322
323
create_table "metasploit_credential_publics", id: :serial, force: :cascade do |t|
324
t.string "username", null: false
325
t.datetime "created_at", precision: nil, null: false
326
t.datetime "updated_at", precision: nil, null: false
327
t.string "type", null: false
328
t.index ["username"], name: "index_metasploit_credential_publics_on_username", unique: true
329
end
330
331
create_table "metasploit_credential_realms", id: :serial, force: :cascade do |t|
332
t.string "key", null: false
333
t.string "value", null: false
334
t.datetime "created_at", precision: nil, null: false
335
t.datetime "updated_at", precision: nil, null: false
336
t.index ["key", "value"], name: "index_metasploit_credential_realms_on_key_and_value", unique: true
337
end
338
339
create_table "mod_refs", id: :serial, force: :cascade do |t|
340
t.string "module", limit: 1024
341
t.string "mtype", limit: 128
342
t.text "ref"
343
end
344
345
create_table "module_actions", id: :serial, force: :cascade do |t|
346
t.integer "detail_id"
347
t.text "name"
348
t.index ["detail_id"], name: "index_module_actions_on_detail_id"
349
end
350
351
create_table "module_archs", id: :serial, force: :cascade do |t|
352
t.integer "detail_id"
353
t.text "name"
354
t.index ["detail_id"], name: "index_module_archs_on_detail_id"
355
end
356
357
create_table "module_authors", id: :serial, force: :cascade do |t|
358
t.integer "detail_id"
359
t.text "name"
360
t.text "email"
361
t.index ["detail_id"], name: "index_module_authors_on_detail_id"
362
end
363
364
create_table "module_details", id: :serial, force: :cascade do |t|
365
t.datetime "mtime", precision: nil
366
t.text "file"
367
t.string "mtype"
368
t.text "refname"
369
t.text "fullname"
370
t.text "name"
371
t.integer "rank"
372
t.text "description"
373
t.string "license"
374
t.boolean "privileged"
375
t.datetime "disclosure_date", precision: nil
376
t.integer "default_target"
377
t.text "default_action"
378
t.string "stance"
379
t.boolean "ready"
380
t.index ["description"], name: "index_module_details_on_description"
381
t.index ["mtype"], name: "index_module_details_on_mtype"
382
t.index ["name"], name: "index_module_details_on_name"
383
t.index ["refname"], name: "index_module_details_on_refname"
384
end
385
386
create_table "module_mixins", id: :serial, force: :cascade do |t|
387
t.integer "detail_id"
388
t.text "name"
389
t.index ["detail_id"], name: "index_module_mixins_on_detail_id"
390
end
391
392
create_table "module_platforms", id: :serial, force: :cascade do |t|
393
t.integer "detail_id"
394
t.text "name"
395
t.index ["detail_id"], name: "index_module_platforms_on_detail_id"
396
end
397
398
create_table "module_refs", id: :serial, force: :cascade do |t|
399
t.integer "detail_id"
400
t.text "name"
401
t.index ["detail_id"], name: "index_module_refs_on_detail_id"
402
t.index ["name"], name: "index_module_refs_on_name"
403
end
404
405
create_table "module_runs", id: :serial, force: :cascade do |t|
406
t.datetime "attempted_at", precision: nil
407
t.text "fail_detail"
408
t.string "fail_reason"
409
t.text "module_fullname"
410
t.integer "port"
411
t.string "proto"
412
t.integer "session_id"
413
t.string "status"
414
t.integer "trackable_id"
415
t.string "trackable_type"
416
t.integer "user_id"
417
t.string "username"
418
t.datetime "created_at", precision: nil, null: false
419
t.datetime "updated_at", precision: nil, null: false
420
t.index ["session_id"], name: "index_module_runs_on_session_id"
421
t.index ["user_id"], name: "index_module_runs_on_user_id"
422
end
423
424
create_table "module_targets", id: :serial, force: :cascade do |t|
425
t.integer "detail_id"
426
t.integer "index"
427
t.text "name"
428
t.index ["detail_id"], name: "index_module_targets_on_detail_id"
429
end
430
431
create_table "nexpose_consoles", id: :serial, force: :cascade do |t|
432
t.datetime "created_at", precision: nil, null: false
433
t.datetime "updated_at", precision: nil, null: false
434
t.boolean "enabled", default: true
435
t.text "owner"
436
t.text "address"
437
t.integer "port", default: 3780
438
t.text "username"
439
t.text "password"
440
t.text "status"
441
t.text "version"
442
t.text "cert"
443
t.binary "cached_sites"
444
t.text "name"
445
end
446
447
create_table "notes", id: :serial, force: :cascade do |t|
448
t.datetime "created_at", precision: nil
449
t.string "ntype", limit: 512
450
t.integer "workspace_id", default: 1, null: false
451
t.integer "service_id"
452
t.integer "host_id"
453
t.datetime "updated_at", precision: nil
454
t.boolean "critical"
455
t.boolean "seen"
456
t.text "data"
457
t.integer "vuln_id"
458
t.index ["ntype"], name: "index_notes_on_ntype"
459
t.index ["vuln_id"], name: "index_notes_on_vuln_id"
460
end
461
462
create_table "payloads", id: :serial, force: :cascade do |t|
463
t.string "name"
464
t.string "uuid"
465
t.integer "uuid_mask"
466
t.integer "timestamp"
467
t.string "arch"
468
t.string "platform"
469
t.string "urls"
470
t.string "description"
471
t.string "raw_payload"
472
t.string "raw_payload_hash"
473
t.string "build_status"
474
t.string "build_opts"
475
t.datetime "created_at", precision: nil, null: false
476
t.datetime "updated_at", precision: nil, null: false
477
end
478
479
create_table "profiles", id: :serial, force: :cascade do |t|
480
t.datetime "created_at", precision: nil, null: false
481
t.datetime "updated_at", precision: nil, null: false
482
t.boolean "active", default: true
483
t.text "name"
484
t.text "owner"
485
t.binary "settings"
486
end
487
488
create_table "refs", id: :serial, force: :cascade do |t|
489
t.integer "ref_id"
490
t.datetime "created_at", precision: nil
491
t.string "name", limit: 512
492
t.datetime "updated_at", precision: nil
493
t.index ["name"], name: "index_refs_on_name"
494
end
495
496
create_table "report_templates", id: :serial, force: :cascade do |t|
497
t.integer "workspace_id", default: 1, null: false
498
t.string "created_by"
499
t.string "path", limit: 1024
500
t.text "name"
501
t.datetime "created_at", precision: nil, null: false
502
t.datetime "updated_at", precision: nil, null: false
503
end
504
505
create_table "reports", id: :serial, force: :cascade do |t|
506
t.integer "workspace_id", default: 1, null: false
507
t.string "created_by"
508
t.string "rtype"
509
t.string "path", limit: 1024
510
t.text "options"
511
t.datetime "created_at", precision: nil, null: false
512
t.datetime "updated_at", precision: nil, null: false
513
t.datetime "downloaded_at", precision: nil
514
t.integer "task_id"
515
t.string "name", limit: 63
516
end
517
518
create_table "routes", id: :serial, force: :cascade do |t|
519
t.integer "session_id"
520
t.string "subnet"
521
t.string "netmask"
522
end
523
524
create_table "services", id: :serial, force: :cascade do |t|
525
t.integer "host_id"
526
t.datetime "created_at", precision: nil
527
t.integer "port", null: false
528
t.string "proto", limit: 16, null: false
529
t.string "state"
530
t.string "name"
531
t.datetime "updated_at", precision: nil
532
t.text "info"
533
t.index ["host_id", "port", "proto"], name: "index_services_on_host_id_and_port_and_proto", unique: true
534
t.index ["name"], name: "index_services_on_name"
535
t.index ["port"], name: "index_services_on_port"
536
t.index ["proto"], name: "index_services_on_proto"
537
t.index ["state"], name: "index_services_on_state"
538
end
539
540
create_table "session_events", id: :serial, force: :cascade do |t|
541
t.integer "session_id"
542
t.string "etype"
543
t.binary "command"
544
t.binary "output"
545
t.string "remote_path"
546
t.string "local_path"
547
t.datetime "created_at", precision: nil
548
end
549
550
create_table "sessions", id: :serial, force: :cascade do |t|
551
t.integer "host_id"
552
t.string "stype"
553
t.string "via_exploit"
554
t.string "via_payload"
555
t.string "desc"
556
t.integer "port"
557
t.string "platform"
558
t.text "datastore"
559
t.datetime "opened_at", precision: nil, null: false
560
t.datetime "closed_at", precision: nil
561
t.string "close_reason"
562
t.integer "local_id"
563
t.datetime "last_seen", precision: nil
564
t.integer "module_run_id"
565
t.index ["module_run_id"], name: "index_sessions_on_module_run_id"
566
end
567
568
create_table "tags", id: :serial, force: :cascade do |t|
569
t.integer "user_id"
570
t.string "name", limit: 1024
571
t.text "desc"
572
t.boolean "report_summary", default: false, null: false
573
t.boolean "report_detail", default: false, null: false
574
t.boolean "critical", default: false, null: false
575
t.datetime "created_at", precision: nil, null: false
576
t.datetime "updated_at", precision: nil, null: false
577
end
578
579
create_table "task_creds", id: :serial, force: :cascade do |t|
580
t.integer "task_id", null: false
581
t.integer "cred_id", null: false
582
t.datetime "created_at", precision: nil, null: false
583
t.datetime "updated_at", precision: nil, null: false
584
end
585
586
create_table "task_hosts", id: :serial, force: :cascade do |t|
587
t.integer "task_id", null: false
588
t.integer "host_id", null: false
589
t.datetime "created_at", precision: nil, null: false
590
t.datetime "updated_at", precision: nil, null: false
591
end
592
593
create_table "task_services", id: :serial, force: :cascade do |t|
594
t.integer "task_id", null: false
595
t.integer "service_id", null: false
596
t.datetime "created_at", precision: nil, null: false
597
t.datetime "updated_at", precision: nil, null: false
598
end
599
600
create_table "task_sessions", id: :serial, force: :cascade do |t|
601
t.integer "task_id", null: false
602
t.integer "session_id", null: false
603
t.datetime "created_at", precision: nil, null: false
604
t.datetime "updated_at", precision: nil, null: false
605
end
606
607
create_table "tasks", id: :serial, force: :cascade do |t|
608
t.integer "workspace_id", default: 1, null: false
609
t.string "created_by"
610
t.string "module"
611
t.datetime "completed_at", precision: nil
612
t.string "path", limit: 1024
613
t.string "info"
614
t.string "description"
615
t.integer "progress"
616
t.text "options"
617
t.text "error"
618
t.datetime "created_at", precision: nil, null: false
619
t.datetime "updated_at", precision: nil, null: false
620
t.text "result"
621
t.string "module_uuid", limit: 8
622
t.binary "settings"
623
end
624
625
create_table "users", id: :serial, force: :cascade do |t|
626
t.string "username"
627
t.string "crypted_password"
628
t.string "password_salt"
629
t.string "persistence_token"
630
t.datetime "created_at", precision: nil, null: false
631
t.datetime "updated_at", precision: nil, null: false
632
t.string "fullname"
633
t.string "email"
634
t.string "phone"
635
t.string "company"
636
t.string "prefs", limit: 524288
637
t.boolean "admin", default: true, null: false
638
end
639
640
create_table "vuln_attempts", id: :serial, force: :cascade do |t|
641
t.integer "vuln_id"
642
t.datetime "attempted_at", precision: nil
643
t.boolean "exploited"
644
t.string "fail_reason"
645
t.string "username"
646
t.text "module"
647
t.integer "session_id"
648
t.integer "loot_id"
649
t.text "fail_detail"
650
end
651
652
create_table "vuln_details", id: :serial, force: :cascade do |t|
653
t.integer "vuln_id"
654
t.float "cvss_score"
655
t.string "cvss_vector"
656
t.string "title"
657
t.text "description"
658
t.text "solution"
659
t.binary "proof"
660
t.integer "nx_console_id"
661
t.integer "nx_device_id"
662
t.string "nx_vuln_id"
663
t.float "nx_severity"
664
t.float "nx_pci_severity"
665
t.datetime "nx_published", precision: nil
666
t.datetime "nx_added", precision: nil
667
t.datetime "nx_modified", precision: nil
668
t.text "nx_tags"
669
t.text "nx_vuln_status"
670
t.text "nx_proof_key"
671
t.string "src"
672
t.integer "nx_scan_id"
673
t.datetime "nx_vulnerable_since", precision: nil
674
t.string "nx_pci_compliance_status"
675
end
676
677
create_table "vulns", id: :serial, force: :cascade do |t|
678
t.integer "host_id"
679
t.integer "service_id"
680
t.datetime "created_at", precision: nil
681
t.string "name"
682
t.datetime "updated_at", precision: nil
683
t.string "info", limit: 65536
684
t.datetime "exploited_at", precision: nil
685
t.integer "vuln_detail_count", default: 0
686
t.integer "vuln_attempt_count", default: 0
687
t.integer "origin_id"
688
t.string "origin_type"
689
t.index ["name"], name: "index_vulns_on_name"
690
t.index ["origin_id"], name: "index_vulns_on_origin_id"
691
end
692
693
create_table "vulns_refs", id: :serial, force: :cascade do |t|
694
t.integer "ref_id"
695
t.integer "vuln_id"
696
end
697
698
create_table "web_forms", id: :serial, force: :cascade do |t|
699
t.integer "web_site_id", null: false
700
t.datetime "created_at", precision: nil, null: false
701
t.datetime "updated_at", precision: nil, null: false
702
t.text "path"
703
t.string "method", limit: 1024
704
t.text "params"
705
t.text "query"
706
t.index ["path"], name: "index_web_forms_on_path"
707
end
708
709
create_table "web_pages", id: :serial, force: :cascade do |t|
710
t.integer "web_site_id", null: false
711
t.datetime "created_at", precision: nil, null: false
712
t.datetime "updated_at", precision: nil, null: false
713
t.text "path"
714
t.text "query"
715
t.integer "code", null: false
716
t.text "cookie"
717
t.text "auth"
718
t.text "ctype"
719
t.datetime "mtime", precision: nil
720
t.text "location"
721
t.text "headers"
722
t.binary "body"
723
t.binary "request"
724
t.index ["path"], name: "index_web_pages_on_path"
725
t.index ["query"], name: "index_web_pages_on_query"
726
end
727
728
create_table "web_sites", id: :serial, force: :cascade do |t|
729
t.integer "service_id", null: false
730
t.datetime "created_at", precision: nil, null: false
731
t.datetime "updated_at", precision: nil, null: false
732
t.string "vhost", limit: 2048
733
t.text "comments"
734
t.text "options"
735
t.index ["comments"], name: "index_web_sites_on_comments"
736
t.index ["options"], name: "index_web_sites_on_options"
737
t.index ["vhost"], name: "index_web_sites_on_vhost"
738
end
739
740
create_table "web_vulns", id: :serial, force: :cascade do |t|
741
t.integer "web_site_id", null: false
742
t.datetime "created_at", precision: nil, null: false
743
t.datetime "updated_at", precision: nil, null: false
744
t.text "path", null: false
745
t.string "method", limit: 1024, null: false
746
t.text "params"
747
t.text "pname"
748
t.integer "risk", null: false
749
t.string "name", limit: 1024, null: false
750
t.text "query"
751
t.text "category", null: false
752
t.integer "confidence", null: false
753
t.text "description"
754
t.text "blame"
755
t.binary "request"
756
t.binary "proof", null: false
757
t.string "owner"
758
t.text "payload"
759
t.index ["method"], name: "index_web_vulns_on_method"
760
t.index ["name"], name: "index_web_vulns_on_name"
761
t.index ["path"], name: "index_web_vulns_on_path"
762
end
763
764
create_table "wmap_requests", id: :serial, force: :cascade do |t|
765
t.string "host"
766
t.inet "address"
767
t.integer "port"
768
t.integer "ssl"
769
t.string "meth", limit: 32
770
t.text "path"
771
t.text "headers"
772
t.text "query"
773
t.text "body"
774
t.string "respcode", limit: 16
775
t.text "resphead"
776
t.text "response"
777
t.datetime "created_at", precision: nil
778
t.datetime "updated_at", precision: nil
779
end
780
781
create_table "wmap_targets", id: :serial, force: :cascade do |t|
782
t.string "host"
783
t.inet "address"
784
t.integer "port"
785
t.integer "ssl"
786
t.integer "selected"
787
t.datetime "created_at", precision: nil
788
t.datetime "updated_at", precision: nil
789
end
790
791
create_table "workspace_members", id: false, force: :cascade do |t|
792
t.integer "workspace_id", null: false
793
t.integer "user_id", null: false
794
end
795
796
create_table "workspaces", id: :serial, force: :cascade do |t|
797
t.string "name"
798
t.datetime "created_at", precision: nil, null: false
799
t.datetime "updated_at", precision: nil, null: false
800
t.string "boundary", limit: 4096
801
t.string "description", limit: 4096
802
t.integer "owner_id"
803
t.boolean "limit_to_network", default: false, null: false
804
t.boolean "import_fingerprint", default: false
805
end
806
807
end
808
809