๐ก๏ธ Mastering Nmap: From Basic Scans to Vulnerability Detection
Learn Nmap Commands with Real Examples (Beginner to Intermediate Guide)
Are you new to Nmap or looking to improve your network scanning skills? ๐จโ๐ป
In this blog, Iโll walk you through Nmap basics, useful scanning techniques, and even Nmap scripting for vulnerability detection. This blog complements the video I posted on YouTube channel โ if you havenโt seen it yet, check it out for a full walkthrough! ๐ฅ
๐ What is Nmap?
Nmap (Network Mapper) is a powerful open-source tool used for:
– Scanning networks
– Discovering hosts and services
– Detecting open ports ๐
– Identifying vulnerabilities
๐งฐ How to Install Nmap
๐ Linux
sudo apt install nmap
๐ Windows
Download the setup from: https://nmap.org/download.html
๐งช Basic Nmap Commands
โ 1. Simple Host Scan
nmap <target-ip>
Example:
nmap 192.168.1.1
๐ Scans for open ports on a single host.
โ 2. Scan Multiple Hosts
nmap 192.168.1.1 192.168.1.2
Example:
nmap 192.168.1.1-50
๐ You can also scan a range.
โ 3. Scan an Entire Subnet
nmap 192.168.1.0/24
๐ Useful in identifying all live hosts in a local network.
โ 4. Aggressive Scan
nmap -A <target-ip>
๐ Includes OS detection, version detection, script scanning, and traceroute. โ ๏ธ Can be noisy โ use with caution on live systems.
๐ Intermediate Level: Nmap Scripting Engine (NSE)
โ 5. Script Scan Example
nmap --script vuln <target-ip>
๐ Scans the target for common vulnerabilities using default NSE scripts.
โ 6. Running Specific Script
nmap --script http-enum <target-ip>
๐ Enumerates directories on a web server.
โ 7. Running Multiple Scripts
nmap --script "ftp*,http*" <target-ip>
๐ Scans using all FTP and HTTP-related scripts.
๐ Save Output to File
โ 8. Save Scan Result to TXT
nmap -oN result.txt <target-ip>
๐ For documentation or reporting purposes.
๐ผ๏ธ Sample Scan Output
Starting Nmap 7.93 ( https://nmap.org ) at 2025-05-23
Nmap scan report for 192.168.1.10
Host is up (0.0040s latency).
Not shown: 996 closed tcp ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
443/tcp open https
๐ Real-World Use Case
Letโs say you want to scan a web server to find possible vulnerabilities:
nmap -p 80,443 --script vuln <target-ip>
๐ This scans ports 80 and 443 with vulnerability scripts. Ideal for finding SSL or HTTP misconfigs.
โ ๏ธ Responsible Usage
๐ Always get permission before scanning any network you donโt own. Unauthorized scanning is illegal and unethical.
๐ Conclusion
Nmap is more than just a port scanner. With the right knowledge, you can use it to:
โ๏ธ Detect services
โ๏ธ Identify vulnerabilities
โ๏ธ Automate scans
โ๏ธ Generate reports
๐ฝ๏ธ Watch the full video here for live demos and deeper explanation:
๐ [Your YouTube Video Link]



