risu 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/KNOWNISSUES.markdown +50 -0
- data/LICENSE +25 -0
- data/NEWS.markdown +112 -0
- data/README.markdown +126 -0
- data/Rakefile +37 -0
- data/TODO.markdown +69 -0
- data/bin/risu +12 -0
- data/lib/nessusdb.rb +38 -0
- data/lib/nessusdb/cli.rb +9 -0
- data/lib/nessusdb/cli/application.rb +402 -0
- data/lib/nessusdb/cli/banner.rb +25 -0
- data/lib/nessusdb/exceptions.rb +8 -0
- data/lib/nessusdb/exceptions/invaliddocument.rb +10 -0
- data/lib/nessusdb/listener.rb +274 -0
- data/lib/nessusdb/models.rb +18 -0
- data/lib/nessusdb/models/familyselection.rb +12 -0
- data/lib/nessusdb/models/host.rb +359 -0
- data/lib/nessusdb/models/individualpluginselection.rb +14 -0
- data/lib/nessusdb/models/item.rb +183 -0
- data/lib/nessusdb/models/plugin.rb +98 -0
- data/lib/nessusdb/models/pluginspreference.rb +12 -0
- data/lib/nessusdb/models/policy.rb +17 -0
- data/lib/nessusdb/models/reference.rb +13 -0
- data/lib/nessusdb/models/report.rb +26 -0
- data/lib/nessusdb/models/serverpreference.rb +13 -0
- data/lib/nessusdb/models/version.rb +12 -0
- data/lib/nessusdb/nessusdocument.rb +66 -0
- data/lib/nessusdb/parsers.rb +8 -0
- data/lib/nessusdb/prawn_templater.rb +38 -0
- data/lib/nessusdb/schema.rb +145 -0
- data/lib/nessusdb/templates/assets.rb +21 -0
- data/lib/nessusdb/templates/cover_sheet.rb +42 -0
- data/lib/nessusdb/templates/data/nessuslogo.jpg +0 -0
- data/lib/nessusdb/templates/exec_summary.rb +56 -0
- data/lib/nessusdb/templates/executive_summary.rb +182 -0
- data/lib/nessusdb/templates/finding_statistics.rb +23 -0
- data/lib/nessusdb/templates/findings_host.rb +49 -0
- data/lib/nessusdb/templates/findings_summary.rb +68 -0
- data/lib/nessusdb/templates/findings_summary_with_pluginid.rb +68 -0
- data/lib/nessusdb/templates/graphs.rb +33 -0
- data/lib/nessusdb/templates/host_summary.rb +40 -0
- data/lib/nessusdb/templates/ms_patch_summary.rb +37 -0
- data/lib/nessusdb/templates/ms_update_summary.rb +43 -0
- data/lib/nessusdb/templates/pci_compliance.rb +66 -0
- data/lib/nessusdb/templates/technical_findings.rb +116 -0
- data/risu.gemspec +44 -0
- metadata +247 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
# Known Issues
|
2
|
+
|
3
|
+
## RMagick Breaks on ImageMagick Updates
|
4
|
+
The easy way to fix this is to just reinstall RMagick, like below:
|
5
|
+
|
6
|
+
[hammackj@taco:~/Projects/public/nessusdb]$ nessusdb
|
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
|
+
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
|
9
|
+
from /Library/Ruby/Gems/1.8/gems/rmagick-2.13.1/lib/RMagick.rb:11
|
10
|
+
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:34:in `gem_original_require'
|
11
|
+
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:34:in `require'
|
12
|
+
from /Library/Ruby/Gems/1.8/gems/gruff-0.3.6/lib/gruff/base.rb:2
|
13
|
+
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
|
14
|
+
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
|
15
|
+
from /Library/Ruby/Gems/1.8/gems/gruff-0.3.6/lib/gruff.rb:25
|
16
|
+
from /Library/Ruby/Gems/1.8/gems/gruff-0.3.6/lib/gruff.rb:5:in `each'
|
17
|
+
from /Library/Ruby/Gems/1.8/gems/gruff-0.3.6/lib/gruff.rb:5
|
18
|
+
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:34:in `gem_original_require'
|
19
|
+
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:34:in `require'
|
20
|
+
from ./bin/../lib/nessusdb.rb:10
|
21
|
+
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
|
22
|
+
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
|
23
|
+
from ./bin/nessusdb:22
|
24
|
+
|
25
|
+
[hammackj@taco:~/Projects/public/nessusdb]$ sudo gem install rmagick
|
26
|
+
|
27
|
+
## Mac OSX Native Dependencies
|
28
|
+
The gems for mysql and rmagick will fail to build if these are not installed.
|
29
|
+
|
30
|
+
sudo port install ImageMagick mysql5
|
31
|
+
|
32
|
+
## Linux Native Dependencies
|
33
|
+
|
34
|
+
### Ubuntu 10.10
|
35
|
+
sudo apt-get install ruby1.8-dev libzip1 libzip-dev libxml2-dev libxml2 libmysqlclient-dev imagemagick libmagickwand3 libmagick9-dev
|
36
|
+
|
37
|
+
### Backtrack
|
38
|
+
sudo apt-get install ruby1.8-dev libzip1 libzip-dev libxml2-dev libxml2 libmysqlclient-dev imagemagick libmagickwand3 libmagick9-dev
|
39
|
+
|
40
|
+
## Sqlite
|
41
|
+
|
42
|
+
Sqlite is a great database to use as a light weight solution. I use Sqlite for all of my assessments. Setting it up on various platforms can be tricky, so here are some examples for what is required to set it up.
|
43
|
+
|
44
|
+
### Ubuntu 10.10
|
45
|
+
sudo apt-get install sqlite3 libsqlite3-dev
|
46
|
+
gem install sqlite3
|
47
|
+
|
48
|
+
### Mac OSX
|
49
|
+
sudo port install sqlite3
|
50
|
+
gem install sqlite3
|
data/LICENSE
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
Copyright (c) 2010-2011 Jacob Hammack, Hammackj 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 Jacob Hammack or Hammackj LLC nor the
|
13
|
+
names of its contributors may be used to endorse or promote products
|
14
|
+
derived from this software 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 JACOB HAMMACK or HAMMACKJ LLC BE LIABLE FOR ANY
|
20
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
21
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
22
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
23
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
24
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
25
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/NEWS.markdown
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
# News
|
2
|
+
|
3
|
+
#1.4.3 (May 23, 2011)
|
4
|
+
|
5
|
+
**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**
|
6
|
+
|
7
|
+
- Fixed small bug in Windows/Other OS graphs
|
8
|
+
- Increased the verboseness of Error messages Ticket #29
|
9
|
+
- Added named scopes off the Plugin class Ticket #34
|
10
|
+
- Added new PCI related HostProperties Tocket #35
|
11
|
+
- New HostProperties attribute: pci-dss-compliance:
|
12
|
+
- New HostProperties attribute: pcidss:compliance:failed
|
13
|
+
- New HostProperties attribute: pcidss:compliance:passed
|
14
|
+
- New HostProperties attribute: pcidss:deprecated_ssl
|
15
|
+
- New HostProperties attribute: pcidss:expired_ssl_certificate
|
16
|
+
- New HostProperties attribute: pcidss:high_risk_flaw
|
17
|
+
- New HostProperties attribute: pcidss:medium_risk_flaw
|
18
|
+
- New HostProperties attribute: pcidss:reachable_db
|
19
|
+
- New HostProperties attribute: pcidss:www:xss
|
20
|
+
- Added more unit tests 91.7% code coverage for testing at the moment. Not including templates.
|
21
|
+
|
22
|
+
#1.4.2 (May 13, 2011)
|
23
|
+
|
24
|
+
- Added a fix for all of the MSXX-XXX Host Properties tags that don't serve any purpose
|
25
|
+
- Added sqlite3 as an install dependency to help with sqlite usage
|
26
|
+
- Fixed a privately report bug with the *_risks_unique_sorted functions not working on MySQL
|
27
|
+
|
28
|
+
#1.4.1 (May 10, 2011)
|
29
|
+
|
30
|
+
- Fixed a issue with a nonexistent 'Critical' severity.
|
31
|
+
- Added VMware ESX to the Other OS graph Ticket #33
|
32
|
+
- windows_os_graph were using the wrong counters Ticket #32
|
33
|
+
- Updated the Prawn gem version to 0.11.1
|
34
|
+
|
35
|
+
#1.4.0 (April 20, 2011)
|
36
|
+
|
37
|
+
- Added a --console option for creating a ActiveRecord console into the database
|
38
|
+
- Updated the parser to handle the new plugin_type field on the plugins table
|
39
|
+
- Fixed a issue with the parser where Nessus leaves the ip field blank for some reason but the name field is the ip. Validates the correctness of the ip and puts it in the ip field
|
40
|
+
- Added 'cpe' field from the updated Nessus XML
|
41
|
+
- Added 'plugin_type' field from the updated Nessus XML
|
42
|
+
- New Templates
|
43
|
+
- Simple list of findings by host, in findings_host.rb [Ticket #27]
|
44
|
+
|
45
|
+
# 1.3.0 (March 4, 2011)
|
46
|
+
**Command line options have changed slightly, run nessusdb -? for a full list of commands**
|
47
|
+
|
48
|
+
**The default config file name is now nessusdb.cfg**
|
49
|
+
|
50
|
+
- New templates
|
51
|
+
- Microsoft Patches Summary
|
52
|
+
- Microsoft Update Enabled Summary
|
53
|
+
- Sample Exec Summary
|
54
|
+
- Host Summary
|
55
|
+
- Findings Summary
|
56
|
+
- Cover Sheet example
|
57
|
+
- Updated more yardoc documentation
|
58
|
+
- Reports
|
59
|
+
- Set a default font size of 12
|
60
|
+
- Set default margins of 50,75,50,75
|
61
|
+
- Cleaned up the graphs to be a little easier to read
|
62
|
+
- Added significantly more error checking to the command line application
|
63
|
+
- 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 ./nessusdb.cfg
|
65
|
+
- Migrated to OptionParser Choice seems to be an abandoned gem with bugs
|
66
|
+
- Updated all the Migration code to use the new AR3 format
|
67
|
+
|
68
|
+
- Special thanks to **Ed Davison** for numerous bug reports and template testing.
|
69
|
+
- Special thanks to **Andrew Benson** for helping track down a major ActiveRecord bug.
|
70
|
+
|
71
|
+
# 1.2.0 (February 13, 2011)
|
72
|
+
**This update breaks all existing templates, included templates are updated**
|
73
|
+
|
74
|
+
- Preformed tons code clean up
|
75
|
+
- Fixed a ton of typos
|
76
|
+
- Removed the Findings class, please use the named scopes on each ActiveRecord object now
|
77
|
+
- All queries are now using ActiveRecord 3
|
78
|
+
- Use named scope off each Model to access data
|
79
|
+
- Ported all the templates to use the new ActiveRecord3 style
|
80
|
+
- Solved some missing dependency issues that are now accounted for!
|
81
|
+
|
82
|
+
# 1.1.0 (October 22, 2010)
|
83
|
+
- Fixed a typo on the classification argument
|
84
|
+
- Added a assets report template
|
85
|
+
- Added a simple PCI/DSS compliance report template (Requires Nessus Professional Feed for the plugin)
|
86
|
+
- Updated the parser to take into account the new fields
|
87
|
+
- HostProperties attribute: pci-dss-compliance
|
88
|
+
- New XML element: exploitability_ease.
|
89
|
+
- New XML element: cvss_temporal_vector.
|
90
|
+
- New XML element: exploit_framework_core.
|
91
|
+
- New XML element: cvss_temporal_score.
|
92
|
+
- New XML element: exploit_available.
|
93
|
+
- New XML element: exploit_framework_metasploit.
|
94
|
+
- New XML element: metasploit_name
|
95
|
+
- New XML element: exploit_framework_canvas
|
96
|
+
- New XML element: canvas_package
|
97
|
+
- Updated technical findings template to account for the new exploitability values
|
98
|
+
- Fixed a bug with the way I was blacklisting the scan box
|
99
|
+
|
100
|
+
# 1.0.0 (October 8, 2010)
|
101
|
+
- Cleaned up more code
|
102
|
+
- Fixed a Mysql error for when the tables do not exist.
|
103
|
+
|
104
|
+
# 0.6.6 (October 4, 2010)
|
105
|
+
- Moved to prawn for pdf output
|
106
|
+
- added templates for the new prawn output
|
107
|
+
- added checks to warn when there are new xml tags
|
108
|
+
- moved everything into the nessusdb executable
|
109
|
+
- cleaned up the code
|
110
|
+
|
111
|
+
# 0.6.5 (August 15, 2010)
|
112
|
+
- Initial public release
|
data/README.markdown
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
# NessusDB
|
2
|
+
|
3
|
+
NessusDB 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
|
+
|
5
|
+
Version 1.4.3 is the current release.
|
6
|
+
|
7
|
+
## Requirements
|
8
|
+
|
9
|
+
### Ruby
|
10
|
+
NessusDB 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
|
+
|
12
|
+
### RubyGems
|
13
|
+
NessusDB 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
|
+
|
15
|
+
- libxml
|
16
|
+
- rails
|
17
|
+
- yaml
|
18
|
+
- logger
|
19
|
+
- rmagick
|
20
|
+
- gruff
|
21
|
+
- prawn
|
22
|
+
- mysql
|
23
|
+
|
24
|
+
## Developmental Requirements
|
25
|
+
|
26
|
+
These are all available through [RubyGems](http://rubygems.org/). The should be installed automatically when you install nessusdb, If not this command will install them all:
|
27
|
+
|
28
|
+
% gem install rmagick gruff prawn sham faker rspec rcov machinist yard mysql libxml-ruby rails sqlite3 logger yaml
|
29
|
+
|
30
|
+
**You my need sudo/root access depending on your system setup**
|
31
|
+
|
32
|
+
Any database that ActiveRecord supports should work. NessusDB has been tested with [MySQL](http://www.mysql.com/) and [SQLite3](http://sqlite.org/).
|
33
|
+
|
34
|
+
## Installation
|
35
|
+
Installation is really easy just gem install!
|
36
|
+
|
37
|
+
% gem install nessusdb
|
38
|
+
|
39
|
+
## Database Setup
|
40
|
+
|
41
|
+
% nessusdb --create-config
|
42
|
+
% $EDITOR nessusdb.cfg
|
43
|
+
% nessusdb --create-tables
|
44
|
+
|
45
|
+
1. Generate the nessusdb.cfg file.
|
46
|
+
2. Edit the nessusdb.cfg file, filling in the variables as needed.
|
47
|
+
3. Migrate the database schema.
|
48
|
+
|
49
|
+
## Parsing Nessus Output
|
50
|
+
|
51
|
+
% nessusdb report1.nessus [report2.nessus ...]
|
52
|
+
|
53
|
+
1. Parse the files by passing their names on the command line.
|
54
|
+
|
55
|
+
|
56
|
+
# Viewing Data
|
57
|
+
The data can be viewed with a query browser available for your database. A Rails front end will be available in the **future**.
|
58
|
+
|
59
|
+
## Generating Reports
|
60
|
+
To generate a report please execute the following after the the data is parsed into the database.
|
61
|
+
|
62
|
+
% nessusdb -t "TEMPLATE_PATH" -o "REPORT_NAME.pdf"
|
63
|
+
|
64
|
+
## NessusDB Console
|
65
|
+
|
66
|
+
Using the NessusDB 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
|
+
|
68
|
+
[hammackj@taco:~/Projects/public/nessusdb]$ ../bin/nessusdb --console
|
69
|
+
|
70
|
+
_ _
|
71
|
+
_ __ ___ ___ ___ _ _ ___ __| | |__
|
72
|
+
| '_ \ / _ \/ __/ __| | | / __|/ _` | '_ \
|
73
|
+
| | | | __/\__ \__ \ |_| \__ \ (_| | |_) |
|
74
|
+
|_| |_|\___||___/___/\__,_|___/\__,_|_.__/
|
75
|
+
|
76
|
+
NessusDB Console v1.4.2
|
77
|
+
>> Host.first
|
78
|
+
=> #<NessusDB::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
|
+
## Templates
|
81
|
+
Several templates are included:
|
82
|
+
|
83
|
+
1. graphs.rb - several graphs written to disk as png's and as a complete pdf
|
84
|
+
2. technical_findings.rb - a detailed pdf of the high and medium findings from the assessment
|
85
|
+
3. finding_statistics.rb - this is a pdf summary of the assessment
|
86
|
+
4. assets.rb - this is a summary of all the hosts found during the scan
|
87
|
+
5. pci_compliance.rb - this generates of list of hosts that pass or failed pci/dss auditing
|
88
|
+
6. exec_summary.rb - A sample executive summary report
|
89
|
+
7. executive_summary.rb - A more detailed sample executive summary report
|
90
|
+
8. findings_summary.rb - A summary of all the findings report
|
91
|
+
9. ms_update_summary.rb - a summary of all the windows update enable hosts
|
92
|
+
10. ms_patch_summary.rb - a summary of all the missing windows patches
|
93
|
+
11. cover_sheet.rb - a example coversheet report
|
94
|
+
12. findings_host.rb - list of findings per host
|
95
|
+
|
96
|
+
The templates are located in the nessusdb/templates folder, where ever the gem was installed. On a typical Mac OSX install the path is:
|
97
|
+
|
98
|
+
[hammackj@taco:~]$ ruby -v
|
99
|
+
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
|
100
|
+
[hammackj@taco:~]$ l /Library/Ruby/Gems/1.8/gems/nessusdb-1.4.0/lib/nessusdb/templates/
|
101
|
+
total 40
|
102
|
+
drwxr-xr-x 7 hammackj admin 238B Oct 21 19:24 ./
|
103
|
+
drwxr-xr-x 8 hammackj admin 272B Oct 21 19:24 ../
|
104
|
+
-rw-r--r-- 1 hammackj staff 695B Mar 9 15:59 assets.rb
|
105
|
+
-rw-r--r-- 1 hammackj staff 691B Mar 9 15:59 cover_sheet.rb
|
106
|
+
drwxr-xr-x 3 hammackj staff 102B Mar 9 15:59 data/
|
107
|
+
-rw-r--r-- 1 hammackj staff 2.0K Mar 9 15:59 exec_summary.rb
|
108
|
+
-rw-r--r-- 1 hammackj staff 6.7K Mar 9 15:59 executive_summary.rb
|
109
|
+
-rw-r--r-- 1 hammackj staff 724B Mar 9 15:59 finding_statistics.rb
|
110
|
+
-rw-r--r--@ 1 hammackj staff 1.2K Mar 17 14:55 findings_host.rb
|
111
|
+
-rw-r--r-- 1 hammackj staff 1.5K Mar 9 15:59 findings_summary.rb
|
112
|
+
-rw-r--r-- 1 hammackj staff 831B Mar 9 15:59 graphs.rb
|
113
|
+
-rw-r--r-- 1 hammackj staff 1.2K Mar 9 15:59 host_summary.rb
|
114
|
+
-rw-r--r-- 1 hammackj staff 663B Mar 9 15:59 ms_patch_summary.rb
|
115
|
+
-rw-r--r-- 1 hammackj staff 924B Mar 9 15:59 ms_update_summary.rb
|
116
|
+
-rw-r--r-- 1 hammackj staff 1.6K Mar 9 15:59 pci_compliance.rb
|
117
|
+
-rw-r--r-- 1 hammackj staff 2.8K Mar 9 15:59 technical_findings.rb
|
118
|
+
[hammackj@taco:~]$
|
119
|
+
|
120
|
+
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
|
+
# Issues
|
123
|
+
If you have any problems, bugs or feature requests please use the [github issue tracker](http://github.com/hammackj/nessusdb/issues).
|
124
|
+
|
125
|
+
# Contact
|
126
|
+
You can reach me at jacob[dot]hammack[at]hammackj[dot]com.
|
data/Rakefile
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
2
|
+
|
3
|
+
require 'rubygems' # not sure why...
|
4
|
+
require "nessusdb"
|
5
|
+
require 'rake'
|
6
|
+
require 'rspec/core/rake_task'
|
7
|
+
|
8
|
+
task :build do
|
9
|
+
system "gem build nessusdb.gemspec"
|
10
|
+
end
|
11
|
+
|
12
|
+
task :release => :build do
|
13
|
+
system "gem push nessusdb-#{NessusDB::VERSION}.gem"
|
14
|
+
|
15
|
+
puts "Just released NessusDB v#{NessusDB::VERSION}. NessusDB is always available in RubyGems!"
|
16
|
+
end
|
17
|
+
|
18
|
+
task :clean do
|
19
|
+
system "rm *.gem"
|
20
|
+
system "rm *.db"
|
21
|
+
system "rm *.cfg"
|
22
|
+
system "rm *.pdf"
|
23
|
+
system "rm -rf coverage"
|
24
|
+
end
|
25
|
+
|
26
|
+
task :report do
|
27
|
+
require 'cover_me'
|
28
|
+
CoverMe.complete!
|
29
|
+
end
|
30
|
+
|
31
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
32
|
+
#t.spec_files = ["application_spec.rb", "item_spec.rb", "plugin_spec.rb", "banner_spec.rb", "host_spec.rb", "nessusdocument_spec.rb", "report_spec.rb"]
|
33
|
+
Rake::Task['report'].invoke
|
34
|
+
|
35
|
+
# t.rcov = true
|
36
|
+
# t.rcov_opts = ['--exclude osx\/objc,gems\/,spec\/,features\/', 'specs']
|
37
|
+
end
|
data/TODO.markdown
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# TODO
|
2
|
+
|
3
|
+
**Release dates are estimates, and features can be changed at any time.**
|
4
|
+
|
5
|
+
## 1.4.5 (May)
|
6
|
+
- Rename Project
|
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)
|
17
|
+
- 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
|
19
|
+
|
20
|
+
## 1.5 (7/4/2011)
|
21
|
+
- Clean up / Bug fixes before 2.0
|
22
|
+
- Create rSpec tests for everything (100% code coverage goal)
|
23
|
+
- Parser tests
|
24
|
+
- application specs
|
25
|
+
- Add a failed load_config() test
|
26
|
+
- models tests
|
27
|
+
- policy
|
28
|
+
- family selection
|
29
|
+
- individualpluginselection
|
30
|
+
- reference
|
31
|
+
- version
|
32
|
+
- report
|
33
|
+
- plugin
|
34
|
+
- plugin preference
|
35
|
+
- server preference
|
36
|
+
- Create test fixtures
|
37
|
+
- Comment all named scope from 1.2
|
38
|
+
- Create a Nessus document generator, for testing the parser
|
39
|
+
- 100% code coverage for testing
|
40
|
+
- Rework the blacklisting stuff
|
41
|
+
- Add blacklisting to config
|
42
|
+
- Add Schema checks to make sure the schema is compatible with the version of nessusdb
|
43
|
+
- Check to see that the xml is version 2
|
44
|
+
- Version 1 = NessusClientData
|
45
|
+
- Version 2 = NessusClientData_V2
|
46
|
+
|
47
|
+
|
48
|
+
- DSL for report creation to abstract the reports to have different output types
|
49
|
+
- Provide more templates
|
50
|
+
- Virtual Machine Summary
|
51
|
+
- Fix list Report?
|
52
|
+
- Add template validation and more error checking
|
53
|
+
- Colorize the reports with better style
|
54
|
+
- Sort Technical Findings Report by count/score
|
55
|
+
|
56
|
+
## 1.6 (9/4/2011)
|
57
|
+
- Remove rmagick
|
58
|
+
- Move to ruby 1.9.2 only support
|
59
|
+
- Add Parser for NBE Format
|
60
|
+
- Add Parser for NSR Format
|
61
|
+
- Add Parser for V1 of the XML Format
|
62
|
+
- Add Parser for OpenVas Output
|
63
|
+
- Add Parser for SecurityCenter Output
|
64
|
+
- Add Parser for Nexpose
|
65
|
+
- Add Parser for Qualys
|
66
|
+
- Look at moving to nokogiri for xml parsing, current benchmarks so it faster than libxml-ruby; http://nokogiri.org
|
67
|
+
|
68
|
+
## 2.0 (12/4/2011)
|
69
|
+
- Rails FrontEnd to NessusDB
|
data/bin/risu
ADDED
data/lib/nessusdb.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module NessusDB
|
4
|
+
APP_NAME = "risu"
|
5
|
+
VERSION = "1.4.3"
|
6
|
+
GRAPH_WIDTH = 750
|
7
|
+
EMAIL = "jacob.hammack@hammackj.com"
|
8
|
+
CONFIG_FILE = "./risu.cfg"
|
9
|
+
end
|
10
|
+
|
11
|
+
require 'active_record'
|
12
|
+
require "active_support"
|
13
|
+
require 'libxml'
|
14
|
+
require 'logger'
|
15
|
+
require 'ipaddr'
|
16
|
+
require 'yaml'
|
17
|
+
require 'gruff'
|
18
|
+
require 'prawn'
|
19
|
+
require 'prawn/layout'
|
20
|
+
require 'stringio'
|
21
|
+
require 'mysql'
|
22
|
+
require 'irb'
|
23
|
+
|
24
|
+
require 'optparse'
|
25
|
+
|
26
|
+
if ActiveRecord::Base.connected? == true
|
27
|
+
require 'nessusdb/schema'
|
28
|
+
end
|
29
|
+
|
30
|
+
require 'nessusdb/listener'
|
31
|
+
require 'nessusdb/prawn_templater'
|
32
|
+
require 'nessusdb/nessusdocument'
|
33
|
+
|
34
|
+
require 'nessusdb/cli'
|
35
|
+
require 'nessusdb/exceptions'
|
36
|
+
require 'nessusdb/models'
|
37
|
+
|
38
|
+
include NessusDB::Models
|