Encrypted DNS - DNS over TLS / DNS over HTTPS

961 views 38 slides Jan 31, 2019
Slide 1
Slide 1 of 38
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38

About This Presentation

Encryption is coming to mainstream DNS. This briefing discusses the history, protocols and architecture of encrypted DNS, specifically DNS over TLS and DNS over HTTPS. It also describes the impact of DoT and DoH on various operational models.

This briefing was given during DNSheads Vienna #5 at the...


Slide Content

1· www.nic.at
DNSheads Vienna #5 · public
Briefing „EncryptedDNS“
DNS overTLS / DNS overHTTPS
DNSheads Vienna #5 · public
2019-01-30 · Alex Mayrhofer · Head ofResearch & Development

2· www.nic.at
DNSheads Vienna #5 · public
Background
WhyDNS encryptionwas developed

3· www.nic.at
DNSheads Vienna #5 · public
The DNS anno circa 2012
•SensationalSuccessStory
Age 25, andpracticallyunmodified
•Today: „Nothinggoes“ withoutDNS
•Clear text. Everything
„DNS ispublicanyways?“
•99% UDP, 1% TCP „fallback“
WorstTCP supportever!
•DNSSEC? Makeseverythingsecure, doesn‘tit!!?!
Doesonly„sign“, not „encrypt“
•2013: Snowdenrevelations
NSA: „Clear textPII data… mmmmm…“
IETF: „Ohhsheesh–wedidn‘texpect*that* scale!“
PhotobySimone AcquarolionUnsplash

4· www.nic.at
DNSheads Vienna #5 · public
„PervasiveMonitoring isan Attack“
•RFC 7258 –„PervasiveMonitoring isa technical
attackthatshouldbemitigatedin thedesign of
IETF protocols, wherepossible“
•Consequence: Review ofall importantprocotols
•DNS –there‘snot evena standardized*option*
forencryption
•Worse–contains„privacydefeating“ mechanism
UnneccessarilytransmitsfullQNAME in manycases
EDNS(0) Client Subnet
•LeakofMeta-Data & Fingerprinting
Re-identificationofindividualsacrossnetworks
But, but…
ohhhhh…
Photo byKotePuertoonUnsplash

5· www.nic.at
DNSheads Vienna #5 · public
„Weneedencryption“
But wheretostart?

6· www.nic.at
DNSheads Vienna #5 · public
The DNS Protocol arena
„RecursiveDNS Server“
„AuthoritativeDNS Server“

7· www.nic.at
DNSheads Vienna #5 · public
IETF DPRIVE* („PRIVateExchange“)
•2014: „Let‘sdeal withthestubresolver
torecursorleg“
Most significantinformationleakage
1:few Relation –Authentication simple
„Don‘tattempttoboiltheocean“
•2018: Re-Chartering: Includes
„recursivetoauthoritative“
More complex: m:nconnections
(Authentication!)
Milestone forend of2019
*https://datatracker.ietf.org/wg/dprive/about/

8· www.nic.at
DNSheads Vienna #5 · public
DNS over(D)TLS
IETF: DPRIVE / DNSOP / (TLS)

9· www.nic.at
DNSheads Vienna #5 · public
Liste ofrelevant RFCs
•RFC 7626 –DNS Privacy Considerations(DPRIVE)
•RFC 7766 –TCP Transport forDNS (DNSOP)
•RFC 7816 –QNAME Minimization(DNSOP)
•RFC 7828 –EDNS keepalive(DNSOP)
•RFC 7858 –DNS overTLS (DPRIVE)
•RFC 8094 –DNS overDTLS (DPRIVE)
•RFC 7830 (+RFC 8467) –DNS Padding(DPRIVE)
•RFC 8310 –UsageProfiles
•RFC 8446 –TLS 1.3 (TLS)

10· www.nic.at
DNSheads Vienna #5 · public
RFC 7626 –DNS Privacy Considerations
•Privacy aspects/ issuesin areasoftheDNS:
In theDNS message(Query Name, IP Adresse)
On theserver
On theWire
Re-Identificationbasedon patterns
•Killsthe„DNS ispublicanyways!“ argument
Website of„AlcoholicsAnonymous“ ispublic
The factthatsomeonevisitsthatwebsiteregularlyisdefinitely
privacyrelevant!
•Practicalexample(similar..)
drugstoremorningafterpillvienna16.at
(Browser searchrequestsleakingtotheDNS?)

11· www.nic.at
DNSheads Vienna #5 · public
RFC 7766 –TCP Transport forDNS
•Goal: EstablishDNS overTCP als „firstclasscitizen“
•Features
Persistent connections(Client supposedtocloseconnections)
Connection re-use
Pipelining
Response Reordering
TCP Fast Open
Similar: „Happy Eyeballs“

12· www.nic.at
DNSheads Vienna #5 · public
RFC 7816 –QNAME Minimization

13· www.nic.at
DNSheads Vienna #5 · public
RFC 7828 –EDNS keepalive
•EDNS Option forSession Management
•ForTCP only!
•Clients: „Pleaseleaveconnectionopen forX seconds“
•Server: „Ok, leaveitopen forX seconds“ or„Please
closeconnectionnow!“

14· www.nic.at
DNSheads Vienna #5 · public
RFC 7858 –DNS overTLS (DoT)
•New Port 853 / TCP
•„On thewire“ protocolisunmodified
•Authentification: Certificatesusw? -> RFC 8310
„Opportunistic“ vs. „Strict“
Chicken/Egg -> Bootstrapping des DoTServers wie?
•Doesnot changethe„path“ oftheDNS message
ExistingRecursiveNameserver cansimplyofferan additional,
encryptedchannel

15· www.nic.at
DNSheads Vienna #5 · public
RFC 8094 –DNS overDTLS
•Port 853 / UDP
•„Same Samebut Different“
•Experimental!
Issueswithfragmentation
DTLS isnot widelyimplemented
•Performance advantageofUDP?
MostlybecauseTCP implementationusedtobeso „lousy“.

16· www.nic.at
DNSheads Vienna #5 · public
EDNS(0) Padding
It‘srequiredforprivacy–but, why?

17· www.nic.at
DNSheads Vienna #5 · public
EDNS(0) Padding–why?
•Encryption removes„direct“ accesstotheinformation
What‘sleftfortheAttacker?
•„PrettyBad Privacy –PitfallsofDNS Encryption“*
HayaShulman@ IETF 93
Applied Networking Research Price –IRTF
•Side Channel informationiskey!
Countermeasures
*https://www.ietf.org/proceedings/93/slides/slides-93-irtfopen-1.pdf

18· www.nic.at
DNSheads Vienna #5 · public
ApplicationQueries–it‘sa stream
•A Pattern -Not just a singlequery/responsepair

19· www.nic.at
DNSheads Vienna #5 · public
EncryptedDNS
•Streams still createsize/timing„patterns“

20· www.nic.at
DNSheads Vienna #5 · public
Size basedCorrelation
•Comparewithknowncleartextpatterns
•Even workswitha subsetofmessagesizes

21· www.nic.at
DNSheads Vienna #5 · public
IntroducingPadding
•Obfuscatesthesizepattern-> Hamperscorrelation
•More „hits“ -> lesslikelythatidentificationispossible

22· www.nic.at
DNSheads Vienna #5 · public
RFC 7830 –EDNS(0) PaddingOption
•EDNS Option code12
https://tools.ietf.org/html/rfc7830

23· www.nic.at
DNSheads Vienna #5 · public
DNS overHTTPS
An alternative encryptionscheme, drivenbybrowservendors

24· www.nic.at
DNSheads Vienna #5 · public
Motivation –Browser Vendors
•(a) Browsers do a lotofDNS thesedays
Websites + assets(JS, Ads, Statistics…), CDNs
CertificateValidation (OCSP), SafeBrowsinglists, updates, …
More directcontrolovertheDNS API desired
•(b) Timing andavailabilityiscritical
„Happy Eyeballs“ –Slow orlousy(local) DNS serverscreatebad
userexperience
„Bad Hotel WiFi“ isoften„Bad Hotel DNS“…
•(c) DNS isusedforcensorship
Circumventinglocal(censoring) DNS serversprotectsFreedom of
Speech
Eg. Google Jigsaw
ttps://dnsserver.example.net/dns-query{?dns}

25· www.nic.at
DNSheads Vienna #5 · public
IETF DoH* (DNS overHTTPs) group
•Founded2017
•2018: RFC 8484
GET orPOST
URI Templates (https://dnsserver.example.net/dns-
query{?dns})
Wire-Format: application/dns-message (identicalzu „normal“
DNS), oder JSON
HTTP Response-Code always2xx (ifsuccessful), nomatter
whichDNS responsecode
*https://datatracker.ietf.org/wg/doh/about/

26· www.nic.at
DNSheads Vienna #5 · public
EffectsofencryptedDNS
The implicationsoftypicaloperational models

27· www.nic.at
DNSheads Vienna #5 · public
„Plain“ DNS

28· www.nic.at
DNSheads Vienna #5 · public
DNS overTLS

29· www.nic.at
DNSheads Vienna #5 · public
DNS overHTTPS (typical)

30· www.nic.at
DNSheads Vienna #5 · public
ConcernsregardingDoH
•4 Browser Vendors
•Fewbigpublicrecursorvendors(1.1.1.1, 8.8.8.8,
9.9.9.9)
•Market concentration/ Control?
Pre-configuredpublicrecursors
Example: Mozilla / Cloudflarediscussion
•Media echo (German only, sorry!)
https://Heise.de/-4203225.html(„Die DNS Gruft gehört
ausgelüftet“)
https://heise.de/-4205380.html(„Vom DNS, aktuellen Hypes,
Überwachung und Zensur“)

31· www.nic.at
DNSheads Vienna #5 · public
Implementations
Server, Clients, Tools

32· www.nic.at
DNSheads Vienna #5 · public
DoTClients
https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Implementation+Status

33· www.nic.at
DNSheads Vienna #5 · public
DoTServer Software

34· www.nic.at
DNSheads Vienna #5 · public
DoT(andDoH) publicrecursors
•Google DNS (8.8.8.8)
•Cloudflare(1.1.1.1)
•Quad9 (9.9.9.9)
•CleanBrowsing(various, withFilters)

35· www.nic.at
DNSheads Vienna #5 · public
DoH
•Clients
Mozilla Firefox
Google Chrome
(plus testtools)
•Server Software
https://github.com/facebookexperimental/doh-proxy
https://github.com/curl/curl/wiki/DNS-over-HTTPS#doh-tools

36· www.nic.at
DNSheads Vienna #5 · public
Android 9 –DNS overTLS bydefault
•UsesDNS overTLS ifavailable
on localnameserver
•Falls back tounencryptedDNS
ifunavailable

37· www.nic.at
DNSheads Vienna #5 · public
ExecSummary
•DNS cannowbeencrypted, eithervia TLS orHTTPS
•DNS overHTTPs ismore„disruptive“ thanDNS overTLS
•Public recursorshaveimplementedeither(orboth)
But fewlocalprovidershaveimplementedit(seebelow:-/)
•Browser VendorsareimplementingDNS overHTTPs
Ongoingpolicydiscussionsaroundpre-configurationofrecursors
•Android 9 implementsDNS overTLS *bydefault*
Automaticallyusesitifavailable(seeabove:-/)
Google suggestingtoconfigure„dns.google“ manually
•Windows / MacOS –no„out ofthebox“ solutions–
„Stubby“

38· www.nic.at
DNSheads Vienna #5 · public
nic.at GmbH
Jakob-Haringer-Str. 8/V · 5020 Salzburg · Austria
T +43 662 4669 -34 · F -29
[email protected] · www.nic.at