risu 1.7.5 → 1.7.6
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
- data/Gemfile +16 -10
- data/Gemfile.lock +125 -102
- data/LICENSE +2 -1
- data/NEWS.markdown +23 -2
- data/README.markdown +35 -22
- data/Rakefile +4 -4
- data/bin/risu +1 -1
- data/lib/risu.rb +12 -7
- data/lib/risu/base.rb +1 -1
- data/lib/risu/base/post_process_base.rb +2 -3
- data/lib/risu/base/post_process_manager.rb +2 -2
- data/lib/risu/base/schema.rb +3 -3
- data/lib/risu/base/shares_template_helper.rb +37 -3
- data/lib/risu/base/template_base.rb +2 -2
- data/lib/risu/base/template_helper.rb +4 -4
- data/lib/risu/base/template_manager.rb +2 -2
- data/lib/risu/base/templater.rb +1 -1
- data/lib/risu/cli.rb +1 -1
- data/lib/risu/cli/application.rb +7 -6
- data/lib/risu/cli/banner.rb +1 -1
- data/lib/risu/exceptions.rb +1 -1
- data/lib/risu/exceptions/invaliddocument.rb +1 -1
- data/lib/risu/graphs.rb +32 -0
- data/lib/risu/graphs/top_vuln_graph.rb +59 -0
- data/lib/risu/graphs/windows_os_graph.rb +134 -0
- data/lib/risu/models.rb +1 -1
- data/lib/risu/models/attachment.rb +1 -1
- data/lib/risu/models/familyselection.rb +1 -1
- data/lib/risu/models/host.rb +100 -44
- data/lib/risu/models/hostproperty.rb +1 -1
- data/lib/risu/models/individualpluginselection.rb +1 -1
- data/lib/risu/models/item.rb +43 -15
- data/lib/risu/models/patch.rb +1 -1
- data/lib/risu/models/plugin.rb +2 -2
- data/lib/risu/models/pluginspreference.rb +1 -1
- data/lib/risu/models/policy.rb +1 -1
- data/lib/risu/models/reference.rb +4 -3
- data/lib/risu/models/report.rb +2 -2
- data/lib/risu/models/serverpreference.rb +1 -1
- data/lib/risu/models/servicedescription.rb +1 -1
- data/lib/risu/models/version.rb +1 -1
- data/lib/risu/parsers.rb +1 -1
- data/lib/risu/parsers/nessus/nessus_document.rb +7 -1
- data/lib/risu/parsers/nessus/nessus_sax_listener.rb +6 -4
- data/lib/risu/parsers/nessus/postprocess.rb +2 -2
- data/lib/risu/parsers/nessus/postprocess/adobe_acrobat.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/adobe_air.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/adobe_reader.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/apache.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/apache_tomcat.rb +53 -0
- data/lib/risu/parsers/nessus/postprocess/apple_quicktime.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/blackberry_enterprise_server.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/ca_brightstor_arcserve.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/core_ftp.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/db2.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/downgrade_plugins.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/filezilla.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/firefox.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/flash_player.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/flexnet.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/foxit_reader.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/google_chrome.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/hp_system_mgt_homepage.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/java.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/openssh.rb +3 -1
- data/lib/risu/parsers/nessus/postprocess/openssl.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/oracle_database.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/php.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/post_process.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/risk_score.rb +2 -2
- data/lib/risu/parsers/nessus/postprocess/root_cause.rb +12 -7
- data/lib/risu/parsers/nessus/postprocess/servu.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/shockwave.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/sigplus_pro.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/symantec_pcanywhere.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/vlc.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/vmware_esxi.rb +3 -1
- data/lib/risu/parsers/nessus/postprocess/vmware_player.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/vmware_vcenter.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/vmware_vsphere_client.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/windows.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/winscp.rb +1 -1
- data/lib/risu/parsers/nessus/postprocess/wireshark.rb +1 -1
- data/lib/risu/parsers/nexpose/nexpose_document.rb +1 -1
- data/lib/risu/parsers/nexpose/simple_nexpose.rb +3 -3
- data/lib/risu/renderers.rb +1 -1
- data/lib/risu/renderers/csvrenderer.rb +4 -4
- data/lib/risu/renderers/nilrenderer.rb +4 -4
- data/lib/risu/renderers/pdfrenderer.rb +5 -5
- data/lib/risu/template_helpers.rb +32 -0
- data/lib/risu/templates/assets.rb +1 -1
- data/lib/risu/templates/cover_sheet.rb +1 -1
- data/lib/risu/templates/exec_summary.rb +1 -1
- data/lib/risu/templates/executive_summary_detailed.rb +1 -1
- data/lib/risu/templates/exploitablity_summary.rb +1 -1
- data/lib/risu/templates/finding_statistics.rb +1 -1
- data/lib/risu/templates/findings_host.rb +1 -1
- data/lib/risu/templates/findings_summary.rb +1 -1
- data/lib/risu/templates/findings_summary_with_pluginid.rb +1 -1
- data/lib/risu/templates/graphs.rb +1 -1
- data/lib/risu/templates/host_findings_csv.rb +1 -1
- data/lib/risu/templates/host_summary.rb +1 -1
- data/lib/risu/templates/malicious_process_detection.rb +1 -1
- data/lib/risu/templates/missing_root_causes.rb +1 -1
- data/lib/risu/templates/ms_patch_summary.rb +1 -1
- data/lib/risu/templates/ms_update_summary.rb +1 -1
- data/lib/risu/templates/ms_wsus_findings.rb +1 -1
- data/lib/risu/templates/notable.rb +1 -1
- data/lib/risu/templates/notable_detailed.rb +1 -1
- data/lib/risu/templates/pci_compliance.rb +1 -1
- data/lib/risu/templates/stig_findings_summary.rb +2 -2
- data/lib/risu/templates/talking_points.rb +5 -5
- data/lib/risu/templates/technical_findings.rb +1 -1
- data/lib/risu/templates/template.rb +1 -1
- data/lib/risu/templates/top_25.rb +1 -1
- data/lib/risu/version.rb +33 -0
- data/risu.gemspec +21 -20
- metadata +161 -67
- data/Gemfile.ci +0 -12
data/lib/risu/models/item.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2016 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -96,20 +96,23 @@ module Risu
|
|
96
96
|
#
|
97
97
|
# @return [ActiveRecord::Relation] with the query results
|
98
98
|
def critical_risks_unique_sorted
|
99
|
-
select("items.*").select("count(*) as count_all").where(:severity => 4).group(:plugin_id).order("count_all DESC")
|
99
|
+
#Item.select("items.*").select("count(*) as count_all").where(:severity => 4).group(:plugin_id).order("count_all DESC")
|
100
|
+
Item.where(:severity => 4).group(:plugin_id).order('count(*) desc')
|
100
101
|
end
|
101
102
|
|
102
103
|
# Queries for all the unique high findings and sorts them by count
|
103
104
|
#
|
104
105
|
# @return [ActiveRecord::Relation] with the query results
|
105
106
|
def high_risks_unique_sorted
|
106
|
-
|
107
|
+
Item.where(:severity => 3).group(:plugin_id).order('count(*) desc')
|
108
|
+
#select("items.*").select("count(*) as count_all").where(:severity => 3).group(:plugin_id).order("count_all DESC")
|
107
109
|
end
|
108
110
|
|
109
111
|
# Queries for all the unique medium risks in the database
|
110
112
|
#
|
111
113
|
# @return [ActiveRecord::Relation] with the query results
|
112
114
|
def medium_risks_unique
|
115
|
+
|
113
116
|
where(:severity => 2).joins(:plugin).order("plugins.cvss_base_score").group(:plugin_id)
|
114
117
|
end
|
115
118
|
|
@@ -117,7 +120,8 @@ module Risu
|
|
117
120
|
#
|
118
121
|
# @return [ActiveRecord::Relation] with the query results
|
119
122
|
def medium_risks_unique_sorted
|
120
|
-
|
123
|
+
Item.where(:severity => 2).group(:plugin_id).order('count(*) desc')
|
124
|
+
#select("items.*").select("count(*) as count_all").where(:severity => 2).group(:plugin_id).order("count_all DESC")
|
121
125
|
end
|
122
126
|
|
123
127
|
# Queries for all the unique low risks in the database
|
@@ -151,6 +155,7 @@ module Risu
|
|
151
155
|
|
152
156
|
# Queries for all the risks grouped by service type, used for the Vulnerabilities by Service graph
|
153
157
|
#
|
158
|
+
# @TODO rewrite
|
154
159
|
# @return [ActiveRecord::Relation] with the query results
|
155
160
|
def risks_by_service(limit=10)
|
156
161
|
select("items.*").select("count(*) as count_all").where("svc_name != 'unknown' and svc_name != 'general'").group(:svc_name).order("count_all DESC").limit(limit)
|
@@ -158,6 +163,7 @@ module Risu
|
|
158
163
|
|
159
164
|
# Queries for all the Critical risks by plugin
|
160
165
|
#
|
166
|
+
# @TODO rewrite
|
161
167
|
# @param limit Limits the result to a specific number, default 10
|
162
168
|
#
|
163
169
|
# @return [ActiveRecord::Relation] with the query results
|
@@ -167,11 +173,14 @@ module Risu
|
|
167
173
|
|
168
174
|
# Queries for all the Critical risks by host
|
169
175
|
#
|
176
|
+
# @deprecated This function shouldn't be used it has been replaced by critical_risks_by_host
|
177
|
+
#
|
170
178
|
# @param limit Limits the result to a specific number, default 10
|
171
179
|
#
|
172
180
|
# @return [ActiveRecord::Relation] with the query results
|
173
181
|
def risks_by_host(limit=10)
|
174
|
-
select("items.*").select("count(*) as count_all").joins(:host).where("plugin_id != 1").where(:severity => 4).group(:host_id).order("count_all DESC").limit(limit)
|
182
|
+
#select("items.*").select("count(*) as count_all").joins(:host).where("plugin_id != 1").where(:severity => 4).group(:host_id).order("count_all DESC").limit(limit)
|
183
|
+
Item.joins(:host).where.not(plugin_id: 1).where(:severity => 4).group(:host_id).order('count(*) desc').limit(limit)
|
175
184
|
end
|
176
185
|
|
177
186
|
# Queries for all the Critical risks by host
|
@@ -180,7 +189,8 @@ module Risu
|
|
180
189
|
#
|
181
190
|
# @return [ActiveRecord::Relation] with the query results
|
182
191
|
def critical_risks_by_host(limit=10)
|
183
|
-
select("items.*").select("count(*) as count_all").joins(:host).where("plugin_id != 1").where(:severity => 4).group(:host_id).order("count_all DESC").limit(limit)
|
192
|
+
#select("items.*").select("count(*) as count_all").joins(:host).where("plugin_id != 1").where(:severity => 4).group(:host_id).order("count_all DESC").limit(limit)
|
193
|
+
Item.joins(:host).where.not(plugin_id: 1).where(:severity => 4).group(:host_id).order('count(*) desc').limit(limit)
|
184
194
|
end
|
185
195
|
|
186
196
|
# Queries for all the High risks by host
|
@@ -189,7 +199,9 @@ module Risu
|
|
189
199
|
#
|
190
200
|
# @return [ActiveRecord::Relation] with the query results
|
191
201
|
def high_risks_by_host(limit=10)
|
192
|
-
select("items.*").select("count(*) as count_all").joins(:host).where("plugin_id != 1").where(:severity => 3).group(:host_id).order("count_all DESC").limit(limit)
|
202
|
+
#select("items.*").select("count(*) as count_all").joins(:host).where("plugin_id != 1").where(:severity => 3).group(:host_id).order("count_all DESC").limit(limit)
|
203
|
+
|
204
|
+
Item.joins(:host).where.not(plugin_id: 1).where(:severity => 3).group(:host_id).order('count(*) desc').limit(limit)
|
193
205
|
end
|
194
206
|
|
195
207
|
# Queries for all the Medium risks by host
|
@@ -198,7 +210,8 @@ module Risu
|
|
198
210
|
#
|
199
211
|
# @return [ActiveRecord::Relation] with the query results
|
200
212
|
def medium_risks_by_host(limit=10)
|
201
|
-
select("items.*").select("count(*) as count_all").joins(:host).where("plugin_id != 1").where(:severity => 2).group(:host_id).order("count_all DESC").limit(limit)
|
213
|
+
#select("items.*").select("count(*) as count_all").joins(:host).where("plugin_id != 1").where(:severity => 2).group(:host_id).order("count_all DESC").limit(limit)
|
214
|
+
Item.joins(:host).where.not(plugin_id: 1).where(:severity => 2).group(:host_id).order('count(*) desc').limit(limit)
|
202
215
|
end
|
203
216
|
|
204
217
|
# Queries for all the Low risks by host
|
@@ -207,7 +220,8 @@ module Risu
|
|
207
220
|
#
|
208
221
|
# @return [ActiveRecord::Relation] with the query results
|
209
222
|
def low_risks_by_host(limit=10)
|
210
|
-
select("items.*").select("count(*) as count_all").joins(:host).where("plugin_id != 1").where(:severity => 1).group(:host_id).order("count_all DESC").limit(limit)
|
223
|
+
#select("items.*").select("count(*) as count_all").joins(:host).where("plugin_id != 1").where(:severity => 1).group(:host_id).order("count_all DESC").limit(limit)
|
224
|
+
Item.joins(:host).where.not(plugin_id: 1).where(:severity => 1).group(:host_id).order('count(*) desc').limit(limit)
|
211
225
|
end
|
212
226
|
|
213
227
|
# Queries for all the hosts with the Microsoft patch summary plugin (38153)
|
@@ -228,6 +242,7 @@ module Risu
|
|
228
242
|
#
|
229
243
|
# @param limit Limits the result to a specific number, default 10
|
230
244
|
#
|
245
|
+
# @deprecated
|
231
246
|
# @return [StringIO] Object containing the generated PNG image
|
232
247
|
def risks_by_service_graph(limit=10)
|
233
248
|
g = Gruff::Pie.new(GRAPH_WIDTH)
|
@@ -248,6 +263,7 @@ module Risu
|
|
248
263
|
|
249
264
|
# Generates text for the Risks by Service graph
|
250
265
|
#
|
266
|
+
# @deprecated
|
251
267
|
# @return [String] Text based on the Risks by Service graph
|
252
268
|
def risks_by_service_graph_text
|
253
269
|
"This graph is a representation of the findings found by service. This graph can help " +
|
@@ -257,6 +273,7 @@ module Risu
|
|
257
273
|
|
258
274
|
# Generates a Graph of all the risks by severity
|
259
275
|
#
|
276
|
+
# @deprecated
|
260
277
|
# @return [StringIO] Object containing the generated PNG image
|
261
278
|
def risks_by_severity_graph
|
262
279
|
g = Gruff::Bar.new(GRAPH_WIDTH)
|
@@ -299,6 +316,7 @@ module Risu
|
|
299
316
|
|
300
317
|
# Generates a Graph of all the risks by severity
|
301
318
|
#
|
319
|
+
# @deprecated
|
302
320
|
# @return [StringIO] Object containing the generated PNG image
|
303
321
|
def stigs_severity_graph
|
304
322
|
g = Gruff::Bar.new(GRAPH_WIDTH)
|
@@ -328,6 +346,7 @@ module Risu
|
|
328
346
|
# Calculates a vulnerable host percent based on Critical and High findings
|
329
347
|
# (unique_vuln_crit_high_count / host_count) * 100
|
330
348
|
#
|
349
|
+
# @deprecated
|
331
350
|
# @return [FixNum] Percentage of vulnerable hosts
|
332
351
|
def calculate_vulnerable_host_percent
|
333
352
|
#patch to fix double counting
|
@@ -336,7 +355,8 @@ module Risu
|
|
336
355
|
host_percent = (unique_hosts_with_critical_and_high.to_f / Host.count.to_f) * 100
|
337
356
|
end
|
338
357
|
|
339
|
-
# @
|
358
|
+
# @TODO w t f
|
359
|
+
# @deprecated
|
340
360
|
def calculate_vulnerable_host_percent_with_patches_applied
|
341
361
|
|
342
362
|
exclude_list = []
|
@@ -364,6 +384,7 @@ module Risu
|
|
364
384
|
#
|
365
385
|
# @param risk_percent Calculated percentage of risk based on {Item::calculate_vulnerable_host_percent}
|
366
386
|
#
|
387
|
+
# @deprecated
|
367
388
|
# @return [String] Textual representation of the risk_percent
|
368
389
|
def adjective_for_risk_text risk_percent
|
369
390
|
adjective = case risk_percent
|
@@ -384,6 +405,7 @@ module Risu
|
|
384
405
|
#
|
385
406
|
# @param risk_percent Calculated percentage of risk based on {Item::calculate_vulnerable_host_percent}
|
386
407
|
#
|
408
|
+
# @deprecated
|
387
409
|
# @return [String] Sentence describing the implied significance of the risk_percent
|
388
410
|
def risk_text risk_percent
|
389
411
|
percent_text = case risk_percent
|
@@ -404,8 +426,9 @@ module Risu
|
|
404
426
|
end
|
405
427
|
end
|
406
428
|
|
407
|
-
# @
|
408
|
-
# @
|
429
|
+
# @TODO change Report.title to a real variable
|
430
|
+
# @TODO rewrite this
|
431
|
+
# @deprecated
|
409
432
|
def risks_by_severity_graph_text
|
410
433
|
host_percent = calculate_vulnerable_host_percent()
|
411
434
|
adjective = adjective_for_risk_text(host_percent)
|
@@ -439,24 +462,29 @@ module Risu
|
|
439
462
|
return graph_text
|
440
463
|
end
|
441
464
|
|
465
|
+
# @deprecated
|
442
466
|
def risk_percent_rounded_text
|
443
467
|
"#{calculate_vulnerable_host_percent().round}%"
|
444
468
|
end
|
445
469
|
|
470
|
+
# @deprecated
|
446
471
|
def risk_percent_patched_rounded_text
|
447
472
|
"#{calculate_vulnerable_host_percent_with_patches_applied().round}%"
|
448
473
|
end
|
449
474
|
|
475
|
+
# @deprecated
|
450
476
|
def risk_percent_text
|
451
477
|
"%.2f%" % calculate_vulnerable_host_percent()
|
452
478
|
end
|
453
479
|
|
480
|
+
# @deprecated
|
454
481
|
def risk_percent_patched_text
|
455
482
|
"%.2f%" % calculate_vulnerable_host_percent_with_patches_applied()
|
456
483
|
end
|
457
484
|
|
458
485
|
#
|
459
|
-
# @
|
486
|
+
# @TODO comment
|
487
|
+
# @FIXME this doesn't work with PostProcess plugins
|
460
488
|
#
|
461
489
|
def notable_order_by_cvss_raw
|
462
490
|
|
@@ -537,8 +565,8 @@ module Risu
|
|
537
565
|
|
538
566
|
# Returns a prawn pdf table for the top 10 notable findings
|
539
567
|
#
|
540
|
-
# @
|
541
|
-
# @
|
568
|
+
# @TODO change this method to return a array/table and let the template render it
|
569
|
+
# @TODO rename to notable_table also
|
542
570
|
#
|
543
571
|
# @param output device to write the table to
|
544
572
|
def top_10_table(output)
|
data/lib/risu/models/patch.rb
CHANGED
data/lib/risu/models/plugin.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2016 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -104,7 +104,7 @@ module Risu
|
|
104
104
|
plugin_name = Plugin.find_by_id(plugin.plugin_id).plugin_name
|
105
105
|
|
106
106
|
#We need to filter the names a little to make everything look nice on the graph
|
107
|
-
#@
|
107
|
+
#@TODO this concept should be added to the database via a yaml file
|
108
108
|
plugin_name = case plugin.plugin_id
|
109
109
|
when 35362 then plugin_name.split(":")[0]
|
110
110
|
when 34477 then plugin_name.split(":")[0]
|
data/lib/risu/models/policy.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2016 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -34,6 +34,7 @@ module Risu
|
|
34
34
|
class << self
|
35
35
|
|
36
36
|
#Generates a full string of all the references
|
37
|
+
# @TODO automate references to parser references to see if all are covered
|
37
38
|
#
|
38
39
|
# @returns [String] of all the references with in-line formatting for
|
39
40
|
# direct output to the report
|
@@ -219,7 +220,7 @@ module Risu
|
|
219
220
|
def apple_sa
|
220
221
|
where(:reference_name => "apple-sa").select('DISTINCT value')
|
221
222
|
end
|
222
|
-
|
223
|
+
|
223
224
|
#
|
224
225
|
#
|
225
226
|
def icsa
|
@@ -236,7 +237,7 @@ module Risu
|
|
236
237
|
#
|
237
238
|
def usn
|
238
239
|
where(:reference_name => "usn").select('DISTINCT value')
|
239
|
-
end
|
240
|
+
end
|
240
241
|
end
|
241
242
|
end
|
242
243
|
end
|
data/lib/risu/models/report.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2016 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -44,7 +44,7 @@ module Risu
|
|
44
44
|
end
|
45
45
|
|
46
46
|
#
|
47
|
-
# @
|
47
|
+
# @TODO comment this
|
48
48
|
#
|
49
49
|
def scanner_nessus_ratings_text
|
50
50
|
text = "The vulnerability scanner used by #{Report.company} rates the findings as follows: Critical, High, Medium, Low and Informational. High findings represents a security hole, initially this is the highest rating a risk can get. These generally represent vulnerabilities that can lead to full system compromise due to missing security patches. High findings should be re-mediated first as they generally leave the network wide open. Medium findings are considered a security warning; these are not as severe as high but should be evaluated on a risk-by-risk basis. These are typically configuration errors that can lead to information disclosures such as usernames, passwords, and configuration settings. Low findings are identified as security notes; these provide information the scanner discovered during the scanning process. The information includes items such as hostname, domain name, and MAC address. Open Port findings represent the open ports on each system that the scanner found during the scan process. These should be evaluated against firewall settings to test the firewall configurations.\n\n"
|
data/lib/risu/models/version.rb
CHANGED
data/lib/risu/parsers.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2016 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -30,10 +30,12 @@ module Risu
|
|
30
30
|
|
31
31
|
# A Object to represents the Nessus XML file in memory
|
32
32
|
class NessusDocument
|
33
|
+
attr_accessor :new_tags
|
33
34
|
|
34
35
|
# Creates a instance of the NessusDocument class
|
35
36
|
def initialize document
|
36
37
|
@document = document
|
38
|
+
@new_tags = Array.new
|
37
39
|
end
|
38
40
|
|
39
41
|
# Checks the validness of a NessusDocument
|
@@ -70,6 +72,10 @@ module Risu
|
|
70
72
|
@parser = LibXML::XML::SaxParser.file @document
|
71
73
|
@parser.callbacks = NessusSaxListener.new
|
72
74
|
@parser.parse
|
75
|
+
|
76
|
+
#require 'pry'
|
77
|
+
#binding.pry
|
78
|
+
@new_tags == @parser.callbacks.new_tags
|
73
79
|
end
|
74
80
|
|
75
81
|
# Fixes the ip field if nil and replaces it with the name if its an ip
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2016 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -36,6 +36,8 @@ module Risu
|
|
36
36
|
class NessusSaxListener
|
37
37
|
include LibXML::XML::SaxParser::Callbacks
|
38
38
|
|
39
|
+
attr_accessor :new_tags
|
40
|
+
|
39
41
|
# An array of valid reference element names
|
40
42
|
VALID_REFERENCES = Set.new(%w[
|
41
43
|
cpe bid see_also xref cve iava msft
|
@@ -157,6 +159,7 @@ module Risu
|
|
157
159
|
# vals tracks state for elements encountered during parsing
|
158
160
|
def initialize
|
159
161
|
@vals = Hash.new
|
162
|
+
@new_tags = Array.new
|
160
163
|
end
|
161
164
|
|
162
165
|
# Callback for when the start of a XML element is reached
|
@@ -168,7 +171,7 @@ module Risu
|
|
168
171
|
@vals[@tag] = ""
|
169
172
|
|
170
173
|
if !VALID_ELEMENTS.include?(element)
|
171
|
-
|
174
|
+
@new_tags << "New XML element detected: #{element}. Please report this at #{Risu::GITHUB}/issues/new or via email to #{Risu::EMAIL}"
|
172
175
|
end
|
173
176
|
|
174
177
|
if DYNAMIC_START_METHOD_NAMES.key?(element)
|
@@ -258,7 +261,7 @@ module Risu
|
|
258
261
|
if attributes["name"] !~ /(netstat-(?:established|listen)-(?:tcp|udp)\d+-\d+)/ \
|
259
262
|
&& attributes["name"] !~ /traceroute-hop-\d+/ \
|
260
263
|
&& @attr.nil?
|
261
|
-
|
264
|
+
@new_tags << "New HostProperties attribute: #{attributes["name"]}. Please report this at #{Risu::GITHUB}/issues/new or via email to #{Risu::EMAIL}\n"
|
262
265
|
end
|
263
266
|
end
|
264
267
|
|
@@ -375,7 +378,6 @@ module Risu
|
|
375
378
|
:cm_compliance_check_name => @vals["cm:compliance-check-name"],
|
376
379
|
:cm_compliance_result => @vals["cm:compliance-result"],
|
377
380
|
:cm_compliance_output => @vals["cm:compliance-output"],
|
378
|
-
|
379
381
|
:cm_compliance_reference => @vals["cm:compliance-reference"],
|
380
382
|
:cm_compliance_see_also => @vals["cm:compliance-see-also" ],
|
381
383
|
:cm_compliance_solution => @vals["cm:compliance-solution"]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2010-
|
1
|
+
# Copyright (c) 2010-2016 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
3
|
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
@@ -27,7 +27,7 @@
|
|
27
27
|
module Risu
|
28
28
|
module Nessus
|
29
29
|
module PostProcess
|
30
|
-
|
30
|
+
#@TODO move PostProcessing to Risu:PostProcess
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|