36.2 Amass: Subdomain Discovery
Company cha ek domain asel (example.com), pan tyache subdomains (mail., dev., staging.) attackers la naye entry points detat. Amass (OWASP) subdomain discovery sathi standard tool aahe.
Passive vs active:
| Mode | Kay karto | Detection |
|---|---|---|
| Passive | Public sources (Certificate Transparency, DNS databases) – target la direct traffic nahi | Khup kami |
| Active | DNS queries, brute force wordlist – target DNS var load | Log madhe disto |
sudo apt install -y amass
# Passive only – preferred first step
amass enum -passive -d lab.local -o amass-passive.txt
# Active (lab domain you own / private lab ONLY)
amass enum -active -d lab.local -brute -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -o amass-active.txt
Placeholder: lab.local kiwa tumcha swatahcha domain. Strangers chya domains var brute force – gunha. Chapter 19 madhe whois/dig/theHarvester shiklo; Amass tyala motha picture deto.
Defence: Certificate Transparency logs monitor kara (crt.sh, your CA alerts), unused subdomains decommission kara, wildcard DNS careful theva, ani external attack-surface inventory (kay public aahe) nehmi update theva. Ghabru naka – he defender cha rozcha kaam aahe.
Ravindra Bagale's Tip
Students run Amass active brute force directly against a public domain "for practice" – that is illegal. Passive first; active only with written permission or in your own lab. Say the same in interviews: "I start passive, then active only in scope."
Ravindra Bagale's Tip – मराठी
Students Amass active brute force थेट public domain वर चालवतात "practice" म्हणून – हे illegal आहे. Passive आधी, active फक्त written permission किंवा स्वतःच्या lab मध्ये. Interview मध्ये पण हेच सांगा: "I start passive, then active only in scope."
Ravindra Bagale's Tip – हिंदी
Students Amass active brute force सीधे public domain पर चलाते हैं "practice" के नाम पर – यह illegal है. Passive पहले, active सिर्फ़ written permission या अपनी lab में. Interview में भी यही बताओ: "I start passive, then active only in scope."
Lab
Aaplya private lab domain (lab.local kiwa host-only DNS) var amass enum -passive -d lab.local chalaa. Output file save kara. Active brute fakt lab domain var try kara – bahercha konatahi domain nako. Note: kitne subdomains passive madhun mile, kitne active madhun.