Safe configuration of DNS
[Posted October 25, 2005 by corbet]
A group called The Measurement Factory has put out
a press
release to call attention to a recent survey of DNS servers. It seems
that, according to TMF, the majority of publicly-available nameservers are
configured incorrectly, and are vulnerable to denial of service and
pharming attacks. In most cases, fixing the problems is a relatively
straightforward operation.
Pharming refers to the use of cache poisoning attacks to hijack a domain
name. If an attacker can convince your nameserver to return a bogus
address for a known domain, your attempts to access a bank or other online
financial-related site can be redirected to a malicious site. Many users
have learned to enter domains for financial sites themselves, rather than,
say, clicking on a random link which showed up in their mailbox. A
pharming attack, however, can lead to the same result as a successful
phish: account names, passwords, and credit card numbers can be captured.
So what are all of those DNS administrators doing wrong? The biggest
problem, according to TMF, is that publicly-available nameservers are
configured to perform recursive lookups for anybody who asks. If an
attacker can request an arbitrary, recursive lookup, that attacker can get
the target nameserver to contact - and accept data from - a malicious
server. The malicious server can pass back incorrect information, which
the target server may then cache and return to users. The solution in this
case is to limit recursive queries to internal hosts; with bind, the
allow-recursion option can be used to this effect.
The survey also notes that some 40% of sites on the net allow zone
transfers to arbitrary sites. These transfers can disclose more
information than one might like; they also represent a denial of service
opportunity. Finally, the survey notes that a fair number of sites place
their secondary servers on the same subnet as the primary, leading to
obvious single point of failure issues.
Security issues with DNS servers have been relatively rare in recent
times. A nameserver is only as secure as its configuration, however.
Auditing nameservers for these issues in the near future might not be a bad
idea.
(
Log in to post comments)