<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://pablomurad.com/assets/feed.xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
    <title>Pablo Murad · Quick Tips</title><link>https://pablomurad.com/quick-tips/</link>
    <atom:link href="https://pablomurad.com/feeds/quick-tips/" rel="self" type="application/rss+xml" />
    <atom:link href="https://websubhub.com/hub" rel="hub" />
    <description>The series is for the small stuff from my day to day: things I test, tweaks I end up keeping, attempts and experiments that don&apos;t need a whole post. Short on purpose, the kind of thing that reads in a couple of minutes.</description><language>en</language><generator>pablawn-v1</generator>
    <item><title>QT #1 - Keeping a subdomain off the scanners&apos; radar</title><link>https://pablomurad.com/keeping-a-subdomain-off-the-scanners-radar/</link><guid isPermaLink="true">https://pablomurad.com/keeping-a-subdomain-off-the-scanners-radar/</guid><pubDate>Fri, 20 Nov 2026 15:46:00 -0300</pubDate><dc:creator>Pablo Murad</dc:creator><description>A Quick Tip on hiding a subdomain: names leak through certificate logs, DNS brute force and IP scans. A wildcard certificate, wildcard DNS, an nginx catch-all and a name nobody guesses make a private one much harder to find.</description><content:encoded><![CDATA[<p>This is the first Quick Tip. The series is for the small stuff from my day to day: things I test, tweaks I end up keeping, attempts and experiments that don't need a whole post. Short on purpose, the kind of thing that reads in a couple of minutes.</p><p>The first one came from a private service I keep on a subdomain. I wanted it harder to find, and the first thing I learned was that its name was already public, with no way to take it back.</p><h2 id="how-a-subdomain-gets-found">How a subdomain gets found</h2><ul>
<li value="1">
<strong>Certificate logs.</strong> Every certificate a public CA issues goes into Certificate Transparency logs,<sup data-footnote-ref="1" id="fnref-1"><a href="https://pablomurad.com/keeping-a-subdomain-off-the-scanners-radar/#fn-1" class="fn-ref" role="doc-noteref">1</a></sup> and anyone can search them on <a href="https://crt.sh">crt.sh</a>. The name lands there the day the certificate exists, and it never leaves.</li>
<li value="2">
<strong>DNS brute force.</strong> Tools try long lists of common names: admin, dev, vault, secrets. If the name is on the list, it gets found.</li>
<li value="3">
<strong>Scanning by IP.</strong> Someone connects straight to the server's address and reads the certificate it hands back, names included.</li>
<li value="4">
<strong>Search engines.</strong> Only if a page ever gets indexed.</li>
<li value="5">
<strong>Passive DNS.</strong> Companies collect the DNS answers that pass through resolvers and sell the history.<sup data-footnote-ref="2" id="fnref-2"><a href="https://pablomurad.com/keeping-a-subdomain-off-the-scanners-radar/#fn-2" class="fn-ref" role="doc-noteref">2</a></sup> Nothing to do about this one.</li>
</ul><h2 id="1-a-wildcard-certificate">1. A wildcard certificate</h2><p>With a certificate for <code>*.example.org</code>, the logs show only the wildcard, and new subdomains stop showing up there. The cover of this post is crt.sh's page for example.com, which does exactly this: every entry is <code>*.example.com</code>.</p><p>Wildcards need the DNS-01 challenge, so the ACME client needs API access to the DNS. On Porkbun, with acme.sh:</p><ol>
<li value="1">Create an API key at porkbun.com/account/api. It comes as a key and a secret.</li>
<li value="2">Turn on API Access in the domain's settings. Porkbun makes each domain opt in.</li>
<li value="3">Then:</li>
</ol><div class="code-block"><pre class="shiki vitesse-dark" style="background-color:#121212;color:#dbd7caee" tabindex="0" data-lang="plain"><code><span class="line"><span>export PORKBUN_API_KEY="pk1_..."</span></span>
<span class="line"><span>export PORKBUN_SECRET_API_KEY="sk1_..."</span></span>
<span class="line"><span>acme.sh --issue --dns dns_porkbun -d example.org -d '*.example.org'</span></span></code></pre></div><p>Any other DNS provider works the same way, only the plugin name and the variables change. acme.sh and lego know well over a hundred providers, and Certbot has plugins for the big ones, like <code>certbot-dns-cloudflare</code>. Whatever the provider, a key that can edit the whole zone is a powerful secret, so it's worth limiting it to that one domain when the provider allows.</p><h2 id="2-wildcard-dns">2. Wildcard DNS</h2><p>Point <code>*.example.org</code> at the server. Every invented name now resolves to the same address, and DNS brute force can't tell what exists from what doesn't.</p><figure class="attachment attachment--image"><img src="https://pablomurad.com/media/93x3carmm9unuetoyny4d928m9al/wildcard-dns-dig.webp" alt="A terminal in a local lab. dig asks for secrets.example.org, admin.example.org and qz81-nothing-here.example.org, and every answer is the same address, 192.0.2.10." width="718" height="212" loading="lazy" srcset="https://pablomurad.com/img/ZagquUtDVP-480.webp 480w, https://pablomurad.com/img/ZagquUtDVP-718.webp 718w" sizes="(min-width: 44rem) 42rem, 100vw" decoding="async"></figure><p>Then nginx needs a catch-all that gives nothing back to names it doesn't know:</p><div class="code-block" data-lang="nginx"><pre class="shiki vitesse-dark" style="background-color:#121212;color:#dbd7caee" tabindex="0" data-lang="nginx"><code><span class="line"><span style="color:#CB7676">server</span><span style="color:#DBD7CAEE"> {</span></span>
<span class="line"><span style="color:#4D9375">listen </span><span style="color:#4C9A91">80</span><span style="color:#4D9375"> default_server</span><span style="color:#666666">;</span></span>
<span class="line"><span style="color:#4D9375">listen </span><span style="color:#4C9A91">443</span><span style="color:#DBD7CAEE"> ssl </span><span style="color:#4D9375">default_server</span><span style="color:#666666">;</span></span>
<span class="line"><span style="color:#4D9375">server_name </span><span style="color:#DBD7CAEE">_</span><span style="color:#666666">;</span></span>
<span class="line"><span style="color:#4D9375">ssl_reject_handshake on</span><span style="color:#666666">;</span></span>
<span class="line"><span style="color:#4D9375">return</span><span style="color:#4C9A91"> 444</span><span style="color:#DBD7CAEE">;</span></span>
<span class="line"><span style="color:#DBD7CAEE">}</span></span></code></pre></div><p><code>ssl_reject_handshake</code> refuses TLS to anyone who doesn't ask for a known name, so connecting by IP reveals nothing. <code>return 444</code> closes the connection without an answer.<sup data-footnote-ref="3" id="fnref-3"><a href="https://pablomurad.com/keeping-a-subdomain-off-the-scanners-radar/#fn-3" class="fn-ref" role="doc-noteref">3</a></sup> Add <code>add_header X-Robots-Tag "noindex" always;</code> to the real site and search engines stay away too.</p><figure class="attachment attachment--image"><img src="https://pablomurad.com/media/cgsusv854csn790vvg1phr4u60xy/nginx-catch-all-curl.webp" alt="A terminal in a local lab running curl four times. Connecting to the IP 192.0.2.10 over HTTPS and to secrets.example.org over HTTPS both fail with &quot;tlsv1 unrecognized name&quot;. secrets.example.org over HTTP gets &quot;Empty reply from server&quot;. Only lantern-9f2c.example.org answers, with the text &quot;you found it&quot;." width="982" height="256" loading="lazy" srcset="https://pablomurad.com/img/cHe8aQNbJp-480.webp 480w, https://pablomurad.com/img/cHe8aQNbJp-800.webp 800w, https://pablomurad.com/img/cHe8aQNbJp-982.webp 982w" sizes="(min-width: 44rem) 42rem, 100vw" decoding="async"></figure><h2 id="3-a-name-nobody-guesses">3. A name nobody guesses</h2><p>Wildcard DNS beats DNS brute force, but a scanner that also tries HTTP still gets an answer from the real name, so a name on its wordlist gets found anyway. The real service needs something no list has, like <code>lantern-9f2c</code> instead of <code>secrets</code>.</p><p>And if the old name is already in the logs, renaming is the only fix: a wildcard only protects the names that come after it. Anything that points to the old name, like a login callback, has to move along with it.</p><h2 id="keep-in-mind">Keep in mind</h2><p>This is a layer of obscurity on top of the real protection. The service still needs a login and updates. What a hidden name buys is fewer bots knocking.</p><section class="footnotes" role="doc-endnotes"><h2>Notes</h2><ol data-footnotes="">
<li id="fn-1"><p>Certificate Transparency came out of Google after the 2011 DigiNotar breach, when a hacked CA issued fake certificates for Google domains. Since 2018, Chrome only trusts new certificates that were logged, so every public CA logs everything. <a class="fn-back" href="https://pablomurad.com/keeping-a-subdomain-off-the-scanners-radar/#fnref-1" role="doc-backlink" aria-label="Back to the text">↩</a></p></li>
<li id="fn-2"><p>SecurityTrails is one of the best known sellers of this history. Their records go back years, so a name that ever resolved publicly can show up there even after it's gone. <a class="fn-back" href="https://pablomurad.com/keeping-a-subdomain-off-the-scanners-radar/#fnref-2" role="doc-backlink" aria-label="Back to the text">↩</a></p></li>
<li id="fn-3"><p>444 isn't a real HTTP status. nginx uses it internally to mean "close the connection and send nothing", which the client sees as an empty reply. <code>ssl_reject_handshake</code> arrived in nginx 1.19.4, in 2020. <a class="fn-back" href="https://pablomurad.com/keeping-a-subdomain-off-the-scanners-radar/#fnref-3" role="doc-backlink" aria-label="Back to the text">↩</a></p></li></ol></section>]]></content:encoded></item>
</channel></rss>
