2024-01-21 04:12:09 +00:00
|
|
|
id: dns-rebinding
|
2024-01-22 18:18:35 +00:00
|
|
|
|
2024-01-21 04:12:09 +00:00
|
|
|
info:
|
|
|
|
name: DNS Rebinding Attack
|
|
|
|
author: ricardomaia
|
|
|
|
severity: high
|
2024-01-22 18:18:35 +00:00
|
|
|
description: |
|
|
|
|
Detects DNS Rebinding attacks by checking if the DNS response contains a private IPv4 or IPv6 address.
|
2024-01-21 04:12:09 +00:00
|
|
|
reference:
|
|
|
|
- https://capec.mitre.org/data/definitions/275.html
|
2024-01-24 04:19:35 +00:00
|
|
|
- https://payatu.com/blog/dns-rebinding/
|
|
|
|
- https://heimdalsecurity.com/blog/dns-rebinding/
|
2024-01-21 04:12:09 +00:00
|
|
|
classification:
|
|
|
|
cvss-metrics: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
|
|
|
|
cvss-score: 8.6
|
|
|
|
cwe-id: CWE-350
|
2024-01-24 04:19:35 +00:00
|
|
|
metadata:
|
|
|
|
verified: true
|
2024-01-29 11:58:34 +00:00
|
|
|
max-request: 2
|
2024-01-24 04:19:35 +00:00
|
|
|
tags: redirect,dns,network
|
2024-01-21 04:12:09 +00:00
|
|
|
|
|
|
|
dns:
|
|
|
|
- name: "{{FQDN}}"
|
|
|
|
type: A
|
|
|
|
matchers:
|
|
|
|
# IPv4
|
|
|
|
- type: regex
|
|
|
|
part: answer
|
|
|
|
regex:
|
2024-02-06 14:37:47 +00:00
|
|
|
- 'IN.*A.(\s)*(127\.0\.0\.1|10\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.(1[6-9]|2\d|3[0-1])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3})(127\.0\.0\.1|\b10\.\d{1,3}\.\d{1,3}\.\d{1,3}\b|172\.(1[6-9]|2\d|3[0-1])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3})$'
|
2024-01-21 04:12:09 +00:00
|
|
|
|
|
|
|
extractors:
|
|
|
|
- type: regex
|
|
|
|
part: answer
|
|
|
|
name: IPv4
|
|
|
|
group: 1
|
|
|
|
regex:
|
2024-02-06 14:37:47 +00:00
|
|
|
- 'IN.*A.(\s)*(127\.0\.0\.1|10\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.(1[6-9]|2\d|3[0-1])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3})(127\.0\.0\.1|\b10\.\d{1,3}\.\d{1,3}\.\d{1,3}\b|172\.(1[6-9]|2\d|3[0-1])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3})'
|
2024-01-21 04:12:09 +00:00
|
|
|
|
|
|
|
- name: "{{FQDN}}"
|
|
|
|
type: AAAA
|
|
|
|
matchers:
|
|
|
|
# IPv6 Compressed
|
|
|
|
- type: regex
|
|
|
|
part: answer
|
|
|
|
regex:
|
|
|
|
- "IN.+A.+(fd([0-9a-fA-F]{2}):([0-9a-fA-F]{0,4}:){0,5}(:[0-9a-fA-F]{0,4}){1,2}(:)?)$"
|
|
|
|
|
|
|
|
# IPv6
|
|
|
|
- type: regex
|
|
|
|
part: answer
|
|
|
|
regex:
|
|
|
|
- "IN.+A.+(fd([0-9a-fA-F]{2}):([0-9a-fA-F]{1,4}:){0,5}([0-9a-fA-F]{1,4}:){1,2}[0-9a-fA-F]{1,4})$"
|
|
|
|
|
|
|
|
extractors:
|
|
|
|
- type: regex
|
|
|
|
part: answer
|
|
|
|
name: IPv6_Compressed
|
|
|
|
group: 1
|
|
|
|
regex:
|
|
|
|
- "IN.+A.+(fd([0-9a-fA-F]{2}):([0-9a-fA-F]{0,4}:){0,5}(:[0-9a-fA-F]{0,4}){1,2}(:)?)$"
|
|
|
|
|
|
|
|
- type: regex
|
|
|
|
part: answer
|
|
|
|
name: IPv6
|
|
|
|
group: 1
|
|
|
|
regex:
|
|
|
|
- "IN.+A.+(fd([0-9a-fA-F]{2}):([0-9a-fA-F]{1,4}:){0,5}([0-9a-fA-F]{1,4}:){1,2}[0-9a-fA-F]{1,4})$"
|
2024-02-06 14:37:47 +00:00
|
|
|
# digest: 490a0046304402200086722c300abf7992729d43c342b754b0f805ca77bb380c079e86ba2fc18891022048ef9c5c5f5d13f31c25d484d6c038c6184dc6d1e4373f5eae32843ffbb89fc7:922c64590222798bb761d5b6d8e72950
|