<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ domain - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ domain - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Mon, 25 May 2026 15:48:42 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/domain/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Discover Hidden Subdomains as an Ethical Hacker ]]>
                </title>
                <description>
                    <![CDATA[ Subdomains are an essential part of a website’s infrastructure. They provide additional functions in a web application, such as APIs, admin portals, and staging environments. As an ethical hacker, discovering subdomains is a critical step in learning... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-discover-hidden-subdomains-as-an-ethical-hacker/</link>
                <guid isPermaLink="false">677d84ad446398ca6f670bef</guid>
                
                    <category>
                        <![CDATA[ #cybersecurity ]]>
                    </category>
                
                    <category>
                        <![CDATA[ gobuster ]]>
                    </category>
                
                    <category>
                        <![CDATA[ domain ]]>
                    </category>
                
                    <category>
                        <![CDATA[ subdomains ]]>
                    </category>
                
                    <category>
                        <![CDATA[ fuzzing ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Ethical Hacking ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Manish Shivanandhan ]]>
                </dc:creator>
                <pubDate>Tue, 07 Jan 2025 19:46:53 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806321604/dec39da9-6dd8-4a73-ba64-5cf894ce34f4.webp" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>Subdomains are an essential part of a website’s infrastructure. They provide additional functions in a web application, such as APIs, admin portals, and staging environments.</p>
<p>As an ethical hacker, discovering subdomains is a critical step in learning the attack surface of a target. Subdomains might not be protected well, unlike the main domain. So they can be a great entry point for security auditing or bug bounty programs.</p>
<p>In this article, I’ll walk you through how to find subdomains using multiple methods. We will use <a target="_blank" href="http://tesla.com/">tesla.com</a> as our example in subdomain research.</p>
<blockquote>
<p><em>Note: tesla.com is part of bug bounty programs, so we have permission to scan it for subdomains. If you are doing this in another web application, make sure you have permission.</em></p>
</blockquote>
<h2 id="heading-crtsh"><strong>Crt.sh</strong></h2>
<p>One of the easiest ways to start is by checking Certificate Transparency (CT) logs using <a target="_blank" href="https://crt.sh/">crt.sh</a>. This website records every SSL/TLS certificate issued for a domain, including subdomains.</p>
<p>To search for Tesla’s subdomains, visit <a target="_blank" href="https://crt.sh/">crt.sh</a> and enter <code>%.tesla.com</code> as the query. The <code>%</code> acts as a wildcard to match any subdomains.</p>
<p>Let's look at the results:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806389562/eabc92c8-6fff-45fb-ba1c-00f582a31c4f.webp" alt="tesla.com subdomain research - results of running tesla.com through crt.sh" class="image--center mx-auto" width="1100" height="471" loading="lazy"></p>
<p>We can see a lot of interesting subdomains listed in the results. These subdomains may belong to different parts of Tesla’s infrastructure.</p>
<p>For example, <code>shop.tesla.com</code> is likely for their online store, while <code>api.tesla.com</code> could host application programming interfaces.</p>
<p>Using <code>crt.sh</code> is passive, meaning it doesn’t interact with the target, making it both safe and stealthy.</p>
<p>Note that <a target="_blank" href="http://crt.sh">crt.sh</a> will only display subdomains that have valid certificates. If a subdomain uses self-signed certificates or doesn’t use SSL/TLS at all, it may not appear in these logs. Despite this limitation, <a target="_blank" href="http://crt.sh">crt.sh</a> remains a quick and efficient starting point for subdomain enumeration.</p>
<h2 id="heading-sublist3r"><strong>Sublist3r</strong></h2>
<p><a target="_blank" href="https://github.com/aboul3la/Sublist3r">Sublist3r</a> is an open-source tool to automate finding subdomains. It’s helpful in both security assessments and general reconnaissance.</p>
<p>By using multiple search engines (like Google, Bing, Yahoo, and more) Sublist3r finds subdomains that might otherwise remain hidden.</p>
<p>Sublist3r’s command-line interface is simple to use — you give it a domain, and Sublist3r goes to work.</p>
<p>Thanks to its open-source nature, it’s actively maintained and improved by the security community.</p>
<p>Sublist3r is not pre-installed on Kali, so lets go ahead and install it. First, clone the repository and install the requirements:</p>
<pre><code class="lang-plaintext">git clone https://github.com/aboul3la/Sublist3r.git
cd Sublist3r
sudo pip install -r requirements.txt
</code></pre>
<p>Now we are ready to use the sublist3r tool. Here is the syntax to use sublist3r:</p>
<pre><code class="lang-plaintext">python sublist3r.py -d tesla.com
</code></pre>
<p>After a few minutes, Sublist3r will return a list of discovered subdomains. The <code>-d</code> flag tells sublist3r that the domain to use is tesla.com</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806446961/b2f239bf-5a9b-4da6-a875-d9326e2b0621.webp" alt="sublist3r response" class="image--center mx-auto" width="1100" height="313" loading="lazy"></p>
<p>You can see that sublist3r has found more than 300 subdomains of <a target="_blank" href="http://tesla.com">tesla.com</a>. Sublist3r is an excellent way to jump-start the recon process, especially if you want to automate the collection of subdomains without installing numerous separate tools.</p>
<p>Note that Sublist3r relies on the APIs of these search engines and other data sources. So it can sometimes miss subdomains that haven’t been crawled or indexed.</p>
<h2 id="heading-google-dorking"><strong>Google Dorking</strong></h2>
<p>Google dorking (sometimes called “Google hacking”) refers to the practice of using special search queries on Google. These operators help to find hidden information, sensitive data, or other resources that would otherwise be hard to locate.</p>
<p>Common operators include <code>site:</code>, <code>inurl:</code>, <code>filetype:</code>, and <code>intitle:</code>, among many others. Let’s start with the <code>site:</code> operator:</p>
<pre><code class="lang-plaintext">site:*.tesla.com
</code></pre>
<p>This query searches for any subdomain of <a target="_blank" href="http://tesla.com"><code>tesla.com</code></a>. Here are some search results.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806489328/fb4187aa-aa35-45d7-b975-5487de0093e2.webp" alt="tesla.com google dork" class="image--center mx-auto" width="1100" height="619" loading="lazy"></p>
<p>To dig deeper, try combining <code>site:</code> with other operators. For example, we can use the <code>inurl</code> operator with the keyword ‘admin’ to find URLs containing the word admin.</p>
<pre><code class="lang-plaintext">site:*.tesla.com inurl:admi
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806522371/02c44cdd-1bc3-4c8c-822a-16f883b6c166.webp" alt="02c44cdd-1bc3-4c8c-822a-16f883b6c166" class="image--center mx-auto" width="1100" height="604" loading="lazy"></p>
<p>By using these operators (known as Google dorks), you can filter search results to find specific file types, directories, or even private information that may be unintentionally exposed on the internet.</p>
<p>Dorking can produce a lot of data, so you may need to carefully filter your searches to avoid getting flooded with irrelevant information.</p>
<p><a target="_blank" href="https://www.stealthsecurity.sh/p/google-dorking-the-ultimate-guide-to-finding-hidden-information-on-the-web">Here is a full tutorial</a> on Google dorking.</p>
<h2 id="heading-fuzzing-with-gobuster"><strong>Fuzzing with GoBuster</strong></h2>
<p>Now what if the subdomains of a target are not listed anywhere on the internet? We fuzz for it.</p>
<p>Fuzzing is simply brute-forcing potential subdomain names by trying combinations from a wordlist. A wordlist is a list of words that we will use along with the fuzzing tool to see if a subdomain exists.</p>
<p>A subdomain wordlist can contain words like:</p>
<pre><code class="lang-plaintext">ftp
root
admin
portal
api
</code></pre>
<p>Tools like Gobuster and Ffuf can use a wordlist to check whether these subdomains exist. Here is a sample <a target="_blank" href="https://raw.githubusercontent.com/danielmiessler/SecLists/refs/heads/master/Discovery/DNS/subdomains-top1million-110000.txt">subdomain wordlist</a>.</p>
<h3 id="heading-how-gobuster-works"><strong>How Gobuster Works</strong></h3>
<p><a target="_blank" href="https://www.stealthsecurity.sh/p/finding-hidden-directories-subdomains-s3-buckets-using-gobuster">Gobuster</a> is a fast brute-force tool for discovering hidden URLs, files, and directories within websites.</p>
<p>Ffuf is a wonderful web fuzzer, but Gobuster is a faster and more flexible alternative. Gobuster has support for extensions with which we can increase its capabilities.</p>
<p>Gobuster also can scale using multiple threads and perform parallel scans to speed up results.</p>
<p>Gobuster comes pre-installed in Kali Linux. Let’s run the following command to look for subdomains. You can find the word list under /usr/share/wordlists/SecLists in Kali Linux.</p>
<pre><code class="lang-plaintext">gobuster dns -d tesla.com -w /usr/share/wordlists/SecLists/Discovery/DNS/subdomains-top1million-110000.txt
</code></pre>
<p>The above command checks each word in the wordlist to see if it resolves to a valid subdomain. Here’s a sample output:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1735806581200/46b3d437-9918-416c-a510-f647e9ac303e.webp" alt="46b3d437-9918-416c-a510-f647e9ac303e" class="image--center mx-auto" width="1100" height="371" loading="lazy"></p>
<p>Gobuster’s results show valid subdomains, including some that might not appear in public databases, like <code>staging.tesla.com</code> or <code>dev.tesla.com</code>.</p>
<p>Fuzzing should be combined with other methods since the results are only as good as the wordlist. For example, prod-version-2.tesla.com can be a subdomain which may not be a part of the wordlist.</p>
<h2 id="heading-other-methods-for-subdomain-discovery"><strong>Other Methods for Subdomain Discovery</strong></h2>
<h3 id="heading-dns-zone-transfers"><strong>DNS Zone Transfers</strong></h3>
<p>While rare, misconfigured DNS servers can allow zone transfers, revealing all subdomains at once. You can test this using <code>dig</code>:</p>
<pre><code class="lang-plaintext">dig axfr @ns1.tesla.com tesla.com
</code></pre>
<p>If the server is properly secured, it won’t allow a zone transfer. But if it’s misconfigured, you might uncover every subdomain Tesla uses.</p>
<h3 id="heading-online-tools"><strong>Online Tools</strong></h3>
<p>Websites like <a target="_blank" href="https://securitytrails.com/">SecurityTrails</a>, <a target="_blank" href="https://shodan.io/">Shodan</a>, and <a target="_blank" href="https://censys.io/">Censys</a> aggregate subdomain data. These tools provide a centralized view of publicly available information.</p>
<h3 id="heading-inspecting-javascript-files"><strong>Inspecting JavaScript Files</strong></h3>
<p>Subdomains often appear in a website’s JavaScript files. By examining Tesla’s website, you might find references to API endpoints or other subdomains.</p>
<h2 id="heading-post-subdomain-discovery">Post-Subdomain Discovery</h2>
<p>Once you have a list of subdomains, we can probe them further. We may discover sign-in portals, development pages, or API endpoints.</p>
<p>Ethical hackers typically use port scanning and service enumeration tools like Nmap and Nikto to find the open ports and running services on each subdomain. Identifying outdated software, insecure protocols, or default credentials is often the next critical step, as these are common weak points in any environment.</p>
<p>Subdomains often show us the broader infrastructure of the website if they are left unprotected.</p>
<h2 id="heading-conclusion"><strong>Conclusion</strong></h2>
<p>Subdomain discovery is a critical skill for ethical hackers. It helps us understand the complete picture of a web application. The more we know, the better entry points we have to gain access.</p>
<p>Before using these techniques, always ensure you have proper authorization. Subdomain discovery helps with security audits by uncovering hidden assets and helping organizations protect themselves from potential threats.</p>
<p>For more practical tutorials on cybersecurity, join our <a target="_blank" href="https://www.stealthsecurity.sh/"><strong>weekly newsletter</strong></a>. If you want to practice these subdomain discovery techniques through a hands-on lab, join us at the <a target="_blank" href="https://www.skool.com/hackershub"><strong>Hacker’s Hub</strong></a>.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
