dradis-openvas 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+
3
+ describe Openvas::Result do
4
+ include FixtureLoader
5
+
6
+ it "splits the <description> tag in its component fields" do
7
+ xml_doc = load_fixture_file('result.xml')
8
+ result = Openvas::Result.new( xml_doc.at_xpath('/result') )
9
+ result.description.should eq(xml_doc.at_xpath('/result/description').text)
10
+
11
+ expect(result.summary).to eq("This host is installed with Oracle Java SE JRE and is prone to\nmultiple vulnerabilities.\n\n")
12
+ expect(result.insight).to eq("Multiple flaws are caused by unspecified errors in the following\ncomponents:\n- 2D\n- AWT\n- Sound\n- I18n\n- CORBA\n- Serialization\n\n")
13
+ end
14
+
15
+ it "respects paragraphs within the component fields of the <description> value" do
16
+ xml_doc = load_fixture_file('result2.xml')
17
+ result = Openvas::Result.new( xml_doc.at_xpath('/result') )
18
+ result.summary.should eq("A weakness has been discovered in Apache web servers that are\nconfigured to use the FileETag directive. Due to the way in which\nApache generates ETag response headers, it may be possible for an\nattacker to obtain sensitive information regarding server files.\nSpecifically, ETag header fields returned to a client contain the\nfile's inode number.\n\nExploitation of this issue may provide an attacker with information\nthat may be used to launch further attacks against a target network.\n\nOpenBSD has released a patch that addresses this issue. Inode numbers\nreturned from the server are now encoded using a private hash to avoid\nthe release of sensitive information.\n")
19
+ end
20
+
21
+ it "correctly parses the fringe 'Impact Level' case" do
22
+ xml_doc = load_fixture_file('result.xml')
23
+ result = Openvas::Result.new( xml_doc.at_xpath('/result') )
24
+
25
+ result.impact_level.should eq('System/Application')
26
+ end
27
+
28
+
29
+ it "correctly parses the last component field in the <description>" do
30
+ xml_doc = load_fixture_file('result2.xml')
31
+ result = Openvas::Result.new( xml_doc.at_xpath('/result') )
32
+
33
+ result.info_gathered.should eq("Inode: 1050855\nSize: 177\n\n")
34
+ end
35
+ end
@@ -0,0 +1,35 @@
1
+ ENV["RAILS_ENV"] ||= 'test'
2
+ require File.expand_path("../../../../../config/environment", __FILE__)
3
+ require 'rspec/rails'
4
+
5
+ # Requires supporting ruby files with custom matchers and macros, etc,
6
+ # in spec/support/ and its subdirectories.
7
+ require 'support/fixture_loader'
8
+
9
+ RSpec.configure do |config|
10
+ # CLI niceties
11
+ config.order = :random
12
+
13
+ # Filter which specs to run
14
+ config.treat_symbols_as_metadata_keys_with_true_values = true
15
+ config.filter_run :focus => true
16
+ config.run_all_when_everything_filtered = true
17
+
18
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
19
+ # examples within a transaction, remove the following line or assign false
20
+ # instead of true.
21
+ config.use_transactional_fixtures = false
22
+
23
+ config.before(:suite) do
24
+ DatabaseCleaner.strategy = :transaction
25
+ DatabaseCleaner.clean_with(:truncation)
26
+ end
27
+
28
+ config.before(:each) do
29
+ DatabaseCleaner.start
30
+ end
31
+
32
+ config.after(:each) do
33
+ DatabaseCleaner.clean
34
+ end
35
+ end
@@ -0,0 +1,5 @@
1
+ module FixtureLoader
2
+ def load_fixture_file(file_name)
3
+ Nokogiri::XML( File.read("spec/fixtures/files/#{file_name}") )
4
+ end
5
+ end
@@ -0,0 +1,18 @@
1
+ result.threat
2
+ result.description
3
+ result.original_threat
4
+ result.notes
5
+ result.overrides
6
+ result.name
7
+ result.cvss_base
8
+ result.risk_factor
9
+ result.cve
10
+ result.bid
11
+ result.xref
12
+ result.summary
13
+ result.insight
14
+ result.info_gathered
15
+ result.impact
16
+ result.impact_level
17
+ result.affected_software
18
+ result.solution
@@ -0,0 +1,48 @@
1
+ <?xml version="1.0"?>
2
+ <result id="e2ccf551-ea4e-4186-9b24-76287d6244f3">
3
+ <subnet>172.31.253.9</subnet>
4
+ <host>172.31.253.9</host>
5
+ <port>general/tcp</port>
6
+ <nvt oid="1.3.6.1.4.1.25623.1.0.802610">
7
+ <name>Oracle Java SE JRE Multiple Vulnerabilities - February 2012 (Windows - 01)</name>
8
+ <cvss_base>10.0</cvss_base>
9
+ <risk_factor>Critical</risk_factor>
10
+ <cve>CVE-2011-3563, CVE-2012-0499, CVE-2012-0502, CVE-2012-0503, CVE-2012-0505, CVE-2012-0506</cve>
11
+ <bid>52011, 52012, 52014, 52016, 52017, 52018</bid>
12
+ <xref>URL:http://secunia.com/advisories/48009, URL:http://www.pre-cert.de/advisories/PRE-SA-2012-01.txt, URL:http://www.oracle.com/technetwork/topics/security/javacpufeb2012-366318.html, URL:http://www.oracle.com/technetwork/java/javase/documentation/overview-142120.html, URL:http://www.oracle.com/technetwork/java/javase/documentation/overview-137139.html</xref>
13
+ </nvt>
14
+ <threat>High</threat>
15
+ <description>
16
+ Summary:
17
+ This host is installed with Oracle Java SE JRE and is prone to
18
+ multiple vulnerabilities.
19
+
20
+ Vulnerability Insight:
21
+ Multiple flaws are caused by unspecified errors in the following
22
+ components:
23
+ - 2D
24
+ - AWT
25
+ - Sound
26
+ - I18n
27
+ - CORBA
28
+ - Serialization
29
+
30
+ Impact:
31
+ Successful exploitation allows remote attackers to affect confidentiality,
32
+ integrity, and availability via unknown vectors.
33
+
34
+ Impact Level: System/Application
35
+
36
+ Affected Software/OS:
37
+ Oracle Java SE JRE 7 Update 2 and earlier, 6 Update 30 and earlier, 5.0 Update 33
38
+ and earlier, and 1.4.2_35 and earlier
39
+
40
+ Solution:
41
+ Upgrade to Oracle Java SE JRE versions 7 Update 3, 6 Update 31, 5.0 Update
42
+ 34, 1.4.2_36 or later. For updates refer to
43
+ http://www.oracle.com/technetwork/topics/security/javacpufeb2012-366318.html
44
+ </description>
45
+ <original_threat>High</original_threat>
46
+ <notes/>
47
+ <overrides/>
48
+ </result>
@@ -0,0 +1,31 @@
1
+ #[Title]#
2
+ %result.name%
3
+
4
+
5
+ #[CVSSv2]#
6
+ %result.cvss_base%
7
+
8
+ #[AffectedSoftware]#
9
+ %result.affected_software%
10
+
11
+ #[Description]#
12
+ %result.summary%
13
+
14
+ #[Recommendation]#
15
+ %result.solution%
16
+
17
+
18
+ #[References]#
19
+ CVE
20
+ %result.cve%
21
+
22
+ BID
23
+ %result.bid%
24
+
25
+ Other
26
+ %result.xref%
27
+
28
+
29
+ #[RawDescription]#
30
+ (note that some of the information below can change from instance to instance of this problem)
31
+ %result.description%
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dradis-openvas
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.6.0
5
+ platform: ruby
6
+ authors:
7
+ - Daniel Martin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-04-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: dradis-plugins
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.6'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.6'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description: This add-on allows you to upload and parse output produced from OpenVAS
56
+ Scanner (v6 and v7) into Dradis.
57
+ email:
58
+ - etd@nomejortu.com
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - ".gitignore"
64
+ - ".rspec"
65
+ - CHANGELOG.md
66
+ - CONTRIBUTING.md
67
+ - Gemfile
68
+ - Guardfile
69
+ - LICENSE
70
+ - README.md
71
+ - Rakefile
72
+ - dradis-openvas.gemspec
73
+ - lib/dradis-openvas.rb
74
+ - lib/dradis/plugins/openvas.rb
75
+ - lib/dradis/plugins/openvas/engine.rb
76
+ - lib/dradis/plugins/openvas/field_processor.rb
77
+ - lib/dradis/plugins/openvas/gem_version.rb
78
+ - lib/dradis/plugins/openvas/importer.rb
79
+ - lib/dradis/plugins/openvas/version.rb
80
+ - lib/openvas/result.rb
81
+ - lib/openvas/v6/result.rb
82
+ - lib/openvas/v7/result.rb
83
+ - lib/tasks/thorfile.rb
84
+ - spec/fixtures/files/result.xml
85
+ - spec/fixtures/files/result2.xml
86
+ - spec/fixtures/files/v7/report_v7.xml
87
+ - spec/openvas/result_spec.rb
88
+ - spec/spec_helper.rb
89
+ - spec/support/fixture_loader.rb
90
+ - templates/result.fields
91
+ - templates/result.sample
92
+ - templates/result.template
93
+ homepage: http://dradisframework.org
94
+ licenses:
95
+ - GPL-2
96
+ metadata: {}
97
+ post_install_message:
98
+ rdoc_options: []
99
+ require_paths:
100
+ - lib
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ">="
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubyforge_project:
113
+ rubygems_version: 2.4.5
114
+ signing_key:
115
+ specification_version: 4
116
+ summary: OpenVAS add-on for the Dradis Framework.
117
+ test_files:
118
+ - spec/fixtures/files/result.xml
119
+ - spec/fixtures/files/result2.xml
120
+ - spec/fixtures/files/v7/report_v7.xml
121
+ - spec/openvas/result_spec.rb
122
+ - spec/spec_helper.rb
123
+ - spec/support/fixture_loader.rb