Introduction to Network Reconnaissance
After identifying web application attack surfaces in our previous lesson, the next critical phase involves mapping the broader network infrastructure. Network reconnaissance enables ethical hackers to discover live hosts, identify running services, and understand the attack surface beyond web applications. For red teamers operating in Pakistan's financial, telecom, or government sectors, understanding network topology is essential before attempting any authorized engagement.
Nmap: The Red Teamer's Scanner of Choice
Nmap (Network Mapper) remains the industry-standard tool for network discovery and security auditing. A typical reconnaissance workflow includes:
- Host Discovery: Using
nmap -sn 192.168.1.0/24to identify live systems - Port Scanning:
nmap -sS -sV -O target.domain.pkfor comprehensive port enumeration - Service Version Detection: Identifying specific service versions to match vulnerabilities
- OS Fingerprinting: Determining underlying operating systems
For Pakistani networks, pay special attention to commonly exposed services: SSH (port 22), RDP (port 3389), and web services on non-standard ports that may indicate misconfigured systems.
Understanding Network Topology in Pakistan
When conducting authorized assessments for Pakistani organizations, note that many institutions run legacy systems alongside modern infrastructure. Banks operating under SBP guidelines, telecom companies regulated by PTA, and government portals require thorough enumeration.
Key scan types for Pakistani infrastructure:
- UDP scans for DNS (port 53) and SNMP (port 161)
- Aggressive scanning
nmap -Afor detailed OS and service info - Timing templates
-T4for faster results on large networks
Lab Exercise: Mapping a Test Environment
- Set up a vulnerable lab environment (never scan unauthorized networks)
- Perform a ping sweep to discover live hosts
- Run a SYN scan on discovered hosts
- Use
-sVto identify service versions - Export results to XML for analysis with MISP or TheHive
Do / Don't
Do: Use -Pn flag to skip ping probes on firewalled hosts. Don't: Scan production systems without explicit written authorization from organization leadership.
Takeaway
This week, practice Nmap scanning on your home network router to understand your home topology. Document all devices and their open ports. This foundational skill applies directly to authorized red team engagements in Pakistani enterprises.
