SlideShare a Scribd company logo
Ch 3: DNS Vulnerabilities
Updated 9-27-16
Causes of Vulnerabilities
• Configuration errors
• Architecture mistakes
• Vulnerable software implementations
• Protocol weaknesses
• Failure to use the security extensions in
the protocol
DNS Architecture Mistakes
Single Point of Failure
• The SOA could be a single server at a
single site
– If the server crashes, clients would be unable
to resolve any of the domains in the zone
– Also Internet connection outage, power
failure, fire, storm, etc.
• If a single server is the recursive resolver
for clients in an intranet
– They'll all lose DNS service if it goes gown
Two Servers
• Many hosting
providers do not
allow delegation
of DNS service to
a single DNS
server name
• End devices are
typically
provisioned with
two DNS server
addresses
Router or Link
Data Center or Single Site
• If all DNS servers are at a single site or
data center, a regional event could take
them all down
– Earthquake
– Power failure
• The more critical the DNS service is, the
more distributed servers should be
– Geographically and topologically
– Like the 13 root servers
Common Configuration Errors
Exposure of Internal Information
• Only public Web-facing servers should be
in the external DNS zone files
• Your DNS server is a target of attack and
may be compromised
CNIT 40: 3: DNS vulnerabilities
Leakage of Internal Queries

to the Internet
• Some Windows DHCP clients leak dynamic
DNS updates to the Internet
– Link Ch 3a
Windows Versions
• These packets were sent from Windows
2000, Windows XP, and Server 2003
– When tested in 2006
• To prevent this, configure local DNS
servers not to refer internal machines to
external name servers
– And block DNS requests directly to the
Internet
Unnecessary Recursiveness
• Not all name servers need to be recursive
– Authoritative servers don't need to
– Recursion is complex and burdens servers
– Added function means more potential
vulnerabilities
• Recursion may be on by default
– Thousands of open recursive resolvers on the
Internet
Failure to Restrict Access
• Recursive DNS servers should only accept
queries from your own clients
– Block outside addresses with access control
lists
Open Resolver Project
• Link Ch 3b
Testing CCSF's DNS Servers in 2016
Testing CCSF's DNS Servers
• All are closed as of 9-27-16
Unprotected Zone Transfers
• Data transfers from a master to a slave
authoritative server
– Update the zone files on the slave
• Can be requested by any other host
• Reveals information about all hosts in the
zone
– Information disclosure vulnerability
North
Korea
• Link Ch 3i
Running Server in Privileged Mode
• root on Unix/Linux
• Administrator on Windows
– Makes any security flaws more dangerous
– Attacker who owns DNS then owns the server
Weakness in Software Implementations
• DNS servers have bugs and vulnerabilities
– Buffer overflows
– Other errors
• Search CVE List for "ISC Bind"
CNIT 40: 3: DNS vulnerabilities
Severe 2008 Bind Vulnerability
• Attack used an IP address like
– 1.2.3.4.xxxxxxxx-exploit-code-here-xxxx
• Another list of DNS vulns at link Ch 3d
Source Port Randomization
• Good video
• Link Ch 3e
Randomness of Transaction ID
• Each DNS query and response has a TXID
field
– 16 bits long (65,536 possible values)
– Should be random
• Bind 8 & 9 used predictable transaction
IDs
– So only ten guesses were needed to spoof the
reply
Randomness of Transaction ID
Tricking a Target into Using Your DNS
Server
• Run a domain evil.com with a SOA you
control ns1.evil.com
– Send the target an email with a link to
server.evil.com and hope someone clicks it
– Send email from joe@evil.com to target email
address
• The server will automatically perform a reverse
lookup to detect spam
Tricking a Target into Making Multiple
DNS Queries
• CNAME Chaining
– www.evil.com is a CNAME for www1.evil.com
– www1.evil.com is a CNAME for
www2.evil.com
– www2.evil.com is a CNAME for
www3.evil.com
– etc.
Tricking a Target into Making Multiple
DNS Queries
• NS Referral Chaining and NS Chains
– a.a.a.a.evil.com has SOA ns.evil.com
– ns.evil.com delegates to ns.a.evil.com
– ns.a.evil.com delegates to ns.a.a.evil.com
– etc.
Protocol Design Weaknesses
Weak Authentication
• DNS uses these elements to match a
request and a response
– Transaction ID (16 bits)
– Question
– Source and destination IP
– Source and destination ports
• But request destination port is known (53)
• Client accepts the first response that
meets these criteria, and caches the result
DNS Cache Poisoning
• A false response that tricks the client puts
a false entry into its cache
DNS Cache Poisoning
Attacker
1.2.3.4
DNS
Resolver
Target
Where is www.yahoo.com?www.yahoo.com is at 1.2.3.4
Where is www.yahoo.com?
www.yahoo.com is at 1.2.3.4
• Link Ch 3f
• Link Ch 3g
Consequences of the Kaminsky Attack
• Attack can be placed in a Web page
– Many img tags
– <img src=aaaa.paypal.com>
– <img src=aaab.paypal.com>
– <img src=aaac.paypal.com>
– <img src=aaad.paypal.com>
– etc.
• If one Comcast customer views that page, all
other Comcast customers will be sent to the
fake paypal.com
• Poisoning can take as few as 10 seconds
Man-in-the-Middle Attacks
• Attacker in the middle has enough info to
perfectly forge responses
– Unless DNSSEC is used
Attacker DNS ResolverTarget
DNS as a DoS Amplifier
• Small requests lead to large responses
• UDP allows spoofing the source IP address
AttackerOpen DNS ResolverTarget

More Related Content

PDF
CNIT 40: 5: Prevention, protection, and mitigation of DNS service disruption
PDF
CNIT 40: 5: Prevention, protection, and mitigation of DNS service disruption
PDF
CNIT 40: 4: Monitoring and detecting security breaches
PDF
CNIT 40: 1: The Importance of DNS Security
PDF
CNIT 40: 4: Monitoring and detecting security breaches
PDF
CNIT 40: 2: DNS Protocol and Architecture
PDF
CNIT 40: 6: DNSSEC and beyond
PPTX
DNS Vulnerabilities
CNIT 40: 5: Prevention, protection, and mitigation of DNS service disruption
CNIT 40: 5: Prevention, protection, and mitigation of DNS service disruption
CNIT 40: 4: Monitoring and detecting security breaches
CNIT 40: 1: The Importance of DNS Security
CNIT 40: 4: Monitoring and detecting security breaches
CNIT 40: 2: DNS Protocol and Architecture
CNIT 40: 6: DNSSEC and beyond
DNS Vulnerabilities

What's hot (20)

PDF
8 technical-dns-workshop-day4
PDF
DNS Attacks
PDF
7 technical-dns-workshop-day3
PDF
Domain Name System (DNS)
PPTX
Understanding DNS Security
PDF
2 technical-dns-workshop-day1
PDF
1 technical-dns-workshop-day1
PDF
4 technical-dns-workshop-day2
PDF
23rd PITA AGM and Conference: DNS Security - A holistic view
PDF
Lets talk dns
PDF
Hands-on DNSSEC Deployment
PPTX
Water Torture: A Slow Drip DNS DDoS Attack on QTNet by Kei Nishida [APRICOT 2...
PDF
Drilling Down Into DNS DDoS
PDF
Pseudo Random DNS Query Attacks and Resolver Mitigation Approaches
PDF
PDF
Securing dns records from subdomain takeover
PDF
OARC 31: NSEC Caching Revisited
PDF
Passive DNS Collection -- the 'dnstap' approach, by Paul Vixie [APNIC 38 / AP...
PPTX
The History of DNS
8 technical-dns-workshop-day4
DNS Attacks
7 technical-dns-workshop-day3
Domain Name System (DNS)
Understanding DNS Security
2 technical-dns-workshop-day1
1 technical-dns-workshop-day1
4 technical-dns-workshop-day2
23rd PITA AGM and Conference: DNS Security - A holistic view
Lets talk dns
Hands-on DNSSEC Deployment
Water Torture: A Slow Drip DNS DDoS Attack on QTNet by Kei Nishida [APRICOT 2...
Drilling Down Into DNS DDoS
Pseudo Random DNS Query Attacks and Resolver Mitigation Approaches
Securing dns records from subdomain takeover
OARC 31: NSEC Caching Revisited
Passive DNS Collection -- the 'dnstap' approach, by Paul Vixie [APNIC 38 / AP...
The History of DNS
Ad

Viewers also liked (20)

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

Similar to CNIT 40: 3: DNS vulnerabilities (20)

PDF
3: DNS vulnerabilities
PPTX
Computer Networks & internet protocols.pptx
PPT
08Mapping.ppt
PDF
DNS & DNSSEC operational best practices - Sleep better at night with KINDNS i...
PDF
DNS & DNSSEC operational best practices - Sleep better at night with KINDNS i...
PPTX
DNS Security Issues NES 554 for DNS Security
PDF
Dns security
PPTX
How DNS works and How to secure it: An Introduction
PDF
DNS/DNSSEC by Nurul Islam
PPTX
Grey H@t - DNS Cache Poisoning
PPT
PPT
Domain name system advanced power point presentation
PPTX
2_Chapter 2_DNS.pptx
PPT
PPT
PPTX
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
PPTX
lecture5.pptx
PDF
Computer Networks Module 1 - part 2.pdf
3: DNS vulnerabilities
Computer Networks & internet protocols.pptx
08Mapping.ppt
DNS & DNSSEC operational best practices - Sleep better at night with KINDNS i...
DNS & DNSSEC operational best practices - Sleep better at night with KINDNS i...
DNS Security Issues NES 554 for DNS Security
Dns security
How DNS works and How to secure it: An Introduction
DNS/DNSSEC by Nurul Islam
Grey H@t - DNS Cache Poisoning
Domain name system advanced power point presentation
2_Chapter 2_DNS.pptx
lecture5.pptxJHKGJFHDGTFGYIUOIUIPIOIPUOHIYGUYFGIH
lecture5.pptx
Computer Networks Module 1 - part 2.pdf

More from Sam Bowne (20)

PDF
Introduction to the Class & CISSP Certification
PDF
Cyberwar
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
PDF
6 Scope & 7 Live Data Collection
Introduction to the Class & CISSP Certification
Cyberwar
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
6 Scope & 7 Live Data Collection

Recently uploaded (20)

PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Insiders guide to clinical Medicine.pdf
PPTX
master seminar digital applications in india
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Pharma ospi slides which help in ospi learning
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Lesson notes of climatology university.
PDF
01-Introduction-to-Information-Management.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPH.pptx obstetrics and gynecology in nursing
Insiders guide to clinical Medicine.pdf
master seminar digital applications in india
STATICS OF THE RIGID BODIES Hibbelers.pdf
Final Presentation General Medicine 03-08-2024.pptx
human mycosis Human fungal infections are called human mycosis..pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
O5-L3 Freight Transport Ops (International) V1.pdf
Complications of Minimal Access Surgery at WLH
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
VCE English Exam - Section C Student Revision Booklet
Pharma ospi slides which help in ospi learning
Anesthesia in Laparoscopic Surgery in India
Lesson notes of climatology university.
01-Introduction-to-Information-Management.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Renaissance Architecture: A Journey from Faith to Humanism
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student

CNIT 40: 3: DNS vulnerabilities

  • 1. Ch 3: DNS Vulnerabilities Updated 9-27-16
  • 2. Causes of Vulnerabilities • Configuration errors • Architecture mistakes • Vulnerable software implementations • Protocol weaknesses • Failure to use the security extensions in the protocol
  • 4. Single Point of Failure • The SOA could be a single server at a single site – If the server crashes, clients would be unable to resolve any of the domains in the zone – Also Internet connection outage, power failure, fire, storm, etc. • If a single server is the recursive resolver for clients in an intranet – They'll all lose DNS service if it goes gown
  • 5. Two Servers • Many hosting providers do not allow delegation of DNS service to a single DNS server name • End devices are typically provisioned with two DNS server addresses
  • 7. Data Center or Single Site • If all DNS servers are at a single site or data center, a regional event could take them all down – Earthquake – Power failure • The more critical the DNS service is, the more distributed servers should be – Geographically and topologically – Like the 13 root servers
  • 9. Exposure of Internal Information • Only public Web-facing servers should be in the external DNS zone files • Your DNS server is a target of attack and may be compromised
  • 11. Leakage of Internal Queries
 to the Internet • Some Windows DHCP clients leak dynamic DNS updates to the Internet – Link Ch 3a
  • 12. Windows Versions • These packets were sent from Windows 2000, Windows XP, and Server 2003 – When tested in 2006 • To prevent this, configure local DNS servers not to refer internal machines to external name servers – And block DNS requests directly to the Internet
  • 13. Unnecessary Recursiveness • Not all name servers need to be recursive – Authoritative servers don't need to – Recursion is complex and burdens servers – Added function means more potential vulnerabilities • Recursion may be on by default – Thousands of open recursive resolvers on the Internet
  • 14. Failure to Restrict Access • Recursive DNS servers should only accept queries from your own clients – Block outside addresses with access control lists
  • 16. Testing CCSF's DNS Servers in 2016
  • 17. Testing CCSF's DNS Servers • All are closed as of 9-27-16
  • 18. Unprotected Zone Transfers • Data transfers from a master to a slave authoritative server – Update the zone files on the slave • Can be requested by any other host • Reveals information about all hosts in the zone – Information disclosure vulnerability
  • 20. Running Server in Privileged Mode • root on Unix/Linux • Administrator on Windows – Makes any security flaws more dangerous – Attacker who owns DNS then owns the server
  • 21. Weakness in Software Implementations • DNS servers have bugs and vulnerabilities – Buffer overflows – Other errors • Search CVE List for "ISC Bind"
  • 23. Severe 2008 Bind Vulnerability • Attack used an IP address like – 1.2.3.4.xxxxxxxx-exploit-code-here-xxxx • Another list of DNS vulns at link Ch 3d
  • 24. Source Port Randomization • Good video • Link Ch 3e
  • 25. Randomness of Transaction ID • Each DNS query and response has a TXID field – 16 bits long (65,536 possible values) – Should be random • Bind 8 & 9 used predictable transaction IDs – So only ten guesses were needed to spoof the reply
  • 27. Tricking a Target into Using Your DNS Server • Run a domain evil.com with a SOA you control ns1.evil.com – Send the target an email with a link to server.evil.com and hope someone clicks it – Send email from joe@evil.com to target email address • The server will automatically perform a reverse lookup to detect spam
  • 28. Tricking a Target into Making Multiple DNS Queries • CNAME Chaining – www.evil.com is a CNAME for www1.evil.com – www1.evil.com is a CNAME for www2.evil.com – www2.evil.com is a CNAME for www3.evil.com – etc.
  • 29. Tricking a Target into Making Multiple DNS Queries • NS Referral Chaining and NS Chains – a.a.a.a.evil.com has SOA ns.evil.com – ns.evil.com delegates to ns.a.evil.com – ns.a.evil.com delegates to ns.a.a.evil.com – etc.
  • 31. Weak Authentication • DNS uses these elements to match a request and a response – Transaction ID (16 bits) – Question – Source and destination IP – Source and destination ports • But request destination port is known (53) • Client accepts the first response that meets these criteria, and caches the result
  • 32. DNS Cache Poisoning • A false response that tricks the client puts a false entry into its cache
  • 33. DNS Cache Poisoning Attacker 1.2.3.4 DNS Resolver Target Where is www.yahoo.com?www.yahoo.com is at 1.2.3.4 Where is www.yahoo.com? www.yahoo.com is at 1.2.3.4
  • 36. Consequences of the Kaminsky Attack • Attack can be placed in a Web page – Many img tags – <img src=aaaa.paypal.com> – <img src=aaab.paypal.com> – <img src=aaac.paypal.com> – <img src=aaad.paypal.com> – etc. • If one Comcast customer views that page, all other Comcast customers will be sent to the fake paypal.com • Poisoning can take as few as 10 seconds
  • 37. Man-in-the-Middle Attacks • Attacker in the middle has enough info to perfectly forge responses – Unless DNSSEC is used Attacker DNS ResolverTarget
  • 38. DNS as a DoS Amplifier • Small requests lead to large responses • UDP allows spoofing the source IP address AttackerOpen DNS ResolverTarget