DNS, DNSSEC and DDOS Geoff Huston APNIC February 2014.

Slides:



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

CST Computer Networks NAT CST 415 4/10/2017 CST Computer Networks.
Network and Application Attacks Contributed by- Chandra Prakash Suryawanshi CISSP, CEH, SANS-GSEC, CISA, ISO 27001LI, BS 25999LA, ERM (ISB) June 2006.
Sergei Komarov. DNS  Mechanism for IP hostname resolution  Globally distributed database  Hierarchical structure  Comprised of three components.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
FIREWALLS. What is a Firewall? A firewall is hardware or software (or a combination of hardware and software) that monitors the transmission of packets.
NTP and Evil Geoff Huston, Randy Bush. The Evolution of Evil It used to be that you sent evil packets to your chosen victim but this exposed you, and.
A Question of Protocol Geoff Huston APNIC. Originally there was RFC791:
Domain Name System: DNS
DNS: Revising the Current Protocol Matt Gustafson Matt Weaver CS522 Computer Communications University of Colorado, Colorado Springs.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
Domain Name System ( DNS )  DNS is the system that provides name to address mapping for the internet.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
COEN 445 Communication Networks and Protocols Lab 3
FIREWALL TECHNOLOGIES Tahani al jehani. Firewall benefits  A firewall functions as a choke point – all traffic in and out must pass through this single.
A question of protocol Geoff Huston APNIC 36. Originally there was RFC791: “All hosts must be prepared to accept datagrams of up to 576 octets (whether.
Lecture 22 Page 1 Advanced Network Security Other Types of DDoS Attacks Advanced Network Security Peter Reiher August, 2014.
Tony Kombol ITIS Who knows this? Who controls this? DNS!
Cisco Discovery Working at a Small-to-Medium Business or ISP CHAPTER 7 ISP Services Jr.
Chapter 4: Managing LAN Traffic
Computer Security: Principles and Practice First Edition by William Stallings and Lawrie Brown Lecture slides by Lawrie Brown Chapter 8 – Denial of Service.
TELE 301 Lecture 11: DNS 1 Overview Last Lecture –Scheduled tasks and log management This Lecture –DNS Next Lecture –Address assignment (DHCP)
Geoff Huston APNIC Labs
Being an Intermediary for Another Attack Prepared By : Muhammad Majali Supervised By : Dr. Lo’ai Tawalbeh New York Institute of Technology (winter 2007)
Firewalls. Evil Hackers FirewallYour network Firewalls mitigate risk Block many threats They have vulnerabilities.
October 15, 2002Serguei A. Mokhov, 1 Intro to DNS SOEN321 - Information Systems Security.
Chapter 17 Domain Name System
© NLnet Labs, Licensed under a Creative Commons Attribution 3.0 Unported License.Creative Commons Attribution 3.0 Unported License Troubleshooting.
Tyre Kicking the DNS Testing Transport Considerations of Rolling Roots Geoff Huston APNIC.
DNS Security Pacific IT Pros Nov. 5, Topics DoS Attacks on DNS Servers DoS Attacks by DNS Servers Poisoning DNS Records Monitoring DNS Traffic Leakage.
Module 8 DNS Tools & Diagnostics. Objectives Understand dig and nslookup Understand BIND toolset Understand BIND logs Understand wire level messages.
Packet Filtering Chapter 4. Learning Objectives Understand packets and packet filtering Understand approaches to packet filtering Set specific filtering.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Fundamentals of Proxying. Proxy Server Fundamentals  Proxy simply means acting on someone other’s behalf  A Proxy acts on behalf of the client or user.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
1 Kyung Hee University Chapter 18 Domain Name System.
NETWORK ATTACKS Dr. Andy Wu BCIS 4630 Fundamentals of IT Security.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
Module 8 DNS Tools & Diagnostics. Dig always available with BIND (*nix) and windows Nslookup available on windows and *nix Dig on windows – unpack zip,
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 4: Planning and Configuring Routing and Switching.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 18 Domain Name System (DNS)
DoS/DDoS attack and defense
What if Everyone Did It? Geoff Huston APNIC Labs.
Firewalls A brief introduction to firewalls. What does a Firewall do? Firewalls are essential tools in managing and controlling network traffic Firewalls.
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
Computer Network Architecture Lecture 6: OSI Model Layers Examples 1 20/12/2012.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
EDNS0 - the need for speed Lawrence Conroy Roke Manor Research This draft has been produced by Lawrence Conroy
Chapter 3 TCP and IP 1 Chapter 3 TCP and IP. Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) User Datagram Protocol (UDP) Internet.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Ch. 23, 25 Q and A (NAT and UDP) Victor Norman IS333 Spring 2015.
Fragmentation Geoff Huston APNIC Labs. Before Packets… Digitised telephone networks switched time – Each active network transaction was a 56K constant.
© 2013 Infoblox Inc. All Rights Reserved. Paul UKNOF 26 – 13 Sep 2013, London Paul Ebersman.
MAN-IN-THE-MIDDLE ATTACK STEGANOGRAPHY Lab# MAC Addresses and ARP  32-bit IP address:  network-layer address  used to get datagram to destination.
A Speculation on DNS DDOS
Chapter 3 TCP and IP Chapter 3 TCP and IP.
Geoff Huston APNIC March 2017
A Speculation on DNS DDOS
Joao Damas, Geoff Labs March 2018
DNS over IPv6 - A Study in Fragmentation
Chapter 19 Domain Name System (DNS)
IPv6: Are we really ready to turn off IPv4?
D* (DNS, and DNSSEC and DDOS)
Surviving IPv6 Fragmentation
Domain Name System: DNS
ITIS 6167/8167: Network and Information Security
ECDSA P-256 support in DNSSEC-validating Resolvers
What part of “NO” is so hard for the DNS to understand?
Presentation transcript:

DNS, DNSSEC and DDOS Geoff Huston APNIC February 2014

The Evolution of Evil It used to be that they sent evil packets to their chosen victim but this exposed the attacker, and limited the damage they could cause Attacker Victim e.g. TCP SYN attack

The Evolution of Evil Then they enrolled a bot army to send evil which kept the attacker hidden and increased the damage leverage Attacker Victim Massed URL retrieval Experiences what looks like a TCP syn attack!

The Evolution of Evil But now they co-opt the innocent to the evil cause, and use un-corrupted servers to launch the attack which hides the attacker(s) and uses the normal operation of servers to cause damage

UDP is a Fine Protocol UDP is used whenever you want a fast and highly efficient short transaction protocol Send a query to a server ( one packet) And the server sends an answer (one packet) UDP works best when the question and the answer are small (<512 bytes), but can work on larger transactions * Although it’s not as reliable as TCP The fine print – you‘ll need to magnify this to read it! Some UDP applications use multiple UDP packets for large answers (e.g. NTP). Some rely of IP level fragmentation (e.g. DNS with EDNS0) The problem with relying on fragmentation is firewall filtering and NATs (the trailing frags have no transport level header to assist in locating the NAT binding, as fragmentation is an IP level function) And the problem with multiple UDP packets is reliably reassembly is pushed into the application, which may not necessarily do this well! *

UDP Mutation Unlike TCP there is no handshake between the two parties who are communicating Send the server a UDP packet The server flips the source and destination IP addresses and responds with a UDP packet The server never checks the authenticity of the source address This allows a simply reflection attack…

UDP Reflection Attack Attacker Victim Server Proto: UDP Dest: Server Source: Victim Proto: UDP Dest: Victim Source: Server Note the fake source!

UDP and DDOS Reflection Attacks This works “best” for a UDP-based service when The service is widely used Servers are commonplace Servers are poorly maintained (or unmaintained) Clients are not “qualified” by the server (i.e. anyone can pose a query to a server) The answer is far bigger than the question

Hmmmmm What could that be?

DNS as an attack vector UDP-based query response service UDP is now almost ubiquitous for the DNS – EDNS0 wiped out the last vestiges of TCP fallback The service is widely used Everybody is a client of the DNS Servers are commonplace Resolvers are scattered all over the Internet Servers are poorly maintained (or unmaintained) There are some 30 million open resolvers Clients are not “qualified” by the server (i.e. anyone can pose a query to a server) DNS servers are by design promiscuous Many DNS resolvers are unintentionally promiscuous The answer is far bigger than the question Just ask the right DNS question!

DNS and DDOS DNS DDOS attacks are now very commonplace on today’s Internet They can (and do) operate at sustained gigabit speeds They can use corrupted intermediaries to broaden the attack surface and further increase the query intensity And efforts to mitigate at the server tend to degrade the quality of the DNS service, as well as affecting the victim

DNS Queries and Responses dig A isc.org - query size = 36 bytes – response size = 52 bytes Conventional DNS queries and answers tend to be relatively poor attack amplifiers – in general the answer is not all that much larger than the question But there are particular questions that generate more impressive answers…

The DNS ANY query dig ANY isc.org – query size = 36 bytes response size = 3,587 bytes That’s more like it! In this case the response is 100x larger than the query

Blocking the ANY attack Modify the resolver not to respond to ANY queries in a meaningful way $ dig ANY ; > DiG P1 > ANY ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 6696 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;isc.org.INANY ;; Query time: 632 msec ;; SERVER: #53( ) ;; WHEN: Sun Feb 16 09:42: ;; MSG SIZE rcvd: 25

The DNSSEC query With DNSSEC, if the client requests DNSSEC information, then the additional records in the response contain crypto values These crypto records can be quite large… dig +dnssec A isc.org – query = 36 bytes – response = 1,619 bytes That’s an additional 1,567 bytes of crypto payload that has been provided by DNSSEC

Blocking DNSSEC DNS attacks Stop serving DNSSEC-signed zones And/or configure resolvers to turn off the DNSSEC-OK EDNS0 flag But resolver-level query blocking defeats the entire purpose of DNSSEC! So we need to look to other measures to mitigate this vulnerability

Possible responses Drop “excessive” queries at the resolver – collateral damage to the server and the served names – can lead to cache poisoning attacks Drop EDNS0 and revert to original DNS behaviour No DNS UDP responses over 512 bytes Requestor directed to use TCP instead – Poor DNS resolution performance for all clients – Can lead to server overload though increased TCP load Maybe we can combine the two approaches

DNS Response Rate Limiting (RRL) Set a maximum rate that any requestor will be told the same answer note: this is not about the query – its about the response! Above this threshold either drop the query, or respond with the query and the truncated bit (TC) set ON – The ratio of candidate queries to TC responses is termed the “SLIP ratio” Some folk say SLIP=2 is enough Others seem to prefer SLIP=1

This will not eliminate the problem As the attacker can broaden the attack plane across a large set of open recursive resolvers and not overload any single resolver to trigger its local RRL response – And there are some ~30M such open resolvers But it does increase the effort required to mount an attack based on DNS reflection, due to the added need to distribute the attack profile over a large set of resolvers Attackers tend to exert no more effort than is strictly necessary to achieve the desired outcome, so increasing the effort needed to use the DNS to mount a reflection attack may well shift attention to other vulnerabilities, such as NTP

What you need to be naughty  Generate a list of open resolvers (zmap, for example is a good starting point)  Write a simple script that sends a simple DNS query to an open resolver, with UDP source address spoofing  Enlist a collection of coercible hosts to generate some 250,000 DNS queries per second across your list of open resolvers  And the servers will respond with a 300Mbps DDOS stream!  Rinse, repeat and multiply To Do List

What you need to be nice  Add RRL to your DNS resolvers  Clean up open DNS resolvers in your networks Limit queries on recursive resolvers to be sourced from your client cone, if you can

But… Being nice is not always possible – There is a significant volume of embedded DNS functionality in appliances and NAT-based consumerware – And enough of includes open DNS resolver functionality to be a problem that is not going to be “fixed” anytime soon

It’s not just the DNS NTP uses a UDP-based command and control channel over the same port as the time exchange (UDP port 123) And NTP servers are often installed with an open config The NTP monlist command is 220 bytes to send, and the response is a set of packets with a total volume of 46,800 bytes

What you need to be nice  Add RRL to your DNS resolvers  Clean up open DNS resolvers in your networks Limit queries on recursive resolvers to come from your client cone, if you can  While you are at it, do the same filtering for NTP, and the monlist command in particular

In the longer term… Commonly used protocols that can generate large UDP responses are a long term problem – And DNSSEC will not cram into a 512 byte payload in the DNS So maybe it’s the ability to pass through IP packets through the network with a false IP source address that is the basic problem, and just UDP exposes this problem to application level behaviour

What you need to be nice  Add RRL to your DNS resolvers  Clean up open DNS resolvers in your networks Limit queries on recursive resolvers to come from your client cone, if you can  While you are at it do the same filtering for NTP, and the monlist command in particular  Perform outbound traffic filtering to support source address validation: BCP38

Some Useful Resources Open DNS resolvers: DNS RRL description Sealing up NTP – a template for ntp.conf Open NTP servers BCP 38 BCP 38 tracking

Thanks!