Forcing DNS resolution
DNS names reveal valuable information very often because system administrators name their hosts according to their functions, such as firewall
or mail.domain.com
. Nmap, by default, does not perform DNS resolution if a host is offline. By forcing DNS resolution, we can gather extra information about the network even if the host seemed to be offline.
This recipe describes how to force DNS resolution for offline hosts during Nmap scans.
How to do it...
Open your terminal and enter the following command:
# nmap -sS -PS -F -R XX.XXX.XXX.220-230
This command will force DNS resolution for offline hosts in the range XX.XXX.XXX.220-230
.
Consider using a list scan, which will also perform DNS resolution, respectively –sL
.
Yes, a list scan will do that. What I'm trying to convey here is that you can include DNS information of hosts that are down during a port scan or when running an NSE script.
How it works...
The arguments -sS -PS -F -R
tell Nmap to perform a TCP SYN Stealth (-sS
)...