News for hackers. Stuff that matters.
Re:Subdomain.center – discover all subdomains for a domain by fuzzy2 on Saturday September 16, 2023 @04:49AM (#37533114)
The Certificate Transparency Log is very important. I recently spun up a service with HTTPS certs by Let's Encrypt. By coincidence I was watching the logs. Within just 80 seconds of the certificate being issued I could see the first automated "attacks".

If you get a certificate, be ready for the consequences.

Re:Subdomain.center – discover all subdomains for a domain by tikkabhuna on Saturday September 16, 2023 @05:08AM (#37533210)
This is really interesting. For my Homelab I've been playing around with using Lets Encrypt rather than spinning up my own CA. "What's the worst that could happen?"

Guess I'll be looking to spin up my own CA now!

Re:Subdomain.center – discover all subdomains for a domain by KronisLV on Saturday September 16, 2023 @05:19AM (#37533260)
> Guess I'll be looking to spin up my own CA now!

I was looking for a lazy/easy way to do this manually and settled on KeyStore Explorer, which is a GUI tool that lets you work with various keystores and do everything from making your own CA, to signing and exporting certificates in various formats: https://github.com/kaikramer/keystore-explorer (to me it feels easier than working with OpenSSL directly, provided I trust the tool)

In addition, I also setup mTLS or even basicauth at the web server (reverse proxy) level for some of my sites, which seems to help that little bit more, given that some automated attacks might choose to ignore TLS errors, but won't be able to provide my client certs or the username/password. In addition, I also run fail2ban and mod_security, though that's more opinionated.

Re:Subdomain.center – discover all subdomains for a domain by ahoka on Saturday September 16, 2023 @05:35AM (#37533335)
Didn’t you read the original comment? It’s just a matter of time until someone starts to poke your IPs. Your own CA will be harder to get right.
Re:Subdomain.center – discover all subdomains for a domain by dspillett on Saturday September 16, 2023 @06:00AM (#37533449)
Getting a wildcard certificate from LE might be a better option, depending on how easy the extra bit of if plumbing is with your lab setup.

You need to use DNS based domain identification, and once you have a cert distribute it to all your services. The former can be automated using various common tools (look at https://github.com/joohoi/acme-dns, self-hosted unless you are only securing toys you don't really care about, if you self host DNS or your registrar doesn't have useful API access) or you can leave that as an every ~ten weeks manual job, the latter involves scripts to update you various services when a new certificate is available (either pushing from where you receive the certificate or picking up from elsewhere). I have a little VM that holds the couple of wildcard certificates (renewing them via DNS01 and acmedns on a separate machine so this one is impossible to see from the outside world), it pushes the new key and certificate out to other hosts (simple SSH to copy over then restart nginx/Apache/other).

Of course you may decide that the shin if your own CA is easier than setting all this up, as you can sign long lived certificates for yourself. I prefer this because I don't need to switch to something else if I decide to give friends/others access to something.

Your top level (sub)domain for the wildcard is still in the transparency logs of course, but nothing under it is.

Re:Subdomain.center – discover all subdomains for a domain by rbut on Saturday September 16, 2023 @06:43AM (#37533647)
If you're homelab'ing then you should be using private IPs to host your services anyway. Don't put them on a public IP unless you absolutely have to (eg port 25 for mail).

Use your internal DNS server (eg your routers) for DNS entries for each service. Or if you wish you can put them in public DNS also. Eg. gitlab.myhome.com A 192.168.33.11

You can then access your services over an always-on VPN like wireguard when you're away from home.

Then it doesn't matter if anyone knows what subdomains you have, they can't access them anyway.

Re:Subdomain.center – discover all subdomains for a domain by thfuran on Saturday September 16, 2023 @08:21AM (#37534191)
>Don't put them on a public IP unless you absolutely have to

Not a fan of ipv6?

Re:Subdomain.center – discover all subdomains for a domain by haliskerbas on Saturday September 16, 2023 @10:06AM (#37534868)
Why not something like https://www.cloudflare.com/products/tunnel/ free tier?
Re:Subdomain.center – discover all subdomains for a domain by nik282000 on Saturday September 16, 2023 @02:09PM (#37537141)
If your exposed services use authentication and you use strong passwords you are no worse off than any small business but you have the advantage of being a lesser target.
Re:Subdomain.center – discover all subdomains for a domain by chipsa on Monday September 18, 2023 @03:56AM (#37553485)
Tailscale actually does all of the above for you: does the DNS, can register a LE cert, and provides the always-on VPN to allow access when you're away from home.
Re:Subdomain.center – discover all subdomains for a domain by oooyay on Saturday September 16, 2023 @10:47AM (#37535242)
I use a wildcard certificate for my home infrastructure. For all the talk of hiding, though, it's wise not to count on hiding behind a wild card. Properly configure your firewalls and network policy. For the services you do have exposed, implement rate limiting and privileged access. I stuck most of my LE services behind Tailscale, so they get their certificates but aren't routable outside my Tailscale network.
Re:Subdomain.center – discover all subdomains for a domain by maccard on Saturday September 16, 2023 @11:52AM (#37535873)
We have all our services deployed on an internal network in AWS. We took care to use private hosted zones, gate access behind a VPN with SAML auth.

Turns out we're leaking our service usage by using ACM for our certificates.

Re:Subdomain.center – discover all subdomains for a domain by makestuff on Saturday September 16, 2023 @01:28PM (#37536761)
Doing something similar on AWS right now, what do you mean by leaking service usage? What is ACM exposing? I assume the “fix” for this would be to host your own CA through ACM?
Re:Subdomain.center – discover all subdomains for a domain by maccard on Saturday September 16, 2023 @03:37PM (#37537956)
If I register a TLS cert for gitlab.donalmacc.ie, its publicly logged.

From this thread it seems the fix is to register a wildcard *.donalmacc.ie and use that cert.

Re:Subdomain.center – discover all subdomains for a domain by tamimio on Saturday September 16, 2023 @05:29PM (#37538886)
Pretty much yeah, I don’t know why would any sysadmin thinks a subdomian is a hidden thing.
Re:Subdomain.center – discover all subdomains for a domain by teekert on Saturday September 16, 2023 @05:09PM (#37538724)
Can Tailscale magic DNS + tunnel obscure things? Or only when you keep a service within the tailnet? (Still a + for selfhosters)
Re:Subdomain.center – discover all subdomains for a domain by mixdup on Saturday September 16, 2023 @08:12AM (#37534131)
Were these automated "attacks" hitting you by hostname or IP? Because there's a chance you would've been getting them regardless just from people scanning the entire IPv4 space
Re:Subdomain.center – discover all subdomains for a domain by fuzzy2 on Saturday September 16, 2023 @10:22AM (#37534997)
They would not have been reverse proxied to the Docker container without the hostname.