Ravindra BagaleCourses & study guides Track your progress

Guides

How to Find Subdomains of a Website with Amass (Own Scope)

To discover subdomains for a domain in your written scope, install Amass and run a passive enum: amass enum -passive -d example.com -o subs.txt. Passive mode uses public sources and does not flood the target. Always stay inside permission.

Quick answer

sudo apt install -y amass   # Kali / Debian
amass enum -passive -d example.com -o subs.txt
wc -l subs.txt; head subs.txt

Why find subdomains?

Attackers map dev, staging, old-vpn before they touch the main site. Defenders must find those names first. Elena in Madrid and Arjun in Surat both keep a living subdomain list for their own companies.

What does Amass do?

Amass gathers names from public sources (certificates, DNS datasets, search data depending on config). Passive mode avoids loud guesses against the target.

How do I run it step by step?

  1. Write the domain you own, for example oleole.in (sample).
  2. Install (Kali example):
    sudo apt update && sudo apt install -y amass
    amass -version

    What it means: Confirms Amass is installed.

  3. Passive enumeration:
    amass enum -passive -d example.com -o subs.txt
    head -20 subs.txt
    www.example.com
    mail.example.com
    dev.example.com
    cdn.example.com

    What it means: Four names found from public sources. Investigate dev.example.com if you did not expect it.

  4. Sort and diff next week:
    sort -u subs.txt > subs-sorted.txt
    comm -13 last-week.txt subs-sorted.txt

    What it means: Shows names that appeared since last week.

  5. For each new name: who owns it, is HTTPS on, is it still needed?

Do not run aggressive brute force against third-party domains.

Ravindra Bagale's Tip

Passive first. Active brute force can look like an attack in SOC dashboards. For Sahyadri Traders' own domain, Neha in Pune runs passive Amass weekly and diffs the list for surprise hostnames.

Quick quiz: check what you learned

  1. Which Amass flag keeps discovery passive (no active probing)?

    1. -passive for DNS-only discovery
    2. -brute-all on production hosts
    3. -exploit to attack live hosts
    4. -T5 for maximum nmap speed
    Show answer

    A. -passive uses public sources only.

  2. Before enumerating subdomains of a company site, you should:

    1. Have written authorisation for that domain
    2. Scan every random .com you can find
    3. Post results on a public forum first
    4. Disable logging on your laptop
    Show answer

    A. Only enumerate domains you own or have permission for.

Learn it properly

This guide is the short path. These pages go deeper, with labs:

Frequently asked questions

What tool finds subdomains?

Amass is a common choice. Subfinder and Certificate Transparency logs help too.

Is passive Amass safe?

Safer than active brute force because it queries public data, not the target heavily. Still need permission for your engagement rules.

Why do subdomains matter for security?

Forgotten apps (dev, old-jira, vpn2) often miss patches and become entry points.

Can I scan any company domain?

No. Only with authorisation. Random scanning can be illegal.

Related course lesson?

Cyber 36.2 Amass subdomain discovery.