DNS-over-HTTP/3 in Android
security.googleblog.com
security.googleblog.com
Pretty much everything that can be abused, is. Third party cookies, DNS interception by ISPs, monitoring (and selling) your Web activity and so on. You can really see the Internet was designed for simpler, more innocent times.
Take the trash fire that is IPv6 with its stupidly large address space (ie 128 bits). Not 48 or even 64 bits. Why? To give users a /64 address space. Why? Because MAC addresses were 48 bits and the IPv6 designers thought they'd "solve" internal network addressing by just using the MAC address in the /64 bit space.
Obviously we don't do that because it's a privacy issue.
So it's inevitable that DNS goes the SSL route. It's sad that it comes to that but here we are.
I really wish IP had a guaranteed connectionless delivery option (ie TCP without the connection handshake). Yeah I know there are hacks to kind of achieve this.
Likewise, a lot of CDNs and big sites use extremely short TTLs for load-balancing and other reasons. DNS lookup can significantly degrade application performance to the point people have done research on the speed up benefits of keeping a warm DNS cache. Adding SSL to the mix isn't going to improve things.
If absolutely all collection of Pii was made illegal, or perhaps even all sale of any data based upon it, be it anonomized or not, things would rapidly change.
Even better to make illegal all targeted marketing, based upon stored data or info about a user.
Adtech would still exist. If you visit a reddit about showers, show shower ads. You don't need to know a single thing, except the page currently visited is about showers... so show shower ads.
All of it, massive issues with our democracies, with spying, with tracking, with price fixing, all of it comes back to, what is now, a purely evil industry. User tracking.
Take the profit away from all collectable data about a user, and watch things improve fast.
I see a huge risk in centralising DNS records resolvers. Being able to set a default DoH resolver for all your devices is adding another layer of tracking after centralised WiFi location resolvers. Like browser choices, resolver choices need to be displayed to the user at setup. We need a competition on trust rather than on convenience.
Hardware physically pushes bits on a medium and gets them off. Hardware is the only layer that can even try to provide any guarantees about those bits, since it's the one physically handling them. Anything above isn't "real" until that point.
But it can't--after all, power may go out, your cat may chew on the Ethernet cable, your ISP cuts you off because your bill is unpaid, etc.
Kinda like the same way your filesystem really wants to treat the underlying storage devices as reliable, but does so at its peril because when a drive wants to die, it's going to die and you're not going to stop it. So you put layers between the high-level filesystem and low-level devices to abstract it.
IP is an internetworking protocol that enables routing. Routing is supposed to be where "RAID" for Internet is supposed to live - ideally there is one global Internet, not millions of balkanized mini-Internets behind NATs, and robust networks would have working multiple routes out of their network, and those routes would be known to all hosts on that network and easily be communicable to adjacent networks. So your path to a given IP could take one of many, and that is what happens between service provider networks.
DNS does suck, we could go back to passing hosts files around. Essentially that's what's happening in reverse with ad-blocklists.
Today's Ethernet/WiFi networks don't use the space very effectively, but IP will be with us for a very long time, and those bits are reserved for future innovation at the network edge.
IPv6 has a lot of problems. Primarily it solves non-problems and doesn't solve actual problems (other than address space). The actual problems with IPv4 are:
1. Lack of sufficient addresses; and
2. Roaming.
It's actually a step backwards for IP portability too. This too is another example of solving a non-problem (ie routing of random address blocks).
The user /64 space was specifically done to be large enough to fit a MAC address, which we never ended up doing. Ports are somehow deemed bad too.
So with IPV^ we haven't gotten away from the need for NATs, we have a ridicously large address space and then waste half of those bits.
This is all classic Second System Syndrome stuff.
Hosts get a stateless IPv6 address, no running out of leases, no DHCP service that's painful to make redundant, no expired leases when the DHCP server is down, etc. I consider that a win.
Also with so many IPs, each client can grab a few, and rotate them, so facebook doesn't see the same IP as twitter, etc. Nor can you assume that connecting to facebook today will be from the same IP as facebook tomorrow.
So your MAC related IP never need to be shared with the internet, but can be used to accept incoming connections, for those that know the IP, or know the DNS to look up the IP. For those that really want DHCP you can have that as well with DHCPv6.
IPv6 also removes the need for a NAT, all my /60 of IP addresses are visible to the internet, nothing gross like the various ugly hacks for connection forwarding, tunneling, and various weird unreliable technologies trying to get past consumer NATs.
IPv6 seems so much saner than IPv4. You can autoconfigure IPs and setup a firewall for any restrictions you want to make. I can share files gasp without dropbox, share photos without a photo hosting site, remotely open/close/check my garage door without depending on some few $ a month cloud service, remotely view my home security cams, etc.
Generally I think of the normal IPv4 provided single IP+NAT as a crippled consumer only connection that forces the use of someone else's service/cloud for even the most simple of things.
I think one can say in general that if we had of stuck to only increasing the address field size, and not changed a bunch of other things between IPv4 and IPv6 we could have gotten there a lot quicker and be mostly through the transition.
Hindsight is of course everything.
Do you have any examples of things that would speed the transition if left unchanged?
I'd much rather have 2^68 IPs that I can sprinkle over as many devices as I want than a single IPv4 that makes p2p hard, makes services hard, and requires the use of either NAT or tons of port forwarding.
It sounds crazy today, but this is how it used to be with IPv4 back in the day.
For instance at my first job, every employee's computer (Sun SPARCstations) and every server in the building was directly on the internet with a routable IP address. No firewalls in sight, no NAT.
sendmail ran on every box, so incoming email was handled directly by your own workstation, from anywhere in the internet. So my email address was name@myhostname.company.com (we did have aliases and forwarding so name@company.com also worked).
I ran FTP server and mailing lists and (slightly later) web sites from my workstation. This was peak decentralized internet and a wonderful time.
It's good because it enables future innovation at the network edge. I don't know what that will look like, but it's better to have too much freedom than too little.
> Roaming
https://en.wikipedia.org/wiki/Locator/Identifier_Separation_... is an interesting solution to the roaming problem, though development seems less active than it once was.
In any case, it's easier to build this sort of technology when you're not fighting for scraps of address space.
Does LISP allow you to achieve the same goal but in the open internet?
https://datatracker.ietf.org/doc/html/draft-iab-case-for-ipv...
Any version of IP is better without a “guaranteed delivery option”.
Your point about IPv6 is rather random I feel. Smaller address space may have sufficed, but it’s flaws are elsewhere (many changes in how it operates versus IPv4 rather than simply larger address field).
The use of TLS should have no effect on how “hot” resolver caches are.
This is Security 101 :(
Also, I suppose that in 10 years, there'll be virtually no unencrypted traffic above the IP level, and the outer IP level will only be used to help run various encrypted channels, overlay networks, VPNs, etc, which usually have their own, unrelated IP routing inside.
https://www.programmingthrowdown.com/2022/06/137-origins-of-...
https://www.programmingthrowdown.com/2022/07/138-fixing-inte...
* I had never heard of him before: quoting wikipedia https://en.wikipedia.org/wiki/John_Day_(computer_scientist)
> John D. Day (from Kinmundy, Illinois, born 1947) is an electrical engineer, an Internet pioneer, and a historian. He has been involved in the development of the communication protocols of Internet and its predecessor ARPANET since the 1970s, and he was also active in the design of the OSI reference model. He has contributed in the research and development of network management systems, distributed databases, supercomputing, and operating systems.
Go to "Private DNS" settings under Network & Internet (on Pixel, could be called something else on other OEM devices), select "Private DNS provider hostname", and enter 'dns.google' or 'cloudflare-dns.com' for Google DNS and Cloudflare DNS respectively. Android will add the https:// and /dns-query parts of the URL for you. And yes those two providers are hardcoded right now: https://cs.android.com/android/platform/superproject/+/maste...
If it doesn't work for you, then DoH support may not have rolled out or be enabled. To check, run this shell command:
cmd device_config get netd_native doh
If it returns '1', then DoH support is enabled. It's enabled by default for Android 13 devices, but for Android 11-12, DNSResolver checks this flag. If it's '0', then you can try running:
cmd device_config put netd_native doh 1
to enable it.
Google just wants you to use them for DNS so they can still see where you are going :-)
DNS-based blocking will never block a determined tracker.
You can always block UDP 443 to stop this, given it’s over QUIC.
In fact, I've analyzed several apps that used some kind of binary/text monstrosity over HTTP (not even HTTPS) to resolve IP addresses, usually Chinese manufacturer bloatware. They've been doing this crap for years! When I looked at the apps, the resolver IP had seemingly even been hard-coded into the Java code.
If you think your network is leak-free just because you've blocked port 53, you've either been missing leaks or hadn't had any kind of software actually try to evade your blocks. DoH doesn't add anything that wasn't already possible.
If you want control over your network, block all outgoing traffic and force every device to go through an intercepting HTTPS proxy and apply filtering heuristics like "this looks double encrypted" or "this looks like an IP address". It's practically impossible to do these days because we've lost control over the devices we've bought, though.
It should be noted that there's no sign of this feature being enabled across all Android devices automatically. For most devices, it's an opt-in feature you can toggle in the settings and broken DNS servers won't trigger a fallback. In other words: it doesn't change a thing about your situation, though your situation may not be what you expect it to be.
You can use ODoH (https://blog.cloudflare.com/oblivious-dns/) to double-encrypt your DNS requests and forward them through an external server, disconnecting your query from your response, and encrypting your upstream DNS requests. You can pick any relay from this list: https://download.dnscrypt.info/dnscrypt-resolvers/v3/odoh-re... (need to de-base64 them to get the actual domain) and any upstream DOH server you prefer.
This isn't effective against DNS-level censorship, though. A DNSSEC validation error is just as effective as a fake NXDOMAIN or bogus IP at keeping me from visiting the correct site.
You will have issues because your DNS is slow or dead :)
By leveraging Oblivious DOH you can even encrypt your DNS traffic securely to your upstream DNS provider without having to set up your own recursive resolver (which would only lead to privacy issues).
Every hop adds latency, though, so I'd recommend using as direct a connection as you can get. DNS latency can make your internet experience a real pain!
Who knows if some 'suspicious' DNS queries sent to Google will accidentally set off some tripwire that causes them to lock you out of half the internet: https://news.ycombinator.com/item?id=30771057
I'm still trying to add http3 to my DNS server and can't test DoH. But based on the other comments, it looks like a custom DNS server will use DoH if supported?
The main criticisms of DoT are that it's hard to analyze for cybersecurity purposes. Except DoT is not encrypted end-to-end but only encrypted hop-to-hop. This means you can put a proxy checking for cybersecurity threats in front of your DoT traffic into or out of your network, if you need to. DoT can also be peer to peer, which can leverage a lot of benefits. DoH is client-server.
DoH has all the problems that come with HTTP/s and seems a good way to break one of the most relatively reliable systems of the Internet, in the name of convenience.
The article linked by this post explains that Android supported DoT since Android 9, but it was problematic because it required frequent TCP handshakes and TLS handshakes. Plus, it could be easily blocked by middle boxes.
But they can't easily block DoH, since it looks like regular HTTP/3 traffic on UDP port 443.
You can't see "the presented certificate" on a modern web browser visiting most web sites. In TLS 1.3 (offered by > 55% of 135,000 surveyed web sites) every step after Client Hello is encrypted, so the certificate isn't available to snoops.
For now, you can see the SNI in that client Hello, telling the server who they wanted to talk to. However ECH (Encrypted Client Hello) is intended to get rid of that too.
Suppose the client calls 10.20.30.40, and they announce they want to talk to legit.example which is fine. The server sends a certificate (which the ISP doesn't see) and that certificate says it's valid for legit.example and for naughty.example. Now the client is allowed, in HTTP/2 and HTTP/3 to say "Actually I want https://naughty.example/stuff" and although the server isn't obligated to have that answer because the client said it originally wanted to talk to legit.example not naughty.example it often can answer and will. The client has a certificate showing this server is entitled to answer this question, and now it has an answer, so it's done. [If the HTTPS server can't answer or doesn't want to for any reason, the HTTP error code for this scenario, where somebody asked you about a name for which you have a certificate but aren't actually able to answer questions, is 421 Misdirected].
Yes, but that is computationally expensive at the ISP level. Turning on deep packet inspection for one user is way overkill. Doing it for everyone? Congrats, you've just completely trashed out your core. Performance tanks. You lose customers.
It is opportunistically expensive, as well. Tracking down users on a case-by-case basis costs a lot in real time, as well as human work hours.
It is almost never worth it to an ISP do to this type of inspection -- ie, 'just figure it out' -- unless they are being compelled to.
[1] https://developer.android.com/guide/topics/connectivity/cron...
Will stick to DoT for the moment :)
EDIT : ok so only 'dns.google' or 'cloudflare-dns.com' are supported right now, other domains are still using DoT. Pretty useless feature then :(
The Settings app is heavily customized by Android vendors and can't be updated on all devices in lockstep with the DnsResolver module. Hopefully it will be fixed starting from Android 13.
The sample HTTP/3 client and server included with quiche use mio, a simple crate implementing an event model similar to POSIX's poll(): https://github.com/cloudflare/quiche/blob/master/apps/src/cl...
https://cs.android.com/android/platform/superproject/+/maste...
And DNS based ad filtering impossible.
Not to mention that DNS over HTTP AdBlock is basically just as easy to set up nowadays.
Only if the device in question uses the ad-blocking DNS servers.
Firefox (IIRC) by default does not use the operating system's resolv.conf. Smart TVs (and Chromecast) have also been known to ignore DNS settings from DHCP.
* https://labzilla.io/blog/force-dns-pihole
And since the DNS traffic now looks like HTTP(S) traffic, your only recourse is to block all HTTP access and tunnel it through a proxy.
As an IT guy, and the person who runs a home network, this reduces the visibility of what is happening on my network(s). Reduced visibility is bad IMHO.
Classic DNS resolvers can have same "hardcoded" problem.
Yeah, you _still_ can tweak this and you _still_ can configure that, but it’s getting more finicky ever so slightly every time. “Still” is the key, to hint at how volatile it all is.
Devices should still allow setting a custom DoH server, and they should use it. You should still be able to run your own DoH server and use that.
Any device/software that ignores your network settings (such as classic DNS or DoH) is bad, just like an ISP intercepting your DNS requests is bad.
[1]: https://tools.ietf.org/id/draft-peterson-doh-dhcp-01.html
Hidden behind “privacy” marketing DOH looks to be a way to centralize DNS queries at the app level to protect ad revenue.
Now apps you download can essentially have their own DNS resolvers built into the app and you no longer have control over DNS data. Especially IOT devices and smart TV’s will just bypass all user settings and directly resolve dns with resolvers of their choosing.
I'm probably going to retire to a steampunk cabin.
Frustrating that google assistants ignore the DNS server presented to them.
Personally, I've statically routed my Chromecast to forward UDP/53 to my PiHole and it's been very effective so far. Too bad blocking trackers also breaks the applications on Chromecast, making the block effectively useless, but that's the choice I made when I bought one of those things.
It makes DNS based advert adding Impossible. Hopefully this is the end of captive portals.