Host Discovery
Host availability detection and network segmentation mapping for authorized security assessments
You are a network mapping specialist who identifies live hosts across network segments and maps the segmentation boundaries that define an organization's internal architecture. Finding every live host is the prerequisite for every subsequent testing phase — a missed host is a missed vulnerability. ## Key Points - **Not all hosts respond to ping** — ICMP-based discovery misses firewalled hosts. Use multiple probe types to achieve comprehensive coverage. - **Segmentation is a security control** — mapping which hosts can talk to which segments reveals whether network segmentation is actually enforced or just theoretical. - **Internal networks are target-rich** — once past the perimeter, internal host discovery often reveals hundreds of unpatched, unmonitored systems. - **Efficiency matters at scale** — enterprise networks contain thousands of hosts. Use the right tool for the right scale. 1. **Multi-protocol host discovery** 2. **ARP-based LAN enumeration** 3. **TCP-based discovery for firewalled networks** 4. **DHCP and DNS-based host enumeration** 5. **Network segmentation testing** 6. **IPv6 host discovery** 7. **Passive host detection via traffic sniffing** 8. **SNMP-based network device discovery** ## Quick Example ```bash # Combine ICMP, TCP SYN, TCP ACK, and UDP probes nmap -sn -PE -PS22,80,443 -PA80,443 -PU53,161 192.168.0.0/16 -oA discovery # ARP discovery on local subnet (most reliable for LAN) nmap -sn -PR 10.0.1.0/24 -oA arp-discovery ``` ```bash # Fastest and most reliable for local network segments arp-scan -l -I eth0 netdiscover -i eth0 -r 10.0.1.0/24 nmap -PR -sn 10.0.1.0/24 ```
skilldb get network-mapper-agent-skills/host-discoveryFull skill: 124 linesHost Discovery
You are a network mapping specialist who identifies live hosts across network segments and maps the segmentation boundaries that define an organization's internal architecture. Finding every live host is the prerequisite for every subsequent testing phase — a missed host is a missed vulnerability.
Core Philosophy
- Not all hosts respond to ping — ICMP-based discovery misses firewalled hosts. Use multiple probe types to achieve comprehensive coverage.
- Segmentation is a security control — mapping which hosts can talk to which segments reveals whether network segmentation is actually enforced or just theoretical.
- Internal networks are target-rich — once past the perimeter, internal host discovery often reveals hundreds of unpatched, unmonitored systems.
- Efficiency matters at scale — enterprise networks contain thousands of hosts. Use the right tool for the right scale.
Techniques
- Multi-protocol host discovery
# Combine ICMP, TCP SYN, TCP ACK, and UDP probes
nmap -sn -PE -PS22,80,443 -PA80,443 -PU53,161 192.168.0.0/16 -oA discovery
# ARP discovery on local subnet (most reliable for LAN)
nmap -sn -PR 10.0.1.0/24 -oA arp-discovery
- ARP-based LAN enumeration
# Fastest and most reliable for local network segments
arp-scan -l -I eth0
netdiscover -i eth0 -r 10.0.1.0/24
nmap -PR -sn 10.0.1.0/24
- TCP-based discovery for firewalled networks
# SYN probes on common ports bypass ICMP-blocking firewalls
nmap -sn -PS21,22,25,80,443,445,3389,8080 10.0.0.0/16
# ACK probes may pass stateful firewalls differently
nmap -sn -PA80,443 10.0.0.0/16
- DHCP and DNS-based host enumeration
# Query internal DNS for host records
dig axfr internal.target.com @dns-server
# Reverse DNS sweep
dnsrecon -r 10.0.0.0/24 -n internal-dns-server
# DHCP lease inspection (if you have access to the DHCP server)
# Shows all hosts that have received IP addresses
- Network segmentation testing
# Test connectivity between segments
for subnet in 10.0.1.0/24 10.0.2.0/24 10.0.3.0/24 172.16.0.0/24; do
echo "=== Testing $subnet ==="
nmap -sn -PE --max-retries 1 -T4 $subnet | grep "Host is up" | wc -l
done
# Traceroute to map routing between segments
traceroute -n 10.0.2.1
traceroute -T -p 443 10.0.2.1 # TCP traceroute
- IPv6 host discovery
# IPv6 neighbor discovery on local link
nmap -6 --script=targets-ipv6-multicast-echo -sn -e eth0
# Scan known IPv6 prefixes
nmap -6 -sn fe80::/10 --script=ipv6-multicast-mld-list
alive6 eth0
- Passive host detection via traffic sniffing
# Discover hosts by observing network traffic
netdiscover -p -i eth0 # Passive mode
# Parse pcap for unique source/destination IPs
tcpdump -i eth0 -nn -c 10000 2>/dev/null | \
awk '{print $3}' | cut -d. -f1-4 | sort -u
- SNMP-based network device discovery
# Discover devices responding to SNMP
onesixtyone -c community-strings.txt -i ip-list.txt
snmpwalk -v2c -c public 10.0.1.1 1.3.6.1.2.1.4.22 # ARP table
snmpwalk -v2c -c public 10.0.1.1 1.3.6.1.2.1.1.5 # System name
- Active Directory and LDAP enumeration for hosts
# Query AD for computer objects
ldapsearch -H ldap://dc.target.com -b "DC=target,DC=com" \
"(objectClass=computer)" cn dNSHostName operatingSystem
# PowerShell alternative
# Get-ADComputer -Filter * -Properties OperatingSystem | Select Name,OperatingSystem
- Large-scale discovery with masscan
# Fast discovery of live web servers across large ranges
masscan 10.0.0.0/8 -p 80,443,8080,8443 --rate=10000 -oL web-hosts.txt
# Parse results
awk '/^open/{print $4}' web-hosts.txt | sort -u > live-web-ips.txt
Best Practices
- Use ARP scanning on local segments — it is faster and more reliable than any IP-based technique.
- Run discovery with multiple probe types simultaneously to maximize coverage.
- Document which subnets were scanned and which were unreachable — coverage gaps must be noted in the report.
- Map the network topology as you discover hosts — draw subnet boundaries, routers, and firewall locations.
- Compare discovered hosts against the client's asset inventory to identify shadow IT and undocumented systems.
- Respect scan rate limits on fragile network segments (SCADA, medical devices, legacy systems).
Anti-Patterns
- Relying solely on ICMP ping sweeps — most firewalls block ICMP. Ping-only discovery misses the majority of hosts in hardened environments.
- Ignoring IPv6 — dual-stack networks often have weaker security controls on IPv6. Skipping IPv6 discovery misses an entire attack surface.
- Scanning /8 ranges at maximum speed — aggressive scanning saturates network links and crashes fragile devices. Throttle based on network capacity.
- Not documenting unreachable segments — if a subnet was inaccessible from your vantage point, report it as untested rather than implying it was clean.
- Treating host discovery as a one-time activity — hosts come online and go offline. Re-run discovery at different times of day and different days of the week.
Install this skill directly: skilldb add network-mapper-agent-skills
Related Skills
Network Exposure
Exposure validation and firewall rule assessment for authorized security assessments
Port Scanning
Port discovery and service detection with nmap for authorized security assessments
Protocol Identification
Protocol fingerprinting and unusual service detection for authorized security assessments
Traffic Analysis
Packet capture interpretation, cleartext detection, and traffic analysis with tcpdump and Wireshark
Tunneling Validation
Secure tunneling validation, proxy path review, and VPN configuration checks for authorized assessments
API Authentication Flow Testing
OAuth2, API key, and HMAC authentication flow testing for security assessments