Intro To Tools: Nmap, Wireshark, Netstat
In network and cybersecurity, understanding your network and monitoring traffic is essential. Three foundational tools that help with this are Nmap, Wireshark, and Netstat. Each serves a different purpose but together they provide a strong foundation for network analysis and security testing.
This guide explains these tools in a beginner-friendly way.
Nmap
What Is Nmap
Nmap (Network Mapper) is a network scanning tool that allows you to discover devices, services, and open ports on a network. It is widely used for:
Official website: Nmap
How Nmap Works
Nmap sends packets to a target machine and analyzes responses to determine:
Basic Nmap Commands
Scan a Single IP
nmap 192.168.1.10
Scan a Range of IPs
nmap 192.168.1.1-20
Scan Common Ports Only
nmap -F 192.168.1.10
Scan All Ports
nmap -p- 192.168.1.10
Service Detection
nmap -sV 192.168.1.10
This detects running services and versions.
Wireshark
What Is Wireshark
Wireshark is a network protocol analyzer. It captures network traffic and allows you to inspect packets in detail.
It is used for:
Official website: Wireshark
How Wireshark Works
Wireshark captures packets from a network interface and displays:
Basic Usage
Filtering Traffic
Example: Show only HTTP traffic:
http
Show packets from a specific IP:
ip.addr == 192.168.1.10
Netstat
What Is Netstat
Netstat (Network Statistics) is a command-line tool that shows current network connections, listening ports, and routing tables.
It is available on:
Basic Netstat Commands
Show Active Connections
netstat -a
Show Listening Ports
netstat -l
Show PID With Connection (Linux)
netstat -tulpn
Windows Example
netstat -ano
This shows:
Practical Use Cases
Simple Combined Example
Below is a conceptual workflow using all three tools:
# 1. Scan the local network for live hosts and open ports nmap -sV 192.168.1.1-20 # 2. Start Wireshark on the main network interface to capture traffic wireshark # 3. Check your local machine's active connections netstat -tulpn
This combination allows you to:
Final Notes
Together, these tools give you a complete beginner-friendly toolkit for network analysis and security awareness.
# Nmap Examples
nmap 192.168.1.10
nmap 192.168.1.1-20
nmap -F 192.168.1.10
nmap -p- 192.168.1.10
nmap -sV 192.168.1.10
# Wireshark Filters (run inside Wireshark)
http
ip.addr == 192.168.1.10
# Netstat Examples
netstat -a
netstat -l
netstat -tulpn # Linux
netstat -ano # Windows
# Combined Example Workflow
nmap -sV 192.168.1.1-20
wireshark
netstat -tulpn