当前位置: 首页 > 原创新闻 > 用工具对DNS服务器进行信息收集

用工具对DNS服务器进行信息收集

发表于:2021-02-02 10:31 作者: mtr 阅读数(6222人)

实验地址:https://yijinglab.com/expc.do?w=exp_ass&ec=ECID172.19.104.182016012111000300001

1.dnsrecon

dnsrecon是一款DNS记录的工具,其中一个特色是通过Google查出站点的子域名与IP信息。与dnsmap暴力破解子域名是不一样的,因此速度比dnsmap快,缺点是返回结果不如dnsmap全面。不仅如此,它还是一款针对DNS的安全探测工具,包含多项枚举探测功能,包括DNS域传送、DNS递归等。

很遗憾,由于参数多较复杂以及实验环境的限制,实验不能对全部参数进行详解,尽量对常用的几个参数进行实验。

下面是常用的几个参数和用法:

Usage: dnsrecon.py <options>

-d, --domain <domain> Domain to Target for enumeration.

这个参数用的最多,指定目标域名

-r, --range <range> IP Range for reverse look-up brute force in formats (first-last) or in (range/bitmask).

这个参数是用来进行反向解析的。下面会有具体实例演示

-D, --dictionary <file> Dictionary file of sub-domain and hostnames to use for brute force.

指定字典文件,对目标进行枚举。

-t, --type <types> Specify the type of enumeration to perform:

std To Enumerate general record types, enumerates.SOA, NS, A, AAAA, MX and SRV if AXRF on the NS Servers fail.

rvl To Reverse Look Up a given CIDR IP range.

brt To Brute force Domains and Hosts using a given dictionary.

srv To Enumerate common SRV Records for a given domain.

axfr Test all NS Servers in a domain for misconfigured zone transfers.

goo Perform Google search for sub-domains and hosts.

snoop To Perform a Cache Snooping against all NS servers for a given domain, testing all with file containing the domains, file given with -D option.

tld Will remove the TLD of given domain and test against all TLD's registered in IANA zonewalk Will perform a DNSSEC Zone Walk using NSEC Records.

T参数后面有好几种类型,具体使用那个选项取决与使用者。

--threads <number> Number of threads to use in Range Reverse Look-up, Forward Look-up Brute force and SRV Record Enumeration

指定线程

--xml <file> XML File to save found records.

保存结果文件

2.fierce

fierce是使用多种技术来扫描目标主机IP地址和主机名的一个DNS服务器枚举工具。运用递归的方式来工作。它的工作原理是先通过查询本地DNS服务器来查找目标DNS服务器,然后使用目标DNS服务器来查找子域名。fierce的主要特点就是可以用来定位独立IP空间对应域名和主机名。

语法:perl fierce.pl -dns example.com

由于这个工具参数众多,而且有些参数在实验环境中不能很好的演示,在下面的任务中分别演示讲解几个常用的参数。

3.Dnsmap

Dnsmap也是一款搜集信息的工具,它和Dnsenum一样是用于获得子域名的强有力的工具。

Dnsmap参数比较简单,任务三有实例演示。

usage: dnsmap <target-domain> [options]

dnsmap target-domain.com -w yourwordlist.txt -r /tmp/domainbf_results.txt

实验目的

通过该实验了解dnsrecon、fierce、dnsmap这三个工具的使用方法,并使用该工具对DNS服务器进行信息收集整理,了解并熟悉他们的常用参数意义。

实验环境

服务器:CentOS release 6.5 ,IP地址:10.1.1.101 域名:dns.dnstest.com

客户端:kali linux或BT5, IP地址:10.1.1.100

实验默认配置存在传送漏洞,修复漏洞:/etc/named.conf中加入allow-transfer { none;};

DNS服务器指向10.1.1.101:/etc/resolv.conf中加入nameserver 10.1.1.101