risu 1.5.2 → 1.5.3
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/NEWS.markdown +20 -0
- data/README.markdown +2 -2
- data/Rakefile +14 -3
- data/bin/risu +1 -1
- data/lib/risu.rb +1 -1
- data/lib/risu/base/schema.rb +8 -0
- data/lib/risu/models/familyselection.rb +0 -1
- data/lib/risu/models/host.rb +60 -4
- data/lib/risu/parsers/nessus/nessus_document.rb +0 -4
- data/lib/risu/parsers/nessus/nessus_sax_listener.rb +12 -5
- data/risu.gemspec +3 -3
- metadata +2 -2
data/NEWS.markdown
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
#1.5.3 (August 29, 2012)
|
4
|
+
- New Parsed Tags
|
5
|
+
- cm_compliance_info
|
6
|
+
- cm_compliance_actual_value
|
7
|
+
- cm_compliance_check_id
|
8
|
+
- cm_compliance_policy_value
|
9
|
+
- cm_compliance_audit_file
|
10
|
+
- cm_compliance_check_name
|
11
|
+
- cm_compliance_result
|
12
|
+
- cm_compliance_output
|
13
|
+
- Model Changes
|
14
|
+
- Host
|
15
|
+
- Added os_windows_98
|
16
|
+
- Added not_os_windows_98
|
17
|
+
- Added os_windows_95
|
18
|
+
- Added not_os_windows_95
|
19
|
+
- Added os_windows_me
|
20
|
+
- Added not_os_windows_me
|
21
|
+
- Updated the unsupported operating systems text to take into account these operating systems
|
22
|
+
|
3
23
|
#1.5.2 (July 30, 2012)
|
4
24
|
- New Parsed Tags
|
5
25
|
- vmsa
|
data/README.markdown
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Risu is [Nessus](http://www.nessus.org) parser, that converts the generated reports into a [ActiveRecord](http://api.rubyonrails.org/classes/ActiveRecord/Base.html) database, this allows for easy report generation and vulnerability verification.
|
4
4
|
|
5
|
-
Version **1.5.
|
5
|
+
Version **1.5.3** is the current release.
|
6
6
|
|
7
7
|
## Requirements
|
8
8
|
|
@@ -74,7 +74,7 @@ Using the risu Console is just like using Rails. You can access all of the Activ
|
|
74
74
|
|_| |_|___/\__,_|
|
75
75
|
|
76
76
|
|
77
|
-
risu Console v1.5.
|
77
|
+
risu Console v1.5.3
|
78
78
|
>> Host.first
|
79
79
|
=> #<Risu::Models::Host id: 1, report_id: 1, name: "10.69.69.74", os: "Linux Kernel 2.6 on Debian 4.0 (etch)", mac: "XX:XX:XX:XX:XX:XX", start: "2011-04-20 16:29:37", end: "2011-04-20 16:32:14", ip: "10.69.69.74", fqdn: "redada.hammackj.net", netbios: "REDADA", local_checks_proto: nil, smb_login_used: nil, ssh_auth_meth: nil, ssh_login_used: nil, pci_dss_compliance: nil, notes: nil>
|
80
80
|
|
data/Rakefile
CHANGED
@@ -35,7 +35,12 @@ task :build do
|
|
35
35
|
system "gem build #{Risu::APP_NAME}.gemspec"
|
36
36
|
end
|
37
37
|
|
38
|
-
task :
|
38
|
+
task :tag_and_bag do
|
39
|
+
system "git tag -a v#{Risu::VERSION} -m 'version #{Risu::VERSION}'"
|
40
|
+
system "git push --tags"
|
41
|
+
end
|
42
|
+
|
43
|
+
task :release => [:tag_and_bag, :build] do
|
39
44
|
system "gem push #{Risu::APP_NAME}-#{Risu::VERSION}.gem"
|
40
45
|
puts "Just released #{Risu::APP_NAME} v#{Risu::VERSION}. #{Risu::APP_NAME} is an Nessus XML parser/database. More information at http://hammackj.com/projects/risu/"
|
41
46
|
end
|
@@ -48,8 +53,6 @@ task :clean do
|
|
48
53
|
system "rm -rf coverage"
|
49
54
|
end
|
50
55
|
|
51
|
-
task :default => [:test_sqlite]
|
52
|
-
|
53
56
|
task :test_sqlite do
|
54
57
|
ENV['RISU_TEST_ENV'] = "sqlite"
|
55
58
|
Rake::Task['run_tests'].invoke
|
@@ -65,3 +68,11 @@ Rake::TestTask.new("run_tests") do |t|
|
|
65
68
|
t.pattern = 'test/*/*_test.rb'
|
66
69
|
t.verbose = true
|
67
70
|
end
|
71
|
+
|
72
|
+
task :merge do
|
73
|
+
system "git checkout master"
|
74
|
+
system "get merge #{Risu::VERSION}"
|
75
|
+
system "git push"
|
76
|
+
end
|
77
|
+
|
78
|
+
task :default => [:test_sqlite]
|
data/bin/risu
CHANGED
data/lib/risu.rb
CHANGED
data/lib/risu/base/schema.rb
CHANGED
@@ -114,6 +114,14 @@ module Risu
|
|
114
114
|
t.integer :severity
|
115
115
|
t.string :plugin_name
|
116
116
|
t.boolean :verified
|
117
|
+
t.string :cm_compliance_info
|
118
|
+
t.string :cm_compliance_actual_value
|
119
|
+
t.string :cm_compliance_check_id
|
120
|
+
t.string :cm_compliance_policy_value
|
121
|
+
t.string :cm_compliance_audit_file
|
122
|
+
t.string :cm_compliance_check_name
|
123
|
+
t.string :cm_compliance_result
|
124
|
+
t.string :cm_compliance_output
|
117
125
|
end
|
118
126
|
|
119
127
|
create_table :plugins do |t|
|
data/lib/risu/models/host.rb
CHANGED
@@ -91,6 +91,48 @@ module Risu
|
|
91
91
|
where("os NOT LIKE '%Windows NT%'")
|
92
92
|
end
|
93
93
|
|
94
|
+
# Queries for hosts with a Windows 98 based Operating System
|
95
|
+
#
|
96
|
+
# @return [ActiveRecord::Relation] with the query results
|
97
|
+
def os_windows_98
|
98
|
+
where("os LIKE '%Windows 98%'")
|
99
|
+
end
|
100
|
+
|
101
|
+
# Negation query for all hosts with a Windows 98 based Operating system
|
102
|
+
#
|
103
|
+
# @return [ActiveRecord::Relation] with the query results
|
104
|
+
def not_os_windows_98
|
105
|
+
where("os NOT LIKE '%Windows 98%'")
|
106
|
+
end
|
107
|
+
|
108
|
+
# Queries for hosts with a Windows 98 based Operating System
|
109
|
+
#
|
110
|
+
# @return [ActiveRecord::Relation] with the query results
|
111
|
+
def os_windows_me
|
112
|
+
where("os LIKE '%Windows 98%'")
|
113
|
+
end
|
114
|
+
|
115
|
+
# Negation query for all hosts with a Windows 98 based Operating system
|
116
|
+
#
|
117
|
+
# @return [ActiveRecord::Relation] with the query results
|
118
|
+
def not_os_windows_me
|
119
|
+
where("os NOT LIKE '%Windows Millennium%'")
|
120
|
+
end
|
121
|
+
|
122
|
+
# Queries for hosts with a Windows 95 based Operating System
|
123
|
+
#
|
124
|
+
# @return [ActiveRecord::Relation] with the query results
|
125
|
+
def os_windows_95
|
126
|
+
where("os LIKE '%Windows 95%'")
|
127
|
+
end
|
128
|
+
|
129
|
+
# Negation query for all hosts with a Windows 95 based Operating system
|
130
|
+
#
|
131
|
+
# @return [ActiveRecord::Relation] with the query results
|
132
|
+
def not_os_windows_95
|
133
|
+
where("os NOT LIKE '%Windows 95%'")
|
134
|
+
end
|
135
|
+
|
94
136
|
# Queries for hosts with a Windows 2000 based Operating System
|
95
137
|
#
|
96
138
|
# @return [ActiveRecord::Relation] with the query results
|
@@ -454,21 +496,35 @@ module Risu
|
|
454
496
|
|
455
497
|
# @todo comments
|
456
498
|
def unsupported_os_windows
|
499
|
+
win_95_text = ""
|
500
|
+
win_98_text = ""
|
501
|
+
win_me_text = ""
|
457
502
|
win_nt_text = ""
|
458
503
|
win_2000_text = ""
|
504
|
+
win_95 = Host.os_windows_95
|
505
|
+
win_98 = Host.os_windows_98
|
506
|
+
win_me = Host.os_windows_me
|
459
507
|
win_nt = Host.os_windows_nt
|
460
508
|
win_2000 = Host.os_windows_2k
|
461
509
|
|
462
510
|
#Host.os_windows.not_os_windows_7.not_os_windows_2008.not_os_windows_vista.not_os_windows_2003.not_os_windows_xp
|
463
511
|
|
464
|
-
|
512
|
+
win_95_text = "Windows 95 is an unsupported operating system; Microsoft has stopped support as of December 2001. " +
|
513
|
+
"Please see http://en.wikipedia.org/wiki/Windows_95 for more information.\n\n" if win_95.count >= 1
|
514
|
+
|
515
|
+
win_98_text = "Windows 98 is an unsupported operating system; Microsoft has stopped support as of July 2006. " +
|
516
|
+
"Please see http://support.microsoft.com/gp/lifean18 for more information.\n\n" if win_98.count >= 1
|
517
|
+
|
518
|
+
win_me_text = "Windows Millennium is an unsupported operating system; Microsoft has stopped support as of July 2006. " +
|
519
|
+
"Please see http://support.microsoft.com/gp/lifean18 for more information.\n\n" if win_me.count >= 1
|
520
|
+
|
521
|
+
win_nt_text = "Windows NT is an unsupported operating system; Microsoft has stopped support as of December 2004. " +
|
465
522
|
"Please see http://windows.microsoft.com/en-us/windows/products/lifecycle for more information.\n\n" if win_nt.count >= 1
|
466
523
|
|
467
|
-
win_2000_text = "Windows 2000 is an unsupported operating system; Microsoft has stopped support as of
|
524
|
+
win_2000_text = "Windows 2000 is an unsupported operating system; Microsoft has stopped support as of July 2010. " +
|
468
525
|
"Please see http://windows.microsoft.com/en-us/windows/products/lifecycle for more information.\n\n" if win_2000.count >= 1
|
469
526
|
|
470
|
-
return "#{win_nt_text}#{win_2000_text}"
|
471
|
-
|
527
|
+
return "#{win_95_text}#{win_98_text}#{win_me_text}#{win_nt_text}#{win_2000_text}"
|
472
528
|
end
|
473
529
|
|
474
530
|
# @todo comments
|
@@ -29,11 +29,9 @@ module Risu
|
|
29
29
|
module Nessus
|
30
30
|
|
31
31
|
# A Object to represents the Nessus XML file in memory
|
32
|
-
#
|
33
32
|
class NessusDocument
|
34
33
|
|
35
34
|
# Creates a instance of the NessusDocument class
|
36
|
-
#
|
37
35
|
def initialize document
|
38
36
|
@document = document
|
39
37
|
end
|
@@ -68,7 +66,6 @@ module Risu
|
|
68
66
|
end
|
69
67
|
|
70
68
|
# Invokes the SAX parser on the XML document
|
71
|
-
#
|
72
69
|
def parse
|
73
70
|
@parser = LibXML::XML::SaxParser.file @document
|
74
71
|
@parser.callbacks = NessusSaxListener.new
|
@@ -76,7 +73,6 @@ module Risu
|
|
76
73
|
end
|
77
74
|
|
78
75
|
# Fixes the ip field if nil and replaces it with the name if its an ip
|
79
|
-
#
|
80
76
|
def fix_ips
|
81
77
|
@hosts = Host.all
|
82
78
|
|
@@ -24,8 +24,6 @@
|
|
24
24
|
#OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
25
25
|
#OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
26
|
|
27
|
-
#require 'risu'
|
28
|
-
|
29
27
|
ActiveRecord::Migration.verbose = false
|
30
28
|
|
31
29
|
module Risu
|
@@ -33,12 +31,10 @@ module Risu
|
|
33
31
|
module Nessus
|
34
32
|
|
35
33
|
# NessusSaxListener
|
36
|
-
#
|
37
34
|
class NessusSaxListener
|
38
35
|
include LibXML::XML::SaxParser::Callbacks
|
39
36
|
|
40
37
|
# Sets up a array of all valid XML fields
|
41
|
-
#
|
42
38
|
def initialize
|
43
39
|
@vals = Hash.new
|
44
40
|
|
@@ -58,7 +54,9 @@ module Risu
|
|
58
54
|
"Report", "Family", "Preferences", "PluginsPreferences", "FamilySelection", "IndividualPluginSelection", "PluginId",
|
59
55
|
"pci-dss-compliance", "exploitability_ease", "cvss_temporal_vector", "exploit_framework_core", "cvss_temporal_score",
|
60
56
|
"exploit_available", "metasploit_name", "exploit_framework_canvas", "canvas_package", "exploit_framework_metasploit",
|
61
|
-
"plugin_type", "exploithub_sku", "exploit_framework_exploithub", "stig_severity", "plugin_name", "fname", "always_run"
|
57
|
+
"plugin_type", "exploithub_sku", "exploit_framework_exploithub", "stig_severity", "plugin_name", "fname", "always_run",
|
58
|
+
"cm:compliance-info", "cm:compliance-actual-value", "cm:compliance-check-id", "cm:compliance-policy-value",
|
59
|
+
"cm:compliance-audit-file", "cm:compliance-check-name", "cm:compliance-result", "cm:compliance-output"
|
62
60
|
]
|
63
61
|
|
64
62
|
@valid_elements = @valid_elements + @valid_references
|
@@ -274,6 +272,15 @@ module Risu
|
|
274
272
|
when "ReportItem"
|
275
273
|
@ri.plugin_output = @vals["plugin_output"]
|
276
274
|
@ri.plugin_name = @vals["plugin_name"]
|
275
|
+
@ri.cm_compliance_info = @vals["cm:compliance-info"]
|
276
|
+
@ri.cm_compliance_actual_value = @vals["cm:compliance-actual-value"]
|
277
|
+
@ri.cm_compliance_check_id = @vals["cm:compliance-check-id"]
|
278
|
+
@ri.cm_compliance_policy_value= @vals["cm:compliance-policy-value"]
|
279
|
+
@ri.cm_compliance_audit_file = @vals["cm:compliance-audit-file"]
|
280
|
+
@ri.cm_compliance_check_name = @vals["cm:compliance-check-name"]
|
281
|
+
@ri.cm_compliance_result = @vals["cm:compliance-result"]
|
282
|
+
@ri.cm_compliance_output = @vals["cm:compliance-output"]
|
283
|
+
|
277
284
|
@ri.save
|
278
285
|
|
279
286
|
@plugin.attributes = {
|
data/risu.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Copyright (c) 2010-2012 Arxopia LLC.
|
2
2
|
# All rights reserved.
|
3
|
-
|
3
|
+
#
|
4
4
|
# Redistribution and use in source and binary forms, with or without
|
5
5
|
# modification, are permitted provided that the following conditions are met:
|
6
|
-
|
6
|
+
#
|
7
7
|
# * Redistributions of source code must retain the above copyright
|
8
8
|
# notice, this list of conditions and the following disclaimer.
|
9
9
|
# * Redistributions in binary form must reproduce the above copyright
|
@@ -12,7 +12,7 @@
|
|
12
12
|
# * Neither the name of the Arxopia LLC nor the names of its contributors
|
13
13
|
# may be used to endorse or promote products derived from this software
|
14
14
|
# without specific prior written permission.
|
15
|
-
|
15
|
+
#
|
16
16
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
17
17
|
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
18
18
|
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: risu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-08-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: simplecov
|