DNS Rebinding Vulnerability

Detects server-side host validation logic vulnerable to DNS rebinding attacks, allowing attackers to bypass IP-based restrictions.

zakirkun f9ea96d 2 files · 2.9 KB Updated

File contents

DNS Rebinding Vulnerability

Overview

DNS rebinding allows an attacker to bypass Same-Origin Policy and IP allowlists. The attack works by:

  1. Victim visits attacker's page at evil.com
  2. Attacker's DNS TTL expires; evil.com resolves to 127.0.0.1
  3. JavaScript makes requests to evil.com which now reach the victim's localhost services
  4. Services that only check the IP (not the Host header) are bypassed

Vulnerable applications that check Host header or resolve hostname for validation without proper binding.

Detection Strategy

  • URL validation that checks hostname string rather than resolved IP
  • HTTP servers binding to all interfaces without Host header validation
  • SSRF protection based on DNS resolution rather than allowlist

zakirkun/ice-tea/tree/main/skills/network/dns-rebinding commit f9ea96dece

Frequently asked questions

npx skillmds@latest add zakirkun/dns-rebinding-vulnerability