dradis-nikto 4.11.0 → 4.13.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: b3f0440372ee5cd5e262c97d69db973f977f0a6d4e43db6d53fc12d2b053d503
4
+ data.tar.gz: a9b06f2bbe8f2b66ab9e3df1df65889597eff58dbd289cbe709d3aac135b86f8
5
5
  SHA512:
6
- metadata.gz: 8fc903ac43bde5ece621e98da2871c4320dcb9c4d67113f1984274f98ab37fe19c51289a07bc765db80e5f2018755a63215aec27e35ebe37f9ca945750761d7d
7
- data.tar.gz: 4626d6011bf20333946dd6d10f3cf03a79a632750e86235d4bcada7e95f61597fec3ce8b77bd667caa081a7d60f56b8bed25a81c9cdfe10692e2de07be783c92
6
+ metadata.gz: 91361b14d3fc1c240fd3e367fccbc11d2ebe42d33d0f0f45d6c8da93ab32e3930bd5c64257ac3d7ffe3c5749400196c6363437c86a397c9ad3546af4efaf7a7f
7
+ data.tar.gz: 29f766b6e244160d70ea1a3fefb0e6dec53d50855d57b065fc78401cd49e4ed897d7d4957d64d7e9f0a2a8631b2ce85579c982454ca0aec15da4949ec2cd7d64
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ v4.13.0 (July 2024)
2
+ - No changes
3
+
4
+ v4.12.0 (May 2024)
5
+ - Migrate integration to use Mappings Manager
6
+ - Update Dradis links in README
7
+
1
8
  v4.11.0 (January 2024)
2
9
  - No changes
3
10
 
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
 
data/dradis-nikto.gemspec CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency 'dradis-plugins', '~> 4.0'
27
27
  spec.add_dependency 'nokogiri', '~> 1.3'
28
28
 
29
- spec.add_development_dependency 'bundler', '~> 1.6'
29
+ spec.add_development_dependency 'bundler', '~> 2.0'
30
30
  spec.add_development_dependency 'rake', '~> 10.0'
31
31
  spec.add_development_dependency 'rspec-rails'
32
32
  spec.add_development_dependency 'combustion', '~> 0.5.2'
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 11
11
+ MINOR = 13
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.13.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-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dradis-plugins
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.6'
47
+ version: '2.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.6'
54
+ version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -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.5.6
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%