by c4mpute · 3y ago · 0 comments
E.g. the record should NOT be:
example.com IN TXT "someservice.com-validation=029845yn0sidng0345randomnyosndgf03548yn"
instead, it should be something like
example.com IN TXT "029845yn0sidng0345randomnyosndgf03548yn"
Of course there will be multiple such records for different service providers. The service providers will just have to check all those (handful) of TXT records for the random assigned token in their database instead of pre-filtering them by the someservice.com-validation prefix.
As jelavich pointed out, there is also https://www.ietf.org/archive/id/draft-ietf-dnsop-domain-veri... which suggests another improvement on that. To avoid polluting the example.com name with tons of TXT records and to avoid problems with CNAME records and such, those records should be further down in the tree like
_validation_mv0395ng035.example.com IN TXT "029845yn0sidng0345randomnyosndgf03548yn"
The record name token "mv0395ng035" could either be another random number assigned to example.com by someservice.com they just put in their database. Or it could be something like HMAC(example.com, <common secret known to someservice.com>), so they don't have to save all those tokens. In any case, the check will be just one DNS lookup, one comparison and done. Quicker, equally easy and more privacy-preserving and infosec-hygienic.
And what do opaque records gain you anyways? Security by obscurity is not real security, and it's often possible to determine a domain's service providers by other means, such as CNAME/MX records, or by scanning the website for <script> tags.
Ideally, domain validation records would be of the form ACCOUNT_ID@SERVICEPROVIDER so you can know exactly what the record is authorizing.
Allowing outdated DNS entries to persist can open up all sorts of horrible opportunities for impersonation, phishing, etc.
At the same time, removing a DNS entry that you still need can cause massive downtime.
So anything that makes it easier for ops teams to observe and maintain DNS (in whatever ugly way available) is probably a security win in the long run.
I would have hoped the DNS management is automated and IaC-ed, so you just check the relevant commit message.
Every DNS provider I've used in recent memory, has offered a non-authoritative / non-DNS-exposed "comment" or "description" field for each record. Even if you aren't doing "DNS infrastructure as code" but just editing DNS records in a UI dashboard, you can just use these fields to describe the motivation behind each record at creation time.
In my experience this is not at all common. I think I know of 3 that do, and I've used many more that don't.
As pointed out by singron at https://news.ycombinator.com/item?id=38069760 a malicious service provider (SP1) could give you a DNS record that was really issued by a different service provider (SP2). When you publish the DNS record, you're actually authorizing SP1's account at SP2 to use your domain.
With non-opaque records, you can be sure of what you're publishing.
At least ACME's DNS challenge protocol is designed this way.
> The client SHOULD de-provision the resource record(s) provisioned for this challenge once the challenge is complete, i.e., once the "status" field of the challenge has the value "valid" or "invalid".
On one hand, the InfoSec side where you want to hide info. On the other side, the service provider doing the validation WANTS to advertise their service on these DNS records so they are disincentivized to make the changes you’re suggesting.
And yes, I'm mostly joking.
It’s not hard to figure out what services a company is using, and most of these services requiring verification are so ubiquitous that confirming the knowledge adds no marginal utility to attackers. “Oh wow, this SaaS company has verified with Atlassian and Google, who could have guessed.”
On the other hand, if you are on the attacker's hotlist, he'll try you first and you gain nothing.