page 1 DNS Rate Limiting W. Matthijs Mekking matthijs@nlnetlabs.nl http://www.nlnetlabs.nl/ 28 Feb 2013 Stichting NLnet Labs



Similar documents
Defending against DNS reflection amplification attacks

Identifying Patterns in DNS Traffic

DNS at NLnet Labs. Matthijs Mekking

How To Stop A Malicious Dns Attack On A Domain Name Server (Dns) From Being Spoofed (Dnt) On A Network (Networking) On An Ip Address (Ip Address) On Your Ip Address On A Pc Or Ip Address

Blocking DNS Messages is Dangerous

Use Domain Name System and IP Version 6

dnsperf DNS Performance Tool Manual

DNS Best Practices. Mike Jager Network Startup Resource Center

How To Understand The Effect Of A Domain Name Extension On A Network Attack On A Domain Names Server (Dns)

Defeating DNS Amplification Attacks. Ralf Weber Senior Infrastructure Architect

DRDoS Attacks: Latest Threats and Countermeasures. Larry J. Blunk Spring 2014 MJTS 4/1/2014

DDoS attacks in CESNET2

DOMAIN NAME SECURITY EXTENSIONS

The Domain Name System from a security point of view

NETNOD Autumn 2014 October 2, 2014

The Continuing Denial of Service Threat Posed by DNS Recursion (v2.0)

DISTRIBUTED DENIAL OF SERVICE OBSERVATIONS

Ralph Dolmans A solution for the DNS amplification attack problem

Part 5 DNS Security. SAST01 An Introduction to Information Security Martin Hell Department of Electrical and Information Technology

IETF DPRIVE WG: Encrypting DNS

Response Policy Zones for the Domain Name System (DNS RPZ) By Paul Vixie, ISC (et.al.) 2010 World Tour

The Environment Surrounding DNS. 3.1 The Latest DNS Trends. 3. Technology Trends

Large-scale DNS and DNSSEC data sets for network security research

DNSSEC in your workflow

Preventing DNS Amplification Attacks using white- and greylisting

DNS Cache Poisoning Vulnerability Explanation and Remedies Viareggio, Italy October 2008

How To Protect A Dns Authority Server From A Flood Attack

Defending your DNS in a post-kaminsky world. Paul Wouters <paul@xelerance.com>

IPv6 and DNS. Secure64

DNS Cache-Poisoning: New Vulnerabilities and Implications, or: DNSSEC, the time has come!

DNSSEC Applying cryptography to the Domain Name System

Presented by Greg Lindsay Technical Writer Windows Server Information Experience. Presented at: Seattle Windows Networking User Group April 7, 2010

An Introduction to the Domain Name System

F5 Intelligent DNS Scale. Philippe Bogaerts Senior Field Systems Engineer mailto: Mob.:

DOMAIN NAME SYSTEM (DNS)

Networking Domain Name System

Citrix NetScaler Global Server Load Balancing Primer:

2008 DNS Cache Poisoning Vulnerability Cairo, Egypt November 2008

Defending your DNS in a post-kaminsky world. Paul Wouters <paul@xelerance.com>

Domain Name System :49:44 UTC Citrix Systems, Inc. All rights reserved. Terms of Use Trademarks Privacy Statement

Where is Hong Kong in the secure Internet infrastructure development. Warren Kwok, CISSP Internet Society Hong Kong 12 August 2011

Internet Measurement Research

JPNIC Public Forum. Paul Vixie. Chairman, Internet Software Consortium. January 21, 2003

DNSSEC and DNS Proxying

Guide to DDoS Attacks December 2014 Authored by: Lee Myers, SOC Analyst

DNS Rex Do you need an aggressive benchmark?

SSAC Advisory on DDoS Attacks Leveraging DNS Infrastructure

Security of IPv6 and DNSSEC for penetration testers

Domain Name System (DNS) RFC 1034 RFC

Georgia College & State University

Service Expectations of Root Servers

DNS amplification attacks

Rough Outline. Introduction Why DNSSEC DNSSEC Theory Famous last words. Universiteit van Amsterdam, Sep 2006.

2012 Infrastructure Security Report. 8th Annual Edition Kleber Carriello Consulting Engineer

DNSSEC Support in SOHO CPE. OARC Workshop Ottawa 24 th September 2008

How To Mitigate A Large Volume Of Dns Amplification Attacks

How To Attack Isc.Org.Org With A Dnet On A Network With A Pnet On The Same Day As A Dbus On A Pc Or Ipnet On An Ipnet.Org On A 2.5Th Gen.Net

How to launch and defend against a DDoS

DNS. Some advanced topics. Karst Koymans. (with Niels Sijm) Informatics Institute University of Amsterdam. (version 2.6, 2013/09/19 10:55:30)

DNSSEC update TF Mobility, Vienna

IPV6 SERVICES DEPLOYMENT

The Future of DNS. Johan Ihrén Netnod. October 15,

Lesson 13: DNS Security. Javier Osuna GMV Head of Security and Process Consulting Division

The Impact of DNSSEC. Matthäus Wander. on the Internet Landscape. Duisburg, June 19, 2015

THE MASTER LIST OF DNS TERMINOLOGY. First Edition

HOW TO PREVENT DDOS ATTACKS IN A SERVICE PROVIDER ENVIRONMENT

DNS, DNSSEC and DDOS. Geoff Huston APNIC February 2014

Using the Domain Name System for System Break-ins

Harness Your Internet Activity!

Root zone update for TLD managers Mexico City, Mexico March 2009

Domain Name System (DNS) Fundamentals

TDC s perspective on DDoS threats

Reverse DNS considerations for IPv6

Defending against Flooding-Based Distributed Denial-of-Service Attacks: A Tutorial

Table of Contents DNS. How to package DNS messages. Wire? DNS on the wire. Some advanced topics. Encoding of domain names.

State of the "DNS privacy" project. Stéphane Bortzmeyer AFNIC

IPv6 and DNS. Secure64

Accommodating IP Version 6 Address Resource Records for the Root of the Domain Name System

Authenticated Denial of Existence in the DNS

DDoS Threat Report. Chris Beal Chief Security Architect on Twitter

Network Security. DNS (In)security. Radboud University, The Netherlands. Autumn 2015

Network Infrastructure Under Siege

THE MASTER LIST OF DNS TERMINOLOGY. v 2.0

DNS (Domain Name System) is the system & protocol that translates domain names to IP addresses.

BIG IP Global Traffic Manager (GTM) v.11

How To - Configure Virtual Host using FQDN How To Configure Virtual Host using FQDN


Akamai CDN, IPv6 and DNS security. Christian Kaufmann Akamai Technologies DENOG 5 14 th November 2013

SSAC Advisory SAC008 DNS Distributed Denial of Service (DDoS) Attacks

Computer Security CS 426 Lecture 36. CS426 Fall 2010/Lecture 36 1

Analysis of a DDoS Attack

RSSAC Recommendation on Measurements of the Root Server System RSSAC 002

BEST PRACTICES FOR IMPROVING EXTERNAL DNS RESILIENCY AND PERFORMANCE

DDoS attacks on electronic payment systems. Sean Rijs and Joris Claassen Supervisor: Stefan Dusée

Deploying IP Anycast. Core DNS Services for University of Minnesota Introduction and General discussion

DNS security: poisoning, attacks and mitigation

SIDN Server Measurements

DNS Security: New Threats, Immediate Responses, Long Term Outlook Infoblox Inc. All Rights Reserved.

Protecting DNS Critical Infrastructure Solution Overview. Radware Attack Mitigation System (AMS) - Whitepaper

Recommendations for dealing with fragmentation in DNS(SEC)

Transcription:

page 1 DNS Rate Limiting W. Matthijs Mekking matthijs@nlnetlabs.nl

page 2 One slide DNS Root www.nlnetlabs.nl A Referral: nl NS www.nlnetlabs.nl A 213.154.224.1 www.nlnetlabs.nl A www.nlnetlabs.nl A 213.154.224.1 Stub resolver Referral: nlnletlabs.nl NS Recursive name servers.nl Authoritative name servers www.nlnetlabs.nl A Answer: www.nlnetlabs.nl A 213.154.224.1 NLnetLabs.nl

page 3 Authoritative name servers

page 4 Inhaltsübersicht DNS DDoS attacks Defense mechanisms Response Rate Limiting Future developments

page 5 Background I am. Matthijs Mekking I work at. NLnet Labs I maintain. NSD And. OpenDNSSEC, Unbound, ldns, shim6,...

page 6 DNS DDoS attacks

page 7 Attack properties Reflection IP address spoofing Solution: BCP 38 (Ingress filtering) No deployment

page 8 Attack properties Amplification Large responses UDP These two characteristics make DNS a hot target.

page 9 DNS amplification ANY Apex, NS RRset 1:80 (with DNSSEC) NXDOMAIN + DNSSEC NSEC(3) + RRSIG records 1:18 (NXDOMAIN, NSEC) 1:25 (NXDOMAIN, NSEC3)

page 10 Abusing resolvers Service only to the intended clients RFC 5358: Preventing Use of Recursive Nameservers in Reflector Attacks

page 11 Abusing auth. servers Service to many, many recursive name servers Wide audience, RFC 5358 not applicable

page 12 Abusing auth. servers 50 B/s 50 B/s 1:80 50 B/s 20 KB/s 50 B/s Victim 50 B/s Botnet

page 13 Impact of the attack

page 14 Defense mechanisms

page 15 Defense mechanisms Adding capacity But more capacity means more abuse Prevent reflection BCP 38 Mitigate amplification Limit bandwidth DNS Rate Limiting

page 16 DNS Rate Limiting Blocking UDP ANY queries DNS Firewall DNS Dampening Response Rate Limiting

page 17 DNS Rate Limiting Blocking UDP ANY queries ANY queries are legitimate requests DNS Health checks Mail forwarders (collecting addresses, data) Quick fix for one attack scenario

page 18 DNS Rate Limiting DNS Firewall Can be configured to block specific packets or address range Drawbacks: (Manual) reactive approach No flexibility

page 19 DNS Rate Limiting DNS Firewall (cont.) iptables -A INPUT -p udp --dport 53 -m hashlimit \ --hashlimit-name DNS --hashlimit-above 20/second \ --hashlimitmode srcip --hashlimit-burst 100 \ --hashlimit-srcmask 28 -j DROP http://www.bortzmeyer.org/files/generate-netfilter-u32-dns-rule.py

page 20 DNS Rate Limiting DNS Dampening Proposal by Lutz Donnerhacke Based on BGP Route Dampening Self learning service Collect penalty points per address range (network) Hysteresis: Start at high level, stop at a much lower value During dampening no processing occurs

page 21 DNS Rate Limiting DNS Dampening (cont.) Unofficial patch for BIND9 Effective, but aggressive: False positives during attack Configuration defaults http://lutz.donnerhacke.de/eng/blog/dns-dampening

page 22 DNS Rate Limiting Response Rate Limiting (RRL) Proposal by Paul Vixie and Vernon Schryver http://www.redbarn.org/dns/ratelimits

page 23 RRL

page 24 RRL - Overview Limit responses instead of queries Resolvers have caches Drop answers that exceed rate limit False positive mitigation TCP fallback Performs well in existing cases Implemented in BIND9 (official patch) and NSD 3.2.15 This just in: Also in Knot 1.2.0

page 25 RRL How it works State blob: Address buckets: IPv4 /24, IPv6 /56 Response name: QNAME or Wildcard or Apex (NXDOMAIN) Error status (RCODE) NOERROR or NXDOMAIN or ERROR <bucket, name, status>

page 26 RRL How it works When generating response Look up state blob: <mask(ip), impute(name), status(rcode)) Increment state blob: <bucket, name, status> ++ If state blob threshold is reached, drop Or slip...

page 27 RRL How it works SLIP False positive mitigation Allow DDoS victim to contact DNS servers over TCP Approximately 1/SLIP responses with TC (instead of dropped)

page 28 RRL - Configuration RESPONSES-PER-SECOND NXDOMAINS-PER-SECOND ERRORS-PER-SECOND WINDOW IPv{4,6}-PREFIX-LENGTH SLIP MAX-TABLE-SIZE MIN-TABLE-SIZE

page 29 RRL Measurements Defending against DNS refection amplification attacks. Thijs Rozekrans, Javy de Koning Universiteit van Amsterdam downloads/publications/report-rrl-dekoning-rozekrans.pdf February 2013

page 30 RRL Measurements Use cases: ANY Targeted at zone apex NXDOMAIN Trigger NSEC(3)s in response Varying queries 25%, 50%, 75%, 100% positive responses Guessing, indexing, zone walking,...

page 31 RRL Measurements Setup:

page 32 RRL Measurements ANY attack at 11:20

page 33 RRL Measurements ANY attack at 11:20 RRL enabled at 14:15 1:52.2 1:1

page 34 RRL Measurements ANY attack at 11:20 RRL enabled at 14:15 SLIP In Out Amp. Ratio False positives* TCP responses 1 80 KB/s 81 KB/s 1:1 0% 100 % 2 79 KB/s 39 KB/s 1:0.5 50% 87.5 % 3 79 KB/s 26 KB/s 1:0.3 66.6% 66 % 5 80 KB/s 16 KB/s 1:0.2 80% 49 % 10 80 KB/s 8 KB/s 1:0.1 90% 27 % * Possible fps, assuming 3 tries

page 35 RRL Measurements NXDOMAIN attack 0% positive answers, 100% nxdomains Similar results as ANY attack

page 36 RRL Measurements Varying query attack 25% positive answers, 75% nxdomains 1:17 1:3.5

page 37 RRL Measurements Varying query attack 50% positive answers, 50% nxdomains 1:15.3 1:5.9

page 38 RRL Measurements Varying query attack 75% positive answers, 25% nxdomains 1:8.7 1:13.2

page 39 RRL Measurements Varying query attack 75% positive answers, 25% nxdomains SLIP In Out Amp. Ratio False positives* TCP responses 1 79 KB/s 689 KB/s 1:8.72 0% 100 % 2 78 KB/s 680 KB/s 1:8.72 50% 87.5 % 3 79 KB/s 677 KB/s 1:8.57 66.6% 66 % 5 79 KB/s 673 KB/s 1:8.52 80% 49 % 10 79 KB/s 665 KB/s 1:8.42 90% 27 %

page 40 RRL Measurements Varying query attack 100% positive answers, 0% nxdomains Amplification 1:11.14 RRL has no effect Attack only works for large zones (TLD)

page 41 RRL - Measurements

page 42 RRL Settings But for the short term, a good solution

page 43 RRL Settings SLIP Trade off between #false positives and #TCP sessions Default 2

page 44 RRL Settings Rate limit Default: 5 M: Maximum acceptable outgoing traffic per subnet L: Largest response found Configure threshold to be M/L Example: 30KB/s / 4KB/s = 8

page 45 RRL Settings Window Keep small: back to normal operation asap But not too small: flapping Default 15s

page 46 RRL Settings IPv4 prefix length Default /24 IPv6 prefix length Default /56

page 47 RRL Settings Max table size max(qps) * window Default 10000 ( 1MB) Min table size Default 1000 Advised to set higher

page 48 Future developments

page 49 Cat-and-mouse game DNS Rate Limiting is a cat-and-mouse game. RRL is currently an effective defense mechanism... but attacks are getting more sophisticated. Varying query attack

page 50 Cat-and-mouse game Dampening does actually do well with the varying query attack:

page 51 Cat-and-mouse game Dampening does actually do well with the varying query attack. It needs SLIP and parameter tweaking...

page 52 Cat-and-mouse game but not anymore if distributed attacks will happen.

page 53 BCP 38 Amplification is not the biggest issue, reflection is. Network vendors need to implement source validation (BCP 38, Ingress filtering) For the good of the Internet But no economic or legal incentive No direct benefit, operational costs, risks

page 54 Conclusions DNS DDoS attacks are real practical problems Reflection and amplification Amplification mitigation Resolvers: RFC 5358 Authoritative nameservers: Rate Limiting Cat-and-mouse game Reflection prevention BCP 38 is the real solution How to stimulate adoption?

page 55 Questions? W. Matthijs Mekking matthijs@nlnetlabs.nl If you like our work, please consider sponsoring us