YUNOVA · Ethical Hacking

Module 5: Scanning and enumeration

Notes for offline study · 30 November 2026

Host discovery with Nmap

Key points

  • Host discovery का लक्ष्य है यह पता करना कि network पर कौन से devices चालू हैं।
  • Nmap में -sn option ping scan करता है, यानी ports scan किए बिना सिर्फ़ live hosts ढूँढता है।
  • Local network पर Nmap ARP requests से hosts ढूँढता है, जो ICMP से ज़्यादा भरोसेमंद है।
  • Scan सिर्फ़ अपने lab या authorised range पर करें।

Port scanning with Nmap

Key points

  • Port scan बताता है कि host पर कौन से ports open, closed या filtered हैं।
  • -sS SYN (half-open) scan है और -sT पूरा TCP connect scan; -sU UDP ports scan करता है।
  • Default में Nmap सबसे आम 1000 ports scan करता है; -p- से सभी 65535 TCP ports scan होते हैं।
  • Scan results को -oN या -oA से file में save करें ताकि report में evidence रहे।

Service and version detection

Key points

  • -sV option open ports पर चल रही service और उसका version पहचानने की कोशिश करता है।
  • Version जानना ज़रूरी है क्योंकि known vulnerabilities अक्सर specific versions से जुड़ी होती हैं।
  • -O option operating system detection करता है और -A version, OS, scripts और traceroute एक साथ चलाता है।
  • Version detection हमेशा 100% सही नहीं होता, इसलिए result को दूसरे तरीकों से confirm करें।

Nmap scripting engine

Key points

  • Nmap Scripting Engine (NSE) Lua में लिखी scripts से Nmap की क्षमता बढ़ाता है।
  • -sC default scripts चलाता है और --script से किसी खास script या category को चुना जाता है।
  • Scripts categories में बँटी हैं, जैसे default, safe, discovery, vuln, auth, brute और intrusive।
  • intrusive और brute scripts target पर असर डाल सकती हैं, इसलिए इन्हें सिर्फ़ स्पष्ट permission के साथ चलाएँ।

Enumerating SMB, FTP and web services

Key points

  • Enumeration में open services से usernames, shares, versions और configuration जैसी विस्तृत जानकारी निकाली जाती है।
  • SMB (port 445) पर shares और users की जानकारी smbclient या enum4linux जैसे tools से देखी जाती है।
  • FTP (port 21) पर anonymous login allowed होना एक आम misconfiguration है।
  • Web services पर directories और technologies पहचानने के लिए gobuster, dirb या whatweb जैसे tools इस्तेमाल होते हैं।

Vulnerability scanning on the lab

Key points

  • Vulnerability scanner known vulnerabilities और misconfigurations को अपने आप ढूँढता है।
  • OpenVAS (Greenbone) और Nessus आम vulnerability scanners हैं; Nikto web servers के लिए है।
  • Scanner false positives दे सकता है, इसलिए हर finding को manually verify करें।
  • Vulnerability scans भारी traffic बनाते हैं, इसलिए इन्हें lab या authorised scope में ही चलाएँ।

Free on YUNOVA · yunova.in · Sign in to add your own lesson notes to this sheet.