risu 1.5.0 → 1.5.1
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.
- data/Gemfile.ci +2 -5
- data/KNOWNISSUES.markdown +12 -11
- data/LICENSE +11 -11
- data/NEWS.markdown +43 -8
- data/README.markdown +36 -32
- data/Rakefile +29 -9
- data/TODO.markdown +150 -77
- data/bin/risu +26 -0
- data/lib/risu.rb +27 -1
- data/lib/risu/base.rb +26 -0
- data/lib/risu/base/prawn_templater.rb +36 -8
- data/lib/risu/base/schema.rb +199 -163
- data/lib/risu/base/template_base.rb +34 -7
- data/lib/risu/base/template_manager.rb +37 -37
- data/lib/risu/base/templater.rb +36 -9
- data/lib/risu/cli.rb +26 -0
- data/lib/risu/cli/application.rb +72 -39
- data/lib/risu/cli/banner.rb +47 -21
- data/lib/risu/exceptions.rb +26 -0
- data/lib/risu/exceptions/invaliddocument.rb +30 -1
- data/lib/risu/models.rb +26 -0
- data/lib/risu/models/familyselection.rb +28 -2
- data/lib/risu/models/host.rb +59 -2
- data/lib/risu/models/individualpluginselection.rb +26 -1
- data/lib/risu/models/item.rb +132 -79
- data/lib/risu/models/patch.rb +26 -1
- data/lib/risu/models/plugin.rb +28 -2
- data/lib/risu/models/pluginspreference.rb +26 -2
- data/lib/risu/models/policy.rb +27 -2
- data/lib/risu/models/reference.rb +81 -20
- data/lib/risu/models/report.rb +33 -8
- data/lib/risu/models/serverpreference.rb +26 -1
- data/lib/risu/models/servicedescription.rb +26 -1
- data/lib/risu/models/version.rb +26 -1
- data/lib/risu/parsers.rb +29 -0
- data/lib/risu/parsers/nessus/nessus_document.rb +47 -14
- data/lib/risu/parsers/nessus/nessus_sax_listener.rb +45 -16
- data/lib/risu/parsers/nexpose/nexpose_document.rb +91 -0
- data/lib/risu/parsers/nexpose/simple_nexpose.rb +108 -0
- data/lib/risu/renderers.rb +26 -0
- data/lib/risu/renderers/nilrenderer.rb +30 -4
- data/lib/risu/templates/assets.rb +36 -10
- data/lib/risu/templates/cover_sheet.rb +34 -8
- data/lib/risu/templates/exec_summary.rb +45 -19
- data/lib/risu/templates/executive_summary.rb +37 -11
- data/lib/risu/templates/finding_statistics.rb +33 -7
- data/lib/risu/templates/findings_host.rb +44 -18
- data/lib/risu/templates/findings_summary.rb +43 -17
- data/lib/risu/templates/findings_summary_with_pluginid.rb +60 -18
- data/lib/risu/templates/graphs.rb +30 -0
- data/lib/risu/templates/host_summary.rb +34 -8
- data/lib/risu/templates/ms_patch_summary.rb +35 -9
- data/lib/risu/templates/ms_update_summary.rb +34 -8
- data/lib/risu/templates/ms_wsus_findings.rb +99 -0
- data/lib/risu/templates/notable.rb +39 -13
- data/lib/risu/templates/notable_detailed.rb +42 -16
- data/lib/risu/templates/pci_compliance.rb +40 -14
- data/lib/risu/templates/stig_findings_summary.rb +62 -36
- data/lib/risu/templates/technical_findings.rb +29 -3
- data/lib/risu/templates/template.rb +35 -9
- data/risu.gemspec +28 -7
- metadata +94 -101
data/lib/risu/models/patch.rb
CHANGED
@@ -1,9 +1,34 @@
|
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
# * Redistributions of source code must retain the above copyright
|
8
|
+
# notice, this list of conditions and the following disclaimer.
|
9
|
+
# * Redistributions in binary form must reproduce the above copyright
|
10
|
+
# notice, this list of conditions and the following disclaimer in the
|
11
|
+
# documentation and/or other materials provided with the distribution.
|
12
|
+
# * Neither the name of the Arxopia LLC nor the names of its contributors
|
13
|
+
# may be used to endorse or promote products derived from this software
|
14
|
+
# without specific prior written permission.
|
15
|
+
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
17
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
19
|
+
# DISCLAIMED. IN NO EVENT SHALL ARXOPIA LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
21
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
|
+
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
|
+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
+
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
|
+
|
1
27
|
module Risu
|
2
28
|
module Models
|
3
29
|
|
4
30
|
# Version Model for the DB
|
5
31
|
#
|
6
|
-
# @author Jacob Hammack
|
7
32
|
class Patch < ActiveRecord::Base
|
8
33
|
belongs_to :host
|
9
34
|
end
|
data/lib/risu/models/plugin.rb
CHANGED
@@ -1,9 +1,34 @@
|
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
# * Redistributions of source code must retain the above copyright
|
8
|
+
# notice, this list of conditions and the following disclaimer.
|
9
|
+
# * Redistributions in binary form must reproduce the above copyright
|
10
|
+
# notice, this list of conditions and the following disclaimer in the
|
11
|
+
# documentation and/or other materials provided with the distribution.
|
12
|
+
# * Neither the name of the Arxopia LLC nor the names of its contributors
|
13
|
+
# may be used to endorse or promote products derived from this software
|
14
|
+
# without specific prior written permission.
|
15
|
+
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
17
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
19
|
+
# DISCLAIMED. IN NO EVENT SHALL ARXOPIA LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
21
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
|
+
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
|
+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
+
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
|
+
|
1
27
|
module Risu
|
2
28
|
module Models
|
3
29
|
|
4
30
|
# Plugin Model
|
5
31
|
#
|
6
|
-
# @author Jacob Hammack
|
7
32
|
class Plugin < ActiveRecord::Base
|
8
33
|
has_many :items
|
9
34
|
belongs_to :family
|
@@ -61,6 +86,7 @@ module Risu
|
|
61
86
|
g = Gruff::Bar.new(GRAPH_WIDTH)
|
62
87
|
g.title = sprintf "Top %d Critical Findings By Plugin", Item.risks_by_plugin(limit).all.count
|
63
88
|
g.sort = false
|
89
|
+
g.marker_count = 1
|
64
90
|
g.theme = {
|
65
91
|
:colors => %w(red orange yellow blue green purple black grey brown pink),
|
66
92
|
:background_colors => %w(white white)
|
@@ -80,7 +106,7 @@ module Risu
|
|
80
106
|
else
|
81
107
|
plugin_name = Plugin.find_by_id(plugin.plugin_id).plugin_name
|
82
108
|
end
|
83
|
-
|
109
|
+
|
84
110
|
if plugin_name =~ /^(MS\d{2}-\d{3}):/
|
85
111
|
plugin_name = $1
|
86
112
|
end
|
@@ -1,10 +1,34 @@
|
|
1
|
-
#
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
# * Redistributions of source code must retain the above copyright
|
8
|
+
# notice, this list of conditions and the following disclaimer.
|
9
|
+
# * Redistributions in binary form must reproduce the above copyright
|
10
|
+
# notice, this list of conditions and the following disclaimer in the
|
11
|
+
# documentation and/or other materials provided with the distribution.
|
12
|
+
# * Neither the name of the Arxopia LLC nor the names of its contributors
|
13
|
+
# may be used to endorse or promote products derived from this software
|
14
|
+
# without specific prior written permission.
|
15
|
+
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
17
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
19
|
+
# DISCLAIMED. IN NO EVENT SHALL ARXOPIA LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
21
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
|
+
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
|
+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
+
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
2
26
|
|
3
27
|
module Risu
|
4
28
|
module Models
|
29
|
+
|
5
30
|
# PluginPreference Model
|
6
31
|
#
|
7
|
-
# @author Jacob Hammack
|
8
32
|
class PluginsPreference < ActiveRecord::Base
|
9
33
|
belongs_to :policy
|
10
34
|
end
|
data/lib/risu/models/policy.rb
CHANGED
@@ -1,9 +1,34 @@
|
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
# * Redistributions of source code must retain the above copyright
|
8
|
+
# notice, this list of conditions and the following disclaimer.
|
9
|
+
# * Redistributions in binary form must reproduce the above copyright
|
10
|
+
# notice, this list of conditions and the following disclaimer in the
|
11
|
+
# documentation and/or other materials provided with the distribution.
|
12
|
+
# * Neither the name of the Arxopia LLC nor the names of its contributors
|
13
|
+
# may be used to endorse or promote products derived from this software
|
14
|
+
# without specific prior written permission.
|
15
|
+
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
17
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
19
|
+
# DISCLAIMED. IN NO EVENT SHALL ARXOPIA LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
21
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
|
+
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
|
+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
+
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
|
+
|
1
27
|
module Risu
|
2
28
|
module Models
|
3
|
-
|
29
|
+
|
4
30
|
# Policy Model
|
5
31
|
#
|
6
|
-
# @author Jacob Hammack
|
7
32
|
class Policy < ActiveRecord::Base
|
8
33
|
has_many :family_selections
|
9
34
|
has_many :individual_plugin_selections
|
@@ -1,103 +1,164 @@
|
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
# * Redistributions of source code must retain the above copyright
|
8
|
+
# notice, this list of conditions and the following disclaimer.
|
9
|
+
# * Redistributions in binary form must reproduce the above copyright
|
10
|
+
# notice, this list of conditions and the following disclaimer in the
|
11
|
+
# documentation and/or other materials provided with the distribution.
|
12
|
+
# * Neither the name of the Arxopia LLC nor the names of its contributors
|
13
|
+
# may be used to endorse or promote products derived from this software
|
14
|
+
# without specific prior written permission.
|
15
|
+
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
17
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
19
|
+
# DISCLAIMED. IN NO EVENT SHALL ARXOPIA LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
21
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
|
+
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
|
+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
+
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
|
+
|
1
27
|
module Risu
|
2
28
|
module Models
|
3
|
-
|
29
|
+
|
4
30
|
# Reference Model
|
5
31
|
#
|
6
|
-
# @author Jacob Hammack
|
7
32
|
class Reference < ActiveRecord::Base
|
8
33
|
has_many :plugins
|
9
|
-
|
34
|
+
|
10
35
|
class << self
|
11
|
-
|
36
|
+
|
12
37
|
# Queries all unique CVEs
|
13
38
|
#
|
14
39
|
def cve
|
15
40
|
where(:reference_name => "cve").select('DISTINCT value')
|
16
41
|
end
|
17
|
-
|
42
|
+
|
18
43
|
# Queries all unique CPE
|
19
44
|
#
|
20
45
|
def cpe
|
21
46
|
where(:reference_name => "cpe").select('DISTINCT value')
|
22
47
|
end
|
23
|
-
|
48
|
+
|
24
49
|
# Queries all unique BID
|
25
50
|
#
|
26
51
|
def bid
|
27
52
|
where(:reference_name => "bid").select('DISTINCT value')
|
28
53
|
end
|
29
|
-
|
54
|
+
|
30
55
|
# Queries all unique see_also
|
31
56
|
#
|
32
57
|
def see_also
|
33
58
|
where(:reference_name => "see_also").select('DISTINCT value')
|
34
59
|
end
|
35
|
-
|
60
|
+
|
36
61
|
# Queries all unique IAVA
|
37
62
|
#
|
38
63
|
def iava
|
39
64
|
where(:reference_name => "iava").select('DISTINCT value')
|
40
65
|
end
|
41
|
-
|
66
|
+
|
42
67
|
# Queries all unique MSFT
|
43
68
|
#
|
44
69
|
def msft
|
45
70
|
where(:reference_name => "msft").select('DISTINCT value')
|
46
71
|
end
|
47
|
-
|
72
|
+
|
48
73
|
# Queries all unique OSvdb
|
49
74
|
#
|
50
75
|
def osvdb
|
51
76
|
where(:reference_name => "osvdb").select('DISTINCT value')
|
52
77
|
end
|
53
|
-
|
54
|
-
# Queries all
|
78
|
+
|
79
|
+
# Queries all unique cert refs
|
55
80
|
#
|
56
81
|
def cert
|
57
82
|
where(:reference_name => "cert").select('DISTINCT value')
|
58
83
|
end
|
59
|
-
|
84
|
+
|
60
85
|
#
|
61
86
|
#
|
62
87
|
def edbid
|
63
88
|
where(:reference_name => "edb-id").select('DISTINCT value')
|
64
89
|
end
|
65
|
-
|
90
|
+
|
66
91
|
#
|
67
92
|
#
|
68
93
|
def rhsa
|
69
94
|
where(:reference_name => "rhsa").select('DISTINCT value')
|
70
95
|
end
|
71
|
-
|
96
|
+
|
72
97
|
#
|
73
98
|
#
|
74
99
|
def secunia
|
75
100
|
where(:reference_name => "secunia").select('DISTINCT value')
|
76
101
|
end
|
77
|
-
|
102
|
+
|
78
103
|
#
|
79
104
|
#
|
80
105
|
def suse
|
81
106
|
where(:reference_name => "suse").select('DISTINCT value')
|
82
107
|
end
|
83
|
-
|
108
|
+
|
84
109
|
#
|
85
110
|
#
|
86
111
|
def dsa
|
87
112
|
where(:reference_name => "dsa").select('DISTINCT value')
|
88
113
|
end
|
89
|
-
|
114
|
+
|
90
115
|
#
|
91
116
|
#
|
92
117
|
def owasp
|
93
118
|
where(:reference_name => "owasp").select('DISTINCT value')
|
94
119
|
end
|
95
|
-
|
120
|
+
|
96
121
|
#
|
97
122
|
#
|
98
123
|
def cwe
|
99
124
|
where(:reference_name => "cwe").select('DISTINCT value')
|
100
|
-
end
|
125
|
+
end
|
126
|
+
|
127
|
+
#
|
128
|
+
#
|
129
|
+
def iavb
|
130
|
+
where(:reference_name => "iavb").select('DISTINCT value')
|
131
|
+
end
|
132
|
+
|
133
|
+
#
|
134
|
+
#
|
135
|
+
def iavt
|
136
|
+
where(:reference_name => "iavt").select('DISTINCT value')
|
137
|
+
end
|
138
|
+
|
139
|
+
#
|
140
|
+
#
|
141
|
+
def cisco_sa
|
142
|
+
where(:reference_name => "cisco-sa").select('DISTINCT value')
|
143
|
+
end
|
144
|
+
|
145
|
+
#
|
146
|
+
#
|
147
|
+
def ics_alert
|
148
|
+
where(:reference_name => "ics-alert").select('DISTINCT value')
|
149
|
+
end
|
150
|
+
|
151
|
+
#
|
152
|
+
#
|
153
|
+
def cisco_bug_id
|
154
|
+
where(:reference_name => "cisco-bug-id").select('DISTINCT value')
|
155
|
+
end
|
156
|
+
|
157
|
+
#
|
158
|
+
#
|
159
|
+
def cisco_sr
|
160
|
+
where(:reference_name => "cisco-sr").select('DISTINCT value')
|
161
|
+
end
|
101
162
|
end
|
102
163
|
end
|
103
164
|
end
|
data/lib/risu/models/report.rb
CHANGED
@@ -1,31 +1,56 @@
|
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
# * Redistributions of source code must retain the above copyright
|
8
|
+
# notice, this list of conditions and the following disclaimer.
|
9
|
+
# * Redistributions in binary form must reproduce the above copyright
|
10
|
+
# notice, this list of conditions and the following disclaimer in the
|
11
|
+
# documentation and/or other materials provided with the distribution.
|
12
|
+
# * Neither the name of the Arxopia LLC nor the names of its contributors
|
13
|
+
# may be used to endorse or promote products derived from this software
|
14
|
+
# without specific prior written permission.
|
15
|
+
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
17
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
19
|
+
# DISCLAIMED. IN NO EVENT SHALL ARXOPIA LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
21
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
|
+
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
|
+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
+
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
|
+
|
1
27
|
module Risu
|
2
28
|
module Models
|
3
|
-
|
29
|
+
|
4
30
|
# Report Model
|
5
31
|
#
|
6
|
-
# @author Jacob Hammack <jacob.hammack@hammackj.com>
|
7
32
|
class Report < ActiveRecord::Base
|
8
33
|
has_many :hosts
|
9
34
|
belongs_to :policy
|
10
|
-
|
35
|
+
|
11
36
|
class << self
|
12
|
-
|
37
|
+
|
13
38
|
attr_accessor :title, :author, :company, :classification
|
14
|
-
|
39
|
+
|
15
40
|
#
|
16
41
|
#@scan_date = Host.where("start is not null").first[:start].to_s
|
17
42
|
#
|
18
43
|
def scan_date
|
19
44
|
Host.where("start is not null").first[:start]
|
20
45
|
end
|
21
|
-
|
46
|
+
|
22
47
|
#
|
23
48
|
# @todo comment this
|
24
49
|
#
|
25
50
|
def scanner_nessus_ratings_text
|
26
|
-
text = "The vulnerability scanner used by #{Report.company} rates the findings as follows: High, Medium, Low and Open Ports. 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 remediated 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"
|
51
|
+
text = "The vulnerability scanner used by #{Report.company} rates the findings as follows: High, Medium, Low and Open Ports. 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 remediated 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"
|
27
52
|
text << "After the scanner is complete, the scanner evaluates each finding and bases it on the Common Vulnerability Scoring System (CVSS) score assigned to each finding. Any findings with a CVSS base score of 10 are upgraded to a Critical finding. These represent vulnerabilities that are trivial to gain administrator access to the system, with little to no effort. For more information on the CVSS scoring system please visit: http://nvd.nist.gov/cvss.cfm.\n\n"
|
28
|
-
|
53
|
+
|
29
54
|
return text
|
30
55
|
end
|
31
56
|
end
|
@@ -1,9 +1,34 @@
|
|
1
|
+
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
|
+
# All rights reserved.
|
3
|
+
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
# * Redistributions of source code must retain the above copyright
|
8
|
+
# notice, this list of conditions and the following disclaimer.
|
9
|
+
# * Redistributions in binary form must reproduce the above copyright
|
10
|
+
# notice, this list of conditions and the following disclaimer in the
|
11
|
+
# documentation and/or other materials provided with the distribution.
|
12
|
+
# * Neither the name of the Arxopia LLC nor the names of its contributors
|
13
|
+
# may be used to endorse or promote products derived from this software
|
14
|
+
# without specific prior written permission.
|
15
|
+
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
17
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
19
|
+
# DISCLAIMED. IN NO EVENT SHALL ARXOPIA LLC BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
21
|
+
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
22
|
+
# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
23
|
+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
24
|
+
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
|
+
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
|
+
|
1
27
|
module Risu
|
2
28
|
module Models
|
3
29
|
|
4
30
|
# ServerPreference Model
|
5
31
|
#
|
6
|
-
# @author Jacob Hammack
|
7
32
|
class ServerPreference < ActiveRecord::Base
|
8
33
|
belongs_to :policy
|
9
34
|
end
|