Top Banner
DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT Student Assistant SysAdmin
38

DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Dec 15, 2015

Download

Documents

Joana Hollin
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

DNSSECBrought to you by ISC-BIND, SUNYCT, and:

Nick Merante – SUNYIT Comp Sci SysAdmin

Nick Gasparovich – SUNYIT Campus SysAdmin

Paul Brennan – SUNYIT Student Assistant SysAdmin

Page 2: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Wait… I thought you were from SUNYIT?

Page 3: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

DNSSEC TIMELINE

Page 4: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Selective Timeline of DNSSEC• 1987 – DNS Ratified to replace hosts.txt• 1990 – DNS Security Flaws Found• 1997 – First try at DNSSEC - RFC2065• 1999 – Second try at DNSSEC - RFC2535

BIND9 is first DNSSEC capable implementation• 2005 – Finalized RFCs Published• July 2008 – Kaminsky exploit announced• July 2010 – Root signed• August 2010 – .edu TLD is signed• March 2011 – .com TLD is signed

ARIN signed for Reverse DNS

Page 5: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

DNS BASICSA refresher to get us all on the same page…

Page 6: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

DNS Records• DNS comprised of various resource record (RR) types• Primary types:

• A – map hostnames to IP addresses• MX – map a host or domain to a list of mail servers• CNAME – specifies an alias for a host• PTR – map a IP address to a host name• NS – Specifies authoritative name servers for a zone• SOA – Specifies authoritative information about a zone

• Primary name server• Domain administrator email• Serial number• Timers related to refreshing the zone

• DNSSEC will introduce several new record types

Page 7: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

DNS Security Issues• Original DNS specifications did not account for security• DNS Spoofing

• No data integrity checks• Anyone can answer a request intended for another name server• Attacks against query ID numbers

• Cache Poisoning• A result of DNS spoofing• Trick a DNS server into caching false information• Nodes querying this name server will obtain false cached data

• Consequences:• Clients misdirected to alternate locations• Compromise host-based authentication systems

Page 8: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

DNSSEC CONCEPTS

Page 9: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

4 Security Objectives of DNSSEC

1. Key Distribution

2. Origin Authentication

3. Data Integrity

4. Authenticated Denial of Existence

Page 10: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

New Record Types• DNSKEY

• Public side of Private/Public Keyset• Key Signing Key• Zone Signing Key

• RRSIG• Signed Validation of Resource Record Set

• DS• Delegation Signer• Builds Chain of Trust

• NSEC/NSEC3• Certified Non-existence record

Page 11: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Traditional DNS Lookup (un-cached)

Recursive DNS

Server

Client looking for:fang.cs.sunyct.edu

Iterative calls

edu

sunyct

cs

fangcs

sunyct

edu

root

1

8

Page 12: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

DNS Lookup Under Attack

Recursive DNS

Server

Client looking for:fang.cs.sunyct.edu

Targeted bycache poisoning

Iterative calls

edu

sunyct

cs

fangcs

sunyct

edu

root

1

8

Page 13: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Keys• Public/Private Keyset

• Private Key used to sign records• Should be kept in a secure location (not on live DNS servers)

• Public Key used to check signatures• Must be 512 to 4096 bits for DNSSEC• Several Algorithms available

• Zone Signing Key used to sign zones• Key Signing Key used to sign ZSK record

• Generally larger & more secure

• Cryptographic Digest of KSK is sent upstream• DS Record• Verifies Authority of KSK

Page 14: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Key Flow

DS

KSK

ZSK

ampere

nagios

logit

(sunyct.edu)

DS

KSK

ZSK

fang

yoshi

spuds

(cs.sunyct.edu)

DS

KSK

ZSK

maryann

gilligan

professor

(island.sunyct.edu)

(edu)

Page 15: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Chain of Trust / Tower of Authority

Recursive DNS

Server

Client looking for:fang.cs.sunyct.edu

Targeted bycache poisoning

Iterative calls

edu

sunyct

cs

fangcs

sunyct

edu

rootCrushes youwhen yourdata is bad1

8

Page 16: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Key Rollover• Changing ZSK:

• Recommended monthly to quarterly

• Changing KSK• Recommended annually

• Why Rollover• Reduced window of key exposure• ZSKs sign many records• Keys become more vulnerable with use

Page 17: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

NSEC/NSEC3 Comparison• Presented as evidence of non-existence

Page 18: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

ldns-walk of berkeley.edu

Page 19: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

What’s all this RRSIG stuff?

Key tag of signing key

Date of signing

Signature expirationAlgorithm

Starting TTL

The signature

itself

Page 20: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Gotchas• DoS Danger• Load Increase• Signed zone can be 4x LARGER than unsigned• Bigger record size = more network traffic• Key Security• Dynamic DNS = fail

(Have to keep private keys loaded to resign, no support for that)

• Network Gear must support EDNS0 for UDP packets

Performance!

Page 21: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

IMPLEMENTATION

Page 22: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Our Test Environment

3 VM’s running OEL (sunyct.edu)

3 Hosts running FreeBSD (cs.sunyct.edu)

BIND 9.8.0-P2

Page 23: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

BIND Versions/Restrictions• We recommend using the most up-to-date version of your

preferred DNS software• Updates often pertain to security issues

• Preliminary DNSSEC support introduced in BIND 8.2• Recommended version of BIND 9.7 for all capabilities• Windows Server 2003 has preliminary support

• Slave support only• Must be activated in Registry

• Windows Server 2008 R2 has full support

Page 24: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Key Generation

Specifies Key Type

Algorithm

Key Size

Name Type

Zone Name

ZSK is default

Smaller Key Size

Key tag added

Page 25: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Signing the Zone

NSEC3 Hex Salt Zone Zone File

Generated Zone File

Page 26: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

named.conf Edits – Authoritative Servers

• Add “dnssec-enable yes” to the options section• For your first time signing, make sure you increment your

serial number!• After signing your zones, point to the new signed zones

• Same names as your old zone files, but with “.signed” appended

Page 27: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

named.conf Edits – Recursive Servers

To start validating results add: “dnssec-validation yes”

You also need to get the KSK for root into your config.As of this presentation, it would look like this forBIND >= 9.7:

managed-keys { "." initial-key 257 3 8 "AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0O8gcCjF FVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0NfnfL2MTJRkxoX bfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL496M/QZxkjf5/Efucp2gaD X6RS6CXpoY68LsvPVjR0ZSwzz1apAzvN9dlzEheX7ICJBBtuA6G3LQpz W5hOA2hzCTMjJPJ8LbqF6dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relS Qageu+ipAdTTJ25AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulq QxA+Uk1ihz0=";};

Page 28: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Determine Your DS Info

Domain Digest

Key Tag

Algorithm and Digest Type Fields

Key FileSpecify

SHA1 Hash

Page 29: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Send Your Digest to EDUCAUSE

Page 30: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Key rotation - ZSK

1. Generate and publish new ZSK one TTL before planned rotation, but don’t sign the zone with it!

2. After TTL expiration, sign with new ZSK1. Leave old DNSKEY record in zone for 1 TTL cycle

2. Allows cached signed records to be verified(Signatures created with old key need time to expire)

Here’s one option:• Have 3 ZSK’s in your zone. The previous, current and next.

Your zones will always contain the necessary keys.

Page 31: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Key rotation - KSK

1. Generate and publish new KSK at least one TTL before planned rotation and sign ZSK records with both the old and the new keys.

2. Make sure you send your new DS record upstream!

3. After TTL expiration, remove the old DS record from your upstream provider and remove the old KSK from your zone files

Page 32: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

VERIFICATION

Page 33: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

Verification – dnsviz.net

All Clear Trust Issue

Page 34: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

DNSSEC Debugger – Verisign Labs

Everything looks good

This shows a problem with the keys

Page 35: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

dig – Points of Interest

DNS Server Name

DNSSEC Enabled Search

Host to query forRecord Type

ad flag = authenticated data(this means it’s been confirmed valid)

Page 36: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

dig – Points of Interest

aa flag = authoritative answer(if you’re querying the authoritative server,you won’t see the ad flag, just the aa flag)

Page 37: DNSSEC Brought to you by ISC-BIND, SUNYCT, and: Nick Merante – SUNYIT Comp Sci SysAdmin Nick Gasparovich – SUNYIT Campus SysAdmin Paul Brennan – SUNYIT.

QUESTIONS?Get a copy of the slides @ http://www.cs.sunyit.edu/stc