dradis-openvas 4.2.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37ab1d55e8bf4aecd660030ddf6d57e3b19c7878a9df6559dd2c7a541b399336
4
- data.tar.gz: aec3f05770b7368da1bce24041a702dddbd8e8063ee1aa690591570de353f7aa
3
+ metadata.gz: d2995faaab7464c1ddb7b6a92bbc43d498d0bf946a7cda83851252f7f2b9f691
4
+ data.tar.gz: 458b917d6a93e96aecb93cb455478f612f6f4e5b52beb382cd1290235d1e3fa3
5
5
  SHA512:
6
- metadata.gz: 542ae8b03b7871217c5a1d4ba2b7867abf36d1a8ce351a52a6ef7dc735c3451780f2a3c1724a1819805db0c5becf07a33889d8cf065fcf7c7bf3f786977a2f01
7
- data.tar.gz: 1f7fc4df207fd5cf9e620043f64405d60bc58d6b2016686330155a7630bec4d0ba0231ce841baf352aca586af7ab2b9f7945fd28f40050f9a6f25c8cc3240b26
6
+ metadata.gz: 1644859b459667c7c9fd8198ab832b8b25eb8be9b42f2ac7278df6e0e0ceaaf61111720191012d694f5a6581aa9a0d453d1809a7b7c61408996c1e87bdcc9edb
7
+ data.tar.gz: e03b9d3be3992dd68b18eb2b8c9dc5e8ec84c27192ad0e82999b419d5bce2039687636896c406b297a9015572fc172c608d6199273e7655adefb4b4bfa7282a6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ v4.5.0 (August 2022)
2
+ - No changes
3
+
4
+ v4.4.0 (June 2022)
5
+ - Registers template mappings locally
6
+
7
+ v4.3.0 (April 2022)
8
+ - Update Node label parsing. Include :hostname and :asset_id properties.
9
+
1
10
  v4.2.0 (February 2022)
2
11
  - No changes
3
12
 
@@ -12,4 +12,4 @@ module Dradis::Plugins::OpenVAS
12
12
  end
13
13
  end
14
14
  end
15
- end
15
+ end
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 2
11
+ MINOR = 5
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -1,5 +1,8 @@
1
1
  module Dradis::Plugins::OpenVAS
2
2
  class Importer < Dradis::Plugins::Upload::Importer
3
+ def self.templates
4
+ { evidence: 'evidence', issue: 'result' }
5
+ end
3
6
 
4
7
  # The framework will call this function if the user selects this plugin from
5
8
  # the dropdown list and uploads a file.
@@ -35,8 +38,7 @@ module Dradis::Plugins::OpenVAS
35
38
 
36
39
  def process_result(xml_result)
37
40
  # Extract host
38
- host_label = xml_result.at_xpath('./host').text()
39
- self.host_node = content_service.create_node(label: host_label, type: :host)
41
+ set_host(xml_result.at_xpath('./host'))
40
42
 
41
43
  # Uniquely identify this issue
42
44
  nvt_oid = xml_result.at_xpath('./nvt')[:oid]
@@ -93,5 +95,18 @@ module Dradis::Plugins::OpenVAS
93
95
  content_service.create_evidence(issue: issue, node: host_node, content: evidence_content)
94
96
  end
95
97
 
98
+ def set_host(xml_host)
99
+ host_label = xml_host.at_xpath('text()').text
100
+ self.host_node = content_service.create_node(label: host_label, type: :host)
101
+
102
+ xml_hostname = xml_host.at_xpath('./hostname')
103
+ host_node.set_property(:hostname, xml_hostname.text) if xml_hostname
104
+
105
+ xml_asset = xml_host.at_xpath('./asset')
106
+ host_node.set_property(:asset_id, xml_asset[:asset_id]) if xml_asset
107
+
108
+ host_node.save!
109
+ end
110
+
96
111
  end
97
112
  end
@@ -0,0 +1,71 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <report id="9917b2e8-7db6-475b-b591-bd3ba828625c">
3
+ <report>
4
+ <results>
5
+ <result id="32249f6c-89f1-4a93-888f-29404b01374f">
6
+ <subnet>188.111.11.85</subnet>
7
+ <host>188.111.11.85<hostname>www.google.com</hostname></host>
8
+ <port>http (80/tcp)</port>
9
+ <nvt oid="1.3.6.1.4.1.25623.1.0.103122">
10
+ <name>Apache Web Server ETag Header Information Disclosure Weakness</name>
11
+ <family>Web application abuses</family>
12
+ <cvss_base>4.3</cvss_base>
13
+ <risk_factor>Medium</risk_factor>
14
+ <cve>CVE-2003-1418</cve>
15
+ <bid>6939</bid>
16
+ <tags>cvss_base_vector=AV:N/AC:M/Au:N/C:P/I:N/A:N|summary=A weakness has been discovered in Apache web servers that are
17
+ configured to use the FileETag directive. Due to the way in which
18
+ Apache generates ETag response headers, it may be possible for an
19
+ attacker to obtain sensitive information regarding server files.
20
+ Specifically, ETag header fields returned to a client contain the
21
+ file's inode number.
22
+
23
+ Exploitation of this issue may provide an attacker with information
24
+ that may be used to launch further attacks against a target network.
25
+
26
+ OpenBSD has released a patch that addresses this issue. Inode numbers
27
+ returned from the server are now encoded using a private hash to avoid
28
+ the release of sensitive information.|solution=OpenBSD has released a patch to address this issue.
29
+
30
+ Novell has released TID10090670 to advise users to apply the available
31
+ workaround of disabling the directive in the configuration file for
32
+ Apache releases on NetWare. Please see the attached Technical
33
+ Information Document for further details.</tags>
34
+ <cert>
35
+ <warning>database not available</warning>
36
+ </cert>
37
+ <xref>URL:https://www.securityfocus.com/bid/6939, URL:http://httpd.apache.org/docs/mod/core.html#fileetag, URL:http://www.openbsd.org/errata32.html, URL:http://support.novell.com/docs/Tids/Solutions/10090670.html</xref>
38
+ </nvt>
39
+ <threat>Medium</threat>
40
+ <description>Summary:
41
+ A weakness has been discovered in Apache web servers that are
42
+ configured to use the FileETag directive. Due to the way in which
43
+ Apache generates ETag response headers, it may be possible for an
44
+ attacker to obtain sensitive information regarding server files.
45
+ Specifically, ETag header fields returned to a client contain the
46
+ file's inode number.
47
+
48
+ Exploitation of this issue may provide an attacker with information
49
+ that may be used to launch further attacks against a target network.
50
+
51
+ OpenBSD has released a patch that addresses this issue. Inode numbers
52
+ returned from the server are now encoded using a private hash to avoid
53
+ the release of sensitive information.
54
+ Solution:
55
+ OpenBSD has released a patch to address this issue.
56
+
57
+ Novell has released TID10090670 to advise users to apply the available
58
+ workaround of disabling the directive in the configuration file for
59
+ Apache releases on NetWare. Please see the attached Technical
60
+ Information Document for further details.
61
+
62
+ Information that was gathered:
63
+ Inode: 1050855
64
+ Size: 177</description>
65
+ <original_threat>Medium</original_threat>
66
+ <notes />
67
+ <overrides />
68
+ </result>
69
+ </results>
70
+ </report>
71
+ </report>
@@ -0,0 +1,44 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Openvas upload plugin' do
4
+ describe 'importer' do
5
+ before(:each) do
6
+ # Stub template service
7
+ templates_dir = File.expand_path('../../../templates', __FILE__)
8
+ expect_any_instance_of(Dradis::Plugins::TemplateService)
9
+ .to receive(:default_templates_dir).and_return(templates_dir)
10
+
11
+ plugin = Dradis::Plugins::OpenVAS
12
+
13
+ @content_service = Dradis::Plugins::ContentService::Base.new(plugin: plugin)
14
+
15
+ allow(@content_service).to receive(:create_note) do |args|
16
+ OpenStruct.new(args)
17
+ end
18
+ allow(@content_service).to receive(:create_node) do |args|
19
+ OpenStruct.new(args)
20
+ end
21
+ allow(@content_service).to receive(:create_issue) do |args|
22
+ OpenStruct.new(args)
23
+ end
24
+ allow(@content_service).to receive(:create_evidence) do |args|
25
+ OpenStruct.new(args)
26
+ end
27
+
28
+ @importer = plugin::Importer.new(
29
+ content_service: @content_service
30
+ )
31
+ end
32
+
33
+ context 'Openvas v24 output' do
34
+ it 'parses node label without hostname' do
35
+ expect(@content_service).to receive(:create_node) do |args|
36
+ expect(args[:label]).to eq('188.111.11.85')
37
+ expect(args[:type]).to eq(:host)
38
+ end
39
+
40
+ @importer.import(file: File.expand_path('../fixtures/files/report_v24.xml', __dir__))
41
+ end
42
+ end
43
+ end
44
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-openvas
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-14 00:00:00.000000000 Z
11
+ date: 2022-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -112,10 +112,12 @@ files:
112
112
  - lib/openvas/v6/result.rb
113
113
  - lib/openvas/v7/result.rb
114
114
  - lib/tasks/thorfile.rb
115
+ - spec/fixtures/files/report_v24.xml
115
116
  - spec/fixtures/files/result.xml
116
117
  - spec/fixtures/files/result2.xml
117
118
  - spec/fixtures/files/v7/report_v7.xml
118
119
  - spec/openvas/result_spec.rb
120
+ - spec/openvas/upload_v24_spec.rb
119
121
  - spec/spec_helper.rb
120
122
  - spec/support/fixture_loader.rb
121
123
  - templates/evidence.fields
@@ -143,14 +145,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
145
  - !ruby/object:Gem::Version
144
146
  version: '0'
145
147
  requirements: []
146
- rubygems_version: 3.1.4
148
+ rubygems_version: 3.2.28
147
149
  signing_key:
148
150
  specification_version: 4
149
151
  summary: OpenVAS add-on for the Dradis Framework.
150
152
  test_files:
153
+ - spec/fixtures/files/report_v24.xml
151
154
  - spec/fixtures/files/result.xml
152
155
  - spec/fixtures/files/result2.xml
153
156
  - spec/fixtures/files/v7/report_v7.xml
154
157
  - spec/openvas/result_spec.rb
158
+ - spec/openvas/upload_v24_spec.rb
155
159
  - spec/spec_helper.rb
156
160
  - spec/support/fixture_loader.rb