本节书摘来自异步社区《Nmap渗透测试指南》一书中的第2章2.12节反向域名解析,作者 商广明,更多章节内容可以访问云栖社区“异步社区”公众号查看。
2.12 反向域名解析
表2.11所示为本章节所需Nmap命令表,表中加粗命令为本小节所需命令——反向解析域名。
![02e3c6ae55eb951851f173d65548ad75c799df9c](https://i-blog.csdnimg.cn/blog_migrate/96778f2e136dd1ff5976e484a7d8be1e.png)
![94af990fc490ac09d3a94ef3b71bcdd45c03b1f9](https://i-blog.csdnimg.cn/blog_migrate/1602dd2219cf438b93a0b5b419f34e47.png)
-R选项意为反向解析域名,使用该选项时Nmap永远对目标IP地址作反向域名解析。
root@Wing:~# nmap -R -sL *.172.156.75/24
Starting Nmap 6.40 ( http://nmap.org ) at 2014-06-09 21:29 CST
Nmap scan report for *.172.156.0
Nmap scan report for *.172.156.1
Nmap scan report for *.172.156.2
Nmap scan report for *.172.156.3
Nmap scan report for *.172.156.4
…省略…
Nmap scan report for mail.***testarlight.com (*.172.156.229)
Nmap scan report for *.172.156.230
Nmap scan report for *.172.156.231
Nmap scan report for *.172.156.232
Nmap scan report for *.172.156.233
Nmap scan report for *.172.156.234
Nmap scan report for *.172.156.235
Nmap scan report for *.172.156.236
Nmap scan report for *.172.156.237
Nmap scan report for *.172.156.238
Nmap scan report for *.172.156.239
Nmap scan report for *.172.156.240
Nmap scan report for *.172.156.241
Nmap scan report for *.172.156.242
Nmap scan report for *.172.156.243
Nmap scan report for *.172.156.244
Nmap scan report for *.172.156.245
Nmap scan report for *.172.156.246
Nmap scan report for *.172.156.247
Nmap scan report for *.172.156.248
Nmap scan report for *.172.156.249
Nmap scan report for *.172.156.250
Nmap scan report for *.172.156.251
Nmap scan report for *.172.156.252
Nmap scan report for *.172.156.253
Nmap scan report for *.172.156.254
Nmap scan report for *.172.156.255
Nmap done: 256 IP addresses (0 hosts up) scanned in 4.41 seconds
root@Wing:~#
通过上述代码可以看到Nmap对*.172.156.229进行了反向域名解析,其他IP地址并没有绑定域名。
该选项多用于绑定域名的服务器主机上,该选项的使用便于我们了解目标的详细信息。例如,在扫描一个C段的时候,我们更加清楚在哪一段IP上存在哪些网站。