Naming Security Nick Feamster CS 6250 Fall 2011. 2 DNS: Mapping Names to Addresses ClientLocal DNS resolver root,.edu troll-gw.gatech.edu www.cc.gatech.edu.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Advertisements

Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
(Distributed) Denial of Service Nick Feamster CS 4251 Spring 2008.
Naming: The Domain Name System Nick Feamster CS 4251 Fall 2008.
1 Hyades Command Routing Message flow and data translation.
Writing Pseudocode And Making a Flow Chart A Number Guessing Game
INTERNET PROTOCOLS Class 9 CSCI 6433 David C. Roberts Entire contents copyright 2011, David C. Roberts, all rights reserved.
Review iClickers. Ch 1: The Importance of DNS Security.
ACT User Meeting June Your entitlements window Entitlements, roles and v1 security overview Problems with v1 security Tasks, jobs and v2 security.
Network Attack via DNS Fagpakke: IT Sikkerhed Modul: Introduktion til IT Sikkerhed Jesper Buus Nielsen.
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
06-Sep-2006Copyright (C) 2006 Internet Initiative Japan Inc.1 Prevent DoS using IP source address spoofing MATSUZAKI ‘maz’ Yoshinobu.
PSSA Preparation.
RefWorks: The Basics October 12, What is RefWorks? A personal bibliographic software manager –Manages citations –Creates bibliogaphies Accessible.
State of DNS Security Extensions Edward Lewis February 26, 2001 APRICOT 2001 Panel.
TCP/IP Protocol Suite 1 Chapter 18 Upon completion you will be able to: Remote Login: Telnet Understand how TELNET works Understand the role of NVT in.
Sergei Komarov. DNS  Mechanism for IP hostname resolution  Globally distributed database  Hierarchical structure  Comprised of three components.
DNS Security Overview AROC Guatemala July What’s the Problem? Until July of 2008 the majority of authoritative DNS servers worldwide were completely.
Lecture 18 Page 1 CS 236 Online DNS Security The Domain Name Service (DNS) translates human-readable names to IP addresses –E.g., thesiger.cs.ucla.edu.
Computer Networks: Domain Name System. The domain name system (DNS) is an application-layer protocol for mapping domain names to IP addresses Vacation.
A New Approach to DNS Security (DNSSEC) Author: Giuseppe Ateniese Stefan Mangard Presenter: Liu, Xiaotao.
Foundations of Network and Computer Security J J ohn Black Lecture #35 Dec 9 th 2009 CSCI 6268/TLEN 5550, Fall 2009.
Domain Name System Security Extensions (DNSSEC) Hackers 2.
Domain Name System | DNSSEC. 2  Internet Protocol address uniquely identifies laptops or phones or other devices  The Domain Name System matches IP.
NET0183 Networks and Communications Lecture 25 DNS Domain Name System 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks.
CS 4396 Computer Networks Lab
1 Domain Name System (DNS). 2 DNS: Domain Name System Internet hosts: – IP address (32 bit) - used for addressing datagrams – “name”, e.g.,
CS426Fall 2010/Lecture 341 Computer Security CS 426 Lecture 34 DNS Security.
TELE 301 Lecture 11: DNS 1 Overview Last Lecture –Scheduled tasks and log management This Lecture –DNS Next Lecture –Address assignment (DHCP)
Computer Networks: Domain Name System. The domain name system (DNS) is an application-layer protocol for mapping domain names to IP addresses Vacation.
CSUF Chapter 6 1. Computer Networks: Domain Name System 2.
IIT Indore © Neminath Hubballi
Microsoft Windows Server 2003 TCP/IP Protocols and Services Technical Reference Slide: 1 Lesson 17 Domain Name System (DNS)
CS526Topic 19: DNS Security1 Information Security CS 526 Topic 19: DNS Security.
Written By: David Dagon Manos Antonakakis Paul Vixie Georgia Institute of Georgia Institute ofInternet Systems. Technology Technology Consortium Wenke.
1 DNS: Domain Name System People: many identifiers: m SSN, name, Passport # Internet hosts, routers: m IP address (32 bit) - used for addressing datagrams.
October 15, 2002Serguei A. Mokhov, 1 Intro to DNS SOEN321 - Information Systems Security.
October 8, 2015 University of Tulsa - Center for Information Security Microsoft Windows 2000 DNS October 8, 2015.
DNS Security Pacific IT Pros Nov. 5, Topics DoS Attacks on DNS Servers DoS Attacks by DNS Servers Poisoning DNS Records Monitoring DNS Traffic Leakage.
Netprog: DNS and name lookups1 Address Conversion Functions and The Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
Packet Filtering & Firewalls. Stateless Packet Filtering Assume We can classify a “good” packet and/or a “bad packet” Each rule can examine that single.
1 Kyung Hee University Chapter 18 Domain Name System.
Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
CPSC 441: DNS 1. DNS: Domain Name System Internet hosts: m IP address (32 bit) - used for addressing datagrams m “name”, e.g., - used by.
DNS Cache Poisoning. History 1993 – DNS protocol allowed attacker to inject false data which was then cached 1997 – BIND 16-bit transaction ids not randomized,
Security in DNS(DNSSEC) Yalda Edalat Pramodh Pallapothu.
DNS Security Extension 1. Implication of Kaminsky Attack Dramatically reduces the complexity and increases the effectiveness of DNS cache poisoning –No.
DNS Cache Poisoning – The Next Generation by Joe Stewart, GCIH Presented by Stephen Karg CS510, Advanced Security Portland State University Oct. 24, 2005.
DNS Security 1. Fundamental Problems of Network Security Internet was designed without security in mind –Initial design focused more on how to make it.
Lecture 18 Page 1 CS 236, Spring 2008 DNS Security The Domain Name Service (DNS) translates human-readable names to IP addresses –E.g., thesiger.cs.ucla.edu.
Ch 6: DNSSEC and Beyond Updated DNSSEC Objectives of DNSSEC Data origin authentication – Assurance that the requested data came from the genuine.
DNS Cache Poisoning (pretending to be the authoritative zone) ns.example.co m Webserver ( ) DNS Caching Server Client I want to access
COMP 431 Internet Services & Protocols
Grades update. Homework #1 Count35 Minimum Value47.00 Maximum Value Average
Short Intro to DNS (part of Tirgul 9) Nir Gazit. What is DNS? DNS = Domain Name System. For translation of host names to IPs. A Distributed Database System.
Internet infrastructure 1. Infrastructure Security r User expectations  Reliable service  Reliable endpoints – although we know of spoofing and phishing.
Using Digital Signature with DNS. DNS structure Virtually every application uses the Domain Name System (DNS). DNS database maps: –Name to IP address.
DNS Security Risks Section 0x02. Joke/Cool thing traceroute traceroute c
Security Issues with Domain Name Systems
DNS Security Advanced Network Security Peter Reiher August, 2014
DNS Security.
DNS Security Issues SeongHo Cho DPNM Lab., POSTECH
DNS Cache Poisoning Attack
DNS security.
Information Security CS 526 Omar Chowdhury
A New Approach to DNS Security (DNSSEC)
NET 536 Network Security Lecture 8: DNS Security
NET 536 Network Security Lecture 6: DNS Security
Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
DNS Security The Domain Name Service (DNS) translates human-readable names to IP addresses E.g., thesiger.cs.ucla.edu translates to DNS.
Presentation transcript:

Naming Security Nick Feamster CS 6250 Fall 2011

2 DNS: Mapping Names to Addresses ClientLocal DNS resolver root,.edu troll-gw.gatech.edu NS troll-gw.gatech.edu NS burdell.cc.gatech.edu A burdell.cc.gatech.edu Recursive query Iterative queries Note the diversity of Georgia Techs authoritative nameservers

3 Some Record Types A NS MX CNAME TXT PTR AAAA SRV

4 Caching Resolvers cache DNS responses –Quick response for repeated translations –Other queries may reuse some parts of lookup NS records for domains typically cached for longer –Negative responses also cached Typos, localhost, etc. Cached data periodically times out –Lifetime (TTL) of data controlled by owner of data –TTL passed with every record What if DNS entries get corrupted?

5 Root Zone Generic Top Level Domains (gTLD) –.com,.net,.org, Country Code Top Level Domain (ccTLD) –.us,.ca,.fi,.uk, etc… Root server ({a-m}.root-servers.net) also used to cover gTLD domains –Increased load on root servers –August 2000:.com,.net,.org moved off root servers onto gTLDs

6 Some gTLDs.info general info.biz businesses.name individuals.aero air-transport industry.coop business cooperatives.pro accountants, lawyers, physicians.museum museums

7 Source:

8 Inherent DNS Vulnerabilities Users/hosts typically trust the host-address mapping provided by DNS –What bad things can happen with wrong DNS info? DNS resolvers trust responses received after sending out queries –How to attack? Responses can include DNS information unrelated to the query Obvious problems –No authentication for DNS responses

9 Pharming Exploit DNS poisoning attack –Change IP addresses to redirect URLs to fraudulent sites –Potentially more dangerous than phishing attacks –No solicitation is required DNS poisoning attacks have occurred: –January 2005, the domain name for a large New York ISP, Panix, was hijacked to a site in Australia. –In November 2004, Google and Amazon users were sent to Med Network Inc., an online pharmacy –In March 2003, a group dubbed the "Freedom Cyber Force Militia" hijacked visitors to the Al-Jazeera Web site and presented them with the message "God Bless Our Troops"

CS426Fall 2010/Lecture DNS cache poisoning (Vulnerability 1) (Chris Schuba in 1993) DNS resource records (see RFC 1034) –An A record supplies a host IP address –A NS record supplies name server for domain Example –evil.org NS ns.yahoo.com /delegate to yahoo –ns.yahoo.com A / address for yahoo Result –If resolver looks up then evil name server will give resolver address for yahoo –Lookup yahoo through cache goes to

Defense Using The Bailiwicks Rules The bailiwick system prevents foo.com from declaring anything about com, or some other new TLD, or Using the bailiwicks rules –The root servers can return any record –The com servers can return any record for com –The google.com servers can return any record for google.com CS Fall 2010/Lecture 34

DNS cache poisoning: Racing to Respond First CS Fall 2010/Lecture 34

DNS Cache Poisoning Attacker wants his IP address returned for a DNS query When the resolver asks ns1.google.com for the attacker could reply first, with his own IP What is supposed to prevent this? Transaction ID –16-bit random number –The real server knows the number, because it was contained in the query –The attacker has to guess CS Fall 2010/Lecture 34

CS426Fall 2010/Lecture DNS cache poisoning (Vulnerability 2) Responding before the real nameserver –An attacker can guess when a DNS cache entry times out and a query has been sent, and provide a fake response. –The fake response will be accepted only when its 16- bit transaction ID matches the query –CERT reported in 1997 that BIND uses sequential transaction ID and is easily predicted fixed by using random transaction IDs

CS426Fall 2010/Lecture DNS cache poisoning (Vulnerability 3) Improve the chance of responding before the real nameserver (discovered by Vagner Sacramento in 2002) –Have many (say hundreds of) clients send the same DNS request to the name server Each generates a query –Send hundreds of reply with random transaction IDs at the same time –Due to the Birthday Paradox, the success probability can be close to 1

CS426Fall 2010/Lecture DNS cache poisoning (Vulnerability 4) Kaminsky Attack –Big security news in summer of 2008 –DNS servers worldwide were quickly patched to defend against the attack In previous attacks, when the attacker loses the race, the record is cached, with a TTL. –Before TTL expires, no attack can be carried out –Posining address for google.com in a DNS server is not easy.

Guess the ID Early versions of DNS servers deterministically incremented the ID field Vulnerabilities were discovered in the random ID generation –Weak random number generator –The attacker is able to predict the ID if knowing several IDs in previous transactions Birthday attack –Force the resolver to send many identical queries, with different IDs, at the same time –Increase the probability of making a correct guess CS Fall 2010/Lecture 34

What is New in the Kaminsky Attack? The bad guy does not need to wait to try again The bad guy asks the resolver to look up –If the bad guy lost the race, the other race for will be suppressed by the TTL If the bad guy asks the resolver to look up 1.google.com, 2.google.com, 3.google.com, and so on –Each new query starts a new race Eventually, the bad guy will win –he is able to spoof 183.google.com –So what? No one wants to visit 183.google.com CS Fall 2010/Lecture 34

Kaminsky-Style Poisoning A bad guy who wins the race for183.google.com can end up stealingwww.google.com as well The malicious response –google.com NS – A –OR –google.com NS ns.badguy.com CS Fall 2010/Lecture 34

Kaminsky-Style Poisoning (cont) Can start anytime; no waiting for old good cached entries to expire No wait penalty for racing failure The attack is only bandwidth limited Defense (alleviate, but not solve the problem) –Also randomize the UDP used to send the DNS query, the attacker has to guess that port correctly as well. CS Fall 2010/Lecture 34

DNS Poisoning Defenses Difficulty to change the protocol –Protocol stability (embedded devices) –Backward compatible Long-term –Cryptographic protections E.g., DNSSEC, DNSCurve –Require changes to both recursive and authority servers –A multi-year process Short-term –Only change the recursive server –Easy to adopt CS Fall 2010/Lecture 34

Short-Term Defenses Source port randomization –Add 16-bits entropy –resource intensive (select on a potentially large pool of ports) –NAT could de-randomize the port DNS 0x20 encoding –From Georgia tech, CCS 2008 Tighter logic for accepting responses CS Fall 2010/Lecture 34

DNS-0x20 Bit Encoding DNS labels are case insensitive Matching and resolution is entirely case insensitive A resolver can query in any case pattern –E.g., –It will get the answer for CS Fall 2010/Lecture 34

DNS-0x20 DNS Encoding (cont) A DNS response contains the query being asked When generating the response, the query is copied from the request exactly into the response –The case pattern of the query is preserved in the response Open source implementations exhibit this behavior –The DNS request is rewritten in place The mixed pattern of upper and lower case letters constitutes a channel, which can be used to improve DNS security –Only the real server knows the correct pattern CS Fall 2010/Lecture 34

Query Encoding Transforms the query into all lowercase Encrypt the query with a key shared by all queries on the recursive server (A) The cipher text is used to encode the query –0: buff[i] |= 0x20 –1: buff[i] &= 0x20 CS Fall 2010/Lecture 34

DNS-0x20 Encoding Analysis Do existing authority servers preserve the case pattern? –Scan 75 million name servers, 7 million domains Only 0.3% mismatch observed CS Fall 2010/Lecture 34

DNS-0x20 Encoding Analysis (cont) Not every character is 0x20 capable Improve the forgery resistance of DNS messages only in proportion to the number of upper or lower case characters –cia.gov6-bit entropy –licensing.disney.com12-bit entropy –163.com3-bit entropy TLDs are also vulnerable to Kaminsky-style attacks; but they have few 0x20-capable bits CS Fall 2010/Lecture 34

CS426Fall 2010/Lecture Other DNS attacks Attacking home routers/gateways Incidence in Mexica in 2008 –an sent to users – include URL (HTTP requests) to the HTTP- based interface of wireless routers –using the default password to reconfigure the router/gateway

29 Root level DNS attacks Feb. 6, 2007: –Botnet attack on the 13 Internet DNS root servers –Lasted 2.5 hours –None crashed, but two performed badly: g-root (DoD), l-root (ICANN) Most other root servers use anycast

30 Do you trust the TLD operators? Wildcard DNS record for all.com and.net domain names not yet registered by others.com.net –September 15 – October 4, 2003 –February 2004: Verisign sues ICANN Redirection for these domain names to Verisign web portal What services might this break?

31 Protecting the Root Nameservers Redundancy: 13 root nameservers IP Anycast for root DNS servers {c,f,i,j,k}.root-servers.net –RFC 3258 –Most physical nameservers lie outside of the US Sophisticated? Why did nobody notice? gatech.edu NS trollgw.gatech.edu. Defense Mechanisms

32 Defense: Replication and Caching source: wikipedia

33 Other Vulnerabilities DNS Amplification Attacks Kaminsky DNS Cache Poisoning Comcast.net hijack

34 DNS Amplification Attack 580,000 open resolvers on Internet (Kaminsky-Shiffman 06) Prevention: reject DNS queries from external addresses DNS Server DoS Source DoS Target DNS Query SrcIP: Dos Target (60 bytes) EDNS Reponse (3000 bytes) DNS Amplification attack: ( 40 amplification )

35 DNS Amplification Attack DNS victim Command&Control DNS stub-resolvers full-resolvers root-servers tld-servers example-servers botnet IP spoofed DNS queries

36 attacker Solutions ip spoofed packets replies victim open amplifier prevent ip spoofing disable open amplifiers

37 Why DNSSEC DNSSEC protects against data spoofing and corruption DNSSEC also provides mechanisms to authenticate servers and requests DNSSEC provides mechanisms to establish authenticity and integrity

38

39 PK-DNSSEC (Public Key) The DNS servers sign the hash of resource record set with its private keys Resouce record set: The set of resource records of the same type. Public keys can be used to verify the SIGs The authenticity of public keys is established by a SIGnature over the keys with the parents private key In the ideal case, only one public key needs to be distributed out-of-band (the roots public key)

40 DNSSEC: new RRs 2 Public key related RRs SIG signature over RRset made using private key KEY public key, needed for verifying a SIG over a RRset, signed by the parents private key One RR for internal consistency (authenticated denial of data) NXT RR to indicate which RRset is the next one in the zone For non DNSSEC public keys: CERT

41 SIG RRs Cover each resource record set with a public-key signature which is stored as a resource record called SIG RR SIG RRs are computed for every RRset in a zone file and stored Add the corresponding pre-calculated signature for each RRset in answers to queries Must include the entire RRset in an answer, otherwise the resolver could not verify the signature

42 Verifying the tree stub resolver Question: A ? resolver. (root) A ? ask.com server SIG(the ip address and PK of.com server) by its private key.com A ? ask cnn.com server SIG(the ip address and PK of cnn.com server) by its private key cnn.com A ? SIG(xxx.xxx.xxx.xxx) by its private key xxx.xxx.xxx.xxx add to cache lab.cs.umass.edu dns.cs.umass.edu transaction signatures slave servers transaction signatures

43 Verify a SIG over data using the public KEY DNS data is signed with the private key Verify the SIG with the KEY mentioned in the SIG record The key can be found in the DNS or can be locally configured Verifying