draft-ietf-dnsop-reflectors-are-evil-06.txt   rfc5358.txt 
Network Working Group J. Damas Network Working Group J. Damas
Internet-Draft ISC Request for Comments: 5358 ISC
Intended status: BCP F. Neves BCP: 140 F. Neves
Expires: March 5, 2009 Registro.br Category: Best Current Practice Registro.br
September 1, 2008 October 2008
Preventing Use of Recursive Nameservers in Reflector Attacks Preventing Use of Recursive Nameservers in Reflector Attacks
draft-ietf-dnsop-reflectors-are-evil-06.txt
Status of this Memo
By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at Status of This Memo
http://www.ietf.org/shadow.html.
This Internet-Draft will expire on March 5, 2009. This document specifies an Internet Best Current Practices for the
Internet Community, and requests discussion and suggestions for
improvements. Distribution of this memo is unlimited.
Abstract Abstract
This document describes ways to prevent the use of default configured This document describes ways to prevent the use of default configured
recursive nameservers as reflectors in Denial of Service (DoS) recursive nameservers as reflectors in Denial of Service (DoS)
attacks. Recommended configuration as measures to mitigate the attacks. It provides recommended configuration as measures to
attack are given. mitigate the attack.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Document Terminology . . . . . . . . . . . . . . . . . . . . . 3 2. Document Terminology . . . . . . . . . . . . . . . . . . . . . 2
3. Problem Description . . . . . . . . . . . . . . . . . . . . . . 3 3. Problem Description . . . . . . . . . . . . . . . . . . . . . . 2
4. Recommended Configuration . . . . . . . . . . . . . . . . . . . 5 4. Recommended Configuration . . . . . . . . . . . . . . . . . . . 4
5. Security Considerations . . . . . . . . . . . . . . . . . . . . 6 5. Security Considerations . . . . . . . . . . . . . . . . . . . . 5
6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 6 6. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . 5
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6 7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 5
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 6 7.1. Normative References . . . . . . . . . . . . . . . . . . . 5
8.1. Normative References . . . . . . . . . . . . . . . . . . . 6 7.2. Informative References . . . . . . . . . . . . . . . . . . 6
8.2. Informative References . . . . . . . . . . . . . . . . . . 7
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 7
Intellectual Property and Copyright Statements . . . . . . . . . . 8
1. Introduction 1. Introduction
Recently, DNS [RFC1034] has been named as a major factor in the Recently, DNS [RFC1034] has been named as a major factor in the
generation of massive amounts of network traffic used in Denial of generation of massive amounts of network traffic used in Denial of
Service (DoS) attacks. These attacks, called reflector attacks, are Service (DoS) attacks. These attacks, called reflector attacks, are
not due to any particular flaw in the design of the DNS or its not due to any particular flaw in the design of the DNS or its
implementations, aside perhaps the fact that DNS relies heavily on implementations, except that DNS relies heavily on UDP, the easy
UDP, the easy abuse of which is at the source of the problem. They abuse of which is at the source of the problem. The attacks have
have preferentially used DNS due to common default configurations preferentially used DNS due to common default configurations that
that allow for easy use of open recursive nameservers that make use allow for easy use of open recursive nameservers that make use of
of such a default configuration. such a default configuration.
In addition, due to the small query-large response potential of the In addition, due to the small query-large response potential of the
DNS system it is easy to yield great amplification of the source DNS system, it is easy to yield great amplification of the source
traffic as reflected traffic towards the victims. traffic as reflected traffic towards the victims.
DNS authoritative servers which do not provide recursion to clients DNS authoritative servers that do not provide recursion to clients
can also be used as amplifiers; however, the amplification potential can also be used as amplifiers; however, the amplification potential
is greatly reduced when authoritative servers are used. It is also is greatly reduced when authoritative servers are used. It is also
not practical to restrict access to authoritative servers to a subset impractical to restrict access to authoritative servers to a subset
of the Internet, since their normal operation relies on them being of the Internet, since their normal operation relies on them being
able to serve a wide audience, and hence the opportunities to able to serve a wide audience; hence, the opportunities to mitigate
mitigate the scale of an attack by modifying authoritative server the scale of an attack by modifying authoritative server
configurations are limited. This document's recommendations are configurations are limited. This document's recommendations are
concerned with recursive nameservers only. concerned with recursive nameservers only.
In this document we describe the characteristics of the attack and In this document we describe the characteristics of the attack and
recommend DNS server configurations that specifically alleviate the recommend DNS server configurations that specifically alleviate the
problem described, while pointing to the only truly real solution: problem described, while pointing to the only real solution: the
the wide-scale deployment of ingress filtering to prevent use of wide-scale deployment of ingress filtering to prevent use of spoofed
spoofed IP addresses [BCP38]. IP addresses [BCP38].
2. Document Terminology 2. Document Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
3. Problem Description 3. Problem Description
Because most DNS traffic is stateless by design, an attacker could Because most DNS traffic is stateless by design, an attacker could
start a DoS attack in the following way: start a DoS attack in the following way:
1. The attacker starts by configuring a record on any zone he has 1. The attacker starts by configuring a record on any zone he has
access to, normally with large RDATA and TTL. access to, normally with large RDATA and Time to Live (TTL).
2. Taking advantage of clients on non-BCP38 networks, the attacker 2. Taking advantage of clients on non-BCP38 networks, the attacker
then crafts a query using the source address of their target then crafts a query using the source address of their target
victim and sends it to an open recursive nameserver. victim and sends it to an open recursive nameserver.
3. Each open recursive nameserver proceeds with the resolution, 3. Each open recursive nameserver proceeds with the resolution,
caches the record and finally sends it to the target. After this caches the record, and finally sends it to the target. After
first lookup, access to the authoritative nameservers is normally this first lookup, access to the authoritative nameservers is
no longer necessary. The record will remain cached for the normally no longer necessary. The record will remain cached at
duration of the TTL at the open recursive nameserver even if it's the open recursive nameserver for the duration of the TTL, even
deleted from the zone. if it's deleted from the zone.
4. Cleanup of the zone might, depending on the implementation used 4. Cleanup of the zone might, depending on the implementation used
in the open recursive nameserver, afford a way to clean the in the open recursive nameserver, afford a way to clean the
cached record from the open recursive nameserver. This would cached record from the open recursive nameserver. This would
possibly involve queries luring the open recursive nameserver to possibly involve queries luring the open recursive nameserver to
lookup information for the same name that is being used in the lookup information for the same name that is being used in the
amplification. amplification.
Because the characteristics of the attack normally involve a low Because the characteristics of the attack normally involve a low
volume of packets amongst all the kinds of actors besides the victim, volume of packets amongst all the kinds of actors besides the victim,
it's unlikely any one of them would notice their involvement based on it's unlikely any one of them would notice their involvement based on
traffic pattern changes. traffic pattern changes.
Taking advantage of open recursive nameserver that support EDNS0 Taking advantage of an open recursive nameserver that supports EDNS0
[RFC2671], the amplification factor (response packet size / query [RFC2671], the amplification factor (response packet size / query
packet size) could be around 80. With this amplification factor a packet size) could be around 80. With this amplification factor, a
relatively small army of clients and open recursive nameservers could relatively small army of clients and open recursive nameservers could
generate gigabits of traffic towards the victim. generate gigabits of traffic towards the victim.
With the increasing length of authoritative DNS responses derived With the increasing length of authoritative DNS responses derived
from deployment of DNSSEC and NAPTR as used in ENUM services, from deployment of DNSSEC [RFC4033] and NAPTR resource records as
authoritative servers will eventually be more useful as actors in used in ENUM services, authoritative servers will eventually be more
this sort of amplification attack. useful as actors in this sort of amplification attack.
Even if this attack is only really possible due to non-deployment of Even if this amplification attack is only possible due to non-
BCP38, this amplification attack is easier to leverage because for deployment of BCP38, it is easier to leverage because of historical
historical reasons, from times when the Internet was a much closer- reasons. When the Internet was a much closer-knit community, some
knit community, some nameserver implementations have been made nameserver implementations were made available with default
available with default configurations that when used for recursive configurations that, when used for recursive nameservers, made the
nameservers made the server accessible to all hosts on the Internet. server accessible to all hosts on the Internet.
For years this was a convenient and helpful configuration, enabling For years this was a convenient and helpful configuration, enabling
wider availability of services. As this document aims to make wider availability of services. As this document aims to make
apparent, it is now much better to be conscious of ones own apparent, it is now much better to be conscious of one's own
nameserver services and focus the delivery of services on the nameserver services and focus the delivery of services on the
intended audience of those services, be they a university campus, an intended audience of those services -- be they a university campus,
enterprise or an ISP's customers. The target audience also includes an enterprise, or an ISP's customers. The target audience also
operators of small networks and private server managers who decide to includes operators of small networks and private server managers who
operate nameservers with the aim of optimising their DNS service, as decide to operate nameservers with the aim of optimising their DNS
these are more likely to use default configurations as shipped by service, as these are more likely to use default configurations as
implementors. shipped by implementors.
4. Recommended Configuration 4. Recommended Configuration
In this section we describe the Best Current Practice for operating In this section we describe the Best Current Practice for operating
recursive nameservers. Following these recommendations would reduce recursive nameservers. Following these recommendations would reduce
the chances of having a given recursive nameserver be used for the the chances of any given recursive nameserver being used for the
generation of an amplification attack. generation of an amplification attack.
The generic recommendation to nameserver operators is to use the The generic recommendation to nameserver operators is to use the
means provided by the implementation of choice to provide recursive means provided by the implementation of choice to provide recursive
name lookup service only to the intended clients. Client name lookup service to only the intended clients. Client
authorization can be usually done in several ways: authorization can usually be done in several ways:
o IP address based authorization. Use the IP source address of the o IP address based authorization. Use the IP source address of the
DNS queries and filter them through an Access Control List (ACL) DNS queries and filter them through an Access Control List (ACL)
to service only the intended clients. This is easily applied if to service only the intended clients. This is easily applied if
the recursive name server's service area is a reasonably fixed IP the recursive name server's service area is a reasonably fixed IP
address range that is protected against external address spoofing, address range that is protected against external address spoofing,
usually the local network. usually the local network.
o Incoming Interface based selection. Use the incoming interface o Incoming interface based selection. Use the incoming interface
for the query as a discriminator to select which clients are to be for the query as a discriminator to select which clients are to be
served. This is of particular applicability for SOHO devices, served. This is of particular applicability for SOHO (Small
such as broadband routers that include embedded recursive name Office, Home Office) devices, such as broadband routers that
servers. include embedded recursive nameservers.
o Use TSIG [RFC2845] or SIG(0) [RFC2931] signed queries to o TSIG [RFC2845] or SIG(0) [RFC2931] signed queries to authenticate
authenticate the clients. This is a less error prone method, the clients. This is a less error prone method that allows server
which allows server operators to provide service to clients who operators to provide service to clients who change IP address
change IP address frequently (e.g. roaming clients). The current frequently (e.g., roaming clients). The current drawback of this
drawback of this method is that very few stub resolver method is that very few stub resolver implementations support TSIG
implementations support TSIG or SIG(0) signing of outgoing or SIG(0) signing of outgoing queries. The effective use of this
queries. The effective use of this method implies in most cases method implies, in most cases, running a local instance of a
running a local instance of a caching nameserver or forwarder that caching nameserver or forwarder that will be able to TSIG sign the
will be able to TSIG sign the queries and send them on to the queries and send them on to the recursive nameserver of choice.
recursive nameserver of choice.
o For mobile users use a local caching name server running on the o For mobile users, use a local caching nameserver running on the
mobile device or use a Virtual Private Network to a trusted mobile device or use a Virtual Private Network to a trusted
server. server.
In nameservers that do not need to be providing recursive service, In nameservers that do not need to be providing recursive service,
for instance servers that are meant to be authoritative only, turn for instance servers that are meant to be authoritative only, turn
recursion off completely. In general, it is a good idea to keep recursion off completely. In general, it is a good idea to keep
recursive and authoritative services separate as much as practical. recursive and authoritative services separate as much as practical.
This, of course, depends on local circumstances. This, of course, depends on local circumstances.
Even with all these recommendations network operators should consider Even with all these recommendations, network operators should
deployment of ingress filtering [BCP38] in routers to prevent use of consider deployment of ingress filtering [BCP38] in routers to
address spoofing as a viable course of action. In situations where prevent use of address spoofing as a viable course of action. In
more complex network setups are in place, "Ingress Filtering for situations where more complex network setups are in place, "Ingress
Multihomed Network" [BCP84] maybe a useful additional reference. Filtering for Multihomed Network" [BCP84] maybe a useful additional
reference.
By default, nameservers SHOULD NOT offer recursive service to By default, nameservers SHOULD NOT offer recursive service to
external networks. external networks.
5. Security Considerations 5. Security Considerations
This document does not create any new security issues for the DNS This document does not create any new security issues for the DNS
protocol, it deals with a weakness in implementations. protocol, it deals with a weakness in implementations.
Deployment of SIG(0) transaction security should consider the caveats Deployment of SIG(0) transaction security [RFC2931] should consider
with SIG(0) computational expense as it uses public key cryptography the caveats with SIG(0) computational expense as it uses public key
rather than the symmetric keys used by TSIG. In addition, the cryptography rather than the symmetric keys used by TSIG [RFC2845].
identification of the appropriate keys needs similar mechanisms to In addition, the identification of the appropriate keys needs similar
those for deploying TSIG, or alternatively, the use of DNSSEC mechanisms as those for deploying TSIG or, alternatively, the use of
signatures (RRSIGs) over the KEY RRs if published in DNS. This will DNSSEC [RFC4033] signatures (RRSIGs) over the KEY RRs if published in
in turn require the appropriate management of DNSSEC trust anchors. DNS. This will in turn require the appropriate management of DNSSEC
trust anchors.
6. Acknowledgments 6. Acknowledgments
The authors would like to acknowledge the helpful input and comments The authors would like to acknowledge the helpful input and comments
of Joe Abley, Olafur Gudmundsson, Pekka Savola, Andrew Sullivan and of Joe Abley, Olafur Gudmundsson, Pekka Savola, Andrew Sullivan, and
Tim Polk. Tim Polk.
7. IANA Considerations 7. References
This document does not define a registry and does not require any
IANA action.
8. References
8.1. Normative References 7.1. Normative References
[RFC1034] Mockapetris, P., "Domain names - concepts and facilities", [RFC1034] Mockapetris, P., "Domain names - concepts and facilities",
STD 13, RFC 1034, November 1987. STD 13, RFC 1034, November 1987.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2671] Vixie, P., "Extension Mechanisms for DNS (EDNS0)", [RFC2671] Vixie, P., "Extension Mechanisms for DNS (EDNS0)",
RFC 2671, August 1999. RFC 2671, August 1999.
[RFC2845] Vixie, P., Gudmundsson, O., Eastlake, D., and B. [RFC2845] Vixie, P., Gudmundsson, O., Eastlake, D., and B.
Wellington, "Secret Key Transaction Authentication for DNS Wellington, "Secret Key Transaction Authentication for DNS
(TSIG)", RFC 2845, May 2000. (TSIG)", RFC 2845, May 2000.
[RFC2931] Eastlake, D., "DNS Request and Transaction Signatures ( [RFC2931] Eastlake, D., "DNS Request and Transaction Signatures
SIG(0)s)", RFC 2931, September 2000. (SIG(0)s)", RFC 2931, September 2000.
8.2. Informative References [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S.
Rose, "DNS Security Introduction and Requirements",
RFC 4033, March 2005.
7.2. Informative References
[BCP38] Ferguson, P. and D. Senie, "Network Ingress Filtering: [BCP38] Ferguson, P. and D. Senie, "Network Ingress Filtering:
Defeating Denial of Service Attacks which employ IP Source Defeating Denial of Service Attacks which employ IP Source
Address Spoofing", BCP 38, RFC 2827, May 2000. Address Spoofing", BCP 38, RFC 2827, May 2000.
[BCP84] Baker, F. and P. Savola, "Ingress Filtering for Multihomed [BCP84] Baker, F. and P. Savola, "Ingress Filtering for Multihomed
Networks", BCP 84, RFC 3704, March 2004. Networks", BCP 84, RFC 3704, March 2004.
Authors' Addresses Authors' Addresses
Joao Damas Joao Damas
Internet Systems Consortium, Inc. Internet Systems Consortium, Inc.
950 Charter Street 950 Charter Street
Redwood City, CA 94063 Redwood City, CA 94063
US US
Phone: +1 650 423 1300 Phone: +1 650 423 1300
Email: Joao_Damas@isc.org EMail: Joao_Damas@isc.org
URI: http://www.isc.org/ URI: http://www.isc.org/
Frederico A. C. Neves Frederico A. C. Neves
NIC.br / Registro.br NIC.br / Registro.br
Av. das Nacoes Unidas, 11541, 7 Av. das Nacoes Unidas, 11541, 7
Sao Paulo, SP 04578-000 Sao Paulo, SP 04578-000
BR BR
Phone: +55 11 5509 3511 Phone: +55 11 5509 3511
Email: fneves@registro.br EMail: fneves@registro.br
URI: http://registro.br/ URI: http://registro.br/
Full Copyright Statement Full Copyright Statement
Copyright (C) The IETF Trust (2008). Copyright (C) The IETF Trust (2008).
This document is subject to the rights, licenses and restrictions This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors contained in BCP 78, and except as set forth therein, the authors
retain all their rights. retain all their rights.
 End of changes. 36 change blocks. 
122 lines changed or deleted 101 lines changed or added

This html diff was produced by rfcdiff 1.35. The latest version is available from http://tools.ietf.org/tools/rfcdiff/