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 +4 -4
- data/.github/pull_request_template.md +12 -3
- data/CHANGELOG.md +7 -0
- data/README.md +3 -4
- data/lib/dradis/plugins/nikto/gem_version.rb +1 -1
- data/lib/dradis/plugins/nikto/importer.rb +4 -4
- data/lib/dradis/plugins/nikto/mapping.rb +61 -0
- data/lib/dradis/plugins/nikto.rb +1 -0
- metadata +7 -14
- data/templates/evidence.fields +0 -4
- data/templates/evidence.template +0 -6
- data/templates/item.fields +0 -9
- data/templates/item.template +0 -8
- data/templates/scan.fields +0 -11
- data/templates/scan.template +0 -14
- data/templates/ssl.fields +0 -3
- data/templates/ssl.template +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 717a9a1c0a9082a70bdfdb2403d91b032c02f3866e139735ac7f23faca939d6a
|
4
|
+
data.tar.gz: 5c1d73b43b8a241b815c05a6c340ba4d60dd5b4caaf80ee6a040ffb0365e77b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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://
|
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/
|
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/
|
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
|
@@ -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 =
|
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 =
|
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 =
|
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 =
|
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
|
data/lib/dradis/plugins/nikto.rb
CHANGED
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.
|
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:
|
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:
|
data/templates/evidence.fields
DELETED
data/templates/evidence.template
DELETED
data/templates/item.fields
DELETED
data/templates/item.template
DELETED
data/templates/scan.fields
DELETED
data/templates/scan.template
DELETED
@@ -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