dradis-openvas 3.18.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,2 @@
1
+ evidence.port
2
+ evidence.description
@@ -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,6 @@
1
+ #[Port]#
2
+ %evidence.port%
3
+
4
+
5
+ #[Description]#
6
+ %evidence.description%
@@ -0,0 +1,19 @@
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.cvss_base_vector
9
+ result.risk_factor
10
+ result.cve
11
+ result.bid
12
+ result.xref
13
+ result.summary
14
+ result.insight
15
+ result.info_gathered
16
+ result.impact
17
+ result.impact_level
18
+ result.affected_software
19
+ 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,27 @@
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: %result.cve%
20
+ CVSS Vector: %cvss_base_vector%
21
+ BID: %result.bid%
22
+ Other: %result.xref%
23
+
24
+
25
+ #[RawDescription]#
26
+ (note that some of the information below can change from instance to instance of this problem)
27
+ %result.description%
metadata ADDED
@@ -0,0 +1,127 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dradis-openvas
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.18.0
5
+ platform: ruby
6
+ authors:
7
+ - Daniel Martin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-07-22 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
+ - ".github/issue_template.md"
64
+ - ".github/pull_request_template.md"
65
+ - ".gitignore"
66
+ - ".rspec"
67
+ - CHANGELOG.md
68
+ - CONTRIBUTING.md
69
+ - Gemfile
70
+ - Guardfile
71
+ - LICENSE
72
+ - README.md
73
+ - Rakefile
74
+ - dradis-openvas.gemspec
75
+ - lib/dradis-openvas.rb
76
+ - lib/dradis/plugins/openvas.rb
77
+ - lib/dradis/plugins/openvas/engine.rb
78
+ - lib/dradis/plugins/openvas/field_processor.rb
79
+ - lib/dradis/plugins/openvas/gem_version.rb
80
+ - lib/dradis/plugins/openvas/importer.rb
81
+ - lib/dradis/plugins/openvas/version.rb
82
+ - lib/openvas/result.rb
83
+ - lib/openvas/v6/result.rb
84
+ - lib/openvas/v7/result.rb
85
+ - lib/tasks/thorfile.rb
86
+ - spec/fixtures/files/result.xml
87
+ - spec/fixtures/files/result2.xml
88
+ - spec/fixtures/files/v7/report_v7.xml
89
+ - spec/openvas/result_spec.rb
90
+ - spec/spec_helper.rb
91
+ - spec/support/fixture_loader.rb
92
+ - templates/evidence.fields
93
+ - templates/evidence.sample
94
+ - templates/evidence.template
95
+ - templates/result.fields
96
+ - templates/result.sample
97
+ - templates/result.template
98
+ homepage: http://dradisframework.org
99
+ licenses:
100
+ - GPL-2
101
+ metadata: {}
102
+ post_install_message:
103
+ rdoc_options: []
104
+ require_paths:
105
+ - lib
106
+ required_ruby_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ required_rubygems_version: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - ">="
114
+ - !ruby/object:Gem::Version
115
+ version: '0'
116
+ requirements: []
117
+ rubygems_version: 3.1.2
118
+ signing_key:
119
+ specification_version: 4
120
+ summary: OpenVAS add-on for the Dradis Framework.
121
+ test_files:
122
+ - spec/fixtures/files/result.xml
123
+ - spec/fixtures/files/result2.xml
124
+ - spec/fixtures/files/v7/report_v7.xml
125
+ - spec/openvas/result_spec.rb
126
+ - spec/spec_helper.rb
127
+ - spec/support/fixture_loader.rb