Linux -> dnsenum命令详解

分类介绍

dnsenum可用于信息收集->DNS分析

定义

dnsenum是一款非常强大的域名信息收集工具,它的目的是尽可能收集一个域的信息,它能够通过谷歌或者字典文件猜测可能存在的域名,以及对一个网段进行反向查询。它可以查询网站的主机地址信息、域名服务器、mx record(函件交换记录),在域名服务器上执行axfr请求,通过谷歌脚本得到扩展域名信息(google hacking),提取子域名并查询,计算C类地址并执行whois查询,执行反向查询,把地址段写入文件。

获取

dnsenum是一个perl脚本,脚本文件获取:http://code.google.com/p/dnsenum/downloads/detail?name=dnsenum.pl&can=2&q=

脚本源码地址:http://code.google.com/p/dnsenum/source/browse/trunk/dnsenum.pl

下载后是一个叫dnsenum.pl的perl脚本。当然kali里是自带的,你可以直接用。

使用方法

官方帮助

dnsenum VERSION:1.2.4
Usage: dnsenum [Options] <domain> 
[Options]:
Note: the brute force -f switch is obligatory.
GENERAL OPTIONS:
  --dnsserver 	<server>
			Use this DNS server for A, NS and MX queries.
  --enum		Shortcut option equivalent to --threads 5 -s 15 -w.
  -h, --help		Print this help message.
  --noreverse		Skip the reverse lookup operations.
  --nocolor		Disable ANSIColor output.
  --private		Show and save private ips at the end of the file domain_ips.txt.
  --subfile <file>	Write all valid subdomains to this file.
  -t, --timeout <value>	The tcp and udp timeout values in seconds (default: 10s).
  --threads <value>	The number of threads that will perform different queries.
  -v, --verbose		Be verbose: show all the progress and all the error messages.
GOOGLE SCRAPING OPTIONS:
  -p, --pages <value>	The number of google search pages to process when scraping names, 
			the default is 5 pages, the -s switch must be specified.
  -s, --scrap <value>	The maximum number of subdomains that will be scraped from Google (default 15).
BRUTE FORCE OPTIONS:
  -f, --file <file>	Read subdomains from this file to perform brute force.
  -u, --update	<a|g|r|z>
			Update the file specified with the -f switch with valid subdomains.
	a (all)		Update using all results.
	g		Update using only google scraping results.
	r		Update using only reverse lookup results.
	z		Update using only zonetransfer results.
  -r, --recursion	Recursion on subdomains, brute force all discovred subdomains that have an NS record.
WHOIS NETRANGE OPTIONS:
  -d, --delay <value>	The maximum value of seconds to wait between whois queries, the value is defined randomly, default: 3s.
  -w, --whois		Perform the whois queries on c class network ranges.
			 **Warning**: this can generate very large netranges and it will take lot of time to performe reverse lookups.
REVERSE LOOKUP OPTIONS:
  -e, --exclude	<regexp>
			Exclude PTR records that match the regexp expression from reverse lookup results, useful on invalid hostnames.
OUTPUT OPTIONS:
  -o --output <file>	Output in XML format. Can be imported in MagicTree (www.gremwell.com)

翻译帮助

dnsenum.pl 版本:1.2.4
格式: dnsenum [参数] <domain> 代指域 或者域名
[参数]:
注意: -f 是强制开启的
选项:
  --dnsserver 	<dns服务>
			一个使用此DNS服务器,NS和MX查询。
  --enum		  快速扫描 相当于线程数 5 -s 15 -w.
  -h, --help		打印此帮助消息。
  --noreverse		跳过反向查找操作。
  --nocolor		禁用ansicolor输出。
  --private		显示在文件domain_ips.txt最终拯救大兵IPS。  ???
  --subfile <file>	所有有效的子域写入这个文件的。
  -t, --timeout <value>	TCP和UDP超时值  默认为10 
  --threads <value>	将执行不同查询的线程数。
  -v, --verbose		很详细:显示所有结果
谷歌搜索选项:
   -p, --pages <value>	当搜索关键词时谷歌搜索页面的数量,默认为5页,必须指定搜索页数是多少
-s, --scrap <value>	他最大的子域,将搜索结果的谷歌数(默认为15)。
暴力破解:
  -f, --file <file>	从这个文件读取子域进行暴力破解。
  -u, --update	<a|g|r|z>
			更新这个软件 用-f 
	a (all)		使用所有结果更新。
	g		更新只使用谷歌刮结果。
	r		更新只使用反向查找结果。
	z		更新只使用区域转移的结果。
  -r, --recursion	递归穷举所有子域,子域的NS记录发现。
WHOIS NETRANGE 选项:
  -d, --delay <value>	Whois查询等待的最大值,该值定义随机 默认为3 
  -w, --whois		执行C类网络范围的WHOIS查询。
			 **Warning**:这可以产生非常大的netranges要花很多时间进行反向查找。反向查找选项:
  -e, --exclude	<regexp>
			xclude PTR记录,从反向查找结果表达式表达式匹配,对无效的主机名有用
输出选项:
  -o --output <file>	输出的XML格式. Can be imported in MagicTree (www.gremwell.com)

使用举例

我们用百度来举例,不加任何参数。

注:此款工具会用到谷歌,所以需要翻墙,使用proxychains挂上代理。

BIND(Berkeley Internet Name Domain)是Unix系统最常用的DNS服务器

用于创建和管理DNS域的Webmin模块

因为BIND几乎适用于所有Unix系统,并且无论操作系统如何都能以相同的方式工作

猜你喜欢

转载自blog.csdn.net/Jiajiajiang_/article/details/97142930