Skip to main content
QUICK REVIEW

[Paper Review] Security of Patched DNS

Amir Herzberg, Haya Shulman|arXiv (Cornell University)|May 23, 2012
Internet Traffic Analysis and Secure E-votingComputer Science19 references12 citations
TL;DR

This paper analyzes the security of non-cryptographic 'patches' used to defend DNS resolvers against cache poisoning, demonstrating that source port randomization, IP address randomization, and query randomization (via 0x20 encoding and random prefixes) can all be circumvented by off-path attackers using NAT behavior, resolver quirks, and query length manipulation. The key contribution is showing that these widely deployed defenses are fundamentally vulnerable, reinforcing the need for DNSSEC adoption.

ABSTRACT

In spite of the availability of DNSSEC, which protects against cache poisoning even by MitM attackers, many caching DNS resolvers still rely for their security against poisoning on merely validating that DNS responses contain some 'unpredictable' values, copied from the re- quest. These values include the 16 bit identifier field, and other fields, randomised and validated by different 'patches' to DNS. We investigate the prominent patches, and show how attackers can circumvent all of them, namely: - We show how attackers can circumvent source port randomisation, in the (common) case where the resolver connects to the Internet via different NAT devices. - We show how attackers can circumvent IP address randomisation, using some (standard-conforming) resolvers. - We show how attackers can circumvent query randomisation, including both randomisation by prepending a random nonce and case randomisation (0x20 encoding). We present countermeasures preventing our attacks; however, we believe that our attacks provide additional motivation for adoption of DNSSEC (or other MitM-secure defenses).

Motivation & Objective

  • To analyze the security effectiveness of widely deployed non-cryptographic defenses (patches) in DNS resolvers against cache poisoning.
  • To identify and demonstrate practical attacks that circumvent major patches, including source port randomization, IP address randomization, and query randomization via 0x20 encoding and random prefixes.
  • To validate these attacks against real-world NAT devices and standard DNS resolvers like Unbound and Google Public DNS.
  • To motivate broader deployment of DNSSEC by demonstrating the inherent limitations and fragility of current patch-based defenses.

Proposed method

  • Analyzing the behavior of NAT gateways to show how they can expose or predict source ports used in DNS queries.
  • Exploiting standard-conforming resolvers (e.g., Unbound) to force deterministic name server selection, nullifying IP address randomization.
  • Constructing long DNS queries (up to 255 bytes) using only digits to prevent the addition of random prefixes and disable 0x20 encoding.
  • Demonstrating that 0x20 encoding is ineffective against attacks targeting top-level domains (e.g., .com) rather than subdomains.
  • Validating attacks on real-world systems, including Google Public DNS and common NAT devices, to confirm practical feasibility.
  • Proposing countermeasures that address each attack vector, though emphasizing that such fixes are temporary.

Experimental results

Research questions

  • RQ1Can attackers bypass source port randomization in DNS resolvers when NAT devices are involved?
  • RQ2Can IP address randomization be defeated by manipulating standard-conforming DNS resolvers?
  • RQ3To what extent does 0x20 encoding or random prefix insertion provide real security against off-path attackers?
  • RQ4Why do current non-cryptographic patches fail to provide strong security, even when deployed widely?
  • RQ5How do real-world NATs and resolvers interact to undermine the entropy provided by DNS patches?

Key findings

  • NAT gateways can expose or predict source ports used in DNS queries, rendering port randomization ineffective in common deployment scenarios.
  • Standard-conforming resolvers like Unbound can be manipulated to consistently query a single, predictable name server, nullifying IP address randomization.
  • Attackers can construct maximal-length DNS queries using only digits, which prevents the addition of random prefixes and disables 0x20 encoding, thereby bypassing both defenses.
  • The 0x20 encoding technique provides negligible protection against attacks targeting top-level domains (e.g., .com), which are the primary targets in Kaminsky-style attacks.
  • The combination of these attacks allows off-path attackers to systematically strip all entropy from DNS requests, enabling efficient cache poisoning.
  • The authors validate their attacks on Google Public DNS and common NAT devices, confirming the practical feasibility of the attacks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.