Re: Permitting recursion can allow spammers to steal name server resources

From: Mark Johnston (mjohnston_at_skyweb.ca)
Date: 09/10/03

  • Next message: Tim Kennedy: "CacheFlow Proxy Abuse (revisited)"
    Date: Wed, 10 Sep 2003 13:21:54 -0500
    To: Chris Brenton <cbrenton@chrisbrenton.org>
    
    

    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


  • Next message: Tim Kennedy: "CacheFlow Proxy Abuse (revisited)"

    Relevant Pages

    • Re: DNS Question
      ... single server for both resolver service (for trusted hosts) and general ... The best setup uses two services, one with recursion that can be used by ... dns servers that are not from our subscribers or for our authorized zone ... > sure it's available in BIND 8, and it definitely is in BIND ...
      (FreeBSD-Security)
    • Re: per-zone-recursion?
      ... Per-zone recursion control doesn't exist in BIND, because frankly it doesn't make sense. ... Either a zone type is meaningless *without* recursion, or recursion is *unnecessary* because the nameserver answers from authoritative data. ... So you might as well REFUSE queries outside of zones for which recursion is not explicitly enabled. ...
      (comp.protocols.dns.bind)
    • [Full-disclosure] [ GLSA 200609-11 ] BIND: Denial of Service
      ... ISC BIND contains two vulnerabilities allowing a Denial of Service ... lowered by restricting the clients that can ask for recursion. ... in which there are multiple SIG RRsets. ... Security is a primary focus of Gentoo Linux and ensuring the ...
      (Full-Disclosure)
    • [ GLSA 200609-11 ] BIND: Denial of Service
      ... ISC BIND contains two vulnerabilities allowing a Denial of Service ... lowered by restricting the clients that can ask for recursion. ... in which there are multiple SIG RRsets. ... Security is a primary focus of Gentoo Linux and ensuring the ...
      (Bugtraq)
    • Re: DNS DDoS potential in OpenVMS
      ... Remmeber that VAX is stuck at BIND 8. ... and doesn't actually limit recursion. ... I.e., done at the router, firewall, or if a host has firewall-like ...
      (comp.os.vms)