10 ms·
DNSCrypt – A protocol to improve DNS security
- arkadiyt 10y agoFor all the attention that https gets, I'm amazed how little (relatively speaking) attention plaintext dns gets. If a site is https then even if an attacker is MITM-ing DNS to their own site they presumably won't have a valid cert for the site they're intercepting, although it has happened many times before, and 50% of the internet is still unencrypted. But even assuming that doesn't happen it's still a huge privacy/data leak.
- marcosdumay 10y ago> If a site is https then even if an attacker is MITM-ing DNS to their own site they presumably won't have a valid cert for the site they're intercepting Kinda. It still can add a CNAME there, and make you go into another site for what it has a valid cert.
- JoshTriplett 10y agoA CNAME isn't a redirect; if you add a CNAME record from thing1.example.net pointing to thing2.example.com, the browser still uses the domain name thing1.example.net for certificates, and just does a DNS lookup on thing2.example.com.
- jsmthrowaway 10y agoPut another way, a CNAME literally says the answer for any record type for thing1. is found by querying its canonical name, thing2. They're most comparable to symlinks. There is no data for this label; ask over there in that label. (This is why you can't CNAME the top of a zone, because you need SOA and NS there and CNAME can't coexist with other types. It wouldn't make sense.) In most DNS stacks when an application asks for thing1. the usual way (something like gethostbyname), the resolver side will quietly follow a CNAME answer and resolve thing2. without telling the application anything happened. It's not part of the usual APIs, but that's not to say applications can't find out if desired. Same story with symlinks, where one uses a different API to read the link instead of the target. So for the browser case mentioned, a naive resolver wouldn't even be aware of the CNAME, hence the CN not changing for TLS purposes and the address bar staying the same. No modern browser has a naive resolver, just saying. People trip up on this a lot, just clarifying.
- stonogo 10y agoNone of the commercial entities involved stand to gain from providing encrypted DNS lookups. It would just be one fewer bullet point in their personal-data sales packages.
- davidu 10y agoI do, which is why I drove the creation of DNSCrypt.
- fukusa 10y agoAs far as I understand this doesn't encrypt communication but authenticates it to ensure it hasn't been tampered with. So it's still out in the open. I also don't understand what the benefit over DNSSEC is. Edit: Nvm, DNSSEC still has to trust the validating resolver, DNSCrypt solves this.
- robertcope 10y agodnscrypt is an encrypted channel back to the DNS server. They can tell it's going to OpenDNS because of the IP address, but the cannot see the payload.
- fukusa 10y agoGood to know, couldn't find that on their website.
- lsjdfkljdfwkwdf 10y agoWhy would you forward to opendns with a local dnssec enabled resolver? Just implement dnssec and run a proper dns infrastructure. No DNS operator reading HN? This thread is full of misinformation.
- sliken 10y agoRight, but what advantage does DNSCrypt have over a local DNSSEC aware resolver? If you can't trust the local resolver you have more serious problems than DNS.
- bluejekyll 10y agoAs others have stated, DNSSec only solves for authenticity of the data, not privacy. DNSCrypt has been designed to both authenticate, authorize and encrypt the channel. Using both in conjunction means that you have a private connection with authenticated data coming from the upstream resolver. Now the obvious issue is you don't know what the upstream resolver does with that...
- tptacek 10y ago
- openasocket 10y ago> But even assuming that doesn't happen it's still a huge privacy/data leak. Meh, if an attacker can sniff your packets, they can already tell what IP addresses you're talking to, which certainly narrows down which domain names you're talking to. I'm far more concerned with the possibility of intercepting or hijacking http traffic. Sure, an attacker could do this with any non-TLS connection in theory, but it's way way easier to hijack that one DNS response and change the A record.
- wslh 10y agoThe IP address does not always tell you to which site you are connecting to. Many different sites can point to the same IP, more when services like Cloudflare are being used.
- 0xxon 10y agoMost clients nowadays sent the "server name indication" (SNI) TLS extension though, which contains the name of the site you are connecting to. The extension is sent unencrypted, even when using TLS 1.3. So everyone sniffing the traffic can tell where you are surfing to, even without DNS.
- tedunangst 10y agoI don't think many people know this, or at least never think about it. "https means encrypted, that means secret."
- MertsA 10y agoAnd in order to support clients that don't support SNI, you need to have one domain per IP address so an attacker can just try and connect to that IP and then look at the SSL cert that's sent back to get the domain name.
- pixl97 10y ago>And in order to support clients that don't support SNI There is little reason to support clients that do not support SNI. By supporting those clients you are likely putting your entire encrypted infrastructure at risk. SSL3 should be disabled by now. XP clients are legacy and should be taken out back and shot. Older mobile phones are enormous security risks.
- cptskippy 10y agoOddly they never say that DNSCrypt encrypts your DNS traffic, just that it's cryptographically secure. The OpenDNS page on DNSCrypt does state that traffic is encrypted. Confusing...
- snowpanda 10y agoWhen you use a VPN (OpenVPN) is there still a way to use DNSCrypt? My VPN provider seems to force their own DNS. Tried OpenVPN config manual pages to no help.
- sanehatter 10y agoManually updating you network settings after connecting will do the trick. Use --script-security and --up if you'd like to script the DNS update and have it run everytime after you connect
- coniptor 10y agoYou need to upgrade to OpenVPN v 4.0 or greater. Then investigate the option string below: pull-filter ignore "dhcp-option DNS"
- coniptor 10y agoCorrection: 2.4.0 or greater.
- gwu78 10y agoI prefer http://curvedns.on2it.net http://curvedns.on2it.net This was the original. Other than having to modify their ksh script, it is painless to set up. In my opinion, authoritative nameservers, and therefore DNSCurve forwarders like CurveDNS, are more important than recursive resolvers/caches such as OpenDNS and DNSCrypt. A recursive resolver should be authoritative for nothing. They are middlemen. Companies that offered this "service", such as OpenDNS, had to pander to advertisers, or were run by advertising companies themselves, e.g., Google. The "rules" of DNS are easily broken. This applies to caches. One does not need to look very far to find resolvers that someone has designated as "authoritative". dnsq: "weird ra". This often means an open resolver IME. A while back some companies including the ones named above if I am not mistaken were pushing for extensions in DNS to put at least part of user IP addresses into DNS packets so cache operators could track them. The reason? Advertising. (Although maybe they would cite other reasons.) Not sure what ever happened with that. BIND had started to implement it. Thankfully djbdns will never support this garbage. This kind of nonsense is why I cannot get excited about the latest extensions to internet protocols anymore. Too often they are for the benefit of web companies and advertisers, not users. The "encrypted DNS revolution", if it ever comes, is not going to be initiated by companies running recursive resolvers. (Unless they also run authoritative nameservers.) Note: When the user runs their own cache on localhost there is no need to determine nearest POP.
- papaf 10y agoIt quite easy to setup DNSCrypt with OpenNIC[1] and then a lot of the downsides that you mention go away. Here is some background and setup instructions: https://markbrown778.wordpress.com/2014/08/08/dns-privacy-using-opennic-and-dnscrypt/ https://markbrown778.wordpress.com/2014/08/08/dns-privacy-us... [1] https://www.opennicproject.org/ https://www.opennicproject.org/
- MertsA 10y ago>The reason? Advertising. Or the ability to accurately direct users to the nearest POP.
- bluejekyll 10y ago
- tankenmate 10y agoThe default port of 443 is somewhat bizarre, it's almost guaranteed to conflict on a server. They could have applied to IETF / IANA for port 253 (it currently reserved / unassigned).
- INTPenis 10y agoAs long as you can set it on both ends it doesn't really matter. It's actually better for clients that the servers listen on 443. If it conflicts then that means you're putting multiple services on your server. Don't. Personally I've put dnscrypt on my regular dns servers, they only listen on 53.
- _jal 10y agoIt is intentional. There are creepy providers out there that really want you to use their DNS so they can surveil/gaslight you, so they block or redirect traffic to well-known DNS ports. Putting it on 443 forces a choice between letting people manage their own DNS or blocking every store on the planet.
- tresni 10y agoDefinitely this. Also lots of weird hardware/software out there that tends to discard packets it can't understand (i.e. this doesn't look like a DNS packet going to port 53, let's drop it.) 443 generally works as it is expected to be encrypted by most middleware. I would also say that most DNSCrypt-capable providers I know of can also do it on port 53.
- hannob 10y agoJust pointing out, there's now a standardized way to do encrypted DNS via TLS: https://tools.ietf.org/html/rfc7858 https://tools.ietf.org/html/rfc7858 Probably more likely that that one will succeed. DNScrypt has been around for a long time and hasn't really seen any significant adoption.
- INTPenis 10y agoWhy are you being downvoted? https://kb.isc.org/article/AA-01386/30/DNS-over-TLS.html https://kb.isc.org/article/AA-01386/30/DNS-over-TLS.html This article shows how to set it up according to ISC with stunnel. I was hoping for a native implementation in Bind but maybe it's coming.
- Tepix 10y agoBind is still a mess after all these years. It seems to me like I get an update every other week that fixes a trivial DoS that hits an unchecked assertion. bind is a software that is only 80% finished. The missing 20% that take 80% of the time will only be implemented via CVEs.
- INTPenis 10y agoWhat's a good alternative open source DNS that supports views and DDNS updates?
- _jal 10y agoTake a look at PowerDNS. I use it for my day job and it causes very little trouble. I can only recall one annoying bug and one security issue in about the last two years. It also has an OK, if not great, API for integrating with, e.g., your provisioning system, inventory system, etc.
- 72deluxe 10y agoDo they need help? Or a more rigorous test suite? Or pushing more errors to the compiler to trap these kind of things?
- singularity2001 10y agoThis can't be repeated often enough: If you have some ssh server somewhere (who hasn't), you can very easily create a 'VPN over ssh' by calling: sshuttle -r user@remote_host 0.0.0.0/0 --dns It works nicely together with dnscrypt
- Tepix 10y agoThis only moves the problem slightly. You then have to trust the network surrounding your SSH box.
- _jal 10y agoIt does more than that. AWS or Linode are not, to my knowledge, deploying the sort of intrusive, ad-centric deep packet inspection that Comcast, for instance, is. It is also a layer of separation from your actual IP address, which is worth less than it may seem at first, but helps. Of course, that could change if everyone starts using homebrew VPNs. That's a bit hard to imagine, but stranger things and all that.
- theveloped 10y agoThis looks like a great option to validate the seed IP's used to connect to the bitcoin p2p network have not been tampered with. As would be possible with a plain text DNS lookup.
- cryptolect 10y agoIn case nobody has pointed it out yet. By default, with Ubuntu's dnscrypt-proxy package - the resolver is "cisco". That's right, you're encrypting your DNS traffic just so Cisco can read it... There are alternate resolvers but most people wouldn't change it out of the box.
- feld 10y agoCisco doesn't log the traffic. Don't believe me, just ask davidu who founded OpenDNS and resides at Cisco.
- mike-cardwell 10y agoYour default setup probably involves using your ISPs DNS resolver, which leaks your DNS queries to your ISP. Your ISP can also see which IP addresses you are connecting to and which website hostnames you're visiting thanks to unencrypted HTTP, and to SNI. You could re-point your DNS resolver to one of the public DNSCrypt resolvers, but by doing so, all you're doing is making it so that another party gets to see your traffic. Your ISP still knows what you're doing, but now your DNS provider knows too. From their own front page: Please note that DNSCrypt is not a replacement for a VPN, as it only authenticates DNS traffic, and doesn't prevent third-party DNS resolvers from logging your activity. By design, the TLS protocol, as used in HTTPS and HTTP/2, leaks websites host names in plain text, so DNSCrypt is not enough to hide this information.
- pixl97 10y ago>Your default setup probably involves using your ISPs DNS resolver You also have to make sure your ISP isn't transparently capturing your DNS packets, which they probably are.
- arca_vorago 10y agoI'm a bit rusty, and not to knock DNSCrypt or change the subject, but in the past I did a lot of reading and came to the conclusion that DNSCurve is the thing we should be pushing to adopt instead, due to some inherent flaws in DNSCrypt/DNSSEC. To me, DNS is the current primary weakness of the internet in it's modern form, mainly due to centralization. I think we should also be focused more on secure connection techniques independent of the DNS system.
- tptacek 10y agoDNSCrypt is unrelated to DNSSEC.
- arca_vorago 10y agoWasn't saying it was, perhaps I could have worded that more carefully.
- riquito 10y agoIs there any plan to let smartphones, both Android and iOS, tu support changing the DNS at system level without rooting the device? So that it works with cellular data and that you don't need to change it for every wifi?
- WadeJohnson 10y agoI am waiting for this as well.