News for hackers. Stuff that matters.
Re:[email protected] by nebulous1 on Sunday September 27, 2020 @08:55AM (#24606279)
A lot of people learned this the hard way when Google bought and later enabled permanent HSTS for the .dev domain (prior to actually publicly releasing it) in Chrome, breaking everybody's non https local .dev environments.

As mentioned above, it should have been .test

Re:[email protected] by CydeWeys on Sunday September 27, 2020 @09:04AM (#24606339)
The HSTS preloading fortunately ended up being an unintentional additional type of Controlled Interruption period, which was a good thing in the end. It would've been a lot worse if, one day, your fake domain names are resolving locally, and then literally the next day it's now a real domain name that's resolving remotely, with who knows what result. This at least forced people to address it well in advance of domain names potentially resolving globally.

https://www.icann.org/resources/pages/name-collision-2013-12...

https://jdebp.eu/FGA/dns-use-domain-names-that-you-own.html

Re:[email protected] by owl57 on Sunday September 27, 2020 @09:25AM (#24606432)
Sounds like it could be intentional.

— We bought .dev, now what we do with all those people in the wild misusing it?

— Well, most of them misuse it with our browser, let's break at least their hacks early and loudly.

Re:[email protected] by CydeWeys on Sunday September 27, 2020 @09:34AM (#24606501)
It was unintentional.

Source: The horse's mouth. I'm the guy who came up with the idea of launching .dev and .app as HTTPS-only TLDs, and I'm the one who had them added to the HSTS preload list.

Re:[email protected] by hmcamp on Sunday September 27, 2020 @11:45AM (#24607482)
@Cydeweys, I respect this level of candidness
Re:[email protected] by jbrooksuk on Sunday September 27, 2020 @09:48AM (#24606586)
Out of interest, how did this happen without any investigation into possible consequences etc?

It’s a huge change that surely warranted special attention before making it happen?

Re:[email protected] by CydeWeys on Sunday September 27, 2020 @10:09AM (#24606714)
It's not a huge change though. .dev was a new, never-launched TLD, so there were no existing real domain names to break with the addition of HSTS preloading. Established best practice for decades at that point was already to always use real domain names (or subdomains thereof) or specifically reserved test domains/TLDs (see RFC 2606, published in 1999) for testing/development/local networking purposes.

So yes, we didn't anticipate how many people weren't following the best practices, but that would have been hard to determine prior to doing the thing anyway. There were also lots of people who had the mindset of "We won't change anything until it stops working", so in some sense a lot of it was unavoidable. See e.g.: https://github.com/laravel/valet/issues/204 https://github.com/laravel/valet/issues/294 https://github.com/laravel/valet/issues/431 (note that Laravel users were responsible for a non-trivial fraction of the total problems experienced, and that we only discovered all this post-HSTS-preloading). The problem was repeatedly pointed out and the maintainers refused to fix it until it actually broke. So, inevitably, it broke, and then they fixed it.

Re:[email protected] by oauea on Sunday September 27, 2020 @02:48PM (#24609144)
Were you somehow unaware of the many, many, many people who used .dev in their local environments? You must've had some idea, since the initial plan was to use the .dev TLD for exactly that within Google.

I've always hated Google for egoistically claiming this tld, and ICANN for letting them.

Re:[email protected] by evolve2k on Sunday September 27, 2020 @03:41PM (#24609549)
Basecamp’s Pow project comes to mind.

It enables zero config local development configuration, whereby at the time it would make your locally running dev server available on .dev

So instead of having to spin up a local server and then visiting say 127.0.0.1:3000,

I could instead just visit myappname.dev and it would show me what would previously show on localhost or it would spin up a server first for that app then show it to me.

They switched to .test in response to google’s change.

Official site: https://pow.cx

Thread on change from .dev to .test https://github.com/basecamp/pow/issues/386

Re:[email protected] by colejohnson66 on Sunday September 27, 2020 @05:41PM (#24610352)
I just got an “untrusted connection” warning visiting pow.cx
Re:[email protected] by evolve2k on Monday September 28, 2020 @05:30AM (#24614735)
Oh woops just habit to set https now. Page is from an earlier time when we didn’t mind static sites not being https.

Visit http://pow.cx

Re:[email protected] by CydeWeys on Sunday September 27, 2020 @05:24PM (#24610235)
Yes. Not nearly as many people were using .dev in local environments as you seem to think. We didn't know anyone, and by the very nature of them being fake and locally-configured-only it's not something you can easily find out about. And no, our intention was not to use .dev for fake domain names.

Also, just because someone is using a fake domain doesn't preclude that from being created as a real domain name farther down the line. That's why you shouldn't use fake domain names. This problem has been known since at least the 90s and is not a good habit to get into. Them now being real makes them actually more useful (and not reliant on potentially unsynced local-only config).

Re:[email protected] by linsomniac on Sunday September 27, 2020 @09:55PM (#24612173)
My problem was that it also broke properly configured domains. We have machines in xxx.dev.example.com (for example) that I used to rely on the resolver searching for, so I could just type "xxx.dev" and it would then know to try it with example.com banged onto the end. Then everything in .dev started resolving so my abbreviations started resolving to other hosts.

I mean, I THINK this is "properly configured", but it also isn't a huge deal to avoid. Just was annoying when it started happening. Didn't FEEL like I was misconfigured. :-)

Re:[email protected] by Kalium on Sunday September 27, 2020 @10:45PM (#24612460)
If your machines started exhibiting behavior you didn't expect or intend from a configuration you believe to be proper, then something has gone wrong. It may be the system, it may be the configuration, and it may be your understanding of either. Or any combination.

In this particular case it sounds like your resolver was set up to try an external resolution first and then append an internal domain if the external resolution failed. And as you say, this clearly worked just fine for a long, long time. Then it suddenly started failing one day, for reasons unrelated to anything you changed.

At this point, most people would find it reasonable to blame the external change for breaking their fully functional, correctly working, "properly configured" setup. Some, perhaps contrarian or perhaps more cautious, would note that the "properly configured" approach only worked so long as external systems played ball. I think it might be the case that you were bitten by this assumption that seemed safe at the time, leading to the awkward and uncomfortable conclusion that your systems were indeed misconfigured.

Re:[email protected] by CydeWeys on Monday September 28, 2020 @11:36AM (#24617760)
And also, from a larger standpoint, we have a choice of two mutually exclusive options here. It comes down to either (a) freezing the TLD hierarchy in place and never creating any new ones (e.g. not even for a new country, or .mars or whatever), or (b) not retaining indefinite backwards support for multi-label DNS search lists when they happen to collide with new TLDs.

I would argue that, of the two options, option B is the less onerous one, and less restrictive on the future growth of the Internet. It's not that hard to set up some aliases to be able to SSH quickly into the right hosts without having to manually type out longer paths.

Re:[email protected] by ChickeNES on Sunday September 27, 2020 @03:43PM (#24609559)
This attitude is the reason I refuse to use Chrome and only recommend the alternatives.
Re:[email protected] by ludamad on Sunday September 27, 2020 @10:11AM (#24606739)
I don't think fresh launches, even with bold new parameters, are always considered 'huge changes' in that sense. The fact that it could break local environment's was probably not even documented in those specific environments
Re:[email protected] by nitrogen on Sunday September 27, 2020 @12:47PM (#24607980)
There was a time when the creation of a new TLD was unthinkable, so it seemed safe to use a domain syntax internally that was never going to become a public TLD. Then the TLD money grab happened and what was assumed to be safely isolated wilderness was sold out from under everyone.
Re:[email protected] by CydeWeys on Sunday September 27, 2020 @01:24PM (#24608301)
There never was such a time, and IANA never said "We won't make any more". TLDs have been continually created for at least the past two decades. Look up the history of e.g. .biz, .info, .museum, .aero, .mobi, .cat, .asia, all the various ccTLDs that are created as new countries form (.ss), etc. And none of that is even counting the new gTLD expansion round that kicked off in 2012.
Re:[email protected] by akritrime on Sunday September 27, 2020 @10:02AM (#24606661)
How do we know you are the right horse? Sorry, just watched `/the social dilemma` and now I am skeptical of all information on the internet.
Re:[email protected] by CydeWeys on Sunday September 27, 2020 @10:25AM (#24606861)
If you give me your email I can send you a message from my _lastname_@ work address, which you can then match up with published media I've done under my name, e.g. https://www.youtube.com/watch?v=kBkX30Cj7Bw and https://security.googleblog.com/2017/09/broadening-hsts-to-s...

Or you can look at the matching username on GitHub ( https://github.com/CydeWeys ) and see that I'm a member of the Google org and owner of the Nomulus repo ( https://github.com/google/nomulus/graphs/contributors ), the software running our TLD registry and which was announced here: https://opensource.googleblog.com/2016/10/introducing-nomulu...

Or I could just dig out my GPG key and sign a message.

So I respect your healthy skepticism, but I promise I'm really me, and not just someone pretending to be me! And I'll also note that, in all my time on HN, I've never once seen someone pretending to be anyone they weren't, at least not on seasoned accounts like mine. You can go back through my 5 years of comments on here, and every time I say I'm a specific person out there in the real world, it's always the same consistent person.

Re:[email protected] by akritrime on Sunday September 27, 2020 @10:40AM (#24606980)
I actually confirmed your GitHub before I made the previous comment. It was just a frivolous reply that I found funny but HN didn't. Tough crowd. But I really, really appreciate your reply, thanks for taking your time to prove your identity. Hopefully I didn't waste too much of your Sunday morning.
Re:[email protected] by CydeWeys on Sunday September 27, 2020 @11:02AM (#24607135)
My experience here is that humor (especially deadpan) tends to land very poorly on HN, both because people are never contextually expecting it and because they tend to downvote it when they do recognize it, as they dislike perceived low effort comments that they don't feel are meaningfully contributing to the discussion (i.e. adding noise, not signal). HN may as well put "Don't try to be funny" in the FAQ, because it almost never works out.
Re:[email protected] by akritrime on Sunday September 27, 2020 @11:44AM (#24607475)
Mistake made and lesson learnt. After being introduced to the larger internet community via reddit, sometimes you slip up in more serious places like HN.
Re:[email protected] by mcdevilkiller on Sunday September 27, 2020 @05:53PM (#24610419)
Yep, Hacker News is like Reddit, without the jokes and porn.
Re:[email protected] by radisb on Monday September 28, 2020 @11:02AM (#24617360)
lol
Re:[email protected] by JoshTriplett on Sunday September 27, 2020 @03:26PM (#24609444)
> If you give me your email I can send you a message from my _lastname_@ work address

Not disputing your account in any way, but please don't propagate the widespread myth that only people who own an email address can send from that email address. If you wanted to use your well-known email address as authentication, you'd need to offer to reply to a mail sent to that address.

Re:[email protected] by tonyztan on Sunday September 27, 2020 @04:06PM (#24609750)
You could check whether the email passed SPF, DKIM, and DMARC checks. Google has certainly implemented these for their SMTP servers. If all of the tests pass, you can be pretty certain that the sender is the owner of the address.
Re:[email protected] by CydeWeys on Sunday September 27, 2020 @05:26PM (#24610257)
This is what I was getting at. It's definitely not possible to fully impersonate an email from an @google.com address. We've got all the security bells and whistles turned on.

Though, admittedly, it would be easier for a layman to verify ability to reply to an email than to verify all those features, so point taken.

Re:[email protected] by Maursault on Sunday September 27, 2020 @01:16PM (#24608217)
This is argument from authority, but an exquisite one.
Re:[email protected] by throw0101a on Sunday September 27, 2020 @11:21AM (#24607303)
> .dev domain (prior to actually publicly releasing it) in Chrome, breaking everybody's non https local .dev environments.

Yeah, except it broke more than that.

A lot of folks use/d ".dev" and and ".prod" as internal sub-domains in their actually-owned domain (dev.example.com, prod.example.net).

For convenience you could however use the resolve.conf's "search" option to simply things, so at the CLI one could type "ssh webserv01.dev" and the resolver would would then append the company's domain to get the FQDN for the query.

Except once Google made their changes "webserv01.dev" now could go out to the Internet—especially if you had it in a browser and it tried to be "clever".

Re:[email protected] by CydeWeys on Sunday September 27, 2020 @11:59AM (#24607611)
This applies to every domain name though (at the second level too, not just the first). You'd have exactly the same problem if you were using a fake .com domain that someone then actually registered. The best practice has always been to use a real domain name that you own, and subdomains thereof. If you don't, your setup isn't working so much as it is not broken ... yet.

See https://jdebp.eu/FGA/dns-use-domain-names-that-you-own.html for more explanation.

Re:[email protected] by throw0101a on Sunday September 27, 2020 @01:10PM (#24608161)
> This applies to every domain name though

Say I own "throw0101a.com", and then use "dev.throw0101a.com" and "prod.throw0101a.com". (Or you own CydeWeys.com.)

Previously, when .dev and .prod were not TLDs, it was fairly safe to type "ssh websrv01.dev" and "ssh dbsrv02.prod" because if the queries leaked onto the Internet they'd fail.

Now, with the post-Google TLD changes, if you type one of those things, and the local DNS happens to not be configured properly (i.e., the resolve.conf 'search' options is not present), then strange things can happen.

Further, if you put "websrv01.dev" in a browser now, it may go off into the Internet and try to be clever about auto-complete instead of just doing a local query.

Re:[email protected] by CydeWeys on Sunday September 27, 2020 @01:51PM (#24608567)
This applies to any TLD though, not just .dev and .prod, not just gTLDs generally, and not even just real TLDs (that's right, you could be using a fake TLD on an internal network somewhere and the "creation" of a domain on that fake TLD on that network could cause your previously working hostname shortcuts to start failing).

Relying on DNS search lists to find the right host is a bad security practice that has caused security incidents even outside the context of the creation of new TLDs. It's best to always use fully-qualified domain names. A lot of people responsible for implementing DNS search lists in the first place now regret having ever created them.

More info at https://www.icann.org/en/system/files/files/sac-064-en.pdf (particularly section 4.1.3 and the preceding logic leading up to it).

Re:[email protected] by PowerBar on Sunday September 27, 2020 @12:28PM (#24607838)
Which is one of the reasons I always insist our dev and prod teams use FQDNs (under domains the company owns) in all of their configurations.

In more dynamic environments, the config may have the domain as its own setting and each service as just the hostname, but the software must combine them before use, or better yet combine them in the config if variable expansion is possible in the config language they are using (ex: db_server="db-01.${domain}" with domain being defined near the top).

Re:[email protected] by dmd on Sunday September 27, 2020 @10:06AM (#24606693)
I own "dev.host" and we get a ton of interesting traffic.
Re:[email protected] by Hamuko on Sunday September 27, 2020 @10:10AM (#24606723)
Can't wait for .internal to be registered so that my internal DNS breaks.
Re:[email protected] by jeroenhd on Sunday September 27, 2020 @11:09AM (#24607177)
The only proper way to do internal DNS is to register a domain. Even a free one will do.

The more people follow decent practices at home, the fewer businesses will accidentally break because on of the admins thought it'd be alright because it works for them at home. If you set your DNS domain correctly you can also save yourself some typing effort because DNS will automatically append the network name (so you can http://test instead of http://test.internal or http://test.hamu.co). As an added bonus, you can get valid TLS certificates for your internal network devices without messing with a certificate authority of your own!

Re:[email protected] by srtjstjsj on Sunday September 27, 2020 @12:30PM (#24607847)
It's terrible that the spec doesn't reserve something like .localdomain that is unregisterable so that DNS servers can use it for internal use.

.test doesn't quite cut it.

Re:[email protected] by kzrdude on Sunday September 27, 2020 @04:06PM (#24609756)
You could propose this to be implemented, surely?
Re:[email protected] by CydeWeys on Sunday September 27, 2020 @05:29PM (#24610272)
It's already being proposed by one of my colleagues. See: https://tools.ietf.org/html/draft-wkumari-dnsop-internal-00

It does seem much, much more likely that .internal will be definitely reserved for this purpose than that it will ever be delegated as an actual real TLD. If you have to pick a fake TLD to use that isn't one of the 4 mentioned in RFC 2606 that has the best chance of actually being reserved for this purpose in the future, then .internal is it.

Re:[email protected] by Hamuko on Sunday September 27, 2020 @12:15PM (#24607742)
I do have a domain but I don't want to enter my private IP addresses on a public DNS. Hence I just have server.internal to point to the correct IP address on my local DNS server and have service1.server.com, service2.server.com, etc. all just CNAME to server.internal.
Re:[email protected] by PowerBar on Sunday September 27, 2020 @12:33PM (#24607876)
You don't need to disclose anything on the public DNS. Just register the domain, then use it internally.

For example, if you buy "example.com", just set your public DNS (assuming your registrar provides one) to resolv it to 127.0.0.1, then add your internal hostnames and IP addresses to your internal DNS. If you do it that way, "my-server.example.com" will simply fail to resolve unless you're on your internal network and you don't have to worry about any issues with using the reserved *.internal domain.

Re:[email protected] by Hamuko on Sunday September 27, 2020 @12:42PM (#24607947)
I need to have the public DNS anyways so I find this way to be easier. I'd have to use CNAMEs anyways since the .internal addresses have to resolve to different IP addresses depending on the context.
Re:[email protected] by PowerBar on Saturday October 03, 2020 @06:52PM (#24675266)
Why would your A records change depending on context? Do you have separate networks where "server.localdomain" has different IPs? The typical way to solve that is to use different sub-domains for each one.

For example if you have a home network and a testing network, you could have one on home.example.com and the other at lab.example.com, in which case your servers would be server.home.example.com and server.lab.example.com. If you use DHCP on those networks, you simply set the domain and search-domain options and you can just enter "server/" on the devices that moves between them.

You only need to register example.com with a registrar, then you can use whatever subdomains you want wherever you want.

Re:[email protected] by kubanczyk on Saturday October 03, 2020 @07:34PM (#24675474)
> Why would your A records change depending on context?

Good grief, usually it's because of a hairpin nat. People do that to themselves. They damage their own L3 networking and then decide that they need to damage also their entire DNS as a workaround.

It's a regular mind virus, because it's easy to implement split-horizon DNS but enormously expensive to remove it. People get used to it on one company and go and spread it on another company.

Just do a snat+dnat. These networking boxes are so expensive because they are meant to handle it, so let them do their job already. Or go IPv6 and get rid of DNAT altogether.

Re:[email protected] by CydeWeys on Sunday September 27, 2020 @12:27PM (#24607833)
You can continue using /etc/resolv.conf to specify the private IP addresses even for a website that does actually exist. The point of registering the domain is to ensure that your computer/software can't ever accidentally hit anything you didn't intentionally configure that is actually under the control of someone else. You don't actually need to use publicly visible DNS to configure your internal network just because you used a real domain name.
Re:[email protected] by detaro on Sunday September 27, 2020 @12:59PM (#24608070)
If you have a local DNS server, you can just have the service1.yourdomain.com only resolve there. Totally standard practice.
Re:[email protected] by Hamuko on Sunday September 27, 2020 @01:08PM (#24608145)
My local DNS server can't resolve certificate verifications so I need a public DNS server anyways.
Re:[email protected] by bradstewart on Monday September 28, 2020 @10:39AM (#24617085)
> don't want to enter my private IP addresses on a public DNS

Why not?

Re:[email protected] by tialaramex on Sunday September 27, 2020 @04:40PM (#24609982)
Once upon a time plenty of people thought it'd be cool to give their "internal" stuff names like wwwtest.int and database.int and so on.

Now, there has actually been an int TLD for a long time, but you probably don't visit sites in that TLD very often because it is for international organisations like the UN.

So if your configuration blocks all those actual sites well, too bad right?

However, back that long ago the trusted Public CAs were not actually forbidden from issuing certificates for names that don't belong to anybody on the public Internet. This was a bad idea, but it was not yet (at that time) forbidden. So you could pay Thawte a pile of money and get a certificate for "exchange2" your backup MS Exchange server or maybe "linux.build" your Linux build server.

And since people were using this for internal names, you'd get people asking their CA for certificates like "exchange2.int" - for the internal backups MS Exchange server right?

Obviously there can't be any effective way to demonstrate control over internal names, since you do not in fact have control over them, you've just hijacked them.

And so the end result is that there were actual publicly trusted CAs issuing certificates for names in a real public TLD without checks, because they assumed it was internal when it was actually not.

These days the CAs are required to issue only for names in the actual Internet DNS hierarchy (plus TOR) and only after seeing one of the accepted proofs of control nicknamed the Ten Blessed Methods.

Meanwhile: There is only one namespace, do not try to hijack little pieces for yourself that don't belong to you. If you want to reserve some names so that your DNS doesn't "break" then you can buy names like anybody else.

Re:[email protected] by samoa42 on Sunday September 27, 2020 @10:20AM (#24606825)
should have used .local
Re:[email protected] by detaro on Sunday September 27, 2020 @10:32AM (#24606920)
Not really. .local is often tied to zeroconf/mDNS and doesn't work reliably over traditional DNS on all platforms.
Re:[email protected] by nitrogen on Sunday September 27, 2020 @12:51PM (#24608007)
mDNS is actually pretty nice on controlled networks, so if you want .local use mDNS.