15
Sep 2008 ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Embed Size (px)

Citation preview

Page 1: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 1

DNS Response Modification

David PiscitelloSenior Security Technologist

ICANN

Page 2: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 2

Intended web experience• Type a URL: http://www.example.com/index.htm• Browser asks DNS to find IP address of this host• If DNS finds the IP address then

– It passes this IP address to browser– Browser connects to the site – If page exists, browser downloads page– Else browser displays “page not found”

• Else if host does not exist – DNS returns a “name error” to browser– Browser displays an error “Server not found” (or similar)

Page 3: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 3

Response Modification alters this experience• Type a URL: http://www.example.com/index.htm• Browser asks DNS to find IP address of this host• If DNS finds the IP address then

– business as usual (well, maybe…)• Else if DNS response is “name error” then

– Respond in a way that is self-beneficial– Commonly done without notice and consent to user or

domain registrant • Even when notice is provided, full disclosure of

the security implications are not identified– The registrant does not benefit from and in some

instances is harmed by the alteration

Page 4: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 4

DNS Protocol Violation?• RFC 1035 says name error is "only meaningful in

responses from an authoritative name server "– The response is thus more than an error indication– Response expresses content that the authoritative

name server expects the client to receive

• DNSSEC goes through great pains to provide authenticated denial of existence of DNS records– Why would we bother if non-existence was

unimportant!!!

Page 5: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 5

Who can make such changes• Entrusted Agents

– A DNS operator who provides authoritative name service on behalf of a registrant

– Registrars, ISPs, trusted 3rd parties, registrant’s IT

• Third parties– any DNS operator of any name server that processes

the response along the return path from the authority name server to the client that issued the request

Page 6: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 6

Form 1: Synthesized DNS response

• An Entrusted agent operating as a zone authority– Receives a name query from a client

– Determines the name does not exist in the zone file

– Returns a name exists response containing an IP address mapping the entrusted agent chooses

– Common implementation is to include a wildcard entry in the registrant's zone file• All names not found resolve to an IP address the

agent chooses

Page 7: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 7

Iterativeresolver

Client

Root Name Server

What is the IP address of

ww.example.com?

Ask one of these COM

name servers

What is the IP address of

ww.example.com?

<label>.example.com does not exist

synthesize DNS responsereturn Answers Section

with IP address = a.b.c.d

What is the IP address of

ww.example.com ww.example.com

is at IP = a.b.c.d

COM Name Server

Wha

t is

the

IP a

ddre

ss o

f

ww.exa

mpl

e.co

m?

Ask e

xam

ple.

com

's

nam

e se

rvice

pro

vider

ww.example.com's

IP = a.b.c.d

example.com'sEntrusted

Agent example.com zone file

Synthesized DNS Response (Simplified)

Page 8: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 8

Form 2: "On the fly" response modification

• A third party NS operator– Examines DNS responses messages it attempts

to resolve for a client

– When it encounters a non-existent domain response the resolver• Silently alters the response code from non-existent

to name found• Inserts an IP address mapping the third party

chooses

Page 9: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 9

Iterativeresolver

Client

Root Name Server

What is the IP address of

ww.example.com?

Ask one of these COM

name servers

What is the IP address of

ww.example.com?

What is the IP address of

ww.example.com ww.example.com

is at IP = w.x.y.z

COM Name Server

Wha

t is

the

IP a

ddre

ss o

f

ww.exa

mpl

e.co

m?

Ask e

xam

ple.

com

's

nam

e se

rvice

pro

vider

example.com'sEntrusted

Agent example.com zone file

NXDomain Response Modification(Simplified)

response says NXDomain: synthesize DNS response return Answers Section with

IP address = w.x.y.z

ww.example.com is

non-existent domain

Page 10: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 10

Who has the means, motive and opportunity?Who How Why

Sponsoring registrar Entrusted agent (EA) Promote business

Promote services

Advertise

Affiliate advertising

"Enhance the user experience"

Public DNS provider Third party NS operator

ISP Third party NS operator or EA

Web (proxy) operators Third party NS operator

"for fee" DNS provider Third party NS operator or EA

Domain registrant EA Enforce a policyRemedial Education

Attackers "own" a DNS server Fun, fame, fortune…

Page 11: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 11

How are users affected?• A modified DNS response

– Signals a different state of the zone to the user than the registrant intended• The non-existence of a name is not conveyed to the user• The user concludes the host is operated by the registrant

– Can result in inconsistent responses • The response a user receives depends on the

resolver it asks– Can cause address mapping conflicts when multiple

NS operators alter responses• An authority may add a host that has been “redirected”• Resolvers caching a modified response for this name will

return a different address from the one now in the authority zone file

Page 12: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 12

How are domain registrants affected?• A modified DNS response

– Alters the content the domain authority intended to have delivered• Would you tolerate undisclosed modification of any other

application content?• Why should DNS messages be treated differently from mail,

IMs or voice?

– Has business and brand implications• Redirection hosts benefit from the domain registrant's brand,

reputation, site and link popularity, and sponsored link agreements…

• Operational instabilities• Security implications ->

Page 13: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 13

Security Implications• A modified DNS response

– Subverts a "parent trusts the subdomain" security assumption common to web applications

• Applications assume that any host in my domain is trustworthy

– Wrests security of hosts from the registrant• A host is named in your domain but secured by "someone else”• How can I test and audit for (regulatory) compliance and policy conformance if I

don’t know or operate the hosts where my NXDOMAINs are redirected

– Creates opportunities for attack via a host you cannot secure• Phishing via false site injection• Redirect hosts can intercept, monitor and analyze traffic (extract data)• Redirect hosts can intercept cookies to acquire personal, credit or bank data

– Facilitates attacks against brand• Aren’t 3rd level labels you don't control as dangerous as 2nd level labels

Page 14: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 14

Other issues• A Records today, what about tomorrrow?

– Assumption is that most NXDomain responses are for web sites so they lead to "eyeballs"

– Imagine a future of modified DNS responses that includes MX, NAPTR, SRV and other resource records

• Dueling rewrites– DNS responses can be processed by many third parties – Any party downstream from a synthesized response can

rewrite the response– Interesting problem for error resolution marketeers

• Is this the tip of the iceberg?– How long before responses from other application

servers are “in play”?

Page 15: Sep 2008ALAC Webinar 1 DNS Response Modification David Piscitello Senior Security Technologist ICANN

Sep 2008 ALAC Webinar 15

SSAC Recommendations• Synthesized responses at any level in the DNS have

unanticipated and undesirable consequences for the registrant and user

• Registrants should choose an entrusted agent that asserts it will not modify DNS responses in its terms of service

• Registrants should study ways to provide end-to-end authenticated proof of non-existence of subdomains (DNSSEC)

• Entrusted agents should not inject DNS wildcards in a zone without informed consent and without fully informing the domain registrant of the risks this practices exposes

• Entrusted agents should provide opt-out mechanism that allows clients to receive the original DNS answers to their queries.

• Third parties should disclose that they practice NXDomain response modification and should provide opportunities for users to opt out