Nmap Recon Guide: Tunnel Vision vs Landscape Scan
If you're on a Red Team mission โ even a simulated one โ you need to see what others can't. Sometimes that means scanning the entire battlefield. Sometimes it means focusing on a single sentry. In this article, we break down the two mindsets that every Nmap user must master: targeted reconnaissance and environmental mapping.
๐ช๏ธ PART 1 โ Tunnel Vision: Targeted Scanning
Imagine you already know the IP of a machine โ maybe it's a second PC at home, a test server, or an IoT device. Your job now is to go deep, not wide.
๐งญ Step 1 โ Find the Target IP
On the machine you want to scan, use the following command to find its IP address:
ip a
Look for a line like:
inet 192.168.1.42/24
This means the machine's IP is 192.168.1.42
. Make sure the machine is on the same network as yours so you can reach it.
๐ Optional Lab Setup
If you're learning, the easiest way to simulate this is to:
- Run a second VM (e.g., Ubuntu or Metasploitable) on the same host network
- Use
ip a
inside that VM to get its IP - Scan it from your main system using its local IP
This helps you practice scans in a safe and isolated environment.
๐ Step 2 โ Launch a Focused Scan
nmap -sC -sV -O -Pn 192.168.1.42
-sC
: run default scripts-sV
: detect service versions-O
: attempt OS detection-Pn
: skip host discovery (assume host is up)
This reveals open ports, services, software versions, and possible OS fingerprinting. It's the sniper approach โ you're focused on a single target.
๐ก Understanding Hosts, Ports & Services
๐ง Host
A host is any device connected to the network โ PC, smartphone, printer, or smart lightbulb. Each has an IP address (e.g., 192.168.1.42
).
๐ Ports
Ports are virtual doors used by services and applications to communicate over the network. Here are a few commonly found ones:
- 22 โ SSH (Secure Shell): Remote administration and login for Unix/Linux systems. If open, can be a target for brute-force login attempts.
- 80 โ HTTP: Unencrypted web traffic. Might host a public or internal site. Could be vulnerable to directory traversal or outdated CMS issues.
- 443 โ HTTPS: Secure web traffic. Always worth checking with tools like
sslscan
orwhatweb
to identify cert misconfigs or tech stack. - 21 โ FTP (File Transfer Protocol): Used for file transfers. Weaknesses include anonymous login, cleartext credentials, and misconfigurations.
- 3389 โ RDP (Remote Desktop Protocol): Used for remote access to Windows systems. If exposed, it can be a major attack vector.
Ports can be:
- Open โ the service is available and accepting connections
- Closed โ nothing is listening on that port
- Filtered โ traffic is being blocked (e.g., by a firewall or IDS)
โ๏ธ Services
Nmap can detect services running behind open ports. This includes software names and often their versions, e.g., Apache 2.4.41
, OpenSSH 7.9
, etc. This is critical for vulnerability research.
๐ PART 2 โ Landscape Scan: Network Reconnaissance
Other times, you're blind in a new environment. You need situational awareness.
๐งญ Step 1 โ Find Your IP and Subnet
To scan your network, you first need to know your local IP and subnet:
ip a
Look for a line like:
inet 192.168.1.23/24
This tells you your IP is 192.168.1.23
and your subnet is /24
, so the network range is 192.168.1.0/24
.
๐ Step 2 โ Ping the Entire Network
Once you know the subnet, scan to find live hosts:
nmap -sn 192.168.1.0/24
This ping scans the subnet to find live hosts. Sample output:
Nmap scan report for 192.168.1.1 (Router)
Host is up.
Nmap scan report for 192.168.1.42 (Ubuntu-MSI)
Host is up.
Nmap scan report for 192.168.1.74
Host is up.
Once hosts are identified, zoom in:
nmap -sC -sV -O -Pn 192.168.1.42
๐ง Strategy Breakdown
Tunnel Vision = deep recon on a known IP. Use when your target is precise and valuable.
Landscape Scan = broad awareness. Use to discover hidden assets and understand the terrain.
๐งจ Bonus: Advanced Nmap Tips
nmap -sS -T4 192.168.1.42
โ stealth SYN scannmap --top-ports 100 192.168.1.42
โ scan top 100 portsnmap -p- 192.168.1.42
โ full port scannmap -sV --script vuln 192.168.1.42
โ detect known vulns
๐งฐ What to Do With Results
- SSH open? โ try brute force with
hydra
- Web server? โ scan with
gobuster
,nikto
- SMB? โ explore with
enum4linux
,crackmapexec
๐ Save Your Scan
nmap -sV -O 192.168.1.42 -oN hyuga-scan.txt
๐ Final Advice
Start wide, go deep. One gives you the map. The other, the secret doors.
๐งช Try This โ Your First Recon Challenge
- Spin up a second VM on your network (e.g., Metasploitable, Parrot, or Kali)
- Find its IP address using
ip a
- From your main system, run a full port scan with service detection:
nmap -sC -sV -O -Pn [target-ip]
Try to interpret what services are running. What ports are open? Is there a potential weakness?
๐ Nmap Cheat Sheet
nmap -sn [range]
โ Ping scan (host discovery)nmap -sC -sV [ip]
โ Default scripts + service versionsnmap -O [ip]
โ OS detectionnmap -Pn [ip]
โ Skip ping checknmap -p- [ip]
โ All ports (1โ65535)nmap --top-ports 100 [ip]
โ Most common 100 portsnmap -sV --script vuln [ip]
โ Known vulnerabilitiesnmap -oN output.txt
โ Save to file
โ ๏ธ Ethics Reminder
Only scan networks you are authorized to analyze.
โ Hyuga