Slashdot Mirror


DDoS Attacks Via DNS Recursion

JehCt writes "Associated Press is running a story about how the recursion feature of open DNS servers can be used to launch massive distributed denial of service (DDoS) attacks: 'First detected late last year, the new attacks direct such massive amounts of spurious data against victim computers that even flagship technology companies could not cope.' A thread at WebmasterWorld explains, 'To make a long story short, having a DNS server that allows recursion for the Internet is like running an open SMTP relay.'"

15 of 192 comments (clear)

  1. Re:djbdns by PaisteUser · · Score: 5, Informative

    It's not that difficult to make BIND9 not respond to recursive queries, add "recursion no;" to the "options {};" section of the named.conf file, reload the config and your good to go.

    --
    root@allevil:~#
  2. Separate authoritative and recursive by Aspirator · · Score: 4, Informative

    I am quite a fan of djbns, but the key here is to separate authoritative and
    recursive, which is something that DJB has been preaching for a while.

    Consequently djbdns won't do this, but it is quite possible to make bind not
    do this also. (In fact Bind now has come round and reccomended this.)

    It seems to me like a no-brainer, why is splitting the two such a problem?

    SDNS wouldn't hurt either, but that will take a lot more doing.

  3. Disable recursion in BIND by Ponga · · Score: 5, Informative

    Put this line in your zone definition:
    recursion no;

    Problem solved.

  4. Re:I must resist by AKAImBatman · · Score: 5, Informative

    That's self-referential, not recursive. One does not immediately imply the other. GNU, on the other hand, is recursive.

  5. Re:Could someone explain how the attack works? by Anonymous Coward · · Score: 5, Informative

    No compromise needed. You just send requests to the DNS server spoofing yourself as the victim's IP. (UDP is much easier to spoof, and can be sent out very quickly.) The replies, which are some 30 times larger than the requests, get sent to the spoofed IP (victim). It is a classic form of amplification attack.

  6. Re:Could someone explain how the attack works? by LurkerXXX · · Score: 5, Informative
    Then you don't understand DNS resolvers. Did you bother reading the linked site? All you need to do is query an open resolver with some domain you set up (ex my.span.com), then change the authoritiative DNS of your registered domain as the target open DNS resolver. Now whenever someone anywhere in the world queries for my.spam.com, it hits your DNS server (until their local server caches it). It looks like you are hosting the spammer.

    Another problem:
    (Quoting a post on the other site)"they can send a 70 byte packet to your DNS server, and your DNS server will send a 500+ byte packet to the victim. With EDNS0, that can be 4,000+ bytes.

    So with a dialup account, it would be possible to saturate a T1.

    There's plenty of ways for them to mess with you without any 'compromised' machines on your network.

  7. Re:Old NEws by Intron · · Score: 4, Informative

    Correct. Here is the CERT writeup from 2000.

    --
    Intron: the portion of DNA which expresses nothing useful.
  8. Split-split DNS Design by lazarus · · Score: 4, Informative

    For enterprise systems a split-split DNS design is the best. There are three components to this design:

    ADVERTISER
    RESOLVER
    INTERNAL

    The advertiser sits outside, Internet-facing, and is only responsible for resolving outside queries for your own domains. It does not do recursion or dynamic updates, and has a secured cache.

    The resolver and internal sit inside, are intranet-facing, and handle internal requests for outside domains, and internal requests for internal domains respectively.

    There are lots of articles on-line which show how to set this up.

    --
    I am not interested in articles about life extension advancements.
  9. Recursion considered harmful by Anonymous Coward · · Score: 4, Funny

    Should have used gotos! -1 for the functional language weenies!

  10. Fixing bind9 by pjkundert · · Score: 5, Informative
    If you run an internet facing bind9 DNS server, you may want to allow recursion (caching) to your internal clients, while continuing to serve DNS requests to external clients for your domains (those for which you are "authoritative").

    Lets say that your local LAN and WLAN networks are 192.168.0/24 and 192.168.1/24, respectively. Make the following additions to your /etc/bind/named.conf.options (or equivalent):

    options { allow-query { any; }; allow-recursion { 192.168.0.0/24; 192.168.1.0/24; localhost; }; ...
    --
    -- -pjk Perry Kundert perry@kundert.ca http://kundert.2y.net
  11. slashdot DNS is OPEN! by Anonymous Coward · · Score: 4, Informative

    http://www.dnsreport.com/tools/dnsreport.ch?domain =slashdot.org

    FAIL Open DNS servers ERROR: One or more of your nameservers reports that it is an open DNS server. This usually means that anyone in the world can query it for domains it is not authoritative for (it is possible that the DNS server advertises that it does recursive lookups when it does not, but that shouldn't happen). This can cause an excessive load on your DNS server. Also, it is strongly discouraged to have a DNS server be both authoritative for your domain and be recursive (even if it is not open), due to the potential for cache poisoning (with no recursion, there is no cache, and it is impossible to poison it). Also, the bad guys could use your DNS server as part of an attack, by forging their IP address. Problem record(s) are:

    Server 66.35.250.12 reports that it will do recursive lookups. [test]
    Server 12.152.184.136 reports that it will do recursive lookups. [test]
    Server 12.152.184.135 reports that it will do recursive lookups. [test]

    See this page for info on closing open DNS servers.

  12. Re:djbdns by Russ+Nelson · · Score: 5, Funny

    You have a correct configuration. You gain 2 skill points.

    --
    Don't piss off The Angry Economist
  13. Of course there is... by emil · · Score: 4, Informative
    There really isn't a good reason one nameserver can't serve internal and external users.

    Back in the bind 4 days, when I did serious DNS, my company wanted a few servers visible in their domain(s) for external dns host resolution.

    For people behind the firewall, they wanted a far more extensive list of hosts that were not to be seen for queries outside the firewall.

    I did this by using scp to transfer the zone files from the external to the internal DNS server; the internal server would then "cat" the additional hosts to the zone and HUP the named.

    AFAIK modern BIND uses "zones" so you can accomplish the above on one server, if you want. I've never used it, but I can see a number of situations where I'd need my above solution even with this feature.

    What BIND needs is not a "recursion no;" option, but instead a "recursion eth0;" or "recursion 1.2.3.*;" so recursive queries must originate from a trusted network.

    Remember also that not everyone in the world uses BIND - people with ActiveDirectory or NDS name servers might be screwed until a vendor patch.

  14. Re:When BIND is fixed I'll implement it by 19thNervousBreakdown · · Score: 5, Informative

    view "internal" {
      match-clients {
        10.0.0.0/8;
      };
      recursion yes;
      zone "example.com" {
        yadda yadda yadda;
      };
    };

    view "external" {
      match-clients {
        any;
      };
      recursion no;
      zone "example.com" {
        blah blah blah;
      };
    };

    --
    <xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
  15. Re:When BIND is fixed I'll implement it by gkitty · · Score: 4, Informative

    In Bind9 you don't have to return cached data, so though it happens by default you can turn it off ("additional-from-cache"):

    view "internal" {
            match-clients { internals; guests; };
            recursion yes;

            zone "." {
                    type hint;
                    file "bootstrap/cache";
            };

            zone "example.com"{
                    type master;
                    file "example-int.com";
            };
    };

    view "external" {
            match-clients { any; };
            recursion no;
            additional-from-auth no;
            additional-from-cache no;

            zone "example.com"{
                    type master;
                    file "example-ext.com";
                    allow-query { any; };
            };
    };

    ---------

    I believe that should prevent bind from being too useful from the outside.