dradis-nikto 4.10.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: 70beb907fab76800751b1b08a1220f9d3348ad9d48b0398f57c0726f681585e8
4
- data.tar.gz: a552ff17d859140557f50456ec235979eac2b6eda90ab812781d92b4f928a6cd
3
+ metadata.gz: 717a9a1c0a9082a70bdfdb2403d91b032c02f3866e139735ac7f23faca939d6a
4
+ data.tar.gz: 5c1d73b43b8a241b815c05a6c340ba4d60dd5b4caaf80ee6a040ffb0365e77b8
5
5
  SHA512:
6
- metadata.gz: b1211f020f9e6eaf6face8d66f8cc2603e0b73eb0425eda9a4a4259f9c4197c92bb7eff3b9bfddeced5032381421c056b380d76f07890c2294be8cb5c7b41891
7
- data.tar.gz: ed104fa0ce5f771e97c87bff3c112630a43dd52d6e8519557be5bcdd75ba98e8cff4585a65686ef3897198484e53c2c0529429964446a4d26fa9f3b3deb36073
6
+ metadata.gz: e6ae40c425e8525a7e11e7fec4b4ff3ddaf76a21cfc7a9750337993a2dd95ed7e2bb46e648127ccdee2a5f1aa10de554255ad16d7d41bce14352a62569ae663d
7
+ data.tar.gz: f984cb609b199262907a46943c2d3c2c6648e79155c14a1ad349ace727bb7412a007bcc788fac9d3e6b96a33b3a41e75acf80aa1b4e69c3d215fd24ae2d3b762
@@ -1,3 +1,5 @@
1
+ Please review [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/develop/CONTRIBUTING.md) and remove this line.
2
+
1
3
  ### Summary
2
4
 
3
5
  Provide a general description of the code changes in your pull
@@ -6,6 +8,11 @@ these bugs have open GitHub issues, be sure to tag them here as well,
6
8
  to keep the conversation linked together.
7
9
 
8
10
 
11
+ ### Testing Steps
12
+
13
+ Provide steps to test functionality, described in detail for someone not familiar with this part of the application / code base
14
+
15
+
9
16
  ### Other Information
10
17
 
11
18
  If there's anything else that's important and relevant to your pull
@@ -26,11 +33,13 @@ products, we must have the copyright associated with the entire
26
33
  codebase. Any code you create which is merged must be owned by us.
27
34
  That's not us trying to be a jerks, that's just the way it works.
28
35
 
29
- Please review the [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/master/CONTRIBUTING.md)
30
- file for the details.
31
-
32
36
  You can delete this section, but the following sentence needs to
33
37
  remain in the PR's description:
34
38
 
35
39
  > I assign all rights, including copyright, to any future Dradis
36
40
  > work by myself to Security Roots.
41
+
42
+ ### Check List
43
+
44
+ - [ ] Added a CHANGELOG entry
45
+ - [ ] Added specs
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ v4.12.0 (May 2024)
2
+ - Migrate integration to use Mappings Manager
3
+ - Update Dradis links in README
4
+
5
+ v4.11.0 (January 2024)
6
+ - No changes
7
+
1
8
  v4.10.0 (September 2023)
2
9
  - Update gemspec links
3
10
 
data/README.md CHANGED
@@ -4,17 +4,16 @@
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
 
12
- See the Dradis Framework's [README.md](https://github.com/dradis/dradisframework/blob/master/README.md)
11
+ See the Dradis Framework's [README.md](https://github.com/dradis/dradis-ce/blob/develop/README.md)
13
12
 
14
13
 
15
14
  ## Contributing
16
15
 
17
- See the Dradis Framework's [CONTRIBUTING.md](https://github.com/dradis/dradisframework/blob/master/CONTRIBUTING.md)
16
+ See the Dradis Framework's [CONTRIBUTING.md](https://github.com/dradis/dradis-ce/blob/develop/CONTRIBUTING.md)
18
17
 
19
18
 
20
19
  ## License
@@ -8,7 +8,7 @@ module Dradis
8
8
 
9
9
  module VERSION
10
10
  MAJOR = 4
11
- MINOR = 10
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.10.0
4
+ version: 4.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Martin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-07 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
@@ -96,7 +96,7 @@ dependencies:
96
96
  version: 0.5.2
97
97
  description: This add-on allows you to upload and parse output produced from Nikto
98
98
  web server scanner into Dradis.
99
- email:
99
+ email:
100
100
  executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
@@ -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,23 +130,15 @@ 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
147
140
  metadata: {}
148
- post_install_message:
141
+ post_install_message:
149
142
  rdoc_options: []
150
143
  require_paths:
151
144
  - lib
@@ -161,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
154
  version: '0'
162
155
  requirements: []
163
156
  rubygems_version: 3.1.4
164
- signing_key:
157
+ signing_key:
165
158
  specification_version: 4
166
159
  summary: Nikto add-on for the Dradis Framework.
167
160
  test_files:
@@ -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%