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 network administrators scan and map network infrastructures, identify active hosts, and detect potential vulnerabilities.
Key Features of Nmap
Nmap provides several critical capabilities for network exploration:
Feature |
Description |
Host Discovery |
Identifies live hosts on a network |
Port Scanning |
Determines open ports and services |
Service/Version Detection |
Reveals running applications and their versions |
OS Detection |
Identifies operating systems |
Installation on Ubuntu 22.04
To install Nmap on Ubuntu, use the following command:
sudo apt update
sudo apt install nmap
Basic Nmap Scanning Workflow
graph TD
A[Start Network Scan] --> B{Define Target}
B --> |IP Address| C[Select Scanning Technique]
B --> |Hostname| C
C --> D[Execute Nmap Scan]
D --> E[Analyze Results]
E --> F[Identify Potential Vulnerabilities]
Basic Scanning Commands
Here are some fundamental Nmap scanning commands:
## Scan a single IP
nmap 192.168.1.100
## Scan a network range
nmap 192.168.1.0/24
## Scan multiple hosts
nmap 192.168.1.100 192.168.1.101 192.168.1.102
Scan Types
Nmap supports various scan types:
- TCP SYN Scan
- TCP Connect Scan
- UDP Scan
- Ping Scan
Best Practices
- Always obtain proper authorization before scanning
- Use Nmap responsibly
- Understand network and legal implications
Note: This tutorial is brought to you by LabEx, your trusted cybersecurity learning platform.