IncidentResponsev2

DNS Host Name Mapping

Task DNS Host Name Mapping

Conditions

Given a responder’s computer, a known network topology including IP address ranges, and the proper tools to map network hosts.

Operator Note: Ensure the topology and IP ranges have been confirmed with the mission network owner prior to scanning.

Standards

Operator Note: Where available, use tools that resolve hostnames via DNS, NetBIOS or other name resolution protocols for best results.

End State

Operator Note: Save results using the naming convention noted below and share with the incident coordination lead and intelligence team.

Manual Steps

There are multiple tools available to scan network IP ranges and determine their host names. While a simple ping scan using the built-in Ping tool in Windows will work, the difficulty is that some Operating Systems (OS) block ICMP pings by default. Additionally network administrators may institute a firewall policy to block ICMP across the Enterprise. In those cases a simple ping sweep will not work. In this case, other 3rd-party tools will be more effective, Nmap being one of the most effective.

nmap -sn 192.168.1.0/24
nmap -sU --script nbstat.nse -p137 192.168.1.0/24
[mm/dd/yyyy_hh:mm:ss_DNS_HOSTNAME_Mapping_(xx.xx.xx.xx/x)]

Operator Note: Where possible, validate unknown hostnames using reverse DNS, Active Directory, or administrative tools on the network.

Running Script

chmod 755 dns_hostname_mapping.py

Right-click script file, Properties/Unblock

python dns_hostname_mapping.py
python3 dns_hostname_mapping_py3.py

Operator Note: Always review script output for errors or incomplete scans.

Dependencies

Operator Note: Ensure Python and Nmap are updated to avoid deprecated module issues.

Other available tools

References

NMAP Discovery
NMAP Host Discovery
NMAP NBTSTAT


Operator Recommendations and Additional Tools

Operator Checklist

Tools by Platform

Platform Tool Purpose
Universal Nmap (SN scan + NBSTAT NSE script) Primary hostname resolution
Universal dns_hostname_mapping.py (menu script) Automated hostname resolution
Windows Resolve-DnsName Built-in Windows DNS resolver
Linux/macOS dig / host Built-in Unix/Linux hostname resolution
Mobile Fing Lightweight mobile host discovery

Alternate Commands

Windows PowerShell:

Resolve-DnsName -Name 192.168.1.10

Linux:

dig -x 192.168.1.10

Best Practices


Revision History

Date Version Description Author
2025-05-02 1.8 Full original + enhanced operator guidance and recommendations Leo