SlideShare a Scribd company logo
DNS Security
Ch 2: DNS Overview: Protocol,
Architecture, and Applications
Updated 9-13-16
History
• On ARPANet, host names were mapped to
IP addresses in a hosts.txt file stored on a
single master server
• Other machines downloaded copies of
hosts.txt periodically
• Unix stored this information in /etc/hosts
• This technique didn't scale well. DNS
started in 1983.
Design Principles
• Distributed storage
– DNS data split across many servers
– Smaller storage requirements for each server
– Faster transfer of information
– No single point of failure
• Hierarchical organization of data
– Allows local control of names and avoids
name conflicts
DNS Name Structure
• Up to four labels separated by dots form a
Fully Qualified Domain Name (FQDN)
hills.ccsf.edu
Top Level
Domain
(TLD)
Second Level
Domain (SLD)
{{
Host
name
{
Hierarchical DNS Namespace
DNS Zones
• Data for a domain and all
or some of its subdomains
is called a zone
• All of CCSF could be one
zone, containing
– ns.ccsf.edu
– www.ccsf.edu
– mail.ccsf.edu
edu
.
www mailns
ccsf
Domain Delegation
• CCSF could have
separate
nameservers on each
campus, each
responsible for their
own subdomain
• The ccsf.edu parent
domain would
delegate
responsibility for a
subdomain to each
campus, making
many zones
• URLs would be longer
– www.ocean.ccsf.edu
edu
.
mission evansocean
ccsf
ns www ns www
ns www
DNS Clients, Servers, and Resolvers
• DNS Client
– A program like a Web browser using a domain
name like www.ccsf.edu
• DNS Server
– Stores and serves DNS data
• DNS Resolver
– Software that accepts a query from a client,
queries one or more DNS servers, and replies
to the client
DNS Servers
• Authoritative servers
manage information about a
domain
– SOA (Start Of Authority)
• Caching servers store data
they copied from other
servers
– Not authoritative for any
domain
– Cache records have a Time To
Live (TTL)
– Specified by SOA for each
record
DNS Queries
• Recursive query
– Server will find the answer, even if it has to
query other servers to get it
– Server will not respond with a referral to
another server
• Iterative query
– If server does not have the answer, it will
send a referral to another DNS server
– Requester has to send another query to hunt
for the answer
DNS Forwarder
• Only external queries
are sent to the
forwarder in this
example
• Can reduce traffic
through slow or
expensive links
• Because it can cache
more records
DNS Resolvers
• Receive requests from client applications
• Query DNS servers
• Can cache data
• Stub resolver
– Resolver connected to only one recursive server
– Cannot follow referrals
– Part of the operating system on the end device
– Windows stub resolver caches
– Linux stub resolver does not cache
Local DNS Server
• Provided by Internet Service Provider (ISP)
• Configured at the client manually or by
DHCP
Typical Name Resolution Scenario
ns
ccsf
Stub
resolver
in OS
Local
DNS
Server
Query: Where is
www.ccsf.edu?
Query: Where is
the SOA for
edu?
Query: Where is the
SOA for ccsf.edu?
edu
.
Query: Where is
www.ccsf.edu?
DNS Replication
• Master server contains primary zone files
• Slave servers have copies of the zone
files
• Zone transfer
– The process of copying the files
Root Servers
• Named .
– "dot"
• Has pointers to the top-level domains
– com, biz, mil, net, and so on
• If a DNS server has no data in the cache,
e. g. after a reboot
– Receives a recursive query
– Is not the SOA for that domain
– Must query root to find the TLD servers
Root Servers
• Hundreds of servers
• Dispersed around the world
• 13 domain names
– a.root-servers.net
– b.root-servers.net
– ...
– m.root-servers.net
DNS Resource Record Types
and Classes
Each data element in DNS is
called a Resource Record (RR)
Common RR Types
A IPv4 address of host
AAAA IPv6 address of host
MX Mail exchange
PTR Host name corresponding to IP
address
NS Host name of SOA name server
CNAME Canonical Name: alias
SOA Attributes of zone
TXT General information
Common RR Types
NAPTR Naming Authority Pointer
SRV Service (for specific applications)
SPF Sender Policy Framework
(used to control spam)
Also included in TXT records as a
transitional mechanism
DNSKEY, DS, RRSIG, NSEC for DNSSEC
dig any ccsf.edu
dig any ietf.org
DNS Looking Glass
Reverse DNS Resolutions
• Start with IP address and query to find the
domain name
• Used to block spam email
– If IP address of server doesn't have a valid
domain name, or the domain name is
blacklisted, the email is rejected
PTR Records for RDNS
• Reverse the order of the IP address
• Add "in-addr.arpa"
• For example, 147.144.1.212 becomes
• 212.1.144.147.in-addr.arpa.
Reverse DNS Lookup
Forward Lookup for Google
Reverse Lookup for Google
CNIT 40: 2: DNS Protocol and Architecture
CNIT 40: 2: DNS Protocol and Architecture
CNIT 40: 2: DNS Protocol and Architecture
• Flags specify:
– Query or Response
– Forward or Reverse
– Recursive or Iterative
Glue Records
• If the SOA for ccsf.edu is ns3.ccsf.edu
the system fails
– Q: Where is www.ccsf.edu?
– A: Ask ns3.ccsf.edu
– Q: Where is ns3.ccsf.edu?
– A: Ask ns3.ccsf.edu
• To prevent this, each domain has a glue
record in their top-level domain zone
specifying the IP address of the SOA
Viewing Glue Records with dig
1. Find a .edu root NS server
2. dig NS domain @root
IPv4 Glue for Google
• 1. NS servers for .com
IPv4 Glue Records for Google
Bind Version Query
• From c. 2015
Bind Version Query 9-13-16
ISC.ORG (Authors of Bind)
Common Server Architectures
Small Company: Outsource DNS
Medium 

Company
• Internal and
external DNS
servers
• Only public
servers like
www and mx
on external
DNS servers
Large Company
Hierarchical

Caching

Architecture
Anycast

More Related Content

PDF
CNIT 40: 1: The Importance of DNS Security
PPT
Domain name server
PDF
Dns security
PDF
DNS - Domain Name System
PDF
Presentation on Domain Name System
PDF
Intro to DNS
PPTX
Dns presentation
PDF
DNS Security
CNIT 40: 1: The Importance of DNS Security
Domain name server
Dns security
DNS - Domain Name System
Presentation on Domain Name System
Intro to DNS
Dns presentation
DNS Security

What's hot (20)

PDF
DNS (Domain Name System)
PPTX
Domain name system
PPT
Chapter 29 Domain Name System.ppt
PPT
Domain Name System
PPT
PDF
Linux File System
PPTX
Domain Name System DNS
PPT
Introduction to SSH
PDF
CS9222 ADVANCED OPERATING SYSTEMS
PPT
Secure shell ppt
PPT
Domain Name Service
PPTX
Reverse proxy & web cache with NGINX, HAProxy and Varnish
PPT
Dns protocol design attacks and security
PPTX
Presentation on dns
PPT
Active Directory
PDF
AAA & RADIUS Protocols
PDF
Directory services
PPTX
DNS Presentation
PPTX
Windows 10 Forensics: OS Evidentiary Artefacts
PPT
Domain name system
DNS (Domain Name System)
Domain name system
Chapter 29 Domain Name System.ppt
Domain Name System
Linux File System
Domain Name System DNS
Introduction to SSH
CS9222 ADVANCED OPERATING SYSTEMS
Secure shell ppt
Domain Name Service
Reverse proxy & web cache with NGINX, HAProxy and Varnish
Dns protocol design attacks and security
Presentation on dns
Active Directory
AAA & RADIUS Protocols
Directory services
DNS Presentation
Windows 10 Forensics: OS Evidentiary Artefacts
Domain name system
Ad

Viewers also liked (20)

PDF
CNIT 129S: Ch 4: Mapping the Application
PDF
CNIT 121: 11 Analysis Methodology
PDF
CNIT 129S: Ch 3: Web Application Technologies
PDF
CNIT 121: 4 Getting the Investigation Started on the Right Foot & 5 Initial D...
PDF
CNIT 121: 12 Investigating Windows Systems (Part 2 of 3)
PDF
CNIT 129S: 8: Attacking Access Controls
PDF
CNIT 121: 12 Investigating Windows Systems (Part 3)
PDF
CNIT 40: 6: DNSSEC and beyond
PDF
CNIT 129S: Securing Web Applications Ch 1-2
PDF
CNIT 121: 2 IR Management Handbook
PDF
CNIT 129S: Ch 6: Attacking Authentication
PDF
CNIT 129S: 9: Attacking Data Stores (Part 1 of 2)
PDF
CNIT 129S: Ch 5: Bypassing Client-Side Controls
PDF
CNIT 121: Computer Forensics Ch 1
PDF
CNIT 129S: 13: Attacking Users: Other Techniques (Part 1 of 2)
PDF
CNIT 121: 3 Pre-Incident Preparation
PDF
CNIT 121: 6 Discovering the Scope of the Incident & 7 Live Data Collection
PDF
CNIT 40: 3: DNS vulnerabilities
PDF
CNIT 128 Ch 4: Android
PDF
CNIT 129S: 11: Attacking Application Logic
CNIT 129S: Ch 4: Mapping the Application
CNIT 121: 11 Analysis Methodology
CNIT 129S: Ch 3: Web Application Technologies
CNIT 121: 4 Getting the Investigation Started on the Right Foot & 5 Initial D...
CNIT 121: 12 Investigating Windows Systems (Part 2 of 3)
CNIT 129S: 8: Attacking Access Controls
CNIT 121: 12 Investigating Windows Systems (Part 3)
CNIT 40: 6: DNSSEC and beyond
CNIT 129S: Securing Web Applications Ch 1-2
CNIT 121: 2 IR Management Handbook
CNIT 129S: Ch 6: Attacking Authentication
CNIT 129S: 9: Attacking Data Stores (Part 1 of 2)
CNIT 129S: Ch 5: Bypassing Client-Side Controls
CNIT 121: Computer Forensics Ch 1
CNIT 129S: 13: Attacking Users: Other Techniques (Part 1 of 2)
CNIT 121: 3 Pre-Incident Preparation
CNIT 121: 6 Discovering the Scope of the Incident & 7 Live Data Collection
CNIT 40: 3: DNS vulnerabilities
CNIT 128 Ch 4: Android
CNIT 129S: 11: Attacking Application Logic
Ad

Similar to CNIT 40: 2: DNS Protocol and Architecture (20)

PDF
Domain Name System (DNS) Fundamentals
PPT
08Mapping.ppt
PDF
Chapter4 configuringandmanagingthednsserverrole-140520003253-phpapp01
PPT
Chapter 4 configuring and managing the dns server role
PPTX
2_Chapter 2_DNS.pptx
PPTX
Introduction to DNS
PPTX
Deploying and configuring dns service
PPTX
Cse -306
PPT
Dns1111111111
PDF
DNS/DNSSEC by Nurul Islam
PPTX
Domain name system
PPT
PPTX
Computer Networks & internet protocols.pptx
PDF
Computer Networks Module 1 - part 2.pdf
PPT
DHCP
PPT
PPT
PPT
Session_2.ppt
PPT
13 dns
PDF
Lets talk dns
Domain Name System (DNS) Fundamentals
08Mapping.ppt
Chapter4 configuringandmanagingthednsserverrole-140520003253-phpapp01
Chapter 4 configuring and managing the dns server role
2_Chapter 2_DNS.pptx
Introduction to DNS
Deploying and configuring dns service
Cse -306
Dns1111111111
DNS/DNSSEC by Nurul Islam
Domain name system
Computer Networks & internet protocols.pptx
Computer Networks Module 1 - part 2.pdf
DHCP
Session_2.ppt
13 dns
Lets talk dns

More from Sam Bowne (20)

PDF
Introduction to the Class & CISSP Certification
PDF
Cyberwar
PDF
3: DNS vulnerabilities
PDF
8. Software Development Security
PDF
4 Mapping the Application
PDF
3. Attacking iOS Applications (Part 2)
PDF
12 Elliptic Curves
PDF
11. Diffie-Hellman
PDF
2a Analyzing iOS Apps Part 1
PDF
9 Writing Secure Android Applications
PDF
12 Investigating Windows Systems (Part 2 of 3)
PDF
10 RSA
PDF
12 Investigating Windows Systems (Part 1 of 3
PDF
9. Hard Problems
PDF
8 Android Implementation Issues (Part 1)
PDF
11 Analysis Methodology
PDF
8. Authenticated Encryption
PDF
7. Attacking Android Applications (Part 2)
PDF
7. Attacking Android Applications (Part 1)
PDF
5. Stream Ciphers
Introduction to the Class & CISSP Certification
Cyberwar
3: DNS vulnerabilities
8. Software Development Security
4 Mapping the Application
3. Attacking iOS Applications (Part 2)
12 Elliptic Curves
11. Diffie-Hellman
2a Analyzing iOS Apps Part 1
9 Writing Secure Android Applications
12 Investigating Windows Systems (Part 2 of 3)
10 RSA
12 Investigating Windows Systems (Part 1 of 3
9. Hard Problems
8 Android Implementation Issues (Part 1)
11 Analysis Methodology
8. Authenticated Encryption
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 1)
5. Stream Ciphers

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Institutional Correction lecture only . . .
PDF
RMMM.pdf make it easy to upload and study
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
master seminar digital applications in india
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
GDM (1) (1).pptx small presentation for students
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Classroom Observation Tools for Teachers
PDF
Computing-Curriculum for Schools in Ghana
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
Complications of Minimal Access Surgery at WLH
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Anesthesia in Laparoscopic Surgery in India
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Institutional Correction lecture only . . .
RMMM.pdf make it easy to upload and study
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
master seminar digital applications in india
102 student loan defaulters named and shamed – Is someone you know on the list?
GDM (1) (1).pptx small presentation for students
VCE English Exam - Section C Student Revision Booklet
O7-L3 Supply Chain Operations - ICLT Program
Classroom Observation Tools for Teachers
Computing-Curriculum for Schools in Ghana
TR - Agricultural Crops Production NC III.pdf
Microbial disease of the cardiovascular and lymphatic systems
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
human mycosis Human fungal infections are called human mycosis..pptx

CNIT 40: 2: DNS Protocol and Architecture

  • 1. DNS Security Ch 2: DNS Overview: Protocol, Architecture, and Applications Updated 9-13-16
  • 2. History • On ARPANet, host names were mapped to IP addresses in a hosts.txt file stored on a single master server • Other machines downloaded copies of hosts.txt periodically • Unix stored this information in /etc/hosts • This technique didn't scale well. DNS started in 1983.
  • 3. Design Principles • Distributed storage – DNS data split across many servers – Smaller storage requirements for each server – Faster transfer of information – No single point of failure • Hierarchical organization of data – Allows local control of names and avoids name conflicts
  • 4. DNS Name Structure • Up to four labels separated by dots form a Fully Qualified Domain Name (FQDN) hills.ccsf.edu Top Level Domain (TLD) Second Level Domain (SLD) {{ Host name {
  • 6. DNS Zones • Data for a domain and all or some of its subdomains is called a zone • All of CCSF could be one zone, containing – ns.ccsf.edu – www.ccsf.edu – mail.ccsf.edu edu . www mailns ccsf
  • 7. Domain Delegation • CCSF could have separate nameservers on each campus, each responsible for their own subdomain • The ccsf.edu parent domain would delegate responsibility for a subdomain to each campus, making many zones • URLs would be longer – www.ocean.ccsf.edu edu . mission evansocean ccsf ns www ns www ns www
  • 8. DNS Clients, Servers, and Resolvers • DNS Client – A program like a Web browser using a domain name like www.ccsf.edu • DNS Server – Stores and serves DNS data • DNS Resolver – Software that accepts a query from a client, queries one or more DNS servers, and replies to the client
  • 9. DNS Servers • Authoritative servers manage information about a domain – SOA (Start Of Authority) • Caching servers store data they copied from other servers – Not authoritative for any domain – Cache records have a Time To Live (TTL) – Specified by SOA for each record
  • 10. DNS Queries • Recursive query – Server will find the answer, even if it has to query other servers to get it – Server will not respond with a referral to another server • Iterative query – If server does not have the answer, it will send a referral to another DNS server – Requester has to send another query to hunt for the answer
  • 11. DNS Forwarder • Only external queries are sent to the forwarder in this example • Can reduce traffic through slow or expensive links • Because it can cache more records
  • 12. DNS Resolvers • Receive requests from client applications • Query DNS servers • Can cache data • Stub resolver – Resolver connected to only one recursive server – Cannot follow referrals – Part of the operating system on the end device – Windows stub resolver caches – Linux stub resolver does not cache
  • 13. Local DNS Server • Provided by Internet Service Provider (ISP) • Configured at the client manually or by DHCP
  • 14. Typical Name Resolution Scenario ns ccsf Stub resolver in OS Local DNS Server Query: Where is www.ccsf.edu? Query: Where is the SOA for edu? Query: Where is the SOA for ccsf.edu? edu . Query: Where is www.ccsf.edu?
  • 15. DNS Replication • Master server contains primary zone files • Slave servers have copies of the zone files • Zone transfer – The process of copying the files
  • 16. Root Servers • Named . – "dot" • Has pointers to the top-level domains – com, biz, mil, net, and so on • If a DNS server has no data in the cache, e. g. after a reboot – Receives a recursive query – Is not the SOA for that domain – Must query root to find the TLD servers
  • 17. Root Servers • Hundreds of servers • Dispersed around the world • 13 domain names – a.root-servers.net – b.root-servers.net – ... – m.root-servers.net
  • 18. DNS Resource Record Types and Classes Each data element in DNS is called a Resource Record (RR)
  • 19. Common RR Types A IPv4 address of host AAAA IPv6 address of host MX Mail exchange PTR Host name corresponding to IP address NS Host name of SOA name server CNAME Canonical Name: alias SOA Attributes of zone TXT General information
  • 20. Common RR Types NAPTR Naming Authority Pointer SRV Service (for specific applications) SPF Sender Policy Framework (used to control spam) Also included in TXT records as a transitional mechanism DNSKEY, DS, RRSIG, NSEC for DNSSEC
  • 24. Reverse DNS Resolutions • Start with IP address and query to find the domain name • Used to block spam email – If IP address of server doesn't have a valid domain name, or the domain name is blacklisted, the email is rejected
  • 25. PTR Records for RDNS • Reverse the order of the IP address • Add "in-addr.arpa" • For example, 147.144.1.212 becomes • 212.1.144.147.in-addr.arpa.
  • 32. • Flags specify: – Query or Response – Forward or Reverse – Recursive or Iterative
  • 33. Glue Records • If the SOA for ccsf.edu is ns3.ccsf.edu the system fails – Q: Where is www.ccsf.edu? – A: Ask ns3.ccsf.edu – Q: Where is ns3.ccsf.edu? – A: Ask ns3.ccsf.edu • To prevent this, each domain has a glue record in their top-level domain zone specifying the IP address of the SOA
  • 34. Viewing Glue Records with dig 1. Find a .edu root NS server
  • 35. 2. dig NS domain @root
  • 36. IPv4 Glue for Google • 1. NS servers for .com
  • 37. IPv4 Glue Records for Google
  • 38. Bind Version Query • From c. 2015
  • 43. Medium 
 Company • Internal and external DNS servers • Only public servers like www and mx on external DNS servers