DNS
DNS
DNS
Email
The world wide web
Peer to peer applications
Instant messaging
Voice over IP, etc., etc., etc.
10
25
http://www.uark.edu/~uarkinfo/CAC/CAC4-4-00_DNS.html
http://net.berkeley.edu/policy_review/DNS.new.shtml
http://www.uc.edu/ucomm/web/dns.html
http://www.dfa.cornell.edu/dfa/cms/treasurer/policyoffice/policies/
volumes/informationtech/upload/vol5_6.pdf
Florida:
http://www.webadmin.ufl.edu/policies/domain_name/
Indiana:
http://kb.iu.edu/data/aqeo.html
Iowa:
http://cio.uiowa.edu/Policy/domain-name-policy.shtml
Iowa State:
http://policy.iastate.edu/policy/dns
KS State:
http://www.k-state.edu/cns/policy/dns_policy.html
Michigan:
http://spg.umich.edu/pdf/601.15-1.pdf
Nevada Reno: http://www.it.unr.edu/pages/policy-domain-name.aspx
Oregon State: http://oregonstate.edu/net/info/policy/domain_policy.php
NYU:
http://www.nyu.edu/its/policies/dnsserv.html
Penn State:
http://tns.its.psu.edu/networking/psuDNS.cfm
Vanderbilt:
http://its.vanderbilt.edu/dns_policy
26
WU St Louis: http://www.wustl.edu/policies/domain.html
28
2. A Quick Hand
Waving DNS Tutorial
We don't want to turn you into
DNS administrators, but we do need to
agree on some terminology and provide
a little historical background.
34
Next, one of the root servers identifies the NS's for the .edu TLD:
edu.
172800 IN NS
L3.NSTLD.COM.
edu.
172800 IN
NS
M3.NSTLD.COM.
edu.
172800 IN
NS
A3.NSTLD.COM.
edu.
172800 IN
NS
C3.NSTLD.COM.
edu.
172800 IN
NS
D3.NSTLD.COM.
edu.
172800 IN
NS
E3.NSTLD.COM.
edu.
172800 IN
NS
G3.NSTLD.COM.
edu.
172800 IN
NS
H3.NSTLD.COM.
;; Received 306 bytes from 192.228.79.201#53(B.ROOT-SERVERS.NET) in 30 ms
One of those TLD name servers then identifies the NS's for
uoregon.edu:
uoregon.edu. 172800 IN NS
ARIZONA.edu.
uoregon.edu.
172800 IN
NS
RUMINANT.uoregon.edu.
uoregon.edu.
172800 IN
NS
PHLOEM.uoregon.edu.
;; Received 147 bytes from 192.41.162.32#53(L3.NSTLD.COM) in 85 ms
35
And then finally, via one of the name servers for uoregon.edu,
we can then actually resolve www.uoregon.edu:
www.uoregon.edu. 900 IN
A
128.223.142.89
uoregon.edu.
86400 IN
NS
phloem.uoregon.edu.
uoregon.edu.
86400 IN
NS
arizona.edu.
uoregon.edu.
86400 IN
NS
ruminant.uoregon.edu.
uoregon.edu.
86400 IN
NS
dns.cs.uoregon.edu.
;; Received 228 bytes from 128.196.128.233#53(ARIZONA.edu) in 35 ms
36
DNS Efficiencies
Most common DNS queries do not require re-resolving the TLD
(.edu, .com, .net, .org, .biz, .info, .ca, .de, .uk, etc.) name servers,
or even the name servers for 2nd level domains such as
google.com or microsoft.com -- those name servers change rarely
if ever, and will typically be statically defined via "glue" records,
and cached by the local recursive name server. (Glue records assist
with the DNS bootstrapping process, providing a static mapping of
name server's FQDNs to its associated dotted quad.)
Cached data which has been seen by a DNS server will be reused
until it "cooks down" or expires; cache expiration is controlled by
the TTL (time to live) associated with each data element. TTL
values are expressed in seconds.
Negative caching (the server may remember that a FQDN doesn't
exist) may also help reduce query loads; see "Negative Caching of
DNS Queries (DNS NCACHE)," RFC2308.
38
42
43
44
47
Subnet-Level Filtering
While it is great to prevent spoofing at the university-wide
level, that sort of border router anti-spoofing filter does not
prevent a miscreant from forging an IP address taken from one
of your subnets for use on another of your subnets.
Cue subnet-level anti-spoofing filters.
You KNOW that hosts on each subnet should ONLY be
originating packets with IP addresses legitimately assigned to
that subnet, so at the uplink from each subnet, drop/block
outbound packets that appear to be "from" any other IP
address another very basic sanity check.
48
BCP38/RFC2827
Let me be clear that ingress filtering of traffic with spoofed IP
addresses is not new and is not my idea it is Best Current
Practice (BCP) 38/RFC2827, written by Ferguson and Senie in
May 2000.
Unfortunately, despite being roughly ten years old, many sites
still do NOT do BCP38 filtering -- currently 15-24% Internet
wide depending on whether you count netblocks, dotted quads
or ASNs (see http://spoofer.csail.mit.edu/summary.php)
Does YOUR university do BCP38 filtering?
50
51
55
For Example
Consider a situation where a DNS server is recursive AND is
open for use by anyone (a server that's cleverly termed an
"open recursive DNS server").
While it might seem sort of "neighborly" to share your name
server with others, in fact it is a really bad idea (the domain
name system equivalent of running an open/abusable SMTP
relay, in fact).
The problem? Well, there are actually multiple problems, but
one of the most important ones is associated with spoofed
UDP traffic (see how this all ties together? :-;)
57
65
68
Another Example
Win32.Netmesser.A (published 2/1/2005):
http://www3.ca.com/securityadvisor/virusinfo/virus.aspx?id=41618
"[the trojan] then enumerates the following registry entry:
HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\
Parameters\Adapters
checking for references to dial up adapters. If found, the
adapters'DNS servers are changed by altering the value
'NameServer' in the referenced key."
[]
"Computer Associates have seen the following DNS server
IPs used by these trojans in the wild: 69.50.166.94,
69.50.188.180, 69.31.80.244, 195.225.176.31"
[you can do the whois on all the dotted quads :-)]
73
Trojan.Flush.K (1/18/2007)
http://www.symantec.com/enterprise/security_response/
writeup.jsp?docid=2007-011811-1222-99&tabid=2 states:
'The Trojan then creates the following registry entries: []
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\Tcpip\Parameters\Interfaces\[RANDOM
CLSID]\"DhcpNameServer" = "85.255.115.21,85.255.112.91"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\Tcpip\Parameters\Interfaces\[RANDOM
CLSID]\"NameServer" = "85.255.115.21,85.255.112.91"'
76
DNSChanger.F (3/27/2007)
http://vil.mcafeesecurity.com/vil/content/v_141841.htm states that
"the main objective of this trojan is to change the default DNS
entries to its own [preferred] DNS server."
#HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\Tcpip\Parameters\NameServer: "85.255.115.46
85.255.112.154" (This is just an example and IP can vary)
#HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Services\Tcpip\Parameters\DhcpNameServer: "85.255.115.46
85.255.112.154" (This is just an example and IP can vary)
And there are many, many more The bad guys ARE attempting
to accomplish their goals via your users' reliance on DNS.
77
78
6. Hardening DNS
90
Example Output
92
93
95
OS Hardening
It does little good to run a secure version of the name server
software if the operating system that system is running is insecure.
Making sure that you're running current versions of OS software
and applications are part (but not all) of that picture.
OS hardening is generally beyond the scope of this tutorial,
however a few good starting points include:
-- Center for Internet Security Benchmarks (checklists), see
http://cisecurity.org/en-us/?route=downloads.benchmarks
(some sites tailor their own recommendations from that, e.g.,
see http://security.utexas.edu/admin/redhat-linux.html )
-- See als the National Security Agencys Operating System
Guides, http://www.nsa.gov/snac/
In addition to hardening your name server OS, you may also want
to consider running a tool (such as tripwire) which checksums
critical executables, related libraries, and key configuration files.
97
DNS Monitoring
You should graphically monitor DNS query traffic just as you
monitor things like transit bandwidth. A nice tool for this is DNS
Stats Collector (DSC), see
http://dns.measurement-factory.com/tools/dsc/ (sample below)
You can see samples of some other possible graphs at
http://dns.measurement-factory.com/tools/dsc/sample/index.html
100
101
ns.pknic.net.pk. ashar.pknic.net.pk.
ns.pknic.net.pk.
m-2.pknic.net.pk.
AUTH51.NS.UU.NET.
AUTH101.NS.UU.NET.
74.117.232.51
74.117.232.51
ns1.mailclub.fr.
ns2.mailclub.fr.
nm.thebighosting.com.
cobalt.thebighosting.com.
nm.thebighosting.com.
cobalt.thebighosting.com.
102
Security-As-Availability:
Avoid Single Points of Failure
A key step to hardening your DNS service is to look at your
architecture with an eye to any single points of failure:
-- Do you have multiple physical DNS servers, or just one?
-- Assuming you have multiple servers, are they on different
subnets?
-- Are at least some of your name servers at a different physical
location, preferably in a different part of the country?
-- If your site uses a border firewall, have you taken steps to make
sure all your name servers are not behind a single common
firewall?
-- Are all of your servers running the same operating system and
the same name server software?
-- Don't forget your DNS admin, either do you have at least two
people who can handle DNS responsibilities at your site? 104
AS112 Project
Speaking of dynamic updates, do you all know about the
AS112 Project, the "Nameservers at the end of the universe?"
As noted at public.as112.net:
"Because most answers generated by the Internet's root name
server system are negative, and many of those negative answers
are in response to PTR queries for RFC1918, dynamic DNS
updates and other ambiguous addresses, as follows:
-- 10.0.0.0/8
-- 172.16.0.0/12
-- 169.254.0.0/16
-- 192.168.0.0/16
There are now separate (non-root) servers for these queries"
Nice paper, "The Windows of Private DNS Updates," at
http://www.caida.org/publications/papers/2006/
private_dns_updates/private_dns_updates.pdf
109
DNSSEC in a Nutshell
DNSSEC uses public key asymmetric cryptography to guarantee
that if a DNS resource record (such as an A record, or an MX
record, or a PTR record) is received from a DNSSEC-signed zone,
and checks out as valid on a local DNSSEC-enabled recursive
name server, then we know:
-- it came from the authoritative source for that data
-- it has not been altered en route
-- if the server running the signed zone says that a particular host
does not exist, you can believe that assertion
But what about other things, like insuring that no one's sniffing
your DNS traffic, or making sure that DNS service is always
available?
112
115
119
www.medicare.gov on 4/10/2010
% dig www.medicare.gov @ns1.uoregon.edu [does DNSSEC]
[snip]
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 65323
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0,
ADDITIONAL: 0
[snip]
% dig www.medicare.gov @149.20.64.20
[same result as for ns1.uoregon.edu]
[does DNSSEC]
122
Islands Of Trust
Remember, DNSSEC was designed to work using a centralized,
top-down trust model. If the root isn't signed, or the TLD above
them isnt signed, all the stuff below that point must establish
alternative trust anchors. In some cases (such as .se), the trust
anchor may be the TLD, but in other cases, the trust anchor may be
2nd-level domain (such as nanog.org).
If there is no central trust anchor, unless you can come up with an
alternative way of establishing a chain of trust, you must obtain
trustworthy keys for each of those individual islands of trust.
(Key management is the 2nd thing, after trust models, to always
scrutinize when considering about a crypto effort!)
If each site that wants to do DNSSEC has to do a "scavenger hunt"
for each island of trust's DNSSEC keys, that's rather inconvenient
particularly if (1) trust islands periodically rekey, (2) there are
thousands of domains, and (3) given that if a site fails to keep each
126
trust island's keys current, then that zone will do a medicare.gov
DLV
To avoid these problems, ISC has proposed DLV (Domain
Lookaside Validation) as a temporary/transitional model.
In the DLV model, even if the root or a TLD isn't ready to support
DNSSEC and sign its zone, perhaps a trusted third party can
collect, authenticate and deliver the required keys. Someone
attempting to do DNSSEC then has only to configure the DLV
server or servers as an anchor of trust, thereafter automatically
trusting domains that are anchored/validated via the DLV.
DLV is described at http://www.isc.org/solutions/dlv
DLV is supported in current versions of BIND
DLV is the most popular approach to dealing with the problem of
maintaining trust anchors until the root and TLDs are signed.
If you dont want to rely on DLV, and youre willing to use ONLY
TLD-level trust anchors, you can also use the IANA interim trust
anchors ( https://itar.iana.org/anchors/anchors.mf )
127
129
173,590
11,583
69.23%
4.62% (73.85% total)
235,358
16,828
31.44%
2.26% (33.70% total)
130
134
EDNS0
You should know that name servers doing DNSSEC requires a
feature known as EDNS0, as defined in RFC2671, "Extension
Mechanisms for DNS (EDNS0)," August 1999.
Normally, DNS UDP responses are limited to just 512 bytes, a size
that's too small for the much larger DNSSEC records. To better
handle delivery of DNSSEC records, EDNS0 allows clients and
servers to negotiate the maximum size datagram which they can
handle, with the expectation that at least some hosts might
negotiate datagram sizes as high as 4KB. Name servers doing
DNSSEC must also do EDNS0.
Why's that a problem? Well some firewalls may be configured
to block UDP DNS traffic > 512 bytes. If you've got a firewall in
front of your DNS server, please test to see if youre broken:
https://www.dns-oarc.net/oarc/services/replysizetest
135
136
137
147
NCSU Routing
AS11442 (NCSU)
Upstream: AS81 (NCREN)
No whois.radb.net entry for 11442, but whois.radb.net has interesting entries for AS81:
[whois.radb.net]
aut-num:
AS81
<== this is really MCNC/NCREN.NET per ARIN
as-name:
RoadRunner
descr:
RR-RC-Rockingham County Schools-Greensboro
import:
from AS-ANY accept ANY
export:
to AS-ANY announce AS-ROADRUNNER
admin-c:
IPADDREG
tech-c:
IPADDREG
notify:
[email protected]
mnt-by:
MAINT-RR
changed:
[email protected] 20080805
source:
RADB
[RADB also has an entry for AS81 ASN-NCREN from SAVVIS ~1995]
149
150
151
NCSU Miscellaneous
152
154
155
156
158
128.228.0.0/16
134.74.0.0/16
146.95.0.0/16
146.96.0.0/16
146.111.0.0/16
146.245.0.0/16
148.84.0.0/16
149.4.0.0/16
150.210.0.0/16
163.238.0.0/16
198.61.16.0/20
198.83.28.0/22
198.83.112.0/20
198.180.141.0/24
199.219.128.0/18
199.219.192.0/20
199.219.208.0/21
199.219.216.0/24
207.159.192.0/18
209.2.54.0/23
159
160
161
162
MSM Nameservers
Name server issues/notes:
-- saturn.msm.edu has old version of BIND
(8.4.7-REL-NOESW)
-- saturn.msm.edu open for zone transfers of msm.edu
-- name servers appear to be on consecutive Ips
(192.83.232.40, 192.83.232.41)
-- No offsite name server (for survivability)
-- No IPV6 name servers
-- No DNSSEC
-- superfluous name server listed at parent: ns2.twtelecom.net
165
MSM Miscellaneous
abuse.net has no entry for msm.edu (except the default of
[email protected])
Msm.edu has an SPF record
Msm.edus MXs route via Postini, except for
InFilter2.msm.edu (test anti-spam product?)
wpad.msm.edu doesn't exist
isatap.msn.edu doesnt exist
Msm.edu does NOT appear to have any entries touting cheap
phentermine web pages, good job keeping the blog/guestbook/wiki
spammers at bay!
166
168
169
RIT Miscellaneous
Abuse.net knows about
[email protected]
No SPF record for rit.edu
MX records appear to be on successive dotted quads:
mxgate02.rit.edu.
590 IN A
129.21.3.39
mxgate03.rit.edu.
593 IN A
129.21.3.40
mxgate01.rit.edu.
586 IN A
129.21.3.38
wpad.rit.edu is NOT defined
isatap.rit.edu is NOT defined
Some guestbooks/blogs/wikis appear to be getting abused;
google for cheap phentermine site:rit.edu to see examples
170
172
174
USFCA Routing
176
177
USFCA Miscellaneous
178
180
181
182
7.10 McGill
185
McGill Miscellaneous
Abuse.net knows about [email protected] for
mcgill.edu, but [email protected] and [email protected]
for mcgill.ca
No SPF record for mcgill.edu or mcgill.ca
no mx for mcgill.edu, one mx for mcgill.ca
wpad.mcgill.edu, wpad.mcgill.ca are NOT defined
isatap.mcgill.edu, isatap.mcgill.ca are NOT defined
Mcgill.ca has pages that are being hit by blog/guestbook/wiki spam
(google for cheap phentermine site:mcgill.ca)
186
188
189
190
192
193
194