visitor@shellthisbox:~$ less ~/notes/nmap-03-practical-workflow.md

Title: Nmap for Pentesters — Part 3: Practical Workflow & Cheat Sheet

type
cheat sheet
area
Enumeration
platform
Cross-platform
published
read time
5 min
series
Part 3

A repeatable OSCP-style Nmap workflow: save scans, prioritize services, troubleshoot results, tune speed, and use a practical cheat sheet.

Nmap

Knowing Nmap commands is useful. Having a repeatable enumeration workflow is better.

In Part 1 we covered host discovery and TCP scanning. In Part 2 we identified services, used NSE, and checked UDP. This final part puts those pieces together into something I can use on every HTB-style target.

Lab scope: Run these commands only on authorized targets. The host 10.10.10.10 and the sample results are fictional.

The workflow I actually want to follow

Step 1 — Create a workspace

mkdir -p HTB-Target/{scans,enumeration}
cd HTB-Target
export TARGET=10.10.10.10

I want the results in one place, with the target IP stored in a variable so I can reuse the commands without retyping the address.

Step 2 — Quick TCP discovery

sudo nmap -sS -n --open -oA scans/tcp-initial "$TARGET"

-sS performs a SYN scan; -n disables reverse DNS lookups; --open shows open or potentially open ports; -oA saves three output formats.

--open is useful for keeping the initial output readable, but it hides filtered and closed results. If filtering looks relevant, inspect a scan without that option. Remove -n when hostname information matters.

Suppose the first pass returns:

PORT    STATE SERVICE
21/tcp  open  ftp
22/tcp  open  ssh
80/tcp  open  http
445/tcp open  microsoft-ds

Step 3 — Check the full TCP range

sudo nmap -sS -p- -n -oA scans/tcp-full "$TARGET"

Imagine this also finds 8085/tcp. That’s exactly why the default 1,000-port scan isn’t the end of discovery.

Step 4 — Identify the services

sudo nmap -sC -sV -p 21,22,80,445,8085 \
  -oA scans/tcp-services "$TARGET"

A hypothetical result:

PORT     STATE SERVICE       VERSION
21/tcp   open  ftp           vsftpd 3.0.3
22/tcp   open  ssh           OpenSSH 8.2p1
80/tcp   open  http          Apache httpd 2.4.41
445/tcp  open  microsoft-ds
8085/tcp open  http          Jetty 9.4.x

These are leads—not confirmed vulnerabilities.

Step 5 — Investigate deliberately

PortNext question
21Does FTP allow anonymous login?
22Do I have credentials worth testing?
80What application is behind HTTP?
445Which SMB shares and permissions are visible?
8085What is the second web service?

A few focused checks:

nmap -p 21 --script ftp-anon "$TARGET"
nmap -p 80,8085 --script http-title,http-headers "$TARGET"
nmap -p 445 --script smb-os-discovery,smb-enum-shares "$TARGET"

Each command should answer a question. If it doesn’t, consider why you’re running it.

Step 6 — Check UDP

sudo nmap -sU --top-ports 20 -oA scans/udp-initial "$TARGET"

If DNS, SNMP, or another service looks promising, investigate the specific ports with -sU -sV. If the results aren’t useful, document the coverage and keep going.

Step 7 — Write down what’s confirmed and what’s not

With -oA, Nmap creates .nmap (readable), .xml (structured), and .gnmap (legacy grepable) files.

My notes can be very simple:

# Target: 10.10.10.10

## Open TCP ports
- 21 FTP
- 22 SSH
- 80 HTTP
- 445 SMB
- 8085 HTTP

## Findings
- FTP anonymous login: not checked
- SMB shares: not enumerated
- HTTP 8085: Jetty detected; application unknown

## Next steps
- [ ] Check anonymous FTP
- [ ] Inspect both web services
- [ ] Enumerate SMB shares
- [ ] Review UDP results

“Not checked” and “checked, nothing found” are not the same thing. That distinction stops me from making bad assumptions when I return to a machine later.

Make scans faster without making them worse

On a reliable lab network, -T4 can speed up a scan:

sudo nmap -sS -p- -T4 "$TARGET"

You may also see:

sudo nmap -sS -p- -T4 --min-rate 1000 "$TARGET"

--min-rate 1000 asks Nmap to aim for a minimum packet-sending rate during relevant scan phases. It doesn’t guarantee runtime or accuracy. Aggressive settings can cause missed responses over a poor VPN connection or against rate-limited targets.

A fast, incomplete scan can cost more time than a slower, reliable one. If something looks odd, validate it with a focused scan.

Quick troubleshooting

ProblemWhat I’d try
Host appears downCheck VPN/routing, then nmap -Pn TARGET.
Unknown servicenmap -sV --version-all -p 8085 TARGET.
UDP says open|filteredsudo nmap -sU -sV -p 161 TARGET may help clarify it.
No privileges for SYN scanUse nmap -sT TARGET.
Scan takes foreverCheck filtering, packet loss, UDP probes, and unnecessary scripts before raising the packet rate.

Don’t mistake -Pn for a firewall bypass, and don’t assume version detection will identify every unusual service.

Nmap cheat sheet

I keep this short on purpose. These are the commands I would actually want nearby while working through a lab.

TaskCommand
Default TCP scannmap TARGET
Skip host discoverynmap -Pn TARGET
Discover hostsnmap -sn 10.10.10.0/24
SYN scansudo nmap -sS TARGET
TCP Connect scannmap -sT TARGET
All TCP portssudo nmap -sS -p- TARGET
Selected portsnmap -p 21,22,80,445 TARGET
Service detectionnmap -sV TARGET
Default scripts + versionsnmap -sC -sV TARGET
Top 20 UDP portssudo nmap -sU --top-ports 20 TARGET
Targeted UDP fingerprintingsudo nmap -sU -sV -p 53,161 TARGET
FTP anonymous accessnmap -p 21 --script ftp-anon TARGET
HTTP titles / headersnmap -p 80 --script http-title,http-headers TARGET
SMB sharesnmap -p 445 --script smb-enum-shares TARGET
Save all output formatsnmap -oA scan TARGET
Read script documentationnmap --script-help SCRIPT_NAME

Final thoughts

I don’t want to memorize every Nmap flag. I want a method I can repeat reliably:

Discover → Identify → Enumerate → Investigate → Document.

Finding open ports is easy. Knowing what to do with them is the skill worth developing.

Series navigation: Part 1: Discovery & TCP · Part 2: Services & NSE · Part 3: Workflow & Cheat Sheet

Further reading

↗ Share this article ⌄
Reddit ↗ X / Twitter ↗