Nmap Basics
What is Nmap?
Nmap (Network Mapper) is a powerful open-source tool used for network discovery and security auditing. It helps cybersecurity professionals and system administrators scan and map network infrastructures, identify active hosts, detect open ports, and assess network vulnerabilities.
Key Features of Nmap
Nmap provides several essential capabilities for network exploration:
Feature |
Description |
Host Discovery |
Identify active hosts on a network |
Port Scanning |
Detect open, closed, and filtered ports |
Service/Version Detection |
Determine running services and their versions |
OS Detection |
Identify operating systems of target machines |
Basic Nmap Scanning Techniques
Simple Host Scan
## Scan a single IP address
nmap 192.168.1.100
## Scan a network range
nmap 192.168.1.0/24
Port Scanning Methods
graph TD
A[Nmap Port Scanning] --> B[TCP SYN Scan]
A --> C[TCP Connect Scan]
A --> D[UDP Scan]
A --> E[XMAS Scan]
TCP SYN Scan (Stealth Scan)
## Perform SYN stealth scan
nmap -sS 192.168.1.100
TCP Connect Scan
## Perform full TCP connection scan
nmap -sT 192.168.1.100
Installation on Ubuntu
## Update package list
sudo apt update
## Install Nmap
sudo apt install nmap
Basic Scanning Syntax
nmap [Scan Type] [Options] {target specification}
Practical Considerations
When using Nmap, always ensure:
- You have proper authorization
- Scanning is performed on networks you own or have explicit permission
- Respect legal and ethical boundaries
At LabEx, we recommend practicing Nmap techniques in controlled, legal environments to develop cybersecurity skills responsibly.
Common Scanning Scenarios
- Network Inventory
- Security Auditing
- Vulnerability Assessment
- Network Troubleshooting
By mastering Nmap basics, cybersecurity professionals can effectively map and understand network infrastructures, laying the groundwork for advanced security strategies.