risu 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data/KNOWNISSUES.markdown +4 -4
- data/NEWS.markdown +10 -4
- data/README.markdown +29 -28
- data/Rakefile +5 -9
- data/TODO.markdown +8 -14
- data/bin/risu +2 -2
- data/lib/{nessusdb.rb → risu.rb} +10 -10
- data/lib/risu/cli.rb +9 -0
- data/lib/{nessusdb → risu}/cli/application.rb +13 -13
- data/lib/risu/cli/banner.rb +61 -0
- data/lib/risu/exceptions.rb +8 -0
- data/lib/{nessusdb → risu}/exceptions/invaliddocument.rb +1 -1
- data/lib/{nessusdb → risu}/listener.rb +6 -6
- data/lib/risu/models.rb +18 -0
- data/lib/{nessusdb → risu}/models/familyselection.rb +1 -1
- data/lib/{nessusdb → risu}/models/host.rb +1 -1
- data/lib/{nessusdb → risu}/models/individualpluginselection.rb +1 -1
- data/lib/{nessusdb → risu}/models/item.rb +1 -1
- data/lib/{nessusdb → risu}/models/plugin.rb +1 -1
- data/lib/{nessusdb → risu}/models/pluginspreference.rb +1 -1
- data/lib/{nessusdb → risu}/models/policy.rb +1 -1
- data/lib/{nessusdb → risu}/models/reference.rb +1 -1
- data/lib/{nessusdb → risu}/models/report.rb +1 -1
- data/lib/{nessusdb → risu}/models/serverpreference.rb +1 -1
- data/lib/{nessusdb → risu}/models/version.rb +1 -1
- data/lib/{nessusdb → risu}/nessusdocument.rb +1 -1
- data/lib/{nessusdb → risu}/parsers.rb +2 -2
- data/lib/{nessusdb → risu}/prawn_templater.rb +1 -1
- data/lib/{nessusdb → risu}/schema.rb +2 -2
- data/lib/{nessusdb → risu}/templates/assets.rb +0 -0
- data/lib/{nessusdb → risu}/templates/cover_sheet.rb +0 -0
- data/lib/{nessusdb → risu}/templates/data/nessuslogo.jpg +0 -0
- data/lib/{nessusdb → risu}/templates/exec_summary.rb +0 -0
- data/lib/{nessusdb → risu}/templates/executive_summary.rb +0 -0
- data/lib/{nessusdb → risu}/templates/finding_statistics.rb +0 -0
- data/lib/{nessusdb → risu}/templates/findings_host.rb +0 -0
- data/lib/{nessusdb → risu}/templates/findings_summary.rb +0 -0
- data/lib/{nessusdb → risu}/templates/findings_summary_with_pluginid.rb +0 -0
- data/lib/{nessusdb → risu}/templates/graphs.rb +0 -0
- data/lib/{nessusdb → risu}/templates/host_summary.rb +0 -0
- data/lib/{nessusdb → risu}/templates/ms_patch_summary.rb +0 -0
- data/lib/{nessusdb → risu}/templates/ms_update_summary.rb +0 -0
- data/lib/{nessusdb → risu}/templates/pci_compliance.rb +0 -0
- data/lib/{nessusdb → risu}/templates/technical_findings.rb +0 -0
- data/risu.gemspec +8 -8
- metadata +40 -40
- data/lib/nessusdb/cli.rb +0 -9
- data/lib/nessusdb/cli/banner.rb +0 -25
- data/lib/nessusdb/exceptions.rb +0 -8
- data/lib/nessusdb/models.rb +0 -18
data/KNOWNISSUES.markdown
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
## RMagick Breaks on ImageMagick Updates
|
4
4
|
The easy way to fix this is to just reinstall RMagick, like below:
|
5
5
|
|
6
|
-
[hammackj@taco:~/Projects/public/
|
6
|
+
[hammackj@taco:~/Projects/public/risu]$ risu
|
7
7
|
/Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick2.bundle: This installation of RMagick was configured with ImageMagick 6.6.5 but ImageMagick 6.6.7-0 is in use. (RuntimeError)
|
8
8
|
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
|
9
9
|
from /Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:11
|
@@ -17,12 +17,12 @@ The easy way to fix this is to just reinstall RMagick, like below:
|
|
17
17
|
from /Library/Ruby/Gems/1.8/gems/gruff-0.3.6/lib/gruff.rb:5
|
18
18
|
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:34:in `gem_original_require'
|
19
19
|
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:34:in `require'
|
20
|
-
from ./bin/../lib/
|
20
|
+
from ./bin/../lib/risu.rb:10
|
21
21
|
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
|
22
22
|
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
|
23
|
-
from ./bin/
|
23
|
+
from ./bin/risu:22
|
24
24
|
|
25
|
-
[hammackj@taco:~/Projects/public/
|
25
|
+
[hammackj@taco:~/Projects/public/risu]$ sudo gem install rmagick
|
26
26
|
|
27
27
|
## Mac OSX Native Dependencies
|
28
28
|
The gems for mysql and rmagick will fail to build if these are not installed.
|
data/NEWS.markdown
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# News
|
2
2
|
|
3
|
+
#1.4.4 (May 28, 2011)
|
4
|
+
- NessusDB has been renamed to risu
|
5
|
+
- Fixed a bug in --create-config, where tabs were being inserted with spaces
|
6
|
+
- Fixed a bug in load_config where the exception was not printed.
|
7
|
+
- Added more banners to the console for fun
|
8
|
+
|
3
9
|
#1.4.3 (May 23, 2011)
|
4
10
|
|
5
11
|
**This is the last release under the NessusDB name, I received a legal notice to change the name. They gave me a few weeks to change the name but I do not have a new name yet. If you have any suggestions please submit them to jacob.hammack[@]hammackj.com**
|
@@ -43,9 +49,9 @@
|
|
43
49
|
- Simple list of findings by host, in findings_host.rb [Ticket #27]
|
44
50
|
|
45
51
|
# 1.3.0 (March 4, 2011)
|
46
|
-
**Command line options have changed slightly, run
|
52
|
+
**Command line options have changed slightly, run risu -? for a full list of commands**
|
47
53
|
|
48
|
-
**The default config file name is now
|
54
|
+
**The default config file name is now risu.cfg**
|
49
55
|
|
50
56
|
- New templates
|
51
57
|
- Microsoft Patches Summary
|
@@ -61,7 +67,7 @@
|
|
61
67
|
- Cleaned up the graphs to be a little easier to read
|
62
68
|
- Added significantly more error checking to the command line application
|
63
69
|
- Updated the config file format to handle all of the report generation options as well as the database configuration options
|
64
|
-
- Added a command line option for passing it a config file to use instead of forcing the default ./
|
70
|
+
- Added a command line option for passing it a config file to use instead of forcing the default ./risu.cfg
|
65
71
|
- Migrated to OptionParser Choice seems to be an abandoned gem with bugs
|
66
72
|
- Updated all the Migration code to use the new AR3 format
|
67
73
|
|
@@ -105,7 +111,7 @@
|
|
105
111
|
- Moved to prawn for pdf output
|
106
112
|
- added templates for the new prawn output
|
107
113
|
- added checks to warn when there are new xml tags
|
108
|
-
- moved everything into the
|
114
|
+
- moved everything into the risu executable
|
109
115
|
- cleaned up the code
|
110
116
|
|
111
117
|
# 0.6.5 (August 15, 2010)
|
data/README.markdown
CHANGED
@@ -1,16 +1,16 @@
|
|
1
|
-
#
|
1
|
+
# risu
|
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.4.
|
5
|
+
Version 1.4.4 is the current release.
|
6
6
|
|
7
7
|
## Requirements
|
8
8
|
|
9
9
|
### Ruby
|
10
|
-
|
10
|
+
Risu has been tested with ruby-1.8.7-p334, ruby-1.9.1-p431, ruby-1.9.2-p180. Please try to use one of these versions if possible. I recommend using RVM to setup your ruby environment you can get it [here](https://rvm.beginrescueend.com/).
|
11
11
|
|
12
12
|
### RubyGems
|
13
|
-
|
13
|
+
Risu relies heavily on RubyGems to install other dependencies I highly recommend using it. RubyGems is included by default in the Ruby 1.9 branches.
|
14
14
|
|
15
15
|
- libxml
|
16
16
|
- rails
|
@@ -23,32 +23,32 @@ NessusDB relies heavily on RubyGems to install other dependencies I highly recom
|
|
23
23
|
|
24
24
|
## Developmental Requirements
|
25
25
|
|
26
|
-
These are all available through [RubyGems](http://rubygems.org/). The should be installed automatically when you install
|
26
|
+
These are all available through [RubyGems](http://rubygems.org/). The should be installed automatically when you install risu, If not this command will install them all:
|
27
27
|
|
28
28
|
% gem install rmagick gruff prawn sham faker rspec rcov machinist yard mysql libxml-ruby rails sqlite3 logger yaml
|
29
29
|
|
30
30
|
**You my need sudo/root access depending on your system setup**
|
31
31
|
|
32
|
-
Any database that ActiveRecord supports should work.
|
32
|
+
Any database that ActiveRecord supports should work. Risu has been tested with [MySQL](http://www.mysql.com/) and [SQLite3](http://sqlite.org/).
|
33
33
|
|
34
34
|
## Installation
|
35
35
|
Installation is really easy just gem install!
|
36
36
|
|
37
|
-
% gem install
|
37
|
+
% gem install risu
|
38
38
|
|
39
39
|
## Database Setup
|
40
40
|
|
41
|
-
%
|
42
|
-
% $EDITOR
|
43
|
-
%
|
41
|
+
% risu --create-config
|
42
|
+
% $EDITOR risu.cfg
|
43
|
+
% risu --create-tables
|
44
44
|
|
45
|
-
1. Generate the
|
46
|
-
2. Edit the
|
45
|
+
1. Generate the risu.cfg file.
|
46
|
+
2. Edit the risu.cfg file, filling in the variables as needed.
|
47
47
|
3. Migrate the database schema.
|
48
48
|
|
49
49
|
## Parsing Nessus Output
|
50
50
|
|
51
|
-
%
|
51
|
+
% risu report1.nessus [report2.nessus ...]
|
52
52
|
|
53
53
|
1. Parse the files by passing their names on the command line.
|
54
54
|
|
@@ -59,23 +59,24 @@ The data can be viewed with a query browser available for your database. A Rails
|
|
59
59
|
## Generating Reports
|
60
60
|
To generate a report please execute the following after the the data is parsed into the database.
|
61
61
|
|
62
|
-
%
|
62
|
+
% risu -t "TEMPLATE_PATH" -o "REPORT_NAME.pdf"
|
63
63
|
|
64
|
-
##
|
64
|
+
## Risu Console
|
65
65
|
|
66
|
-
Using the
|
66
|
+
Using the risu Console is just like using Rails. You can access all of the ActiveRecord models directly and pull specific data from each model. Like SQL only easier!
|
67
67
|
|
68
|
-
[hammackj@taco:~/Projects/public/
|
68
|
+
[hammackj@taco:~/Projects/public/risu]$ ../bin/risu --console
|
69
69
|
|
70
|
-
|
71
|
-
_ __
|
72
|
-
| '
|
73
|
-
| |
|
74
|
-
|_|
|
70
|
+
_
|
71
|
+
_ __(_)___ _ _
|
72
|
+
| '__| / __| | | |
|
73
|
+
| | | \__ \ |_| |
|
74
|
+
|_| |_|___/\__,_|
|
75
75
|
|
76
|
-
|
76
|
+
|
77
|
+
risu Console v1.4.4
|
77
78
|
>> Host.first
|
78
|
-
=> #<
|
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>
|
79
80
|
|
80
81
|
## Templates
|
81
82
|
Several templates are included:
|
@@ -93,11 +94,11 @@ Several templates are included:
|
|
93
94
|
11. cover_sheet.rb - a example coversheet report
|
94
95
|
12. findings_host.rb - list of findings per host
|
95
96
|
|
96
|
-
The templates are located in the
|
97
|
+
The templates are located in the risu/templates folder, where ever the gem was installed. On a typical Mac OSX install the path is:
|
97
98
|
|
98
99
|
[hammackj@taco:~]$ ruby -v
|
99
100
|
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
|
100
|
-
[hammackj@taco:~]$ l /Library/Ruby/Gems/1.8/gems/
|
101
|
+
[hammackj@taco:~]$ l /Library/Ruby/Gems/1.8/gems/risu-1.4.0/lib/risu/templates/
|
101
102
|
total 40
|
102
103
|
drwxr-xr-x 7 hammackj admin 238B Oct 21 19:24 ./
|
103
104
|
drwxr-xr-x 8 hammackj admin 272B Oct 21 19:24 ../
|
@@ -120,7 +121,7 @@ The templates are located in the nessusdb/templates folder, where ever the gem w
|
|
120
121
|
The templates are written in ruby using [prawn](http://prawn.majesticseacreature.com/), they are fairly easy to make. I will add any templates as requested.
|
121
122
|
|
122
123
|
# Issues
|
123
|
-
If you have any problems, bugs or feature requests please use the [github issue tracker](http://github.com/hammackj/
|
124
|
+
If you have any problems, bugs or feature requests please use the [github issue tracker](http://github.com/hammackj/risu/issues).
|
124
125
|
|
125
126
|
# Contact
|
126
127
|
You can reach me at jacob[dot]hammack[at]hammackj[dot]com.
|
data/Rakefile
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
2
2
|
|
3
3
|
require 'rubygems' # not sure why...
|
4
|
-
require "
|
4
|
+
require "risu"
|
5
5
|
require 'rake'
|
6
6
|
require 'rspec/core/rake_task'
|
7
7
|
|
8
8
|
task :build do
|
9
|
-
system "gem build
|
9
|
+
system "gem build #{Risu::APP_NAME}.gemspec"
|
10
10
|
end
|
11
11
|
|
12
12
|
task :release => :build do
|
13
|
-
system "gem push
|
13
|
+
system "gem push #{Risu::APP_NAME}-#{Risu::VERSION}.gem"
|
14
14
|
|
15
|
-
puts "Just released
|
15
|
+
puts "Just released #{Risu::APP_NAME} v#{Risu::VERSION}. #{Risu::APP_NAME} is always available in RubyGems!"
|
16
16
|
end
|
17
17
|
|
18
18
|
task :clean do
|
@@ -29,9 +29,5 @@ task :report do
|
|
29
29
|
end
|
30
30
|
|
31
31
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
32
|
-
|
33
|
-
Rake::Task['report'].invoke
|
34
|
-
|
35
|
-
# t.rcov = true
|
36
|
-
# t.rcov_opts = ['--exclude osx\/objc,gems\/,spec\/,features\/', 'specs']
|
32
|
+
Rake::Task['report'].invoke
|
37
33
|
end
|
data/TODO.markdown
CHANGED
@@ -3,26 +3,20 @@
|
|
3
3
|
**Release dates are estimates, and features can be changed at any time.**
|
4
4
|
|
5
5
|
## 1.4.5 (May)
|
6
|
-
|
7
|
-
- Possible Names
|
8
|
-
- ndb (Want to get away from the DB stuff)
|
9
|
-
- fender
|
10
|
-
- Euenos
|
11
|
-
- camara
|
12
|
-
- Hayabusa (Falcon)
|
13
|
-
- Taka (Hawk)
|
14
|
-
- Fukurou (owl) **
|
15
|
-
- risu (squirrel) ***
|
16
|
-
- Bunseki (analysis)
|
6
|
+
|
17
7
|
- Add a CVSS risk factor graph
|
18
|
-
- Update Assets templates to use this if possible http://www.nessus.org/plugins/index.php?view=single&id=54615
|
8
|
+
- Update Assets templates to use this if possible plugin: http://www.nessus.org/plugins/index.php?view=single&id=54615 for extra data
|
19
9
|
|
20
10
|
## 1.5 (7/4/2011)
|
21
11
|
- Clean up / Bug fixes before 2.0
|
22
12
|
- Create rSpec tests for everything (100% code coverage goal)
|
23
13
|
- Parser tests
|
14
|
+
- Add test for new xml element
|
15
|
+
- Add test for new host properties tag
|
24
16
|
- application specs
|
25
17
|
- Add a failed load_config() test
|
18
|
+
- add test for load config from file
|
19
|
+
- add test for non existent config file
|
26
20
|
- models tests
|
27
21
|
- policy
|
28
22
|
- family selection
|
@@ -39,7 +33,7 @@
|
|
39
33
|
- 100% code coverage for testing
|
40
34
|
- Rework the blacklisting stuff
|
41
35
|
- Add blacklisting to config
|
42
|
-
- Add Schema checks to make sure the schema is compatible with the version of
|
36
|
+
- Add Schema checks to make sure the schema is compatible with the version of risu
|
43
37
|
- Check to see that the xml is version 2
|
44
38
|
- Version 1 = NessusClientData
|
45
39
|
- Version 2 = NessusClientData_V2
|
@@ -66,4 +60,4 @@
|
|
66
60
|
- Look at moving to nokogiri for xml parsing, current benchmarks so it faster than libxml-ruby; http://nokogiri.org
|
67
61
|
|
68
62
|
## 2.0 (12/4/2011)
|
69
|
-
- Rails FrontEnd to
|
63
|
+
- Rails FrontEnd to Risu
|
data/bin/risu
CHANGED
data/lib/{nessusdb.rb → risu.rb}
RENAMED
@@ -1,8 +1,8 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
module
|
3
|
+
module Risu
|
4
4
|
APP_NAME = "risu"
|
5
|
-
VERSION = "1.4.
|
5
|
+
VERSION = "1.4.4"
|
6
6
|
GRAPH_WIDTH = 750
|
7
7
|
EMAIL = "jacob.hammack@hammackj.com"
|
8
8
|
CONFIG_FILE = "./risu.cfg"
|
@@ -24,15 +24,15 @@ require 'irb'
|
|
24
24
|
require 'optparse'
|
25
25
|
|
26
26
|
if ActiveRecord::Base.connected? == true
|
27
|
-
require '
|
27
|
+
require 'risu/schema'
|
28
28
|
end
|
29
29
|
|
30
|
-
require '
|
31
|
-
require '
|
32
|
-
require '
|
30
|
+
require 'risu/listener'
|
31
|
+
require 'risu/prawn_templater'
|
32
|
+
require 'risu/nessusdocument'
|
33
33
|
|
34
|
-
require '
|
35
|
-
require '
|
36
|
-
require '
|
34
|
+
require 'risu/cli'
|
35
|
+
require 'risu/exceptions'
|
36
|
+
require 'risu/models'
|
37
37
|
|
38
|
-
include
|
38
|
+
include Risu::Models
|
data/lib/risu/cli.rb
ADDED
@@ -1,9 +1,9 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
module
|
3
|
+
module Risu
|
4
4
|
module CLI
|
5
5
|
|
6
|
-
# Application class for
|
6
|
+
# Application class for Risu
|
7
7
|
#
|
8
8
|
# @author Jacob Hammack <jacob.hammack@hammackj.com>
|
9
9
|
class Application
|
@@ -88,12 +88,12 @@ module NessusDB
|
|
88
88
|
end
|
89
89
|
|
90
90
|
ActiveRecord::Base.establish_connection(@database)
|
91
|
-
require '
|
91
|
+
require 'risu/schema'
|
92
92
|
Schema.migrate(direction)
|
93
93
|
|
94
94
|
if direction == :up
|
95
95
|
ver = Version.create
|
96
|
-
ver.version =
|
96
|
+
ver.version = Risu::VERSION
|
97
97
|
ver.save
|
98
98
|
end
|
99
99
|
|
@@ -238,11 +238,11 @@ module NessusDB
|
|
238
238
|
@options[:test_connection] = option
|
239
239
|
end
|
240
240
|
|
241
|
-
opt.on('--create-tables',
|
241
|
+
opt.on('--create-tables',"Creates the tables required for #{APP_NAME}") do |option|
|
242
242
|
@options[:create_tables] = option
|
243
243
|
end
|
244
244
|
|
245
|
-
opt.on('--drop-tables',
|
245
|
+
opt.on('--drop-tables', "Deletes the tables and data from #{APP_NAME}") do |option|
|
246
246
|
@options[:drop_tables] = option
|
247
247
|
end
|
248
248
|
|
@@ -302,8 +302,8 @@ module NessusDB
|
|
302
302
|
|
303
303
|
if @options[:console] != nil
|
304
304
|
consolize do
|
305
|
-
puts
|
306
|
-
puts "
|
305
|
+
puts Risu::CLI::Banner
|
306
|
+
puts "#{APP_NAME} Console v#{VERSION}"
|
307
307
|
end
|
308
308
|
exit
|
309
309
|
end
|
@@ -346,11 +346,11 @@ module NessusDB
|
|
346
346
|
begin
|
347
347
|
parse_file file
|
348
348
|
|
349
|
-
rescue
|
349
|
+
rescue Risu::Exceptions::InvalidDocument => id
|
350
350
|
puts "[!] #{id.message}"
|
351
351
|
next
|
352
352
|
rescue ActiveRecord::StatementInvalid => si
|
353
|
-
puts "[!] Please run
|
353
|
+
puts "[!] Please run #{Risu::APP_NAME} --create-tables, to create the required database schema!"
|
354
354
|
exit
|
355
355
|
rescue => e
|
356
356
|
puts e.inspect
|
@@ -368,7 +368,7 @@ module NessusDB
|
|
368
368
|
tstart = Time.new
|
369
369
|
|
370
370
|
if File.exists?(file) == false
|
371
|
-
raise
|
371
|
+
raise Risu::Exceptions::InvalidDocument, "[!] Document does not exist - #{file}"
|
372
372
|
end
|
373
373
|
|
374
374
|
doc = NessusDocument.new file
|
@@ -380,7 +380,7 @@ module NessusDB
|
|
380
380
|
doc.fix_ips
|
381
381
|
|
382
382
|
else
|
383
|
-
raise
|
383
|
+
raise Risu::Exceptions::InvalidDocument, "[!] Invalid Document - #{file}"
|
384
384
|
end
|
385
385
|
|
386
386
|
printf "[*] Finished parsing %s. Parse took %.02f seconds\n", file, Time.now - tstart
|
@@ -389,7 +389,7 @@ module NessusDB
|
|
389
389
|
exit(1)
|
390
390
|
rescue Mysql::Error => m
|
391
391
|
if m.errno == 1146
|
392
|
-
puts "[!] Error: Tables were not created. Please run
|
392
|
+
puts "[!] Error: Tables were not created. Please run #{Risu::APP_NAME} --create-tables"
|
393
393
|
exit(1)
|
394
394
|
end
|
395
395
|
rescue => e
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
#Cool random banner stuff for the cli, based on the metasploit random banner stuff
|
4
|
+
|
5
|
+
module Risu
|
6
|
+
module CLI
|
7
|
+
module Banner
|
8
|
+
Banners =
|
9
|
+
[
|
10
|
+
'
|
11
|
+
_
|
12
|
+
_ __(_)___ _ _
|
13
|
+
| \'__| / __| | | |
|
14
|
+
| | | \__ \ |_| |
|
15
|
+
|_| |_|___/\__,_|
|
16
|
+
|
17
|
+
|
18
|
+
',
|
19
|
+
'
|
20
|
+
_
|
21
|
+
(_)
|
22
|
+
_ __ _ ___ _ _
|
23
|
+
| \'__| / __| | | |
|
24
|
+
| | | \__ \ |_| |
|
25
|
+
|_| |_|___/\__,_|
|
26
|
+
|
27
|
+
|
28
|
+
',
|
29
|
+
'
|
30
|
+
_/
|
31
|
+
_/ _/_/ _/_/_/ _/ _/
|
32
|
+
_/_/ _/ _/_/ _/ _/
|
33
|
+
_/ _/ _/_/ _/ _/
|
34
|
+
_/ _/ _/_/_/ _/_/_/
|
35
|
+
|
36
|
+
|
37
|
+
',
|
38
|
+
'
|
39
|
+
o
|
40
|
+
,_ ,
|
41
|
+
/ | | / \_| |
|
42
|
+
|_/|_/ \/ \_/|_/
|
43
|
+
|
44
|
+
|
45
|
+
',
|
46
|
+
'
|
47
|
+
_
|
48
|
+
____(_)__ __ __
|
49
|
+
/ __/ (_-</ // /
|
50
|
+
/_/ /_/___/\_,_/
|
51
|
+
|
52
|
+
|
53
|
+
'
|
54
|
+
]
|
55
|
+
|
56
|
+
def self.to_s
|
57
|
+
Banners[rand(Banners.length)]
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require
|
3
|
+
require 'risu'
|
4
4
|
|
5
|
-
module
|
5
|
+
module Risu
|
6
6
|
|
7
7
|
# NessusSaxListener
|
8
8
|
#
|
@@ -82,12 +82,12 @@ module NessusDB
|
|
82
82
|
@vals[@tag] = ""
|
83
83
|
|
84
84
|
if !@valid_elements.include?(element)
|
85
|
-
puts "New XML element detected: #{element}. Please report this to #{
|
85
|
+
puts "New XML element detected: #{element}. Please report this to #{Risu::EMAIL}"
|
86
86
|
end
|
87
87
|
|
88
88
|
case element
|
89
89
|
when "Policy"
|
90
|
-
@policy =
|
90
|
+
@policy = Risu::Models::Policy.create
|
91
91
|
@policy.save
|
92
92
|
when "preference"
|
93
93
|
@sp = @policy.server_preferences.create
|
@@ -122,9 +122,9 @@ module NessusDB
|
|
122
122
|
@vals = Hash.new # have to clear this out or everything has the same references
|
123
123
|
@ri = @rh.items.create
|
124
124
|
if attributes["pluginID"] == "0"
|
125
|
-
@plugin =
|
125
|
+
@plugin = Risu::Models::Plugin.find_or_create_by_id(1)
|
126
126
|
else
|
127
|
-
@plugin =
|
127
|
+
@plugin = Risu::Models::Plugin.find_or_create_by_id(attributes["pluginID"])
|
128
128
|
end
|
129
129
|
|
130
130
|
@ri.port = attributes["port"]
|
data/lib/risu/models.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module Risu
|
4
|
+
module Models
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
require 'risu/models/host'
|
9
|
+
require 'risu/models/familyselection'
|
10
|
+
require 'risu/models/item'
|
11
|
+
require 'risu/models/individualpluginselection'
|
12
|
+
require 'risu/models/plugin'
|
13
|
+
require 'risu/models/pluginspreference'
|
14
|
+
require 'risu/models/serverpreference'
|
15
|
+
require 'risu/models/report'
|
16
|
+
require 'risu/models/reference'
|
17
|
+
require 'risu/models/policy'
|
18
|
+
require 'risu/models/version'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/risu.gemspec
CHANGED
@@ -4,14 +4,14 @@ base = __FILE__
|
|
4
4
|
$:.unshift(File.join(File.dirname(base), 'lib'))
|
5
5
|
|
6
6
|
require 'rubygems'
|
7
|
-
require '
|
7
|
+
require 'risu'
|
8
8
|
|
9
9
|
Gem::Specification.new do |s|
|
10
|
-
s.name = "#{
|
11
|
-
s.version =
|
12
|
-
s.homepage = "http://www.hammackj.com/"
|
13
|
-
s.summary = "#{
|
14
|
-
s.description = "#{
|
10
|
+
s.name = "#{Risu::APP_NAME}"
|
11
|
+
s.version = Risu::VERSION
|
12
|
+
s.homepage = "http://www.hammackj.com/projects/risu"
|
13
|
+
s.summary = "#{Risu::APP_NAME}"
|
14
|
+
s.description = "#{Risu::APP_NAME} is a Nessus .nessus xml parser and report generation tool"
|
15
15
|
s.license = "BSD"
|
16
16
|
|
17
17
|
s.author = "Jacob Hammack"
|
@@ -19,13 +19,13 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
s.files = Dir['[A-Z]*'] + Dir['lib/**/*'] + ['risu.gemspec']
|
21
21
|
s.bindir = "bin"
|
22
|
-
s.executables = "#{
|
22
|
+
s.executables = "#{Risu::APP_NAME}"
|
23
23
|
s.require_paths = ["lib"]
|
24
24
|
s.has_rdoc = 'yard'
|
25
25
|
s.extra_rdoc_files = ["README.markdown", "LICENSE", "NEWS.markdown", "TODO.markdown", "KNOWNISSUES.markdown"]
|
26
26
|
|
27
27
|
s.required_rubygems_version = ">= 1.6.0"
|
28
|
-
s.rubyforge_project = "#{
|
28
|
+
s.rubyforge_project = "#{Risu::APP_NAME}"
|
29
29
|
|
30
30
|
s.add_development_dependency("rspec", "= 2.5.0")
|
31
31
|
s.add_development_dependency("rcov", ">= 0.9.9")
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: risu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.4.
|
5
|
+
version: 1.4.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jacob Hammack
|
@@ -175,48 +175,48 @@ files:
|
|
175
175
|
- Rakefile
|
176
176
|
- README.markdown
|
177
177
|
- TODO.markdown
|
178
|
-
- lib/
|
179
|
-
- lib/
|
180
|
-
- lib/
|
181
|
-
- lib/
|
182
|
-
- lib/
|
183
|
-
- lib/
|
184
|
-
- lib/
|
185
|
-
- lib/
|
186
|
-
- lib/
|
187
|
-
- lib/
|
188
|
-
- lib/
|
189
|
-
- lib/
|
190
|
-
- lib/
|
191
|
-
- lib/
|
192
|
-
- lib/
|
193
|
-
- lib/
|
194
|
-
- lib/
|
195
|
-
- lib/
|
196
|
-
- lib/
|
197
|
-
- lib/
|
198
|
-
- lib/
|
199
|
-
- lib/
|
200
|
-
- lib/
|
201
|
-
- lib/
|
202
|
-
- lib/
|
203
|
-
- lib/
|
204
|
-
- lib/
|
205
|
-
- lib/
|
206
|
-
- lib/
|
207
|
-
- lib/
|
208
|
-
- lib/
|
209
|
-
- lib/
|
210
|
-
- lib/
|
211
|
-
- lib/
|
212
|
-
- lib/
|
213
|
-
- lib/
|
214
|
-
- lib/
|
215
|
-
- lib/
|
178
|
+
- lib/risu/cli/application.rb
|
179
|
+
- lib/risu/cli/banner.rb
|
180
|
+
- lib/risu/cli.rb
|
181
|
+
- lib/risu/exceptions/invaliddocument.rb
|
182
|
+
- lib/risu/exceptions.rb
|
183
|
+
- lib/risu/listener.rb
|
184
|
+
- lib/risu/models/familyselection.rb
|
185
|
+
- lib/risu/models/host.rb
|
186
|
+
- lib/risu/models/individualpluginselection.rb
|
187
|
+
- lib/risu/models/item.rb
|
188
|
+
- lib/risu/models/plugin.rb
|
189
|
+
- lib/risu/models/pluginspreference.rb
|
190
|
+
- lib/risu/models/policy.rb
|
191
|
+
- lib/risu/models/reference.rb
|
192
|
+
- lib/risu/models/report.rb
|
193
|
+
- lib/risu/models/serverpreference.rb
|
194
|
+
- lib/risu/models/version.rb
|
195
|
+
- lib/risu/models.rb
|
196
|
+
- lib/risu/nessusdocument.rb
|
197
|
+
- lib/risu/parsers.rb
|
198
|
+
- lib/risu/prawn_templater.rb
|
199
|
+
- lib/risu/schema.rb
|
200
|
+
- lib/risu/templates/assets.rb
|
201
|
+
- lib/risu/templates/cover_sheet.rb
|
202
|
+
- lib/risu/templates/data/nessuslogo.jpg
|
203
|
+
- lib/risu/templates/exec_summary.rb
|
204
|
+
- lib/risu/templates/executive_summary.rb
|
205
|
+
- lib/risu/templates/finding_statistics.rb
|
206
|
+
- lib/risu/templates/findings_host.rb
|
207
|
+
- lib/risu/templates/findings_summary.rb
|
208
|
+
- lib/risu/templates/findings_summary_with_pluginid.rb
|
209
|
+
- lib/risu/templates/graphs.rb
|
210
|
+
- lib/risu/templates/host_summary.rb
|
211
|
+
- lib/risu/templates/ms_patch_summary.rb
|
212
|
+
- lib/risu/templates/ms_update_summary.rb
|
213
|
+
- lib/risu/templates/pci_compliance.rb
|
214
|
+
- lib/risu/templates/technical_findings.rb
|
215
|
+
- lib/risu.rb
|
216
216
|
- risu.gemspec
|
217
217
|
- bin/risu
|
218
218
|
has_rdoc: true
|
219
|
-
homepage: http://www.hammackj.com/
|
219
|
+
homepage: http://www.hammackj.com/projects/risu
|
220
220
|
licenses:
|
221
221
|
- BSD
|
222
222
|
post_install_message:
|
data/lib/nessusdb/cli.rb
DELETED
data/lib/nessusdb/cli/banner.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
#Cool random banner stuff for the cli, based on the metasploit random banner stuff
|
4
|
-
|
5
|
-
module NessusDB
|
6
|
-
module CLI
|
7
|
-
module Banner
|
8
|
-
Banners =
|
9
|
-
[
|
10
|
-
'
|
11
|
-
_ _
|
12
|
-
_ __ ___ ___ ___ _ _ ___ __| | |__
|
13
|
-
| \'_ \ / _ \/ __/ __| | | / __|/ _` | \'_ \
|
14
|
-
| | | | __/\__ \__ \ |_| \__ \ (_| | |_) |
|
15
|
-
|_| |_|\___||___/___/\__,_|___/\__,_|_.__/
|
16
|
-
|
17
|
-
'
|
18
|
-
]
|
19
|
-
|
20
|
-
def self.to_s
|
21
|
-
Banners[rand(Banners.length)]
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
data/lib/nessusdb/exceptions.rb
DELETED
data/lib/nessusdb/models.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
module NessusDB
|
4
|
-
module Models
|
5
|
-
end
|
6
|
-
end
|
7
|
-
|
8
|
-
require 'nessusdb/models/host'
|
9
|
-
require 'nessusdb/models/familyselection'
|
10
|
-
require 'nessusdb/models/item'
|
11
|
-
require 'nessusdb/models/individualpluginselection'
|
12
|
-
require 'nessusdb/models/plugin'
|
13
|
-
require 'nessusdb/models/pluginspreference'
|
14
|
-
require 'nessusdb/models/serverpreference'
|
15
|
-
require 'nessusdb/models/report'
|
16
|
-
require 'nessusdb/models/reference'
|
17
|
-
require 'nessusdb/models/policy'
|
18
|
-
require 'nessusdb/models/version'
|