π± Mobile Security Tips
Nina Kovacs — Consumer Security Analyst
{
“title”: “Essential Security Tool Cheatsheet for Nmap”,
“content”: “
What is Nmap?
Nmap (Network Mapper) is an open-source network scanning tool used for network discovery and security auditing. It is widely utilized by security analysts and penetration testers to discover hosts and services on a computer network, thus creating a network map.
Installation
Nmap is available on various platforms including Windows, macOS, and Linux. To install Nmap, follow these commands based on your operating system:
# On Ubuntu/Debiansudo apt update\nsudo apt install nmap
# On macOSbrew install nmap
# On WindowsDownload the installer from https://nmap.org/download.html
Basic Syntax
The basic syntax of Nmap is:
nmap [options] [target]
Where options can vary widely based on what you want to accomplish, and target can be a specific IP address, a hostname, or a range of IPs.
Network Discovery
Network discovery lets you find hosts in a network.
| Flag | Description |
|---|---|
| -sn | Ping scan – disable port scan |
| -sP | Ping scan (deprecated) |
Example command:
nmap -sn 192.168.1.0/24
Port Scanning
Scanning for open ports is critical in assessing the security posture of a system.
| Flag | Description |
|---|---|
| -p | Specify port(s) to scan |
| -sS | TCP SYN scan (stealth scan) |
| -sT | TCP connect scan |
Example command:
nmap -p 1-65535 -sS 192.168.1.1
Service Version Detection
Identify services running on open ports and their versions.
| Flag | Description |
|---|---|
| -sV | Probe open ports to determine service/version info |
Example command:
nmap -sV 192.168.1.1
Operating System Detection
Determine the operating system of the target host.
| Flag | Description |
|---|---|
| -O | Enable OS detection |
Example command:
nmap -O 192.168.1.1
Quick Reference Table
Hereβs a quick summary of commonly used Nmap flags:
| Flag | Description |
|---|---|
| -sn | Ping scan |
| -sS | TCP SYN scan |
| -p | Port(s) to scan |
| -sV | Service/version detection |
| -O | OS detection |
Pro Tips
- Use
-T4for faster scans. - Combine options for comprehensive scanning, e.g.,
nmap -sS -sV -O 192.168.1.1. - Use
-oAto save the output in multiple formats (XML, grepable, etc.).
Real-World Examples
1. Performing a comprehensive scan:
nmap -sS -sV -O -p- 192.168.1.1
2. Discovering all live hosts:
nmap -sn