Finding services companies via their TXT records
abenezerbelachew.com
abenezerbelachew.com
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.
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".
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.
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.
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.
And yes, I'm mostly joking.
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.
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.
I work for a small, local, family company. I maintain the websites and do some of the marketing.
We've noticed an uptick in websites for fake businesses and fake business listings in our area/industry in the past 3-4 years. The goal is to generate leads which can be resold to local contractors--usually without the customer knowing. It's a scheme called "rank and rent."
A few months ago, I noticed a new listing in our area. I started digging into the SEO spam for it. There was a website, a couple of one-episode podcasts, social media profiles, business listings, PDF spam, and more.
Looking into the HTML source of the site, I discovered some JSON-LD for a completely different company. I looked up the company on Google Maps. Sure enough, there was a listing. And the website was using the same theme as the one I was digging into.
I decided to pull the DNS records. They both used the same Cloudflare NS. Not a smoking gun, but interesting. Then when I pulled the TXT records, I noticed both used the same IP for the SPF record. Bingo!
A quick cURL resolving the domains to the IP, and I had proof they were hosted on the same shared hosting server.
With the IP, I was able to do a reverse lookup for other sites hosted on the same server. This netted me several domains that also used the same theme and had Google Maps listings (GBP). The money result was several marketing firm domains.
One turned out to have a GBP. It had videos and photos the person used to verify the listing. Fortunately, it had the marketer speaking in the video as well. That voice sample allowed me to compare it to the podcasts mentioned above. Aside from him faking an accent, it was definitely the same guy. I've since discovered ~30 such podcasts for his different listings.
The other marketing domains were even more interesting. They were also run by the same guy. Again, verified via voice in a video on these sites. He used these websites to recruit people for "social media gigs." The gigs were setting up Google Business listings in their area. They'd setup a listing, get the postcard with a verification code, pass it off to the marketer, and he'd pay them $50-100.
The kicker was a Google form on the recruitment page. It asked if the person would be willing to leave 5-star reviews for businesses they'd never done business with for $20.
I went back to Google Maps and started bouncing through people who'd left reviews. That opened up a whole world of listings that I hadn't known about.
At present, I'm over 80 listings which can be tied back to him.
I've also identified several websites that don't have GBP listings yet thanks to the TXT records and reverse lookups.
You just give it a domain like this: `pig example.com` and it spits out anything it can find about your DNS, including matching services for about 150 different common services.
Remember the recent Hacker News discussion, where you could send mails from 2 million domains through mailchannel? They got the number "2 million" through builtwith.com as you can see which domains use mailchannel. It's in the slides in the submission.
There are so many levels of leaky abstraction here.
CAs have often sought to bypass domain or CAA validation for domains which they believe are hosted with them, and this has repeatedly proven to be a bad idea because it relies on the CA to maintain accurate records about what domains are hosted with them. The source of truth for this information is in the public DNS, so it's more robust to require CAs to check public DNS records.
See for example the now-forbidden DNS Operator Exemption to CAA, which I advocated to be banned after Microsoft bypassed CAA checking for domains which they thought they controlled but really didn't: https://groups.google.com/g/mozilla.dev.security.policy/c/0T...
If your domains don't otherwise have public DNS records, maybe you should be using private certificates instead of publicly-trusted ones?
Some services check them only once, others -- every month?
For a good infosec hygiene, they should also be rotated regularly.
$ dig +short oracle.com TXT | wc -l
41It's really nice to see a company with a cloud offering ... using a rivals cloud offering (yes, Oracle is large, AWS probably has Azure/Google-services, but it's fun :) )
So as a new owner you would want to remove the tokens.
Presumably services pay attention to the TTL, so services don't have to constantly refresh.
Could be interesting to scrape some data to estimate the penetration of particular SaaS providers eg Google, Atlassian, etc.
Here they are for the example OP gave: https://www.nslookup.io/domains/stripe.com/dns-records/
Looks like I need to rerun the script and add some logos (:
11308 include
12284 stripe-verification
13377 cisco-ci-domain-verification
15123 zoho-verification
15621 knowbe4-site-verification
18764 Sendinblue-code
19472 amazonses
21264 adobe-idp-site-verification
23791 klaviyo-site-verification
24156 docusign
27694 yandex-verification
34068 globalsign-domain-verification
55512 atlassian-domain-verification
65353 apple-domain-verification
70535 _globalsign-domain-verification
74467
155337 facebook-domain-verification
400513 MS
1025970 google-site-verification