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:
|
2024-04-08 11:34:33 +00:00
|
|
|
verified: true
|
2024-06-07 10:04:29 +00:00
|
|
|
max-request: 1
|
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}}"
|
|
|
|
|
2024-04-30 06:36:55 +00:00
|
|
|
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://")'
|
2024-04-29 09:42:04 +00:00
|
|
|
- '(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
|
2024-04-30 06:36:55 +00:00
|
|
|
|
|
|
|
- type: dsl
|
|
|
|
dsl:
|
|
|
|
- 'startswith(tostring(BaseURL), "https://")'
|
|
|
|
- 'status_code == 200'
|
|
|
|
- 'contains(tolower(body), "<meta http-equiv=\"refresh\" content=\"0; url=http://")'
|
|
|
|
condition: and
|
2024-06-08 16:02:17 +00:00
|
|
|
# digest: 490a0046304402201ebc2a7d3ff9de891f5ecc6240683d2ca327aeaa7b9bc901e59ef1667735185f0220691a10ba9255d331c965f9e24b766805177d22ca175adfc7097d6b73f336bc14:922c64590222798bb761d5b6d8e72950
|