本节书摘来自异步社区《Nmap渗透测试指南》一书中的第2章2.11节禁止反向域名解析,作者 商广明,更多章节内容可以访问云栖社区“异步社区”公众号查看。
2.11 禁止反向域名解析
表2.10所示为本章节所需Nmap命令表,表中加粗命令为本小节所需命令——禁止DNS反向解析。
-n选项意为禁止解析域名,使用该选项的时候Nmap永远不对目标IP地址作反向域名解析。
root@Wing:~# nmap -n -sL 124.172.156.75/24
Starting Nmap 6.40 ( http://nmap.org ) at 2014-06-09 21:30 CST
Nmap scan report for 124.172.156.0
Nmap scan report for 124.172.156.1
Nmap scan report for 124.172.156.2
Nmap scan report for 124.172.156.3
Nmap scan report for 124.172.156.4
…省略…
Nmap scan report for 124.172.156.240
Nmap scan report for 124.172.156.241
Nmap scan report for 124.172.156.242
Nmap scan report for 124.172.156.243
Nmap scan report for 124.172.156.244
Nmap scan report for 124.172.156.245
Nmap scan report for 124.172.156.246
Nmap scan report for 124.172.156.247
Nmap scan report for 124.172.156.248
Nmap scan report for 124.172.156.249
Nmap scan report for 124.172.156.250
Nmap scan report for 124.172.156.251
Nmap scan report for 124.172.156.252
Nmap scan report for 124.172.156.253
Nmap scan report for 124.172.156.254
Nmap scan report for 124.172.156.255
Nmap done: 256 IP addresses (0 hosts up) scanned in 0.02 seconds
root@Wing:~#
该选项很少使用,如果是对一台有域名绑定的服务器通常不会使用该选项;如果是单纯扫描一段IP,使用该选项可以大幅度减少目标主机的相应时间,从而更快地得到结果。