Skip to content
Nmap Network Scanning and Red Team Assessment
Red Team & Penetration Testing

Nmap as a Decision Engine: Operating Under Pressure During a Red Team Engagement

A high-signal, tactical narrative detailing a real-world Red Team engagement under strict time constraints. This is not a tutorial. It bridges the gap between raw enumeration and attacker logic, demonstrating exactly how a professional operator uses Nmap as a decision engine to find actionable entry points when automated scanners fail.

Pros

  • Provides deep insight into the operational mindset of a Red Teamer under time constraints
  • Demonstrates the critical trade-offs between stealth, speed, and depth during active enumeration
  • Focuses strictly on decision matrices rather than basic tool syntax and tutorials
  • Translates raw port scanning into direct, exploitable paths and measurable business impact
  • Essential reading for engineers bridging the gap between automated scanning and manual exploitation

Cons

  • Assumes a strong foundational knowledge of TCP/IP and networking behavior
  • Techniques shown (like packet fragmentation) will routinely trip modern next-gen firewalls
  • Requires active critical thinking; not a 'copy-paste' guide to network compromise

1. Entry Point Thinking: The Clock is Ticking

The Rules of Engagement are signed. Four hours to map an unfamiliar /24 subnet, find an exploitable way in, and prove impact without breaking production. No asset inventory. An active IPS is actively monitoring the network.

Before I even open a terminal, I’m not asking “which tool do I use?” I’m asking “how noisy can I afford to be, and what does success actually look like?” The goal isn’t a beautiful network map—it’s finding one vulnerability fast. The biggest mistake I could make right now is trusting ICMP responses. If I assume a host is offline just because it doesn’t ping, I’ll miss everything.

2. The First Scan Decision: Speed vs. Truth

Running nmap -A across a /24 is a dead giveaway. It’s loud, slow, and gets your IP flagged immediately. I need a smarter approach—pure discovery without noise. I need to find live hosts without triggering alarms.

nmap -sn -PE -PP -PS21,22,23,25,80,113,443 -PA80,113,443,10025 --source-port 53 203.0.113.0/24 -oA initial_sweep

What’s this doing? Standard ping sweeps get blocked by Windows firewalls and edge gateways. Instead, I’m mixing ICMP Echo requests, Timestamp requests, and specific TCP packets that look like DNS traffic responses (--source-port 53). It’s subtle enough to slip past most defenses.

I expected 30-40 live hosts.

I got 4.

Advertisement

3. When Things Go Wrong: The Silent Drop

Four hosts on a /24 corporate subnet? That’s wrong. The packets aren’t being rejected—they’re being silently dropped. A stateful firewall. If I speed up the scan, the IPS will just throttle me harder or blacklist my IP entirely.

Time to change tactics. I need to understand the firewall rules, not test for open ports.

nmap -sA -T2 203.0.113.0/24

I switch to a TCP ACK scan. I’m mapping the firewall, not hunting for open ports. A RST response means unfiltered. No response means blocked. I slow it down with -T2 to avoid triggering rate-limiting.

The pattern emerges: the firewall is strict on standard ports, but above port 10000, it’s inconsistent. That’s a crack.

4. Attack Surface Expansion: The Hidden Depths

I have three targets that are alive and responding on high ports. I need to find what’s actually running on each one. Management interfaces are always hidden somewhere, and I can’t guess their ports. I need to see all 65,535.

nmap -sS -p- --min-rate 300 --max-retries 1 203.0.113.5 -oA full_tcp

SYN scans disconnect before the handshake completes, so they don’t trigger application logs. I’m aggressive with --min-rate 300 because time is tight, but I cap retries at 1 to avoid flooding the network.

The results change everything. Ports 80 and 443 are there, but hidden on port 10443 is something—an open service running on a non-standard port.

5. Service Enumeration With Intent

Service enumeration is loud—Nmap probes each port multiple times, and the IPS sees this. I need to be selective.

nmap -sV --version-light -p 22,10443 203.0.113.5

Using --version-light keeps it quick, limiting Nmap to the highest-confidence probes instead of exhaustive testing.

Results:

  • Port 22: OpenSSH 8.2p1 (Ubuntu)
  • Port 10443: Apache Tomcat 9.0.31

6. The Decision Point: Tactical Prioritization

SSH 8.2 or Tomcat 9.0.31? Which one breaks first?

SSH 8.2 is modern. Brute-forcing would take hours and guarantee detection—not an option. Tomcat, though? Admins often put Java servers on non-standard ports thinking that’s “security.” They forget to patch them. Default consoles stay enabled. They leave debug interfaces running.

That’s where I go.

7. NSE As A Weapon (Not a Feature)

The Nmap Scripting Engine is precise—when used correctly. Running --script vuln is amateur hour. I’m being surgical.

nmap -sV -p 10443 --script http-tomcat-mgr-enum,http-title,http-enum 203.0.113.5

I’m grabbing the page title, mapping common directories, and checking for the Tomcat Manager URI specifically. The result: /manager/html is accessible.

8. Stealth vs. Speed Tradeoff

90 minutes left. I know the target. I know what it’s running. The IPS hasn’t cut me off, which means my careful SYN scans worked.

Now stealth ends. I switch to Hydra and brute-force the Tomcat Manager panel directly. Aggressive. Rapid-fire requests. The login breaks in 4 minutes: tomcat:s3cr3t.

9. The Internal Network Shift

With valid credentials, I deploy a malicious WAR file. I get a reverse shell. Now I’m inside the firewall, executing as the tomcat user.

Nmap’s role changes completely. I upload a statically compiled Nmap binary to the compromised host. Outside the firewall, I was fighting an IPS. Inside, it’s a different story—networks are soft. I don’t care about stealth anymore. I care about lateral movement.

./nmap -sT -p 445,3389 10.10.0.0/24 > smb_targets.txt

I use full TCP Connect scans (-sT) because I don’t have root for raw sockets. I’m hunting SMB and RDP—the internal highways.

10. The Automation Mindset

I can’t manually analyze every result—I’m running out of time. Automation.

for ip in $(cat smb_targets.txt | grep open | awk '{print $2}'); do 
    ./nmap -p 445 --script smb-os-discovery $ip >> lateral_map.txt & 
done

A simple loop. For each host with SMB open, run OS discovery in parallel. Nmap identifies operating systems and Active Directory membership automatically. Scale instead of manual work.

11. Real Finding to Exploit Path

One host stands out: Windows Server 2008 R2 with SMBv1 open. An unpatched legacy OS deep in the network.

That’s EternalBlue territory. MS17-010.

14 minutes later, I’ve pivoted the exploit through the Tomcat proxy. I’m running as NT AUTHORITY\SYSTEM on the file server. Mission accomplished.

12. The Defensive Perspective

How does a blue team stop this attack?

First, they notice the DNS-sourced packets hitting non-DNS ports. That’s a signature they should catch. Second, they see repeated ACK probes against the firewall—not rejecting, but triggering automated IP bans at the perimeter. Third, they run daily network scans internally, comparing against baselines. When port 10443 suddenly appears on a Friday night, the SOC gets paged before I ever see it.

13. Translating Technical Execution to Business Impact

When I brief the executives, they don’t care about SYN scans. They care about risk.

“An undocumented Tomcat server on a hidden port. We accessed it. We got a shell in your DMZ. From there, we found unpatched Windows servers with unstructured data. A ransomware gang following the same path would encrypt your entire SMB network in an hour. And your perimeter firewall was working—your internal network had zero trust. Once inside, we mapped everything freely. No segmentation. No controls.”

14. Why Nmap is Mandatory for Modern Operations

Nessus, Qualys, and Nexpose are great for compliance. But in real engagements—where IPS is actually blocking you, where stealth matters, and where time is running out—they fail. They’re too loud. Too slow.

Nmap isn’t just a tool. It’s a visibility engine that demands you understand TCP/IP. Every flag changes the packet behavior on the wire. If you want to see your network like an attacker does, you can’t rely on point-and-click scanners. You need to orchestrate raw packets. Nmap forces you to think. That’s what makes it mandatory.


Share article

Subscribe to my newsletter

Receive my case study and the latest articles on my WhatsApp Channel.

Warning