Class: Risu::Parsers::Nessus::PostProcess::DowngradePlugins

Inherits:
Base::PostProcessBase show all
Defined in:
lib/risu/parsers/nessus/postprocess/downgrade_plugins.rb

Instance Attribute Summary

Attributes inherited from Base::PostProcessBase

#info

Instance Method Summary collapse

Methods inherited from Base::PostProcessBase

#<=>, #==, #calculate_severity, #create_item, #create_plugin, #has_findings, #has_host_findings, inherited

Constructor Details

#initializeDowngradePlugins



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/risu/parsers/nessus/postprocess/downgrade_plugins.rb', line 29

def initialize
  @info =
  {
    :description => "Downgrades the Severity of Certain Plugins",
    :plugin_id => 0
  }

       #0 - informational
       #1 - low
       #2 - medium
       #3 - high
       #4 - critical

  # TODO read from "extra" section

  @plugins_to_severity = {
    41028 => 0, # SNMP Agent Default Community Name (public) - 41028
                10264 => 0, # SNMP Agent Default Community Names - 10264
    10081 => 0, # FTP Privileged Port Bounce Scan - 10081
    42411 => 0, # Microsoft Windows SMB Shares Unprivileged Access
    66349 => 0, # X Server Unauthenticated Access: Screenshot
    26925 => 0, # VNC Server Unauthenticated Access
    66174 => 0, # VNC Server Unauthenticated Access: Screenshot
    10205 => 0, # rlogin Service Detection
    20007 => 2, # SSL Version 2 and 3 Protocol Detection
    80101 => 2, # IPMI v2.0 Password Hash Disclosure
  }
end

Instance Method Details

#runObject



59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/risu/parsers/nessus/postprocess/downgrade_plugins.rb', line 59

def run
  @plugins_to_severity.each do |k, v|
    items = Item.where(:plugin_id => k)

    if items == nil
      next
    end

         items.each do |item|
           if item == nil
             next
           end

           item.severity = v
         item.save
         end

  end
end