# Gibst du mir deine Nummer oder muss ich DNS fragen Pentaradio vom Oktober 2019 News: * https://www.sueddeutsche.de/muenchen/muenchen-prozess-telefonica-sim-karte-rabatt-1.4589043 * Zwiebelfreunde 2.0: [Hausdurchsuchung bei Betreiber eines DHT-Bootstrap-Node für Tox (Messenger)](https://blog.fefe.de/?ts=a3695410) * mal wieder völlig inkompetente Polizei: Als ob der Gelbe-Seiten-Verlag nach Mitschnitten meiner Telefonate durchsucht wird. Schließlich kennen Sie meine Telefonnummer! * Update: [Die Polizei hat offenbar eingesehen, dass das Quatsch war.](https://blog.fefe.de/?ts=a3595c3e) * [US Law Enforcement Traces Bitcoin Transfers to Nab ‘Largest’ Child Porn Site](https://www.coindesk.com/us-law-enforcement-traces-bitcoin-transactions-to-nab-largest-child-porn-site) * soviel zu "anonymes Zahlungsmittel" * https://media.ccc.de/v/28c3-4746-en-bitcoin_an_analysis * https://media.ccc.de/v/35c3-9716-du_kannst_alles_hacken_du_darfst_dich_nur_nicht_erwischen_lassen * https://sfdvw.de/blog/2019-10/sfdvw-85-mobile-messenger/ * Unix wird heute 50! https://www.bell-labs.com/unix50/ -- Hey, I just wanted to write that! :) * Unix Oral History Project: http://doc.cat-v.org/unix/oral-history/ * http://www.facesofopensource.com/ * https://thomas--schaefer.de/HochschuleninDeutschlandmitinternet.html ## Thema: DNS - Anlass: DNS over HTTPS - Will man das? Kann man gut in drei Akten abhandeln: # 1. Was ist DNS? (kann man vielleicht kurz halten mit Verweis auf die [frühere DNS-Folge von 2017](https://c3d2.de/news/pentaradio24-20171226.html)) 9.9.9.9 + 1.1.1.1 https://de.wikipedia.org/wiki/Domain_Name_System Telefonbuch des Internets - 1983 von Paul Mockapetris entworfen und in RFC 882 und RFC 883 (RFC = Request for Comments) - von RFC 1034 und RFC 1035 abgelöst - 1994 bis 1996 war Mockapetris Vorsitzender bei der Internet Engineering Task Force (IETF) - Ablösung der fehleranfälligen hosts-Datei 2009 Zugangserschwerungsgesetz: https://www.zdnet.de/41500236/dns-erfinder-paul-mockapetris-implementiert-die-internetzensur-in-deutschland/ verteilte Datenbank mit baumförmiger Struktur Vorteil: IP Adresen können geändert werden 53/UDP - UDP ist ein verbindungsloses, nicht-zuverlässiges und ungesichertes wie auch ungeschütztes Übertragungsprotokoll. 53/TCP 853/TCP (nur mit TLS, RFC 7858) 853/UDP (nur mit DTLS, RFC 8094) A(nchor) AAAA MX PTR (Reverse Lookup ) * dig +trace +additional -t PTR 85.144.99.193.in-addr.arpa. * ;; Received 148 bytes from 193.99.145.37#53(ns.heise.de) in 4482 ms TXT SOA TTL NS CNAME SSHFP seit März 2004 deutsche, liechtensteinische, österreichische und schweizerische Domains (.de, .li, .at und .ch) mit Umlauten registriert ## DNS-Resolver - resolven und cachen (lösen auf und merken es sich) ## Dynamisches DNS DSL IP Change blabla.dyndns.org ### Schwachstellen DNS: DNS-Spoofing / Cache Poisoning DDoS-Angriff auf Nameserver DNS-Amplification-Angriff "Zone Walk" Zone Transfer AXFR # 2. Verschlüsseltes DNS (DNSSEC,DANE, DoT, DoH) Die Schildkröte tanzt: http://www.kame.net/ ## DNSSec Domain Name System Security Extensions https://en.wikipedia.org/wiki/Domain_Name_System_Security_Extensions https://de.wikipedia.org/wiki/Domain_Name_System_Security_Extensions set of extensions to DNS which provide to DNS clients (resolvers) cryptographic authentication of DNS data, authenticated denial of existence, and data integrity, but not availability or confidentiality. DNSSEC specifications RFC 4033, RFC 4034, and RFC 4035 * maintaining backward compatibility * braucht dennoch EDNS um >512 UDP zu sein und für DO BIT * RFC 3833 Threat Analysis of the Domain Name System (DNS) * 1999 im RFC 2535 unbrauchbar * 2005 eine komplette Neufassung * DNS cache poisoning * protected zones are digitally signed * including text records (TXT) and mail exchange records (MX) * Certificate Records (CERT records, RFC 4398), * SSH fingerprints (SSHFP, RFC 4255), * IPSec public keys (IPSECKEY, RFC 4025), and * TLS Trust Anchors (TLSA, RFC 6698). * all DNSSEC responses are authenticated but not encrypted * Mittlerweile sind 90 % der Top-Level-Domains mit DNSSEC signiert * mit DNSSEC auch beweisen, dass ein bestimmter Name nicht existiert dig @8.8.8.8 mailbox.org IN A +qr +dnssec dig @8.8.8.8 mailbox.org DNSKEY +qr +dnssec New DNS Record Types: **RRSIG** (resource record signature) Contains the DNSSEC signature for a record set. DNS resolvers verify the signature with a public key, stored in a DNSKEY record. **DNSKEY** Contains the public key that a DNS resolver uses to verify DNSSEC signatures in RRSIG records. **DS** (delegation signer) Holds the name of a delegated zone. References a DNSKEY record in the sub-delegated zone. The DS record is placed in the parent zone along with the delegating NS records. **NSEC** (next secure record) Contains a link to the next record name in the zone and lists the record types that exist for the record's name. DNS resolvers use NSEC records to verify the non-existence of a record name and type as part of DNSSEC validation. **NSEC3** (next secure record version 3) Contains links to the next record name in the zone (in hashed name sorting order) and lists the record types that exist for the name covered by the hash value in the first label of the NSEC3 record's own name. These records can be used by resolvers to verify the non-existence of a record name and type as part of DNSSEC validation. NSEC3 records are similar to NSEC records, but NSEC3 uses cryptographically hashed record names to avoid the enumeration of the record names in a zone. **NSEC3PARAM** (next secure record version 3 parameters) Authoritative DNS servers use this record to calculate and determine which NSEC3 records to include in responses to DNSSEC requests for non-existing names/types. Test: https://en.internet.nl/connection Server Test: https://dnssec-debugger.verisignlabs.com/ ## DANE DNS-based Authentication of Named Entities (DANE) https://de.wikipedia.org/wiki/DNS-based_Authentication_of_Named_Entities X.509-Zertifikate mit DNS-Einträgen verknüpft und per DNS-Security Extensions (DNSSEC) gesichert. +eigene Zertifikate auszustellen, ohne auf eine bestehende Zertifizierungsstelle DNS Resource Record „TLSA“ Zertifikat im PKIX-Format, dessen Fingerprint oder öffentlichen Schlüssel * **Service Certificate Constraints**: Der Client wird aufgefordert, nur ein definiertes Zertifikat zu akzeptieren. Das Zertifikat selbst muss die Prüfung auf Vertrauenswürdigkeit bestehen. * **Domain-Issued Certificate**: Der Client wird aufgefordert, dem im TLSA-Record referenzierten Zertifikat zu vertrauen. Eine Prüfung der Vertrauenshierarchie wird nicht durchgeführt. * **Trust Anchor Assertion**: Der Client wird aufgefordert, für die Validierung des Zertifikates einen definierten Trust Anchor zu benutzen. Das Zertifikat muss seine Vertrauenskette bis auf diesen „Trust Anchor zurückführen“ und die Zertifikatsprüfung bestehen. RFC 6394 — Konzept, 2011. RFC 6698 — Hauptdokument, 2012. RFC 7218 — Ergänzung, 2014. RFC 7671 — Ausprägung für TLS, 2015. RFC 7672 — Ausprägung für SMTP, 2015. RFC 7673 — Ausprägung für TLSA, 2015. ## DoT Transport Layer Security (TLS) protocol https://en.wikipedia.org/wiki/DNS_over_TLS RFC 7858 and RFC 8310. Port 853 (can't hide in 443 Traffic) TLS mean that the original protocol does not change payload packets are just transport in a "secure" manner uses TCP as the basic connection protocol and layers over TLS encryption and authentication Client often opt in * Android clients use DNS over TLS by default. * Windows mittels Stubby * Linux systemd-resolved ServerSide: DNSDist PowerDNS Bind (nur mit Stunnel) Unbound since Jan 2018 ## DNS over HTTPS Domain Name System (DNS) resolution via the HTTPS protocol * seit 2018 von Google und Mozilla * Port 443 (DNS over HTTP over SSL/TLS) * RFC 8484 (October 2018) by the IETF. * MIME type application/dns-message / application/dns-json * verschlüsselt DNS mittels HTTP/2 and HTTPS * HTTP/2 server push * mehr Privatsphäre, weniger Manipulation * gegen Man in the Middle * Performanceoptimierung ### Anwendungsfälle: * Parental controls and content filters * CDN Localization ### Privacy: Let's recap by looking at how the recursive name server from our earlier example resolves the IP for www.example.com: It asks one of the Internet root servers: Question: "I want to visit www.example.com, do you know where it is?" bzw. DNS Query Name Minimization Question: "Do you know the nameservers for .com?" Answer: "No, but here are the nameservers for .com. Try your luck there!" Then it asks the .com name servers: Question: "So, can you tell me www.example.com's IP address?" Answer: "You should ask the example.com name servers." Finally, it asks the example.com name servers: Question: "What is the IP of www.example.com?" Answer: "The IP is 123.123.123.123" ### Disadvantages: * A Single Point of Failure (+HST) * Same Origin Policy (SOP) vs. Cross-Origin Resource Sharing (CORS) * allows you to access the data anyway, even though the origins don't match * https://dzone.com/articles/pros-and-cons-of-dns-over-https * attackers could read the response and gain important information about your internal network. * https://www.netsparker.com/blog/web-security/vulnerable-web-applications-developers-target/ * 127.1 Beispiel :) * application/dns-message raw DNS packet in the HTTP response * application/dns-json json overhead * Cloudflare! * Overhead ### Betriebssysteme: * Chrome: https://www.zdnet.com/article/how-to-enable-dns-over-https-doh-in-google-chrome/ * Firefox: https://support.mozilla.org/en-US/kb/firefox-dns-over-https * Ubuntu: Stubby: https://www.linuxbabe.com/ubuntu/ubuntu-stubby-dns-over-tls * Windows 10: https://simplednscrypt.org/ * Edge ??? * Android 9+ * MacOS: https://gist.github.com/soderlind/6a440cd3c8e017444097cf2c89cc301d * OpenWRT: https://openwrt.org/docs/guide-user/services/dns/doh_dnsmasq_https-dns-proxy * https://1.1.1.1/help Online Check: https://www.cloudflare.com/ssl/encrypted-sni/ Quote: https://en.wikipedia.org/wiki/D%27oh! > "D'oh!" was first added to the Oxford Dictionary of English in 1998 as an interjection with the definition "(usually [in a manner] mildly derogatory) used to comment on an action perceived as foolish or stupid."[4] > > In 2001, the word "d'oh" was added to the Oxford English Dictionary;[10][11] The definition given is:[10][12] > > Expressing frustration at the realisation that things have turned out badly or not as planned, or that one has just said or done something foolish. Also (usu. mildly derogatory): implying that another person has said or done something foolish (cf. DUH int.). # 3. Datenschutzbedenken bei DoH (Zentralisierung bei Cloudflare und Google) Encryption by itself does not protect privacy, encryption is simply a method to obfuscate the data. Wozu den ganzen quatsch? :D Link-Sammlung: - [How to avoid DoH in Firefox](https://www.dns.cam.ac.uk/news/2019-09-19-dont-use-application-dns.html)