nuclei-templates/http/misconfiguration/https-to-http-redirect.yaml

34 lines
1.1 KiB
YAML
Raw Normal View History

2024-03-18 09:32:48 +00:00
id: https-to-http-redirect
info:
2024-03-27 17:41:38 +00:00
name: HTTPS to HTTP redirect Misconfiguration
2024-05-07 13:26:16 +00:00
author: kazet,idealphase
2024-03-18 09:32:48 +00:00
severity: info
description: |
2024-03-28 06:09:15 +00:00
Detects whether there is a redirect from https:// to http://
2024-03-18 09:32:48 +00:00
metadata:
max-request: 1
verified: true
2024-03-28 06:09:15 +00:00
tags: misconfig,http,https
2024-03-18 09:32:48 +00:00
http:
- method: GET
path:
- "{{BaseURL}}"
matchers-condition: or
2024-03-18 09:32:48 +00:00
matchers:
- type: dsl
dsl:
2024-03-27 17:41:38 +00:00
- 'startswith(tolower(location), "http://")'
- 'startswith(tostring(BaseURL), "https://")'
- '(status_code == 300 || status_code == 301 || status_code == 302 || status_code == 303 || status_code == 307 || status_code == 308)'
2024-03-27 17:41:38 +00:00
condition: and
- type: dsl
dsl:
- 'startswith(tostring(BaseURL), "https://")'
- 'status_code == 200'
- 'contains(tolower(body), "<meta http-equiv=\"refresh\" content=\"0; url=http://")'
condition: and
# digest: 4a0a0047304502202c406d624823af9ef6ae82678b8dfe498a4da9ca22667ad1fb02f10ac0f23842022100afad097672382230a4c19ddf9d918cf336c624af3d33cc1fe279c3fdf43a1a98:922c64590222798bb761d5b6d8e72950