Network Sweeps and Host Discovery
Identify live hosts on a network before performing detailed port scans.
This initial reconnaissance phase helps map the network and identify active targets for further enumeration.
Quick Reference
# Nmap ping sweep (ICMP + ARP) |
Nmap Host Discovery
# ICMP echo requests (disable ARP) |
Fping - Fast ICMP Sweeps
# Basic ping sweep |
Bash One-Liners
# Linux/macOS ping sweep |
Windows CMD Ping Sweep
# Basic ping sweep |
PowerShell Ping Sweeps
# Basic ping sweep (quiet output) |
RustScan Network Sweep
# Scan entire subnet for open ports |
Common Workflows
# Step 1: Fast ICMP sweep to find live hosts |
Notes
Best Practices:
- Prefer ping scanning from compromised hosts - More reliable as you’re scanning from inside the network
- Do ICMP/ARP first - Faster and provides cleaner results for initial discovery
- In defensive/filtered environments - Avoid relying only on ICMP; use
-PR(ARP) or-Pn(skip host discovery)
Host Discovery Techniques:
- ICMP Echo Requests (
-PE) - Traditional ping, often blocked by firewalls - ARP Scanning (
-PR) - Most reliable on local networks, cannot be blocked - TCP SYN Ping (
-PS) - Sends SYN packets to specific ports (22, 80, 443 common) - TCP ACK Ping (
-PA) - Useful for bypassing stateless firewalls - UDP Ping (
-PU) - Sends UDP packets to specific ports (53, 161 common)
Performance Considerations:
- Fping is fastest for simple ICMP sweeps
- Nmap provides more flexibility and multiple discovery techniques
- PowerShell parallel execution significantly speeds up Windows-based sweeps
- RustScan excels at fast subnet-wide port discovery
Firewall Evasion:
- Use multiple discovery techniques simultaneously (
-PS -PA -PE) - Try different port combinations for TCP/UDP pings
- ARP scanning cannot be blocked on local networks
- Consider using
-Pnto skip host discovery if all hosts are known to be up
Output Management:
- Always save results with
-oAfor multiple output formats - Use
grepandcutto extract clean IP lists for further scanning - Maintain separate files for different scan phases (discovery, port scan, service detection)
TTL-Based OS Fingerprinting:
During host discovery, observe TTL values in responses:
- TTL 64: Linux/macOS
- TTL 128: Windows
- TTL 255: Network devices (routers, switches)