Domain Name System (DNS)
E N D
Presentation Transcript
Domain Name System (DNS) Today & Tomorrow Presented By: James Speirs Charles Higby Brady Redfearn
Overview • History • How It Works • DNS Packet Structure • DNS Features • DNS Security Evolution, Early Days • Current DNS Issues • Bailiwick Defined • BIND 9.6 Or Later • Guilty Parties • DNS Exploit, Dan Kaminiski • BIND 8 Or Earlier • Kaminski's Results • What Can Save Us?
History • Pre-DNS • Hosts file • Stanford Research Institute (SRI) • FTP
History Continued • 1983 • Paul Mockapetris, Inventor • RFCs 882 & 883 • 1984 • Berkeley & UNIX • 1985 • Kevin Dunlap, Digital Equipment Corporation (DEC) • Berkeley Internet Name Domain (BIND) • 1987 • RFCs1034 &1035 • 1990s • BIND ported to Windows NT
How it Works • Distributed Databases • Local machine • Hosts file • Linux - /etc/hosts • Mac - /private/etc/hosts • Windows - %SystemRoot%\system32\drivers\etc\ • Local cache • Active memory • Browser cache
How It Works Continued • Distributed Databases • Not on local machine • UDP request • 100 bytes • ISP DNS responds • ISPs ISP DNS responds • Core DNS responds
DNS Features • Name server responds with all sub-domains • microsoft.com, • secure.microsoft.com • update.microsoft.com • Compression (~3x) • Redundancy • Round-robin assignment • Entry expiration (3,600 seconds) • 3,600 second default • Defined by name server • The "big 13 root servers" contain main DNS entries always • .com, .net, .tv, .info, .gov, .mil, etc. • http://www.isoc.org/briefings/020/zonefile.shtml
DNS Security Evolution, Early Days • No bad guys in 1983 • Transaction ID (TID) • Incremental counting integer • Random TID • Port 53 • Incoming port 53 • Port 53 outgoing • Random outgoing port, Dan Bernstein
Current DNS Issues • DNS Poisoning • First response wins • No TCP • Transaction IDs – 16-bits • Ports – 16-bits • DNS Controllers • ICANN • US Commerce Department • Verisign • 13 core servers
Bailiwick • Defined • "The neighborhood of the domain" • Bailiwicked Domain Attack • In Bailiwick • microsoft.com • update.microsoft.com • security.microsoft.com • All acceptable DNS entries • Not in Bailiwick • google.com • yahoo.com • These entries are thrown away
BIND 9.6 Or Later Example of current version of BIND
Guilty Parties • Guilty Parties • Any DNS not randomizing ports • OpenWRT software • Secure Services • OpenDNS • djbdns • Simple router software
DNS Exploit, Dan Kaminski • Cache miss at ISP • Find DNS IPs for example.com • ns1.example.com (1.1.1.1) • ns2.example.com (1.1.1.2) • Send query of bogus machine • aaa.example.com • ISPs DNS queries example.com for fake comp • Note UDP outgoing port from ISP (7649) • Send 100 UDP packets with random TIDs to ISP at port 7649 with your IP 1.1.1.100 as location for example.com
BIND 8 Or Earlier Example of older versions of BIND
Kaminski's Results • Repeat the exploit for any domain • In 30 seconds, you control the entire domain • Works because • New IPs are in bailiwick • New IPs replace old ones at ISP • Make TTL really big • Maximum of 2,147,483,647 seconds • 68+ Years • Never expires • Nothing appears wrong • URL bar is http://www.google.com • Displayed site is google.com
What Can Save Us? • SSL certificates • Cannot be duplicated • Must be examined • If available, force HTTPS • Most sites don't support either solution • Test your ISP • entropy.dns-oarc.net/test