dradis-nikto 4.11.0 → 4.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67e4bf7d7723dcfe5012564b1fa8b5e7f042c65ca5dc67df4b7cfb8baebfa2cf
4
- data.tar.gz: f0a039d26c1bb7e77bbf803edee818658f0307a084dd69461c9d0ad70108918c
3
+ metadata.gz: 717a9a1c0a9082a70bdfdb2403d91b032c02f3866e139735ac7f23faca939d6a
4
+ data.tar.gz: 5c1d73b43b8a241b815c05a6c340ba4d60dd5b4caaf80ee6a040ffb0365e77b8
5
5
  SHA512:
6
- metadata.gz: 8fc903ac43bde5ece621e98da2871c4320dcb9c4d67113f1984274f98ab37fe19c51289a07bc765db80e5f2018755a63215aec27e35ebe37f9ca945750761d7d
7
- data.tar.gz: 4626d6011bf20333946dd6d10f3cf03a79a632750e86235d4bcada7e95f61597fec3ce8b77bd667caa081a7d60f56b8bed25a81c9cdfe10692e2de07be783c92
6
+ metadata.gz: e6ae40c425e8525a7e11e7fec4b4ff3ddaf76a21cfc7a9750337993a2dd95ed7e2bb46e648127ccdee2a5f1aa10de554255ad16d7d41bce14352a62569ae663d
7
+ data.tar.gz: f984cb609b199262907a46943c2d3c2c6648e79155c14a1ad349ace727bb7412a007bcc788fac9d3e6b96a33b3a41e75acf80aa1b4e69c3d215fd24ae2d3b762
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ v4.12.0 (May 2024)
2
+ - Migrate integration to use Mappings Manager
3
+ - Update Dradis links in README
4
+
1
5
  v4.11.0 (January 2024)
2
6
  - No changes
3
7
 
data/README.md CHANGED
@@ -4,8 +4,7 @@
4
4
 
5
5
  Upload Nikto files into Dradis.
6
6
 
7
- The add-on requires [Dradis CE](https://dradisframework.org/) > 3.0, or [Dradis Pro](https://dradisframework.com/pro/).
8
-
7
+ The add-on requires [Dradis CE](https://dradis.com/ce/) > 3.0, or [Dradis Pro](https://dradis.com/).
9
8
 
10
9
  ## More information
11
10
 
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 11
11
+ MINOR = 12
12
12
  TINY = 0
13
13
  PRE = nil
14
14
 
@@ -39,7 +39,7 @@ module Dradis::Plugins::Nikto
39
39
  # Scan details
40
40
  logger.info{ 'Adding ' + host_label }
41
41
  host_node = content_service.create_node(label: host_label, type: :host)
42
- scan_text = template_service.process_template(template: 'scan', data: xml_scan)
42
+ scan_text = mapping_service.apply_mapping(source: 'scan', data: xml_scan)
43
43
  content_service.create_note(
44
44
  text: scan_text,
45
45
  node: host_node)
@@ -55,7 +55,7 @@ module Dradis::Plugins::Nikto
55
55
  # Check for SSL cert tag and add that data in as well
56
56
  unless xml_scan.at_xpath("ssl").nil?
57
57
  xml_ssl = xml_scan.at_xpath("ssl")
58
- ssl_text = template_service.process_template(template: 'ssl', data: xml_ssl)
58
+ ssl_text = mapping_service.apply_mapping(source: 'ssl', data: xml_ssl)
59
59
  content_service.create_note(
60
60
  text: ssl_text,
61
61
  node: host_node)
@@ -64,12 +64,12 @@ module Dradis::Plugins::Nikto
64
64
  # Items
65
65
  xml_scan.xpath("item").each do |xml_item|
66
66
  plugin_id = xml_item.has_attribute?("id") ? xml_item["id"] : "Unknown"
67
- item_text = template_service.process_template(template: 'item', data: xml_item)
67
+ item_text = mapping_service.apply_mapping(source: 'item', data: xml_item)
68
68
  logger.info{ 'Creating Issue ID' + plugin_id }
69
69
  issue = content_service.create_issue(text: item_text, id: plugin_id)
70
70
 
71
71
  logger.info{ "\t\t => Creating new evidence" }
72
- evidence_content = template_service.process_template(template: 'evidence', data: xml_item)
72
+ evidence_content = mapping_service.apply_mapping(source: 'evidence', data: xml_item)
73
73
  content_service.create_evidence(issue: issue, node: host_node, content: evidence_content)
74
74
  end
75
75
  end
@@ -0,0 +1,61 @@
1
+ module Dradis::Plugins::Nikto
2
+ module Mapping
3
+ DEFAULT_MAPPING = {
4
+ evidence: {
5
+ 'Request' => 'Request Method: {{ nikto[item.request_method] }}',
6
+ 'Links' => "Link: {{ nikto[item.namelink] }}\nIP Based Link: {{ nikto[item.iplink] }}"
7
+ },
8
+ item: {
9
+ 'Title' => '{{ nikto[item.description] }}',
10
+ 'Details' => '{{ nikto[item.description] }}',
11
+ 'References' => '{{ nikto[item.references] }}'
12
+ },
13
+ scan: {
14
+ 'Title' => 'Nikto upload: {{ nikto[scan.filename] }}',
15
+ 'Details' => "IP: {{ nikto[scan.targetip] }}\nHostname: {{ nikto[scan.targethostname] }}\nPort: {{ nikto[scan.targetport] }}\nBanner: {{ nikto[scan.targetbanner] }}\nStarttime: {{ nikto[scan.starttime] }}\nSite Name: {{ nikto[scan.sitename] }}\nSite IP: {{ nikto[scan.siteip] }}\nHost Header: {{ nikto[scan.hostheader] }}\nErrors: {{ nikto[scan.errors] }}\nTotal Checks: {{ nikto[scan.checks] }}"
16
+ },
17
+ ssl: {
18
+ 'Title' => 'SSL Cert Information',
19
+ 'Details' => "Ciphers: {{ nikto[ssl.ciphers] }}\nIssuers: {{ nikto[ssl.issuers] }}\nInfo: {{ nikto[ssl.info] }}"
20
+ }
21
+ }.freeze
22
+
23
+ SOURCE_FIELDS = {
24
+ evidence: [
25
+ 'item.request_method',
26
+ 'item.uri',
27
+ 'item.namelink',
28
+ 'item.iplink'
29
+ ],
30
+ item: [
31
+ 'item.description',
32
+ 'item.id',
33
+ 'item.iplink',
34
+ 'item.namelink',
35
+ 'item.osvdbid',
36
+ 'item.osvdblink',
37
+ 'item.references',
38
+ 'item.request_method',
39
+ 'item.uri'
40
+ ],
41
+ scan: [
42
+ 'scan.filename',
43
+ 'scan.targetip',
44
+ 'scan.targethostname',
45
+ 'scan.targetport',
46
+ 'scan.targetbanner',
47
+ 'scan.starttime',
48
+ 'scan.sitename',
49
+ 'scan.siteip',
50
+ 'scan.hostheader',
51
+ 'scan.errors',
52
+ 'scan.checks'
53
+ ],
54
+ ssl: [
55
+ 'ssl.ciphers',
56
+ 'ssl.issuers',
57
+ 'ssl.info'
58
+ ]
59
+ }.freeze
60
+ end
61
+ end
@@ -7,5 +7,6 @@ end
7
7
 
8
8
  require 'dradis/plugins/nikto/engine'
9
9
  require 'dradis/plugins/nikto/field_processor'
10
+ require 'dradis/plugins/nikto/mapping'
10
11
  require 'dradis/plugins/nikto/importer'
11
12
  require 'dradis/plugins/nikto/version'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dradis-nikto
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.11.0
4
+ version: 4.12.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: 2024-01-17 00:00:00.000000000 Z
11
+ date: 2024-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -119,6 +119,7 @@ files:
119
119
  - lib/dradis/plugins/nikto/field_processor.rb
120
120
  - lib/dradis/plugins/nikto/gem_version.rb
121
121
  - lib/dradis/plugins/nikto/importer.rb
122
+ - lib/dradis/plugins/nikto/mapping.rb
122
123
  - lib/dradis/plugins/nikto/version.rb
123
124
  - lib/nikto/item.rb
124
125
  - lib/nikto/scan.rb
@@ -129,18 +130,10 @@ files:
129
130
  - spec/spec_helper.rb
130
131
  - spec/upload_v2.1.4_spec.rb
131
132
  - spec/upload_v2.5.0_spec.rb
132
- - templates/evidence.fields
133
133
  - templates/evidence.sample
134
- - templates/evidence.template
135
- - templates/item.fields
136
134
  - templates/item.sample
137
- - templates/item.template
138
- - templates/scan.fields
139
135
  - templates/scan.sample
140
- - templates/scan.template
141
- - templates/ssl.fields
142
136
  - templates/ssl.sample
143
- - templates/ssl.template
144
137
  homepage: https://dradis.com/integrations/nikto.html
145
138
  licenses:
146
139
  - GPL-2
@@ -160,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
153
  - !ruby/object:Gem::Version
161
154
  version: '0'
162
155
  requirements: []
163
- rubygems_version: 3.3.7
156
+ rubygems_version: 3.1.4
164
157
  signing_key:
165
158
  specification_version: 4
166
159
  summary: Nikto add-on for the Dradis Framework.
@@ -1,4 +0,0 @@
1
- item.request_method
2
- item.uri
3
- item.namelink
4
- item.iplink
@@ -1,6 +0,0 @@
1
- #[Request]#
2
- Request Method: %item.request_method%
3
-
4
- #[Links]#
5
- Link: %item.namelink%
6
- IP Based Link: %item.iplink%
@@ -1,9 +0,0 @@
1
- item.description
2
- item.id
3
- item.iplink
4
- item.namelink
5
- item.osvdbid
6
- item.osvdblink
7
- item.references
8
- item.request_method
9
- item.uri
@@ -1,8 +0,0 @@
1
- #[Title]#
2
- %item.description%
3
-
4
- #[Details]#
5
- %item.description%
6
-
7
- #[References]#
8
- %item.references%
@@ -1,11 +0,0 @@
1
- scan.filename
2
- scan.targetip
3
- scan.targethostname
4
- scan.targetport
5
- scan.targetbanner
6
- scan.starttime
7
- scan.sitename
8
- scan.siteip
9
- scan.hostheader
10
- scan.errors
11
- scan.checks
@@ -1,14 +0,0 @@
1
- #[Title]#
2
- Nikto upload: %scan.filename%
3
-
4
- #[Details]#
5
- IP: %scan.targetip%
6
- Hostname: %scan.targethostname%
7
- Port: %scan.targetport%
8
- Banner: %scan.targetbanner%
9
- Starttime: %scan.starttime%
10
- Site Name: %scan.sitename%
11
- Site IP: %scan.siteip%
12
- Host Header: %scan.hostheader%
13
- Errors: %scan.errors%
14
- Total Checks: %scan.checks%
data/templates/ssl.fields DELETED
@@ -1,3 +0,0 @@
1
- ssl.ciphers
2
- ssl.issuers
3
- ssl.info
@@ -1,7 +0,0 @@
1
- #[Title]#
2
- SSL Cert Information
3
-
4
- #[Details]#
5
- Ciphers: %ssl.ciphers%
6
- Issuers: %ssl.issuers%
7
- Info: %ssl.info%