@voidagency/web-scanner 0.0.1
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.
- package/README.md +198 -0
- package/dist/aggregator.d.ts +65 -0
- package/dist/aggregator.d.ts.map +1 -0
- package/dist/aggregator.js +546 -0
- package/dist/aggregator.js.map +1 -0
- package/dist/categories.d.ts +59 -0
- package/dist/categories.d.ts.map +1 -0
- package/dist/categories.js +278 -0
- package/dist/categories.js.map +1 -0
- package/dist/cli.d.ts +12 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +457 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +19 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +121 -0
- package/dist/config.js.map +1 -0
- package/dist/coverage.d.ts +49 -0
- package/dist/coverage.d.ts.map +1 -0
- package/dist/coverage.js +165 -0
- package/dist/coverage.js.map +1 -0
- package/dist/enrichers/nvd.d.ts +55 -0
- package/dist/enrichers/nvd.d.ts.map +1 -0
- package/dist/enrichers/nvd.js +326 -0
- package/dist/enrichers/nvd.js.map +1 -0
- package/dist/report.d.ts +12 -0
- package/dist/report.d.ts.map +1 -0
- package/dist/report.js +460 -0
- package/dist/report.js.map +1 -0
- package/dist/runners/nuclei.d.ts +59 -0
- package/dist/runners/nuclei.d.ts.map +1 -0
- package/dist/runners/nuclei.js +531 -0
- package/dist/runners/nuclei.js.map +1 -0
- package/dist/runners/testssl.d.ts +16 -0
- package/dist/runners/testssl.d.ts.map +1 -0
- package/dist/runners/testssl.js +179 -0
- package/dist/runners/testssl.js.map +1 -0
- package/dist/runners/zap.d.ts +30 -0
- package/dist/runners/zap.d.ts.map +1 -0
- package/dist/runners/zap.js +389 -0
- package/dist/runners/zap.js.map +1 -0
- package/dist/types.d.ts +172 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/package.json +54 -0
- package/templates/drupal-api-index-exposed.yaml +81 -0
- package/templates/drupal-api-user-detail.yaml +76 -0
- package/templates/drupal-api-user-listing.yaml +59 -0
- package/templates/drupal-dev-files-exposed.yaml +73 -0
- package/templates/drupal-file-path-disclosure.yaml +59 -0
- package/templates/drupal-files-listing.yaml +63 -0
- package/templates/drupal-install-error-disclosure.yaml +62 -0
- package/templates/drupal-theme-lockfiles.yaml +79 -0
- package/templates/drupal-version-detect.yaml +89 -0
- package/templates/http-options-enabled.yaml +56 -0
- package/templates/nextjs-version-detect.yaml +35 -0
- package/templates/php-version-detect.yaml +37 -0
- package/zap.yaml +33 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
id: drupal-install-error-disclosure
|
|
2
|
+
|
|
3
|
+
info:
|
|
4
|
+
name: Drupal Install Error Information Disclosure
|
|
5
|
+
author: voidsec
|
|
6
|
+
severity: medium
|
|
7
|
+
description: |
|
|
8
|
+
The Drupal install.php endpoint is accessible and returns error messages
|
|
9
|
+
with sensitive information including stack traces, internal paths,
|
|
10
|
+
and service configuration details.
|
|
11
|
+
remediation: |
|
|
12
|
+
Remove or restrict access to install.php after installation.
|
|
13
|
+
Configure error display to be disabled in production.
|
|
14
|
+
reference:
|
|
15
|
+
- https://www.drupal.org/docs/security-in-drupal
|
|
16
|
+
classification:
|
|
17
|
+
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
|
|
18
|
+
cvss-score: 5.3
|
|
19
|
+
cwe-id: CWE-200
|
|
20
|
+
metadata:
|
|
21
|
+
verified: true
|
|
22
|
+
max-request: 2
|
|
23
|
+
vendor: drupal
|
|
24
|
+
product: drupal
|
|
25
|
+
tags: drupal,exposure,install,debug,misconfig
|
|
26
|
+
|
|
27
|
+
http:
|
|
28
|
+
- method: GET
|
|
29
|
+
path:
|
|
30
|
+
- "{{BaseURL}}/core/install.php"
|
|
31
|
+
- "{{BaseURL}}/install.php"
|
|
32
|
+
|
|
33
|
+
stop-at-first-match: true
|
|
34
|
+
|
|
35
|
+
matchers-condition: and
|
|
36
|
+
matchers:
|
|
37
|
+
# Error disclosure indicators
|
|
38
|
+
- type: word
|
|
39
|
+
part: body
|
|
40
|
+
words:
|
|
41
|
+
- "uncaught exception"
|
|
42
|
+
- "backtrace"
|
|
43
|
+
- "Symfony\\Component"
|
|
44
|
+
- "DrupalKernel"
|
|
45
|
+
condition: or
|
|
46
|
+
|
|
47
|
+
# Path disclosure
|
|
48
|
+
- type: regex
|
|
49
|
+
part: body
|
|
50
|
+
regex:
|
|
51
|
+
- '/var/www/|/home/|vendor/symfony|\.php\)'
|
|
52
|
+
|
|
53
|
+
- type: status
|
|
54
|
+
status:
|
|
55
|
+
- 200
|
|
56
|
+
|
|
57
|
+
extractors:
|
|
58
|
+
- type: regex
|
|
59
|
+
name: internal_paths
|
|
60
|
+
regex:
|
|
61
|
+
- '(/var/www/[^\s<]+|/home/[^\s<]+)'
|
|
62
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
id: drupal-theme-lockfiles
|
|
2
|
+
|
|
3
|
+
info:
|
|
4
|
+
name: Drupal Theme Lock Files Exposed
|
|
5
|
+
author: voidsec
|
|
6
|
+
severity: low
|
|
7
|
+
description: |
|
|
8
|
+
Drupal theme directory exposes package manager lock files (yarn.lock,
|
|
9
|
+
package-lock.json, package.json). These reveal all frontend dependencies
|
|
10
|
+
with exact versions, which can be used to identify vulnerable packages.
|
|
11
|
+
remediation: |
|
|
12
|
+
Block access to lock files in web server configuration.
|
|
13
|
+
Nginx: location ~* (yarn\.lock|package-lock\.json|package\.json)$ { deny all; }
|
|
14
|
+
reference:
|
|
15
|
+
- https://www.drupal.org/docs/security-in-drupal
|
|
16
|
+
classification:
|
|
17
|
+
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
|
|
18
|
+
cvss-score: 5.3
|
|
19
|
+
cwe-id: CWE-538
|
|
20
|
+
metadata:
|
|
21
|
+
verified: true
|
|
22
|
+
max-request: 6
|
|
23
|
+
vendor: drupal
|
|
24
|
+
product: drupal
|
|
25
|
+
tags: drupal,exposure,config,theme,npm,yarn,misconfig
|
|
26
|
+
|
|
27
|
+
# Usage: nuclei -t drupal-theme-lockfiles.yaml -u URL -var theme=mytheme
|
|
28
|
+
# The 'theme' variable should be passed from the scanner after extracting from HTML
|
|
29
|
+
|
|
30
|
+
http:
|
|
31
|
+
- method: GET
|
|
32
|
+
path:
|
|
33
|
+
# Theme paths - {{theme}} is passed via -var theme=xxx
|
|
34
|
+
- "{{BaseURL}}/themes/{{theme}}/package.json"
|
|
35
|
+
- "{{BaseURL}}/themes/{{theme}}/yarn.lock"
|
|
36
|
+
- "{{BaseURL}}/themes/{{theme}}/package-lock.json"
|
|
37
|
+
- "{{BaseURL}}/themes/custom/{{theme}}/package.json"
|
|
38
|
+
- "{{BaseURL}}/themes/custom/{{theme}}/yarn.lock"
|
|
39
|
+
- "{{BaseURL}}/themes/custom/{{theme}}/package-lock.json"
|
|
40
|
+
|
|
41
|
+
stop-at-first-match: false
|
|
42
|
+
|
|
43
|
+
matchers-condition: and
|
|
44
|
+
matchers:
|
|
45
|
+
- type: status
|
|
46
|
+
status:
|
|
47
|
+
- 200
|
|
48
|
+
|
|
49
|
+
- type: word
|
|
50
|
+
part: body
|
|
51
|
+
words:
|
|
52
|
+
- '"name":' # package.json
|
|
53
|
+
- '"devDependencies":' # package.json
|
|
54
|
+
- '"dependencies":' # package.json
|
|
55
|
+
- '# yarn lockfile' # yarn.lock
|
|
56
|
+
- '"lockfileVersion":' # package-lock.json
|
|
57
|
+
condition: or
|
|
58
|
+
|
|
59
|
+
# Must be JSON or lockfile, not HTML error page
|
|
60
|
+
- type: word
|
|
61
|
+
part: header
|
|
62
|
+
words:
|
|
63
|
+
- 'application/json'
|
|
64
|
+
- 'application/octet-stream'
|
|
65
|
+
- 'text/plain'
|
|
66
|
+
condition: or
|
|
67
|
+
|
|
68
|
+
extractors:
|
|
69
|
+
- type: regex
|
|
70
|
+
name: package_name
|
|
71
|
+
group: 1
|
|
72
|
+
regex:
|
|
73
|
+
- '"name":\s*"([^"]+)"'
|
|
74
|
+
|
|
75
|
+
- type: regex
|
|
76
|
+
name: author
|
|
77
|
+
group: 1
|
|
78
|
+
regex:
|
|
79
|
+
- '"author":\s*"([^"]+)"'
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
id: drupal-version-detect
|
|
2
|
+
|
|
3
|
+
info:
|
|
4
|
+
name: Drupal Version - Detect
|
|
5
|
+
author: voidsec,1nf1n7y,pathtaga
|
|
6
|
+
severity: info
|
|
7
|
+
description: Detects Drupal installation and extracts version from multiple sources
|
|
8
|
+
classification:
|
|
9
|
+
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
|
|
10
|
+
cwe-id: CWE-200
|
|
11
|
+
cpe: cpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:*
|
|
12
|
+
metadata:
|
|
13
|
+
verified: true
|
|
14
|
+
max-request: 4
|
|
15
|
+
vendor: drupal
|
|
16
|
+
product: drupal
|
|
17
|
+
shodan-query:
|
|
18
|
+
- http.component:"drupal"
|
|
19
|
+
- cpe:"cpe:2.3:a:drupal:drupal"
|
|
20
|
+
tags: tech,drupal,version,discovery
|
|
21
|
+
|
|
22
|
+
http:
|
|
23
|
+
- method: GET
|
|
24
|
+
path:
|
|
25
|
+
- "{{BaseURL}}"
|
|
26
|
+
- "{{BaseURL}}/fr"
|
|
27
|
+
- "{{BaseURL}}/en"
|
|
28
|
+
- "{{BaseURL}}/CHANGELOG.txt"
|
|
29
|
+
- "{{BaseURL}}/core/install.php"
|
|
30
|
+
- "{{BaseURL}}/user/login"
|
|
31
|
+
|
|
32
|
+
redirects: true
|
|
33
|
+
max-redirects: 3
|
|
34
|
+
stop-at-first-match: true
|
|
35
|
+
matchers-condition: or
|
|
36
|
+
matchers:
|
|
37
|
+
# Match Drupal script tags with version
|
|
38
|
+
- type: regex
|
|
39
|
+
part: body
|
|
40
|
+
regex:
|
|
41
|
+
- '/core/misc/drupal\.js\?v='
|
|
42
|
+
- '/core/misc/drupalSettingsLoader\.js\?v='
|
|
43
|
+
condition: or
|
|
44
|
+
|
|
45
|
+
# Original matchers from nuclei-templates
|
|
46
|
+
- type: word
|
|
47
|
+
part: body
|
|
48
|
+
words:
|
|
49
|
+
- 'Initial release'
|
|
50
|
+
- 'Drupal 1.0.0'
|
|
51
|
+
condition: and
|
|
52
|
+
|
|
53
|
+
- type: word
|
|
54
|
+
part: body
|
|
55
|
+
words:
|
|
56
|
+
- 'content="Drupal'
|
|
57
|
+
|
|
58
|
+
- type: regex
|
|
59
|
+
part: header
|
|
60
|
+
regex:
|
|
61
|
+
- '(?i)x-drupal'
|
|
62
|
+
- '(?i)x-generator: drupal'
|
|
63
|
+
condition: or
|
|
64
|
+
|
|
65
|
+
extractors:
|
|
66
|
+
# Extract version from script tags (most reliable for modern Drupal)
|
|
67
|
+
- type: regex
|
|
68
|
+
part: body
|
|
69
|
+
name: version_from_scripts
|
|
70
|
+
group: 1
|
|
71
|
+
regex:
|
|
72
|
+
- '/core/misc/drupal(?:SettingsLoader)?\.js\?v=([0-9]+\.[0-9]+\.[0-9]+)'
|
|
73
|
+
|
|
74
|
+
# Extract version from install.php
|
|
75
|
+
- type: regex
|
|
76
|
+
part: body
|
|
77
|
+
name: version_from_install
|
|
78
|
+
group: 1
|
|
79
|
+
regex:
|
|
80
|
+
- 'class="site-version">([0-9.x-]+)'
|
|
81
|
+
|
|
82
|
+
# Extract version from CHANGELOG.txt (Drupal 7 and older)
|
|
83
|
+
- type: regex
|
|
84
|
+
part: body
|
|
85
|
+
name: version_from_changelog
|
|
86
|
+
group: 1
|
|
87
|
+
regex:
|
|
88
|
+
- 'Drupal ([0-9]+\.[0-9]+)'
|
|
89
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
id: http-options-enabled
|
|
2
|
+
|
|
3
|
+
info:
|
|
4
|
+
name: HTTP OPTIONS Method Enabled
|
|
5
|
+
author: voidsec
|
|
6
|
+
severity: low
|
|
7
|
+
description: |
|
|
8
|
+
The HTTP OPTIONS method is enabled on this server. While not directly exploitable,
|
|
9
|
+
it reveals information about available HTTP methods which can aid in reconnaissance.
|
|
10
|
+
Some methods (like TRACE, PUT, DELETE) could be dangerous if enabled.
|
|
11
|
+
remediation: |
|
|
12
|
+
Disable the OPTIONS method in your web server configuration if not required.
|
|
13
|
+
|
|
14
|
+
Nginx: Add to server block:
|
|
15
|
+
if ($request_method = OPTIONS) { return 405; }
|
|
16
|
+
|
|
17
|
+
Apache: Use mod_rewrite or LimitExcept directive.
|
|
18
|
+
reference:
|
|
19
|
+
- https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/02-Configuration_and_Deployment_Management_Testing/06-Test_HTTP_Methods
|
|
20
|
+
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS
|
|
21
|
+
classification:
|
|
22
|
+
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
|
|
23
|
+
cvss-score: 5.3
|
|
24
|
+
cwe-id: CWE-16
|
|
25
|
+
metadata:
|
|
26
|
+
verified: true
|
|
27
|
+
max-request: 1
|
|
28
|
+
tags: misconfig,http,options,headers,generic
|
|
29
|
+
|
|
30
|
+
http:
|
|
31
|
+
- method: OPTIONS
|
|
32
|
+
path:
|
|
33
|
+
- "{{BaseURL}}"
|
|
34
|
+
- "{{BaseURL}}/"
|
|
35
|
+
|
|
36
|
+
stop-at-first-match: true
|
|
37
|
+
|
|
38
|
+
matchers-condition: and
|
|
39
|
+
matchers:
|
|
40
|
+
- type: status
|
|
41
|
+
status:
|
|
42
|
+
- 200
|
|
43
|
+
- 204
|
|
44
|
+
|
|
45
|
+
- type: word
|
|
46
|
+
part: header
|
|
47
|
+
words:
|
|
48
|
+
- "Allow:"
|
|
49
|
+
case-insensitive: true
|
|
50
|
+
|
|
51
|
+
extractors:
|
|
52
|
+
- type: kval
|
|
53
|
+
name: allowed_methods
|
|
54
|
+
kval:
|
|
55
|
+
- allow
|
|
56
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
id: nextjs-version-detect
|
|
2
|
+
|
|
3
|
+
info:
|
|
4
|
+
name: Next.js Version - Detect
|
|
5
|
+
author: voidsec
|
|
6
|
+
severity: info
|
|
7
|
+
description: |
|
|
8
|
+
Detects Next.js framework and extracts the version number from the browser's
|
|
9
|
+
window.next.version property. Requires headless browser execution.
|
|
10
|
+
tags: tech,nextjs,headless
|
|
11
|
+
|
|
12
|
+
headless:
|
|
13
|
+
- steps:
|
|
14
|
+
- action: navigate
|
|
15
|
+
args:
|
|
16
|
+
url: "{{BaseURL}}"
|
|
17
|
+
- action: waitload
|
|
18
|
+
- action: script
|
|
19
|
+
args:
|
|
20
|
+
code: () => window.next?.version
|
|
21
|
+
name: version
|
|
22
|
+
|
|
23
|
+
matchers:
|
|
24
|
+
- type: regex
|
|
25
|
+
part: version
|
|
26
|
+
regex:
|
|
27
|
+
- '\d+\.\d+\.\d+'
|
|
28
|
+
|
|
29
|
+
extractors:
|
|
30
|
+
- type: regex
|
|
31
|
+
name: nextjs_version
|
|
32
|
+
part: version
|
|
33
|
+
regex:
|
|
34
|
+
- '\d+\.\d+\.\d+'
|
|
35
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
id: php-version-detect
|
|
2
|
+
|
|
3
|
+
info:
|
|
4
|
+
name: PHP Version - Detect
|
|
5
|
+
author: voidsec
|
|
6
|
+
severity: info
|
|
7
|
+
description: Detects PHP version from headers and responses
|
|
8
|
+
classification:
|
|
9
|
+
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:N
|
|
10
|
+
cwe-id: CWE-200
|
|
11
|
+
cpe: cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
|
|
12
|
+
metadata:
|
|
13
|
+
verified: true
|
|
14
|
+
vendor: php
|
|
15
|
+
product: php
|
|
16
|
+
tags: tech,php,version,discovery
|
|
17
|
+
|
|
18
|
+
http:
|
|
19
|
+
- method: GET
|
|
20
|
+
path:
|
|
21
|
+
- "{{BaseURL}}"
|
|
22
|
+
|
|
23
|
+
matchers:
|
|
24
|
+
- type: regex
|
|
25
|
+
part: header
|
|
26
|
+
regex:
|
|
27
|
+
- '(?i)x-powered-by:\s*PHP'
|
|
28
|
+
|
|
29
|
+
extractors:
|
|
30
|
+
# Extract PHP version from X-Powered-By header
|
|
31
|
+
- type: regex
|
|
32
|
+
part: header
|
|
33
|
+
name: php_version
|
|
34
|
+
group: 1
|
|
35
|
+
regex:
|
|
36
|
+
- '(?i)x-powered-by:\s*PHP/([0-9]+\.[0-9]+\.[0-9]+)'
|
|
37
|
+
|
package/zap.yaml
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
env:
|
|
2
|
+
contexts:
|
|
3
|
+
- excludePaths: []
|
|
4
|
+
name: baseline
|
|
5
|
+
urls:
|
|
6
|
+
- https://chaabilldocaz.ma/
|
|
7
|
+
parameters:
|
|
8
|
+
failOnError: true
|
|
9
|
+
progressToStdout: false
|
|
10
|
+
jobs:
|
|
11
|
+
- parameters:
|
|
12
|
+
enableTags: false
|
|
13
|
+
maxAlertsPerRule: 10
|
|
14
|
+
type: passiveScan-config
|
|
15
|
+
- parameters:
|
|
16
|
+
maxDuration: 1
|
|
17
|
+
url: https://chaabilldocaz.ma/
|
|
18
|
+
type: spider
|
|
19
|
+
- parameters:
|
|
20
|
+
maxDuration: 0
|
|
21
|
+
type: passiveScan-wait
|
|
22
|
+
- parameters:
|
|
23
|
+
format: Long
|
|
24
|
+
summaryFile: /home/zap/zap_out.json
|
|
25
|
+
rules: []
|
|
26
|
+
type: outputSummary
|
|
27
|
+
- parameters:
|
|
28
|
+
reportDescription: ''
|
|
29
|
+
reportDir: /zap/wrk/
|
|
30
|
+
reportFile: zap-report.json
|
|
31
|
+
reportTitle: ZAP Scanning Report
|
|
32
|
+
template: traditional-json
|
|
33
|
+
type: report
|