LAB 04

Nmap Scanning Manual

Target discovery aur network mapping ka sabse powerful tool.

30 Pro Nmap Commands

Ye list aapka time bachayegi. Inhe terminal par try karein aur result dekhein.

Command Description (Hindi)
nmap [IP]Basic port scan (Top 1000 ports).
nmap -v [IP]Verbose mode (Zyada detail dikhayega).
nmap -p 80 [IP]Sirf specific port (80) scan karein.
nmap -p 1-100 [IP]Range scan (1 se 100 ports).
nmap -p- [IP]Sare 65535 ports scan karein.
nmap -sS [IP]Stealth Scan (Firewall bypass ke liye).
nmap -sT [IP]TCP Connect Scan (Full connection).
nmap -sU [IP]UDP Port scan (Slow hota hai).
nmap -sV [IP]Service Version detection.
nmap -O [IP]Operating System (OS) detection.
nmap -A [IP]Aggressive scan (OS, Services, Scripts).
nmap -sn [IP]Ping scan (Check host is live or not).
nmap -iL list.txtEk file se sare IPs scan karein.
nmap -F [IP]Fast scan (Top 100 ports only).
nmap --top-ports 20 [IP]Top 20 most common ports scan.
nmap -Pn [IP]Skip ping (Jab ICMP blocked ho).
nmap -T4 [IP]Timing set karna (Faster scan).
nmap -f [IP]Fragment packets (Firewall bypass).
nmap --script=vuln [IP]Security vulnerabilities check karna.
nmap --script=auth [IP]Auth related scripts chalana.
nmap -oN output.txtResult ko normal text file me save karein.
nmap -oX output.xmlXML format me result save karein.
nmap -sC [IP]Default scripts ke sath scan karna.
nmap -reason [IP]Kyu port open ya closed hai, wajah janein.
nmap -6 [IP]IPv6 scanning ke liye.
nmap --badsum [IP]Bad checksum packets bhejna (Firewall test).
nmap --open [IP]Sirf open ports dikhao, baaki chhupao.
nmap --iflistApne network interfaces ki list dekhna.
nmap --packet-traceDekho har packet kahan ja raha hai.
nmap --helpHelp menu open karne ke liye.

Step 1: Network Discovery

Pehle humein ye dekhna hai ki target up hai ya nahi. Agar host down hai toh scan fail ho jayega.

nmap -sn 192.168.1.1

Step 2: Service & OS Identification

Ab hum deep jayenge aur dekhenge ki machine par kya chal raha hai. Linux hai ya Windows? Apache hai ya Nginx?

nmap -sV -O 192.168.1.1
Starting Nmap 7.92...
OS details: Linux 5.x
Port 80: Apache 2.4.41

Step 3: Vulnerability Scanning

Hacking ka real kaam yahan shuru hota hai. Hum Nmap ko bolenge ki wo target par vulnerabilities dhunde.

nmap --script=vuln 192.168.1.1
💡 Tip: Nmap Scripts (.nse) bahut powerful hote hain. Inhe use karte waqt hamesha output file (-oN) save karein taaki analysis asan ho.

Ethical Warning

Bina permission kisi public server (jaise google.com) ko scan na karein. Sirf apne local devices ya lab machines (jaise TryHackMe) par hi practice karein.