Home page logo
/

bugtraq logo Bugtraq mailing list archives

Re: Permitting recursion can allow spammers to steal name server resources
From: Mark Johnston <mjohnston () skyweb ca>
Date: Wed, 10 Sep 2003 13:21:54 -0500

Chris Brenton <cbrenton () chrisbrenton org> wrote:
Changing Bind so that it will not act recursively for all hosts on the 
Internet is a relatively simple process. Edit the /etc/named.conf file 
to add in the "allow-recursion" parameter similar to the following:

options {
        directory "/var/named";
        allow-recursion {localnets; };
};

                                          All other subnets however will 
be blocked from doing recursive queries. Users on the Internet will only 
be permitted to look up information you are authoritative for (like your 
Web server's IP address, your MX record, etc.).

That's not entirely true.  BIND (9, at least) is still vulnerable
to cache poisoning by local users, after which it will serve up the
cached answers to anyone that can query (not just recursion-authorized
clients.)  Try looking up a domain you aren't authoritative for from a
recursion-authorized client, then from an unauthorized one.  You'll get
the cached answer with the unauthorized client.  Of course, given an ISP
or corporation, it's trivial to make one of their users look up your
hostname.

The rationale, as I understand it, is that returning a cached answer
doesn't require recursion, so allow-recursion doesn't apply.

The proper way to avoid this problem is to configure BIND to deny all
queries except ones you specifically want to answer:

options {
    allow-query { localnets; };
    allow-recursion { localnets; };
};

zone "example.com" {      # An authoritative zone
    allow-query { any; };
    # other example.com statements
};

Mark


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]