Apnic Elearning Webclass: Dns Security
Apnic Elearning Webclass: Dns Security
"#$"%&'
Introduction
! Presenter
Sheryl Hermoso
Specialties: Training Officer [email protected]
Network Security IPv6 DNS/DNSSEC Internet Resource Mgmt
%'
!"#$"%&'
root-server
gtld-server
5" go ask apnic server @ ns.apnic.net (+ glue) 6" 192.168.5.10 7" www.apnic.net A ?
apnic-server
DNS Vulnerabilities
Zone administrator
1" master
Zone file
2"
4"
Caching forwarder
3"
5"
Dynamic updates
slaves
resolver
&'
!"#$"%&'
DNS Vulnerabilities
Corrupting data"
Zone administrator
Cache impersonation"
Zone file
2"
Caching forwarder
3"
5"
Dynamic updates
resolver
Unauthorized updates"
Server protection!
Data protection!
Root/GTLD
QID=64571
ns.example.com
('
!"#$"%&'
! Run BIND with the least privilege (use chroot) ! Randomize source ports
! dont use query-source option
! RFC 2845
!'
!"#$"%&'
Cache impersonation"
Zone file
master
Caching forwarder
Dynamic updates
slaves
resolver
Unauthorized updates"
TSIG Example
verication"
AXFR" Sig ...! AXFR"
Sig ...!
Query: AXFR"
verication"
10
)'
!"#$"%&'
TSIG Steps
! Generate secret
! dnssec-keygen -a <algorithm> -b <bits> -n host <name of the key>
! Communicate secret
! Transfer the key securely (ex. SSH/SCP)
! Test
! dig @<server> <zone> AXFR -k <TSIG keyfile>
11
1)2345%"&'()"*)"'+,-..-6,-.6'
! key ns1-ns2.pcx.net {! algorithm hmac-md5;! secret "APlaceToBe";! };! server 10.33.40.46 {! keys {ns1-ns2.pcx.net;};! };! zone "my.zone.test." {! type slave;! file myzone.backup;! masters ! !{10.33.40.46;}; };!
!"#$%&'$(&)*$+,-($-'$&$./*$&'0$1*2*1$+"$-+$-'$+,*$%"'.3$./*$4'&5*06%"'27$$ #(-'3$8-'%/#0*9$(+&+*5*'+:$$
include /var/named/master/tsig-key-ns1-ns2;
*'
!"#$"%&'
$ dig @127.0.0.1 example.net AXFR \ -k Kns1-ns2.pcx.net.+157+15921.key ! A wrong key will give Transfer failed and on the server the security-category will log this. ! Note: TSIG is time-sensitive
13
14
+'
!"#$"%&'
Cache impersonation"
Zone file
master
Caching forwarder
Dynamic updates
slaves
resolver
16
,'
!"#$"%&'
Types of Keys
! Zone Signing Key (ZSK)
! Sign the RRsets within the zone ! Public key of ZSK is defined by a DNSKEY RR
! Trusted anchor in a security aware server ! Part of the chain of trust by a parent name server ! Using a single key or both keys is an operational choice (RFC allows both methods)
! Publish your public key ! Signing the zone ! Update the config file
! Modify the zone statement, replace with the signed zone file
$'
!"#$"%&'
! Note that only authoritative records are signed NS records for the zone itself are signed
! NS records for delegations are not signed ! DS RRs are signed! ! Glue is not signed
%#'
!"#$"%&'
Questions
! Please remember to fill out the survey
! http://www.surveymonkey.com/s/ apnic-20120905-eL2
%%'
!"#$"%&'
Thank you!
End of Session
%&'