Unbound a caching, validating DNSSEC resolver. Do you trust your name server? Configuration. Unbound as a DNS cache (SEC-less)



Similar documents
DNS at NLnet Labs. Matthijs Mekking

DNS SECURITY TROUBLESHOOTING GUIDE

Step-by-Step DNSSEC-Tools Operator Guidance Document

Creating a master/slave DNS server combination for your Grid Infrastructure

Domain Name System (DNS) Fundamentals

Zimbra :: The Leader in Open Source Collaboration. Administrator's PowerTip #3: June 21, 2007 Zimbra Forums - Zimbra wiki - Zimbra Blog

netkit lab dns Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group Version Author(s)

Domain Name System (DNS) Session-1: Fundamentals. Ayitey Bulley

Internet-Praktikum I Lab 3: DNS

Introduction. What is Unbound and what is DNSSEC. Installation. Manual for Unbound on Windows. W.C.A. Wijngaards, NLnet Labs, October 2010

Local DNS Attack Lab. 1 Lab Overview. 2 Lab Environment. SEED Labs Local DNS Attack Lab 1

DNS and LDAP persistent search

A versatile platform for DNS metrics with its application to IPv6

what s in a name? taking a deeper look at the domain name system mike boylan penn state mac admins conference

DNSSec Operation Manual for the.cz and e164.arpa Registers

DNSSEC - Why Network Operators Should Care And How To Accelerate Deployment

Networking Domain Name System

Domain Name System Security

How to Enable Internet for Guest Virtual Machine using Wi-Fi wireless Internet Connection.

Introduction to the Domain Name System

Deploying DNSSEC: From End-Customer To Content

Domain Name System. DNS is an example of a large scale client-server application. Copyright 2014 Jim Martin

DNS Session 4: Delegation and reverse DNS. Joe Abley AfNOG 2006 workshop

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

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: DNS Enumeration

DNS Security Tools (

Reverse DNS considerations for IPv6

DNS Service on Linux. Supawit Wannapila CCNA, RHCE

DNSSEC and DNS Proxying

DNSSEC Applying cryptography to the Domain Name System

Use Domain Name System and IP Version 6

A Step-by-Step guide for implementing DANE with a Proof of Concept

Enabling DNS for IPv6 CSD Fall 2011

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

The Domain Name System from a security point of view

DNS Pharming Attack Lab

CSIS 3230 Computer Networking Principles, Spring 2012 Lab 7 Domain Name System (DNS)

DNS Resolving using nslookup

Domain Name System (DNS) RFC 1034 RFC

DNSSEC. Introduction Principles Deployment

DNSSEC: A Vision. Anil Sagar. Additional Director Indian Computer Emergency Response Team (CERT-In)

DNS zone transfers from FreeIPA to non-freeipa slave servers

THE MASTER LIST OF DNS TERMINOLOGY. v 2.0

DNS : Domain Name System

Configuring the BIND name server (named) Configuring the BIND resolver Constructing the name server database files

DNS and BIND Primer. Pete Nesbitt linux1.ca. April 2012

Configuring your network settings to use Google Public DNS

DNS + DHCP. Michael Tsai 2015/04/27

DNSSEC in your workflow

DNSSEC for Everybody: A Beginner s Guide

Thales nshield HSM. Integration Guide for ISC BIND DNSSEC.

DNS Root NameServers

Remote DNS Cache Poisoning Attack Lab

DNSSEC. Introduction. Domain Name System Security Extensions. AFNIC s Issue Papers. 1 - Organisation and operation of the DNS

THE MASTER LIST OF DNS TERMINOLOGY. First Edition

DNS. Computer Networks. Seminar 12

KAREL UCAP DNS AND DHCP CONCEPTS MANUAL MADE BY: KAREL ELEKTRONIK SANAYI ve TICARET A.S. Organize Sanayi Gazneliler Caddesi 10

Lecture 2 CS An example of a middleware service: DNS Domain Name System

Introduction to the DANE Protocol

The secret life of a DNS query. Igor Sviridov <sia@nest.org>

Domain Name Server. Training Division National Informatics Centre New Delhi

DNS. The Root Name Servers. DNS Hierarchy. Computer System Security and Management SMD139. Root name server. .se name server. .

Tunnel Client FAQ. Table of Contents. Version 0v5, November 2014 Revised: Kate Lance Author: Karl Auer

DNSSEC Deployment a case study

FUJITSU Cloud IaaS Trusted Public S5 Setup and Configure yum Software Package Manager with CentOS 5.X/6.X VMs

DNSSEC Misconfigurations: How incorrectly configured security leads to unreachability

ACS 5.x and later: Integration with Microsoft Active Directory Configuration Example

User-ID Best Practices

GDS Resource Record: Generalization of the Delegation Signer Model

Security of IPv6 and DNSSEC for penetration testers

How to Add Domains and DNS Records

Copyright International Business Machines Corporation All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure

F-Root's DNSSEC Signing Plans. Keith Mitchell Internet Systems Consortium DNS-OARC NANOG48, Austin, 24 th Feb 2010

Installing and Setting up Microsoft DNS Server

CSE 127: Computer Security. Network Security. Kirill Levchenko

DNSSEC Practice Statement (DPS)

Defending against DNS reflection amplification attacks

Securing an Internet Name Server

KB Windows 2000 DNS Event Messages 1 Through 1614

ARP and DNS. ARP entries are cached by network devices to save time, these cached entries make up a table

IPV6 SERVICES DEPLOYMENT

A Review of Administrative Tools for DNSSEC Spring 2010

Domain Name System Security

CONSUL AS A MONITORING SERVICE

Resilient Networking. Overview of DNS Known attacks on DNS Denial-of-Service Cache Poisoning. Securing DNS Split-Split-DNS DNSSEC.

Agenda. Network Services. Domain Names. Domain Name. Domain Names Domain Name System Internationalized Domain Names. Domain Names & DNS

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

netkit lab load balancer dns 1.2 Massimo Rimondini Version Author(s)

DNS security: poisoning, attacks and mitigation

Transcription:

Unbound a caching, validating DNSSEC resolver UKUUG Spring 2011 Conference Leeds, UK March 2011 Jan-Piet Mens $ dig 1.1.0.3.3.0.8.1.7.1.9.4.e164.arpa naptr Do you trust your name server? DNS clients typically trust the name servers they use But they need not be trustworthy Rogue DHCP server hands out resolv.conf pointing to pirates Attackers can take over networks (think WiFi in hotels) Viruses/trojans can alter local configuration In all cases: We loose control over DNS replies Install a validating DNS resolver "close" to applications client validating resolver auth servers client valid. resolv resolver auth servers Unbound as a DNS cache (SEC-less) Configuration Unbound is a secure, caching-only, portable DNS server Maintained by NLNetlabs under BSD license Designed with DNSSEC and IPv6 from the ground up Trusts nothing Good security Many "distros" have packages I recommend newest version http://unbound.net/ Lightweight, fast, and easy to configure No split-personalities (And I was first to write about Unbound :-) One file (but we ll add more later on) $ cat /etc/unbound/unbound.conf server: access-control: 127.0.0.1/8 allow verbosity: 1 Launch unbound (and watch your syslog) # unbound Query it $ dig +short @127.0.0.1 ukuug.jpmens.org txt "Leeds" That s it!

Configure unbound-control Your workstation Configure unbound-control unbound-control-setup Generates certificates Enable in unbound.conf remote-control: control-enable: yes Restart unbound and test $ unbound-control status version: 1.4.8 verbosity: 1 threads: 1 modules: 2 [ validator iterator ] uptime: 252 seconds unbound (pid 9331) is running... Ensure unbound is running Configure your workstation to use it! $ cat /etc/resolv.conf nameserver 127.0.0.1 DHCP on Linux $ cat dhclient.conf... prepend domain-name-servers 127.0.0.1; Mac? scutil The Chain of Trust Enable DNSSEC validation The root zone s DNSKEY record is well known Establish a chain of trust from the root to any signed zone Each link validates the next Parent s DS record validates child zone s DNSKEY A child s DS record in parent is signed by private key of parent Chain of trust root zone signed in July 2010 validation starts at trust "anchor" Needs root DNSSEC trust anchor unbound-anchor utility retrieves root zone s DNSSEC key securely $ unbound-anchor -a /etc/unbound/root.key Configure trust anchor in unbound.conf auto-trust-anchor-file: "/etc/unbound/root.key" Ensure unbound-anchor in start-up scripts Reload $ unbound-control reload Did that work? $ dig +dnssec @127.0.0.1 ukuug.jpmens.org txt

dig dig (cont d) dig +dnssec and watch for AD flag indicating successful validation $ dig +dnssec @127.0.0.1 ukuug.jpmens.org txt ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, [...] Invalid or bogus DNSSEC data will not be returned $ dig +dnssec @127.0.0.1 www.dnssec-failed.org ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 3 CD flag indicates application wants to validate itself $ dig +cd +dnssec @127.0.0.1 www.dnssec-failed.org ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5 ;; flags: qr rd ra cd; QUERY: 1, ANSWER: 2, AUTHORITY: www.dnssec-failed.org. 7200 IN A 68.87.64.48 Unbound logging Configure DLV Enable more logging in Unbound val-log-level: 2 [9331:0] info: validation failure <www.dnssec-failed.org. A IN>: signature expired from 68.87.72.244 for key dnssec-failed.org. while building chain of trust Is that true? $ dig +multiline +cd +dnssec @127.0.0.1 \ www.dnssec-failed.org rrsig www.dnssec-failed.org. 7019 IN RRSIG \ A 5 3 7200 20090201000000 ( 20090101000000 48621 dnssec-failed.org. gm8ibze3n4xx4dqog+w2uvy+bwnlijojfmuqudub7fam wtd3k673q+005fdcw8xf88b+9qtvslrpnyi5zluq4v9k Xdya9Je0O2ByYjfrgjYqk4Qu37lfPe+iGvl9aSSMyGeu UHv9NWWY10nXjCp2rTdCSpXc7xt3CSMW7pFNFg0= ) DNS Look-aside Validation We need the DLV DNSKEY record $ dig +dnssec @127.0.0.1 dlv.isc.org dnskey ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 4,... dlv.isc.org. 7200 IN DNSKEY 257 3 5 BEAAAAPHMu/5... dlv.isc.org. 7200 IN DNSKEY 256 3 5 BEAAAAOlYGw5... dlv.isc.org. 7200 IN RRSIG DNSKEY 5 3 7200 20110... dlv.isc.org. 7200 IN RRSIG DNSKEY 5 3 7200 20110... Copy the SEP DNSKEY (KSK) into a file dlv.key grep -P DNSKEY\s+257 Add it to Unbound dlv-anchor-file: "dlv.key"

DLV (cont d) Browser tests Unbound will then Check for "manual" trust anchors in the configuration Get trust from delegation tree (DS in parent) Try to look up trust in DLV zone DNSSEC validation via parent (i.e. root) has priority over DLV DNSSEC Validator for Firefox http://www.dnssec-validator.cz/ DNSSEC or not? http://dnssec-or-not.net http://dnssectest.sidn.nl/ DNSSEC testbed (or your own) Serve local data Set up your own trust anchors in a file "my.keys", which contains DS or DNSKEY records p0000.aa IN DS 47534 8 1 74526d3f57... p0000.aa IN DS 47534 8 2 82512fb4ad... de. 86400 IN DNSKEY 257 3 8 AwEAAZ1FqQED8QBrk3Jk4q96lg example.com IN DS 47534 8 3 296fc89ee0... Configure keys into Unbound trust-anchor-file: "/etc/unbound/my.keys" Alternatively use trust-anchor configuration statements Configure the zone stub-zone: name: "de" stub-addr: 81.91.161.228 # auth-fra.dnssec.denic.de stub-addr: 87.223.175.25 # auth-ams.dnssec.denic.de Unbound can serve "local" data to its clients For example, a static "zone": local-zone: "ukuug." static local-data: "beamer.ukuug. IN A 192.168.1.12" local-data: paul.ukuug. TXT "Hi Paul!" local-data-ptr: "192.168.1.12 beamer.ukuug" Will it work? $ dig +short @127.0.0.1 paul.ukuug txt "Hi Paul!" No DNSSEC But local data can be added on-the-fly with unbound-control

More local data Forwarding Override a single name (all others resolved normally) local-data: "foo.jpmens.org A 127.0.0.1" Redirect a whole domain to an IP local-zone: "example.aa" redirect local-data: "example.aa A 127.0.0.9" Unbound on workstation behind corporate DNS? forward-zone: name: "." forward-addr: 192.168.1.20 Upstream server must be DNSSEC-enabled Unbound is by default For BIND you need to configure dnssec-enable Advanced topics Further reading There s an optional Python module built into Unbound Full control over DNS queries sent out by Unbound Full Control over DNS replies returned to Unbound clients Prototyping Alternative DNS Servers, UIT, 2009, Jan-Piet Mens http://mens.de/:/altdns Gather Unbound statistics http://unbound.net/documentation/howto_statistics.html Wrap a resolver into your own application with libunbound http://unbound.net/documentation/libunbound.html

Thank you Whoami $ dig 1.1.0.3.3.0.8.1.7.1.9.4.e164.arpa naptr Questions? 1.1.0.3.3.0.8.1.7.1.9.4.e164.arpa. 3575 IN NAPTR 3 10 "u" "E2U+http" "!^.*$!http:mens.de!". 1.1.0.3.3.0.8.1.7.1.9.4.e164.arpa. 3575 IN NAPTR 3 20 "u" "E2U+http" "!^.*$!http:blog.fupps.com!". 1.1.0.3.3.0.8.1.7.1.9.4.e164.arpa. 3575 IN NAPTR 4 10 "u" "E2U+mailto" "!^.*$!mailto:jp@mens.de!". 1.1.0.3.3.0.8.1.7.1.9.4.e164.arpa. 3575 IN NAPTR 1 10 "u" "E2U+sip" "!^.*$!sip:5552064@sipgate.de!". 1.1.0.3.3.0.8.1.7.1.9.4.e164.arpa. 3575 IN NAPTR 2 10 "u" "E2U+tel" "!^.*$!tel:+491718033011!".