Live data from Hacker News

Ask HN: How did the internet discover my subdomain?

news.ycombinator.com

71–80 of 322 posts

Re: Ask HN: How did the internet discover my subdomain?

#71
post #67
post #62

Not sure why everyone is going on about certificate transparency logs when the answer is right there in the user agent. The company is scanning the ipv4 space and came upon your IP and port.

Okay. But how did they get the proper host header?

I don't think op said that they had the correct host header?

Re: Ask HN: How did the internet discover my subdomain?

#72

There is a chance that your subdomain is the first/default virtual host in your web server setup (or the subdomain's access log is the default log file) so any requests to the server's IP address get logged to this virtual host. That means they didn't access your subdomain, they accessed via your server IP address but got logged in your subdomain's access log.

And this is the correct answer, thank you.

Transparency logs are fine except if you have a wildcard cert (or no https, obviously).

IP scans are just this: scans for live ports. If you do not provide a host header in your call you get whatever the default response was set up. This can be a default site, a 404 or anything else.

Re: Ask HN: How did the internet discover my subdomain?

#73
post #67
post #62

Not sure why everyone is going on about certificate transparency logs when the answer is right there in the user agent. The company is scanning the ipv4 space and came upon your IP and port.

Okay. But how did they get the proper host header?

Could be a number of ways for example a default TLS cert, or a default vhost redirect.

I actually had a job once a few years ago where I was asked to hide a web service from crawlers and so I did some of these things to ensure no info leaked about the real vhost.

Re: Ask HN: How did the internet discover my subdomain?

#74
post #68
post #62

Not sure why everyone is going on about certificate transparency logs when the answer is right there in the user agent. The company is scanning the ipv4 space and came upon your IP and port.

It's rather hilarious that nobody mentioned this in 7 hours. What am I missing? ~5 billion scans in a few hours is nothing for a company with decent resources. OP: in case you didn't follow, they're literally trying every possible IPv4 address and seeing if something exists on standard ports at that address. I believe it would be harder to find out your domain that way if you were using SNI and only forwarded/served…

> What am I missing?

That it was in fact mentioned many hours earlier, in more than one top level comment.

Re: Ask HN: How did the internet discover my subdomain?

#76
post #55

Earlier quoted context omitted.

> If it is on DNS, it is discoverable. In the context of what OP is asking this is not true. DNS zones aren't enumerable - the only way to reliably get the complete contents of the zone is to have the SOA server approve a zone transfer and send the zone file to you. You can ask if a record in that zone exists but as a random user you can't say "hand over all records in this zone". I'd imagine that tools like Cloudfla…

In practice it's not so far fetched: A zone transfer is just another dns query at the protocol level, i suppose you can conceptually view it as sending a file if you consider the dns response a file. Something like "host -t axfr my.domain ns1.my.domain" will show the zone depending on how a domain's name server is configured (eg in bind, allow-transfer directive can be used to make it public, require ip acl to match…

No sensible DNS provider has zone transfers enabled by default. OP mentioned using CloudFlare, and they certainly don't.

Re: Ask HN: How did the internet discover my subdomain?

#77
post #68

Earlier quoted context omitted.

It's rather hilarious that nobody mentioned this in 7 hours. What am I missing? ~5 billion scans in a few hours is nothing for a company with decent resources. OP: in case you didn't follow, they're literally trying every possible IPv4 address and seeing if something exists on standard ports at that address. I believe it would be harder to find out your domain that way if you were using SNI and only forwarded/served…

> What am I missing? That it was in fact mentioned many hours earlier, in more than one top level comment.

I was referring more to the fact that the user agent explicitly contained the answer, rather than suggestions that it was IP scanning. But you're right I do see one comment that mentions that. And many more likely assumed the OP already figured that part out.

Re: Ask HN: How did the internet discover my subdomain?

#79
post #62

Not sure why everyone is going on about certificate transparency logs when the answer is right there in the user agent. The company is scanning the ipv4 space and came upon your IP and port.

That perfectly fits midwit meme. Lots of people are smart enough to know transparency logs - but not smart enough to read OP post and understand the details.
Post reply on HN