Dns Security
Dns Security
Dns Security
OUTLINE
• Terminology
• Following a simple DNS query
• What's in a DNS packet?
• Resource Record Types
• Drilling down to a real query
• What's in the cache?
• Poisoning the cache
• Solution
• References 2
TERMINOLOGY
Zone
a "domain": a collection of hostnames/IP pairs all managed together.
(unixwiz.net, google.com)
Nameserver
the server software that answers DNS questions, such as "What is the
IP address for www.unixwiz.net?". (authoritative or recursive
nameserver).
Authoritative Nameserver
For every zone, the NS that maintain a file of the hostnames and IP
address associations
3
TERMINOLOGY …
Recursive Nameserver
the nameserver that's willing to go out on the internet and find the
results for zones it's not authoritative for
Resolver
the client part of the DNS client/server system: it asks the
questions about hostnames
Resource Record
DNS is really a database of "resource records". The most common
type is an IP Address (an "A" record), but other records exist too:
NS (nameserver), MX (mail exchanger) and so on.
4
FOLLOWING A DNS QUERY
Ping www.unixwiz.com
1. The client (noted as "User's PC") makes a request
for www.unixwiz.net, and it's routed to the
nameserver provided by the user's ISP. It requests
the A record, which represents an IP address.
The ISP's nameserver knows that it's not
authoritative for unixwiz.net, so it can't look it
up in its local zone database. It also doesn't find
the name in its cache of recently-seen data, so it
knows it has to go out to the internet to find it for
us.
5
FOLLOWING A DNS QUERY …
2. All recursive nameservers are
preconfigured with a list of 13 root
servers, a selection of which looks
like:
7
FOLLOWING A DNS QUERY …
8
FOLLOWING A DNS QUERY …
9
FOLLOWING A DNS QUERY …
10
FOLLOWING A DNS QUERY …
11
FOLLOWING A DNS QUERY …
15
DRILLING DOWN TO A REAL QUERY
16
DRILLING DOWN TO A REAL QUERY …
17
DRILLING DOWN TO A REAL QUERY …
18
DRILLING DOWN TO A REAL QUERY …
19
WHAT'S IN THE CACHE?
The Time-To-Live
When a DNS answer is stored in the
local cache, it can't keep it forever.
Administrator of the zone specifies
this information for every resource
record (known as a Time To Live (TTL)).
20
POISONING THE CACHE
21
POISONING THE CACHE …
23
POISONING THE CACHE …
25
MITIGATIONS
27