News for hackers. Stuff that matters.
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by hannob on Thursday November 19, 2020 @08:10AM (#25149097)
> Operating systems can and should implement DoH

I see a comment like this basically every time something about DoH comes up.

What I haven't seen: A plan how this should be implemented, a proposal to OS vendors and developers, ideally with patches.

This raises a few questions. How should the OS decide which server to use? It obviously can't be DHCP, because that's not a secure thing to begin with. How does this interact with things like captive portals if you have a disconnect between the DNS functionality and the gui application? Do you have good answers for these?

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by tremon on Thursday November 19, 2020 @11:23AM (#25151033)
It obviously can't be DHCP, because that's not a secure thing to begin with

Why not? DHCP is supposed to be authoritative for the network you're connected to. If you don't trust that network, you should probably also not be using its advertised gateway. Where does that leave you?

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by StillBored on Thursday November 19, 2020 @11:30AM (#25151112)
"you should probably also not be using its advertised gateway"

Why not? Just make sure to use a VPN/etc to access services over the gateway.

I mean, this is the default case for everything going over the internet. Do you trust every router in the path?

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by iso1631 on Thursday November 19, 2020 @12:52PM (#25152155)
Fine, then set your own DNS server in your network settings.
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by kelnos on Thursday November 19, 2020 @09:07PM (#25156667)
How do you know the network you're connected to isn't intercepting DNS requests and returning whatever it wants?
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by iso1631 on Friday November 20, 2020 @05:55AM (#25159237)
Set your OS to use your DOH server of choice.

Personally when my laptop is connected to a network on a high latency link to the internet, I'd rather it used the local caching server rather than one half a continent away. Clearly if I don't trust that network provided DNS server I'll tunnel everything out to a trusted network, or I could specify a DOH.

I have no practical issue with DOH if it were implemented at the OS level and had standards around how to distribute recommended settings (just like my dhcp server distributes a recommended gateway, recommended ntp server, recommended tftp boot server, etc).

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by gsich on Friday November 20, 2020 @12:19AM (#25157519)
Use DNSSEC.
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by tptacek on Friday November 20, 2020 @03:37AM (#25158482)
DNSSEC doesn't do that at all. DNSSEC does no transaction encryption. It allows full recursive resolvers --- the kind virtually nobody runs on their own machines --- to validate signatures on the tiny minority of domains (virtually none of them among the most popular on the Internet) that have opted in to DNSSEC over the last 10 years. Note that even in the unusual corner case where you're looking up a name that's actually signed with a DNS recursor that actually verifies DNSSEC signatures, the network between you can still snoop on all your DNS requests, because DNSSEC is bad.

If you're worried that your network upstream is intercepting your DNS requests (and if you're in the US on a mainstream ISP, you should be), this is the problem DoH is designed to solve, and it does so quite effectively.

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by gsich on Friday November 20, 2020 @08:55AM (#25160448)
DoH does not solve the problem that the resolver can just feed you wrong data. So if you want integrity for your DNS records you need DNSSEC. DoH/DoT does not solve that.
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by tptacek on Friday November 20, 2020 @01:40PM (#25163442)
DoH deliberately doesn't touch that problem. In 25 years of work, DNSSEC hasn't put a dent in it --- look at the stats on which zones are signed (and note that most of those signatures are security theater, done automatically by registrars).

The fact is that there's nothing you can do to authenticate DNS records, and turning some silly "DNSSEC" feature on in your own stack won't do anything but make you feel better, because DNSSEC simply doesn't have meaningful adoption. However, enabling DoH does in fact immediately protect you from attacks that really do happen, like ISPs monetizing your DNS.

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by gsich on Friday November 20, 2020 @04:04PM (#25164920)
>DoH deliberately doesn't touch that problem.

Exactly. That's what I said.

The problem is that DoH is not the solution, as you just change trust from resolver A to resolver B. With no indication that B is better than A.

If you fear that your ISP is selling your data you need to change your ISP. The ISP always know what sites you are accessing, regardless of DNS. DNS might be easier than SNI or IP lookups but the danger is still the same. Right now it might actually help but once encrypted DNS gets enough traction those methods will also adapt. (Assuming that ISPs still do that practice)

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by tptacek on Friday November 20, 2020 @04:14PM (#25165039)
It's funny that you've managed simultaneously to argue that DNS monetization (which is ubiquitous) is both a reason to immediately change ISPs, and also not a big deal because ISPs can snoop on you anyways.

While I have strong normative beliefs here, I'm mostly just posting descriptively. DNSSEC isn't happening. Enabling DNSSEC in your local configuration won't meaningfully protect you, because you depend on the security teams of large companies to also participate in the system, and DNSSEC has been more or less rejected by the market. Meanwhile: there are specific problems that DoH does protect against, it's easy to roll out, and doesn't depend on the Stripe security team changing their mind about DNSSEC --- so DoH is on a path to become universal, even as DNSSEC whithers.

(I invite the curious to test my reporting out with the `host -t ds foo.com` command, for arbitrary values of "foo").

I know I sound like a sore winner about this, and I guess I sort of am, but it is a little alarming that there are still currents of sysadmin wisdom telling people to go out of their way to opt into DNSSEC, in the belief that it will somehow protect them from any kind of real attack. In reality: corrupted DNS records overwhelmingly come from phished registrar accounts, not the elaborate, geographically-specific DNS cache corruption attacks DNSSEC was envisaged to deal with. I think it's worth being plain with people about this stuff.

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by gsich on Friday November 20, 2020 @06:03PM (#25166166)
>It's funny that you've managed simultaneously to argue that DNS monetization (which is ubiquitous) is both a reason to immediately change ISPs, and also not a big deal because ISPs can snoop on you anyways.

Of course. If you know that your ISP is doing that, you change to one that is not doing it. It's not ubiquitous. Besides that, what makes you think that your DoH provider (if not your ISP) is also not selling that data?

You think that DoH/DoT is somewhat a replacement for DNSSEC but it's not. Both are independent. Doesn't matter how much domains have it.

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by akerl_ on Friday November 20, 2020 @06:41PM (#25166498)
How do I know if my ISP is doing that? And which ISP do I change to? Where I live, there’s effectively a single available ISP unless I don’t mind dropping down to single digit mbps.

Seems more plausible to just run DoH for my DNS and then not worry about my ISP snooping on my DNS requests.

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by iso1631 on Friday November 20, 2020 @10:07AM (#25161106)
DOH to your trusted resolver which you run yourself (which uses DNSSec upstream)

Shame that I have 20 applications on several different users on two dozen different machines to configure

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by johannes1234321 on Thursday November 19, 2020 @05:35PM (#25155181)
Then you need to know your VPN's endpoint's IP address and can take DNS info from your VPN's config.
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by gsich on Thursday November 19, 2020 @09:46AM (#25150015)
The answer is: DHCP. In an environment where a captive portal is active you can ensure that only one DHCP server is running in your segment with no rogue DHCP servers. So telling a client with DHCP that a captive portal is active, and with URL to show it, is sane. This would eliminate a lot of stupid probing done by clients. Same goes for announcing DoT/DoH servers that way.

The same applies for your "home" environment. Since you usually don't want to run multiple DHCP servers, this would also work there.

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by LinuxBender on Thursday November 19, 2020 @09:54AM (#25150102)
And it isn't like anyone needs to modify DHCP standards to support this. Just use any of the "options" text to add DoH/DoT, the same way browsers are advised of PAC URL's today. Only the clients would need updates to know how to use this, and adding the capability to an OS should be fairly easy to implement.

  option wpad-url code 252 = text;
  option wpad-url "http://10.10.10.10/proxy.pac\n";
I'm sure there is a clean way to overload or augment this capability to extend it to DoH/DoT.
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by gsich on Thursday November 19, 2020 @09:57AM (#25150130)
I did something similar for a PoC at my university. It worked, no surprise there. All you need to do is have a another client script in Debian to configure your resolver.
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by LinuxBender on Thursday November 19, 2020 @02:29PM (#25153381)
I should add that DoH developers should reach out to ISC for comment on DHCP, to get an idea what the cleanest method would be to implement DoH/DoT in DHCP that would work for 90%+ of DHCP implementations.
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by gsich on Thursday November 19, 2020 @06:33PM (#25155677)
https://datatracker.ietf.org/group/add/documents/

There is some work regarding this.

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by StillBored on Thursday November 19, 2020 @11:25AM (#25151054)
Isn't this the trusted network dialog in windows/etc when you connect to a new network?

If you don't trust the network, then the OS should be tunneling to a trusted one. If you do trust it then it can go ahead and use the DHCP/etc provided name servers.

After all it can decide to enable/disable access to services (windows filesharing for example) based on this, there isn't any reason it can't decide to trust the local nameserver too.

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by detaro on Thursday November 19, 2020 @08:31AM (#25149242)
The questions also apply to browser implementations, don't they?
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by hannob on Thursday November 19, 2020 @09:20AM (#25149688)
Some do, some don't. For example the captive portal issue, browsers can try to connect without DoH to a captive portal test page and provide a special non-DoH login tab. You can't do that on the OS level. You could create some interaction between the browser and the OS, but that's nontrivial and needs a solution.
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by Spivak on Thursday November 19, 2020 @09:33AM (#25149855)
Sure you can! iOS, Android, and GNOME/NetworkManager just open up a webview to handle the portal.

I’m sure others do too I just can’t say for certain.

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by zinekeller on Thursday November 19, 2020 @09:48AM (#25150040)
Windows: Network Connectivity Status Indicator (NCSI) will ping www.msftncsi.com on older versions (8.1 and lower) or www.msftconnecttest.com on newer versions (10), and then prompts to open the web browser. Since IE/Edge will be always there, it works.

macOS: same as iOS (a dedicated window pinging www.apple.com).

Firefox: Detects detectportal.firefox.com and asks the user if the want to access the captive portal.

Android: Detects connectivitycheck.android.com on Android 5 and connectivitycheck.gstatic.com on Android 6+. I don't know if it applies to all phones, but I'm sure (that except for phones on Android One or Nexus/Pixel) Samsung also does this for phones outside of China.

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by detaro on Thursday November 19, 2020 @09:34AM (#25149870)
OSes do at least some captive portal detection and prompting already too, but true, that might need additional work, I'm not familiar enough with the details.
Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by iso1631 on Thursday November 19, 2020 @12:57PM (#25152216)
> What I haven't seen: A plan how this should be implemented, a proposal to OS vendors and developers, ideally with patches.

Windows has support

https://techcommunity.microsoft.com/t5/networking-blog/windo...

Re:Mozilla DNS over HTTPS (DoH) and Trusted Recursive Resolv... by megous on Thursday November 19, 2020 @06:16PM (#25155520)
It's already implemented for years. Personally I'm using dnscrypt-proxy for system level DoH.

You can put the proxy anywhere on the network and set up DHCP to point the clients to this proxy.