risu 1.7.9 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (139) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/LICENSE +1 -1
  5. data/README.markdown +16 -8
  6. data/Rakefile +12 -3
  7. data/bin/risu +2 -2
  8. data/docs/NEWS.markdown +32 -9
  9. data/lib/risu.rb +2 -2
  10. data/lib/risu/base.rb +1 -1
  11. data/lib/risu/base/graph_template_helper.rb +20 -26
  12. data/lib/risu/base/host_template_helper.rb +17 -23
  13. data/lib/risu/base/malware_template_helper.rb +18 -24
  14. data/lib/risu/base/post_process_base.rb +97 -71
  15. data/lib/risu/base/post_process_manager.rb +3 -3
  16. data/lib/risu/base/scan_helper.rb +17 -23
  17. data/lib/risu/base/schema.rb +2 -2
  18. data/lib/risu/base/shares_template_helper.rb +18 -24
  19. data/lib/risu/base/template_base.rb +1 -1
  20. data/lib/risu/base/template_helper.rb +20 -26
  21. data/lib/risu/base/template_manager.rb +5 -5
  22. data/lib/risu/base/templater.rb +3 -5
  23. data/lib/risu/cli.rb +1 -1
  24. data/lib/risu/cli/application.rb +26 -5
  25. data/lib/risu/cli/banner.rb +1 -1
  26. data/lib/risu/exceptions.rb +1 -1
  27. data/lib/risu/exceptions/invaliddocument.rb +1 -1
  28. data/lib/risu/graphs.rb +1 -1
  29. data/lib/risu/graphs/top_vuln_graph.rb +1 -1
  30. data/lib/risu/graphs/windows_os_graph.rb +1 -1
  31. data/lib/risu/models.rb +1 -1
  32. data/lib/risu/models/attachment.rb +1 -1
  33. data/lib/risu/models/familyselection.rb +1 -1
  34. data/lib/risu/models/host.rb +13 -13
  35. data/lib/risu/models/hostproperty.rb +1 -1
  36. data/lib/risu/models/individualpluginselection.rb +1 -1
  37. data/lib/risu/models/item.rb +7 -7
  38. data/lib/risu/models/patch.rb +1 -1
  39. data/lib/risu/models/plugin.rb +1 -1
  40. data/lib/risu/models/pluginspreference.rb +1 -1
  41. data/lib/risu/models/policy.rb +1 -1
  42. data/lib/risu/models/reference.rb +1 -1
  43. data/lib/risu/models/report.rb +2 -2
  44. data/lib/risu/models/serverpreference.rb +1 -1
  45. data/lib/risu/models/servicedescription.rb +1 -1
  46. data/lib/risu/models/version.rb +1 -1
  47. data/lib/risu/parsers.rb +1 -1
  48. data/lib/risu/parsers/nessus/nessus_document.rb +1 -1
  49. data/lib/risu/parsers/nessus/nessus_sax_listener.rb +1 -1
  50. data/lib/risu/parsers/nessus/postprocess.rb +1 -1
  51. data/lib/risu/parsers/nessus/postprocess/7zip.rb +46 -0
  52. data/lib/risu/parsers/nessus/postprocess/adobe_acrobat.rb +8 -1
  53. data/lib/risu/parsers/nessus/postprocess/adobe_air.rb +1 -1
  54. data/lib/risu/parsers/nessus/postprocess/adobe_reader.rb +5 -3
  55. data/lib/risu/parsers/nessus/postprocess/apache.rb +1 -1
  56. data/lib/risu/parsers/nessus/postprocess/apache_tomcat.rb +1 -1
  57. data/lib/risu/parsers/nessus/postprocess/apple_itunes.rb +2 -1
  58. data/lib/risu/parsers/nessus/postprocess/apple_quicktime.rb +26 -3
  59. data/lib/risu/parsers/nessus/postprocess/blackberry_enterprise_server.rb +1 -1
  60. data/lib/risu/parsers/nessus/postprocess/ca_brightstor_arcserve.rb +1 -1
  61. data/lib/risu/parsers/nessus/postprocess/cisco_anyconnect.rb +5 -1
  62. data/lib/risu/parsers/nessus/postprocess/cisco_ios.rb +1 -1
  63. data/lib/risu/parsers/nessus/postprocess/core_ftp.rb +1 -1
  64. data/lib/risu/parsers/nessus/postprocess/db2.rb +1 -1
  65. data/lib/risu/parsers/nessus/postprocess/downgrade_plugins.rb +3 -2
  66. data/lib/risu/parsers/nessus/postprocess/filezilla.rb +1 -1
  67. data/lib/risu/parsers/nessus/postprocess/firefox.rb +3 -1
  68. data/lib/risu/parsers/nessus/postprocess/flash_player.rb +29 -26
  69. data/lib/risu/parsers/nessus/postprocess/flexnet.rb +1 -1
  70. data/lib/risu/parsers/nessus/postprocess/foxit_phantom_pdf.rb +46 -0
  71. data/lib/risu/parsers/nessus/postprocess/foxit_reader.rb +11 -8
  72. data/lib/risu/parsers/nessus/postprocess/google_chrome.rb +11 -1
  73. data/lib/risu/parsers/nessus/postprocess/hp_system_mgt_homepage.rb +2 -1
  74. data/lib/risu/parsers/nessus/postprocess/irfanview.rb +1 -1
  75. data/lib/risu/parsers/nessus/postprocess/java.rb +3 -1
  76. data/lib/risu/parsers/nessus/postprocess/libreoffice.rb +3 -2
  77. data/lib/risu/parsers/nessus/postprocess/openoffice.rb +3 -1
  78. data/lib/risu/parsers/nessus/postprocess/openssh.rb +1 -1
  79. data/lib/risu/parsers/nessus/postprocess/openssl.rb +1 -1
  80. data/lib/risu/parsers/nessus/postprocess/oracle_database.rb +1 -1
  81. data/lib/risu/parsers/nessus/postprocess/php.rb +1 -1
  82. data/lib/risu/parsers/nessus/postprocess/post_process.rb +2 -2
  83. data/lib/risu/parsers/nessus/postprocess/real_player.rb +53 -0
  84. data/lib/risu/parsers/nessus/postprocess/risk_score.rb +1 -1
  85. data/lib/risu/parsers/nessus/postprocess/root_cause.rb +2 -3
  86. data/lib/risu/parsers/nessus/postprocess/servu.rb +1 -1
  87. data/lib/risu/parsers/nessus/postprocess/shockwave.rb +1 -1
  88. data/lib/risu/parsers/nessus/postprocess/sigplus_pro.rb +1 -1
  89. data/lib/risu/parsers/nessus/postprocess/skype.rb +46 -0
  90. data/lib/risu/parsers/nessus/postprocess/symantec_endpoint.rb +52 -0
  91. data/lib/risu/parsers/nessus/postprocess/symantec_pcanywhere.rb +1 -1
  92. data/lib/risu/parsers/nessus/postprocess/timbuktu.rb +1 -1
  93. data/lib/risu/parsers/nessus/postprocess/vlc.rb +12 -9
  94. data/lib/risu/parsers/nessus/postprocess/vmware_esxi.rb +9 -2
  95. data/lib/risu/parsers/nessus/postprocess/vmware_player.rb +1 -1
  96. data/lib/risu/parsers/nessus/postprocess/vmware_vcenter.rb +2 -2
  97. data/lib/risu/parsers/nessus/postprocess/vmware_vsphere_client.rb +1 -1
  98. data/lib/risu/parsers/nessus/postprocess/windows.rb +751 -705
  99. data/lib/risu/parsers/nessus/postprocess/winscp.rb +1 -1
  100. data/lib/risu/parsers/nessus/postprocess/wireshark.rb +2 -1
  101. data/lib/risu/parsers/nexpose/nexpose_document.rb +1 -1
  102. data/lib/risu/parsers/nexpose/simple_nexpose.rb +1 -1
  103. data/lib/risu/renderers.rb +1 -1
  104. data/lib/risu/renderers/csvrenderer.rb +3 -3
  105. data/lib/risu/renderers/nilrenderer.rb +1 -1
  106. data/lib/risu/renderers/pdfrenderer.rb +4 -5
  107. data/lib/risu/template_helpers.rb +1 -1
  108. data/lib/risu/templates/assets.rb +3 -3
  109. data/lib/risu/templates/authentication_summary.rb +34 -5
  110. data/lib/risu/templates/cover_sheet.rb +3 -6
  111. data/lib/risu/templates/exec_summary.rb +12 -4
  112. data/lib/risu/templates/executive_summary_detailed.rb +3 -3
  113. data/lib/risu/templates/exploitablity_summary.rb +3 -3
  114. data/lib/risu/templates/failed_audits.rb +20 -26
  115. data/lib/risu/templates/finding_statistics.rb +3 -3
  116. data/lib/risu/templates/findings_host.rb +3 -3
  117. data/lib/risu/templates/findings_summary.rb +5 -5
  118. data/lib/risu/templates/findings_summary_with_pluginid.rb +5 -5
  119. data/lib/risu/templates/graphs.rb +3 -3
  120. data/lib/risu/templates/host_findings_csv.rb +3 -3
  121. data/lib/risu/templates/host_summary.rb +3 -3
  122. data/lib/risu/templates/malicious_process_detection.rb +3 -3
  123. data/lib/risu/templates/missing_root_causes.rb +3 -3
  124. data/lib/risu/templates/ms_patch_summary.rb +3 -3
  125. data/lib/risu/templates/ms_update_summary.rb +3 -3
  126. data/lib/risu/templates/ms_wsus_findings.rb +19 -26
  127. data/lib/risu/templates/notable.rb +3 -3
  128. data/lib/risu/templates/notable_detailed.rb +3 -3
  129. data/lib/risu/templates/pci_compliance.rb +3 -3
  130. data/lib/risu/templates/stig_findings_summary.rb +3 -3
  131. data/lib/risu/templates/talking_points.rb +5 -31
  132. data/lib/risu/templates/technical_findings.rb +3 -3
  133. data/lib/risu/templates/template.rb +3 -3
  134. data/lib/risu/templates/top_25.rb +3 -3
  135. data/lib/risu/version.rb +6 -5
  136. data/risu.gemspec +9 -7
  137. metadata +49 -20
  138. metadata.gz.sig +2 -0
  139. data/Gemfile.lock +0 -148
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4323f4148eb935a7f7fbe855eac75da1e721f5c4
4
- data.tar.gz: a2e2f82eb2a95c8459a785ba92bcd260a758935c
3
+ metadata.gz: accf90c8309d4a0ccc6b26f830b8830458855492
4
+ data.tar.gz: d05b1dde76b40f7fdc5c30961b44ec1cc2d55848
5
5
  SHA512:
6
- metadata.gz: c7b1dd24e54f291b8fc317e6f05945dd16b2cc7190d28b4aa8ce602fceceb6e81151ba74459c5b7377722928cdac1ced1f49cf0384273d89a0dc2cebb683ce73
7
- data.tar.gz: 8a580555cf942fe6b7f3964ec11024911e83d7958e056d7f559bc4b35d3762debf997c1b61ec475b105386709bb242b27b32f73474680403ab04091a73eb2d69
6
+ metadata.gz: c5631c1e7ca724d503e77b8505b7451529bccf01ea088b6acdc80becc1512a6ca2dcffd32df537c20d7ab2dad62d82bcc175dad0214341b189dce836ea35bc0c
7
+ data.tar.gz: 5755fa9507c02125832f8b4fed8642cd75e71454838772ae252d6aa03fc749e524c09a6a7dea019d8c41f0785df6a19e9de1690d8a7636114615f1f2ee1485d5
Binary file
Binary file
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2016 Arxopia LLC.
1
+ Copyright (c) 2010-2017 Jacob Hammack.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -1,4 +1,9 @@
1
- # risu [![Gem Version](https://badge.fury.io/rb/risu.png)](http://badge.fury.io/rb/risu) [![Build Status](https://travis-ci.org/arxopia/risu.png?branch=master)](https://travis-ci.org/arxopia/risu) [![Code Climate](https://codeclimate.com/github/arxopia/risu/badges/gpa.svg)](https://codeclimate.com/github/arxopia/risu) [![Inline docs](http://inch-ci.org/github/arxopia/risu.png)](http://inch-ci.org/github/arxopia/risu)
1
+ # risu
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/risu.png)](http://badge.fury.io/rb/risu)
4
+ [![Build Status](https://travis-ci.org/hammackj/risu.png?branch=master)](https://travis-ci.org/hammackj/risu)
5
+ [![Code Climate](https://codeclimate.com/github/hammackj/risu/badges/gpa.svg)](https://codeclimate.com/github/hammackj/risu)
6
+ [![Inline docs](http://inch-ci.org/github/hammackj/risu.png)](http://inch-ci.org/github/hammackj/risu)
2
7
 
3
8
  Risu is [Nessus](http://www.nessus.org) parser, that converts Nessus .nessus xml files into a [ActiveRecord](http://api.rubyonrails.org/classes/ActiveRecord/Base.html) database, this allows for easy report generation and vulnerability verification.
4
9
 
@@ -32,6 +37,11 @@ Installation is really easy just gem install!
32
37
 
33
38
  % gem install risu
34
39
 
40
+ ## Installation with gem signature verification
41
+
42
+ % gem cert --add <(curl -Ls https://raw.github.com/hammackj/risu/master/certs/hammackj.pem
43
+ % gem install risu -P MediumSecurity
44
+
35
45
  ### Runtime Requirements
36
46
 
37
47
  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:
@@ -94,10 +104,10 @@ Using the risu Console is just like using Rails. You can access all of the Activ
94
104
 
95
105
  risu Console v1.7.2
96
106
  >> Host.first
97
- => #<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.arxopia.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>
107
+ => #<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>
98
108
 
99
109
  ## Templates
100
- Several templates are included:
110
+ Several templates are included, but is recommend you build your own based on what you need.
101
111
 
102
112
  $ risu -l
103
113
  Available Templates
@@ -125,12 +135,10 @@ Several templates are included:
125
135
  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. See the 'template' example for creating your own template.
126
136
 
127
137
  # Contributing
128
- If you would like to contribute templates/bug fixes/etc to risu. The easiest way is to fork the project on [github](http://github.com/arxopia/risu) and make the changes in your fork and the submit a pull request to the project on the dev branch. Please include unit tests for anything non trivial.
138
+ If you would like to contribute templates/bug fixes/etc to risu. The easiest way is to fork the project on [github](http://github.com/hammackj/risu) and make the changes in your fork and the submit a pull request to the project on the dev branch. Please include unit tests for anything non trivial.
129
139
 
130
140
  # Issues
131
- If you have any problems, bugs or feature requests please use the [github issue tracker](http://github.com/arxopia/risu/issues).
141
+ If you have any problems, bugs or feature requests please use the [github issue tracker](http://github.com/hammackj/risu/issues).
132
142
 
133
143
  # Contact
134
- You can reach me at jacob.hammack[at]arxopia[dot]com.
135
-
136
- You can also contact me on IRC as hammackj on irc.freenode.net, #risu
144
+ You can reach me at jacob.hammack[at]hammackj[dot]com. You can also contact me on IRC as hammackj on irc.freenode.net, #risu
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -24,11 +24,21 @@ $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
24
24
  require "risu"
25
25
  require 'rake'
26
26
  require 'rake/testtask'
27
+ require 'digest/sha2'
27
28
 
28
29
  task :build do
29
30
  system "gem build #{Risu::APP_NAME}.gemspec"
30
31
  end
31
32
 
33
+ task :checksum do
34
+ built_gem_path = "#{Risu::APP_NAME}-#{Risu::VERSION}.gem"
35
+ checksum = Digest::SHA512.new.hexdigest(File.read(built_gem_path))
36
+ checksum_path = "checksum/#{Risu::APP_NAME}-#{Risu::VERSION}.gem.sha512"
37
+ File.open(checksum_path, 'w' ) {|f| f.write(checksum) }
38
+ system "git add #{checksum_path}"
39
+ system "git commit #{checksum_path} -m 'Added #{Risu::APP_NAME}-#{Risu::VERSION}.gem checksum'"
40
+ end
41
+
32
42
  task :tag_and_bag do
33
43
  system "git tag -a v#{Risu::VERSION} -m 'version #{Risu::VERSION}'"
34
44
  system "git push --tags"
@@ -45,8 +55,7 @@ task :tweet do
45
55
  puts "Just released #{Risu::APP_NAME} v#{Risu::VERSION}. #{Risu::APP_NAME} is an Nessus XML parser/database/report generator. More information at #{Risu::HOME_PAGE}"
46
56
  end
47
57
 
48
- task :release => [:tag_and_bag, :build, :push, :tweet] do
49
-
58
+ task :release => [:build, :checksum, :tag_and_bag, :push, :tweet] do
50
59
  end
51
60
 
52
61
  task :clean do
data/bin/risu CHANGED
@@ -1,6 +1,6 @@
1
- #!/usr/bin/env ruby
1
+ #!/usr/bin/env ruby -W0
2
2
 
3
- # Copyright (c) 2010-2016 Arxopia LLC.
3
+ # Copyright (c) 2010-2017 Jacob Hammack.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,5 +1,28 @@
1
1
  # News
2
2
 
3
+ # 1.8.0 (March 1, 2017)
4
+ - **Moved repo from http://github.com/arxopia/risu to http://github.com/hammackj/risu**
5
+ - **Upgraded to Rails 5**
6
+ - Added gem signing
7
+ - Lots of clean up for Rails 5 and Ruby 2.4
8
+ - Various improvements / fixes [@abenson]
9
+ - Post Processing Updates
10
+ - Added 7-Zip
11
+ - Added Foxit Phantom PDF
12
+ - Added RealPlayer
13
+ - Added Skype
14
+ - Updated OpenSSH plugin list
15
+ - Updated VMware ESXi plugin list
16
+ - Updated Apple QuickTime
17
+ - Updated Cisco AnyConnect
18
+ - Updated Firefox
19
+ - Updated Foxit Reader
20
+ - Updated Google Chrome
21
+ - Updated Java
22
+ - Updated Libre Office
23
+ - Updated Windows updates
24
+ - Updated Wireshark
25
+
3
26
  # 1.7.9 (July 1, 2016)
4
27
  - Updated RootCauses
5
28
  - Fixed issue #99 with the FindingsHost template enumerating the wrong findings. [@ghuisman]
@@ -114,7 +137,7 @@
114
137
  # 1.7.0 (September 12, 2014)
115
138
  - Update Copyrights to 2014
116
139
  - Wiki
117
- - New page for installing on [OSX]((https://github.com/arxopia/risu/wiki/OSX-Installation-Guide)
140
+ - New page for installing on [OSX]((https://github.com/hammackj/risu/wiki/OSX-Installation-Guide)
118
141
  - Models
119
142
  - Host Model
120
143
  - Changed the field type of 'mac' from string to text to increase the size
@@ -236,7 +259,7 @@
236
259
  it is rough at the moment but good for viewing all the findings. It requires
237
260
  that local checks were run, for the plugin to fire during the Nessus scan.
238
261
  - Wiki
239
- - New page for installing on [Kali Linux](https://github.com/arxopia/risu/wiki/Kali-Linux-Risu-Installation-Guide)
262
+ - New page for installing on [Kali Linux](https://github.com/hammackj/risu/wiki/Kali-Linux-Risu-Installation-Guide)
240
263
  - Post Processing (Alpha Support)
241
264
  - Started to develop a method for doing post processing on all the findings
242
265
  - Initial RiskScore plugin to calculate a risk score for Plugins / Findings / Hosts
@@ -328,10 +351,10 @@
328
351
  - template
329
352
  - cleaned up and updated to use the TemplateHelper mixin
330
353
  - Wiki Pages
331
- - New page for installing on [Fedora](https://github.com/arxopia/risu/wiki/Fedora-Installation-Guide)
332
- - New page for installing on [CentOS](https://github.com/arxopia/risu/wiki/CentOS-Installation-Guide)
333
- - New page for installing on [Gentoo](https://github.com/arxopia/risu/wiki/Gentoo-Installation-Guide)
334
- - New page for installing on [ArchLinux](https://github.com/arxopia/risu/wiki/Arch-Linux-Install-Guide)
354
+ - New page for installing on [Fedora](https://github.com/hammackj/risu/wiki/Fedora-Installation-Guide)
355
+ - New page for installing on [CentOS](https://github.com/hammackj/risu/wiki/CentOS-Installation-Guide)
356
+ - New page for installing on [Gentoo](https://github.com/hammackj/risu/wiki/Gentoo-Installation-Guide)
357
+ - New page for installing on [ArchLinux](https://github.com/hammackj/risu/wiki/Arch-Linux-Install-Guide)
335
358
 
336
359
  #1.5.3 (August 29, 2012)
337
360
  - New Parsed Tags
@@ -470,14 +493,14 @@
470
493
  - Fixed a bug on the exec_summary_detailed detailed report
471
494
  - A quick reference for Microsoft findings can now be found in the Patch model,
472
495
  You are able to get host_id, name(patch name, ie MS01-001), value (plugin_id)
473
- - Please report any missing tags that risu outputs to risu[@]arxopia[.]com, I expect a ton of Microsoft Patch tags missing
496
+ - Please report any missing tags that risu outputs to jacob.hammack[@]hammackj[.]com, I expect a ton of Microsoft Patch tags missing
474
497
 
475
498
  #1.4.8 (August 21, 2011)
476
499
  - Fixed a gemspec dependency error reported by mlpotgieter
477
500
  - Fixed a parser error related to Microsoft Bulletins report by stevelodin
478
501
  - Added a Table for all host related patches, currently only has Microsoft Bulletins
479
502
  You can access it via `Host.first.patches` or `Patch.all`
480
- - Please report any missing tags that risu outputs to risu[@]arxopia[.]com, I expect a ton of Microsoft Patch tags missing
503
+ - Please report any missing tags that risu outputs to jacob.hammack[@]hammackj[.]com, I expect a ton of Microsoft Patch tags missing
481
504
 
482
505
  #1.4.7 (August 13, 2011)
483
506
  - Fixed issue #39 Ruby 1.8.7 Syntax error reported by mlpotgieter
@@ -510,7 +533,7 @@ You can access it via `Host.first.patches` or `Patch.all`
510
533
 
511
534
  #1.4.3 (May 23, 2011)
512
535
 
513
- **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 risu[@]arxopia[.]com**
536
+ **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**
514
537
 
515
538
  - Fixed small bug in Windows/Other OS graphs
516
539
  - Increased the verboseness of Error messages Ticket #29
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -20,7 +20,7 @@
20
20
 
21
21
 
22
22
  module Risu
23
- # @TODO 1.8 - move graph variables to graphs.rb
23
+ # @TODO 1.8.1 - move graph variables to graphs.rb
24
24
  GRAPH_WIDTH = 750
25
25
  # red orange yellow green blue purple grey pink
26
26
  GRAPH_COLORS = %w(#d2403f #ec9241 #fcc343 #50ad51 #397bbb #8E6B8E black #cccccc brown #e52d89)
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,40 +1,34 @@
1
- # Copyright (c) 2012-2016 Arxopia LLC.
2
- # All rights reserved.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
3
2
  #
4
- # Redistribution and use in source and binary forms, with or without
5
- # modification, are permitted provided that the following conditions are met:
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
6
9
  #
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.
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
15
12
  #
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.
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
26
20
 
27
21
  module Risu
28
22
  module Templates
29
23
  module GraphTemplateHelper
30
-
24
+
31
25
  #
32
26
  def other_os_graph_page
33
27
  if Host.other_os_graph_has_data?
34
28
  new_page
35
29
  @output.image Host.other_os_graph, :width => 500, :height => 375, :position => :center
36
30
  text Host.other_os_graph_text
37
- end
31
+ end
38
32
  end
39
33
 
40
34
  #
@@ -65,7 +59,7 @@ module Risu
65
59
  new_page
66
60
  @output.image Item.risks_by_severity_graph, :width => 500, :height => 375, :position => :center
67
61
  text Item.risks_by_severity_graph_text, :inline_format => true
68
- end
62
+ end
69
63
  end
70
64
  end
71
- end
65
+ end
@@ -1,35 +1,29 @@
1
- # Copyright (c) 2012-2016 Arxopia LLC.
2
- # All rights reserved.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
3
2
  #
4
- # Redistribution and use in source and binary forms, with or without
5
- # modification, are permitted provided that the following conditions are met:
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
6
9
  #
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.
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
15
12
  #
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.
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
26
20
 
27
21
  module Risu
28
22
  module Templates
29
23
  module HostTemplateHelper
30
24
 
31
25
  #
32
- def unsupported_os(title, plugin_name)
26
+ def unsupported_os title, plugin_name
33
27
  if item_count_by_plugin_name(plugin_name) <= 0
34
28
  return
35
29
  end
@@ -1,28 +1,22 @@
1
- # Copyright (c) 2012-2016 Arxopia LLC.
2
- # All rights reserved.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
3
2
  #
4
- # Redistribution and use in source and binary forms, with or without
5
- # modification, are permitted provided that the following conditions are met:
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
6
9
  #
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.
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
15
12
  #
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.
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
26
20
 
27
21
  module Risu
28
22
  module Templates
@@ -32,7 +26,7 @@ module Risu
32
26
  def conficker_count
33
27
  begin
34
28
  return Item.where(:plugin_id => Plugin.where(:plugin_name => "Conficker Worm Detection (uncredentialed check)").first.id).count
35
- rescue => e
29
+ rescue
36
30
  return 0
37
31
  end
38
32
  end
@@ -88,7 +82,7 @@ module Risu
88
82
  def known_malicious_process_count
89
83
  begin
90
84
  return Item.where(:plugin_id => 59275).count
91
- rescue => e
85
+ rescue
92
86
  return 0
93
87
  end
94
88
  end
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2010-2016 Arxopia LLC.
1
+ # Copyright (c) 2010-2017 Jacob Hammack.
2
2
  #
3
3
  # Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  # of this software and associated documentation files (the "Software"), to deal
@@ -34,11 +34,11 @@ module Risu
34
34
  attr_accessor :info
35
35
 
36
36
  #
37
- def self.inherited(child)
37
+ def self.inherited child
38
38
  possible_postprocesses << child
39
39
  end
40
40
 
41
- def == (other)
41
+ def == other
42
42
 
43
43
  if self.info == nil || self.info[:plugin_id] == nil
44
44
  false
@@ -49,7 +49,7 @@ module Risu
49
49
  end
50
50
  end
51
51
 
52
- def <=> (other)
52
+ def <=> other
53
53
  if self.info[:plugin_id] < other.info[:plugin_id]
54
54
  -1
55
55
  elsif self.info[:plugin_id] > other.info[:plugin_id]
@@ -59,72 +59,110 @@ module Risu
59
59
  end
60
60
  end
61
61
 
62
- #
63
- #def initialize
64
- # @info = {}
65
- #end
62
+ # Create a plugin based on a combination of all plugins
63
+ # to be rolled up.
64
+ def create_plugin
66
65
 
67
- # NOTE:
68
- #looks like its working
69
- def newest_reader_plugin
70
- newest = DateTime.new(0001, 01, 01)
71
- newest_plugin = nil
66
+ plugin = Plugin.find_by_id(@info[:plugin_id])
72
67
 
73
- @info[:plugin_ids].each do |id|
74
- plugin = Plugin.find_by_id(id)
68
+ if plugin == nil
69
+ plugin = Plugin.new
70
+ end
75
71
 
76
- if plugin == nil || plugin.plugin_modification_date == nil
77
- next
72
+ # Populate items from post process module
73
+ plugin.id = @info[:plugin_id]
74
+ plugin.plugin_name = @info[:plugin_name]
75
+ plugin.description = @info[:description]
76
+ plugin.plugin_version = @info[:version]
77
+ plugin.plugin_publication_date = @info[:publication_date]
78
+ plugin.plugin_modification_date = @info[:modification_date]
79
+
80
+ # Boiler plate for all roll up plugins
81
+ plugin.family_name = "Risu Rollup Plugins"
82
+ plugin.synopsis = "Software often has vulnerabilities that are corrected in newer versions. It was determined that an older version of the software is installed on this system."
83
+ plugin.solution = "If possible, update to the latest version of the software."
84
+ plugin.plugin_type = "Rollup"
85
+ plugin.rollup = true
86
+ plugin.compliance = false
87
+
88
+ # Find oldest vuln date.
89
+ begin
90
+ p = Plugin.where(:id => @info[:plugin_ids]).where.not(:vuln_publication_date => nil).order(:vuln_publication_date).first
91
+ unless p.nil?
92
+ plugin.vuln_publication_date = p.vuln_publication_date
78
93
  end
94
+ end
79
95
 
80
- if plugin.plugin_modification_date >= newest
81
- newest = plugin.plugin_modification_date if plugin.plugin_modification_date != nil
82
- newest_plugin = plugin
96
+ begin
97
+ p = Plugin.where(:id => @info[:plugin_ids]).where.not(:cvss_base_score => nil).order(:cvss_base_score).last
98
+ unless p.nil?
99
+ plugin.cvss_base_score = p.cvss_base_score
100
+ plugin.cvss_vector = p.cvss_vector
83
101
  end
84
102
  end
85
103
 
86
- return newest_plugin
87
- end
104
+ begin
105
+ p = Plugin.where(:id => @info[:plugin_ids]).where.not(:cvss_temporal_score => nil).order(:cvss_temporal_score).last
106
+ unless p.nil?
107
+ plugin.cvss_temporal_score = p.cvss_temporal_score
108
+ plugin.cvss_temporal_vector = p.cvss_temporal_vector
109
+ end
110
+ end
88
111
 
89
- # Creates a rollup plugin based on the newest Adobe Reader
90
- #
91
- def create_plugin
112
+ if Plugin.where(:id => @info[:plugin_ids], :exploit_available => true).count > 0
113
+ plugin.exploit_available = true
114
+ end
92
115
 
93
- plugin = Plugin.find_by_id(@info[:plugin_id])
116
+ if Plugin.where(:id => @info[:plugin_ids], :exploit_framework_core => "true").count > 0
117
+ plugin.exploit_framework_core = true
118
+ end
94
119
 
95
- newest_plugin = newest_reader_plugin()
120
+ if Plugin.where(:id => @info[:plugin_ids], :exploit_framework_metasploit => "true").count > 0
121
+ plugin.exploit_framework_metasploit = true
122
+ end
96
123
 
97
- if newest_plugin == nil
98
- return
124
+ if Plugin.where(:id => @info[:plugin_ids], :exploit_framework_canvas => "true").count > 0
125
+ plugin.exploit_framework_canvas = true
99
126
  end
100
127
 
101
- if plugin == nil
102
- plugin = Plugin.new
128
+ if Plugin.where(:id => @info[:plugin_ids], :exploit_framework_exploithub => "true").count > 0
129
+ plugin.exploit_framework_exploithub = true
103
130
  end
104
131
 
105
- plugin.id = @info[:plugin_id]
106
- plugin.plugin_name = @info[:plugin_name]
107
- plugin.family_name = "Risu Rollup Plugins"
108
- plugin.description = newest_plugin.description || ""
109
- plugin.plugin_version = newest_plugin.plugin_version || ""
110
- plugin.plugin_publication_date = newest_plugin.plugin_publication_date
111
- plugin.plugin_modification_date = newest_plugin.plugin_modification_date
112
- plugin.vuln_publication_date = newest_plugin.vuln_publication_date
113
- plugin.cvss_vector = newest_plugin.cvss_vector || ""
114
- plugin.cvss_base_score = newest_plugin.cvss_base_score
115
- plugin.cvss_temporal_score = newest_plugin.cvss_temporal_score
116
- plugin.cvss_temporal_vector = newest_plugin.cvss_temporal_vector
117
- plugin.risk_factor = newest_plugin.risk_factor
118
- plugin.solution = newest_plugin.solution
119
- plugin.synopsis = newest_plugin.synopsis
120
- plugin.plugin_type = "Rollup"
121
- plugin.rollup = true
132
+ if Plugin.where(:id => @info[:plugin_ids], :exploit_framework_d2_elliot => "true").count > 0
133
+ plugin.exploit_framework_d2_elliot = true
134
+ end
135
+
136
+ if Plugin.where(:id => @info[:plugin_ids], :in_the_news => true).count > 0
137
+ plugin.in_the_news = true
138
+ end
139
+
140
+ if Plugin.where(:id => @info[:plugin_ids], :exploited_by_malware => "true").count > 0
141
+ plugin.exploited_by_malware = true
142
+ end
143
+
144
+ ["Critical", "High", "Medium", "Low", "Info"].each do |risk|
145
+ if Plugin.where(:id => @info[:plugin_ids], :risk_factor => risk).size > 0
146
+ plugin.risk_factor = risk
147
+ break
148
+ end
149
+ end
150
+
151
+ begin
152
+ p = Plugin.where(:id => @info[:plugin_ids]).where.not(:stig_severity => nil).order(:stig_severity).first
153
+ unless p.nil?
154
+ plugin.stig_severity = p.stig_severity
155
+ end
156
+ end
157
+
158
+ # Broken
159
+ #plugin.references << References.where(:plugin_id => @info[:plugin_ids], :reference_name => "cve")
122
160
 
123
161
  plugin.save
124
162
  end
125
163
 
126
164
  #
127
- def create_item(host_id, severity)
165
+ def create_item host_id, severity
128
166
  item = Item.new
129
167
 
130
168
  item.host_id = host_id
@@ -138,24 +176,12 @@ module Risu
138
176
  end
139
177
 
140
178
  #
141
- def has_reader_findings
142
- @info[:plugin_ids].each do |plugin_id|
143
- if Item.where(:plugin_id => plugin_id)
144
- return true
145
- end
146
- end
147
-
148
- return false
179
+ def has_findings
180
+ Item.where(:plugin_id => @info[:plugin_ids]).count > 0
149
181
  end
150
182
 
151
- def has_host_reader_findings (host_id)
152
- @info[:plugin_ids].each do |plugin_id|
153
- if Item.where(:plugin_id => plugin_id).where(:host_id => host_id).count >= 1
154
- return true
155
- end
156
- end
157
-
158
- return false
183
+ def has_host_findings(host_id)
184
+ Item.where(:plugin_id => @info[:plugin_ids]).where(:host_id => host_id).count > 0
159
185
  end
160
186
 
161
187
  #
@@ -169,20 +195,20 @@ module Risu
169
195
 
170
196
  #
171
197
  def run
172
- if !has_reader_findings()
198
+ if !has_findings()
173
199
  return
174
200
  end
175
201
 
176
- #Create the dummy plugin
177
- create_plugin()
202
+ # If this is a "roll up" post-process, create a plugin
203
+ if Plugin.where(:id => @info[:plugin_ids]).count > 0
204
+ create_plugin()
205
+ end
178
206
 
179
207
  Host.all.each do |host|
180
- if !has_host_reader_findings(host.id)
208
+ if !has_host_findings(host.id)
181
209
  next
182
210
  end
183
211
 
184
- #puts "Found host with reader finding #{host.ip}"
185
-
186
212
  finding_severity = 0
187
213
 
188
214
  @info[:plugin_ids].each do |plugin_id|