DNSenum简单介绍与使用

DNSenum简介

DNSenum是一款dns查询工具。它能够通过Google或字典文件猜测可能存在的域名,并对一个网段进行反向查询。
它不仅可以查询网站的主机地址信息,域名服务器和邮件交换记录,还可以在域名服务器上执行axfr(区域传送)请求,然后通过Google脚步得到扩展域名信息,提取子域名并查询,最后计算IP地址并执行whois查询,执行反向查询,把地址写入文件。

参数选项

使用dnsenum -h来查询全部命令

 --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)

常用选项:
–enum 相当于–threads 5 -s 15 -w.
-v 详细显示所有进度和所有错误消息,加上-v会很慢,会动态的进行记录扫描,产生消息过多
-w 执行whois查询
-o [file] 以XML格式输出到指定文件中,方便之后查询
-t/ --timeout 超时设置,可以提高速度但可能会影响查询结果

示例

1.对sina.com(新浪) 实现dns查询
命令: dnsenum --enum sina.com
对sina.com实行dnsenum --enum
基本的域名IP信息。
IN:INTERNET,表示资源都在Internet上

A记录代表"主机名称"与"IP"地址的对应关系, 作用是把名称转换成IP地址,意思是说该主机的IP对应之意!DNS使用A记录来回答"某主机名称所对应的IP地址是什么?"主机名必须使用A记录转译成IP地址,网络层才知道如何选择路由,并将数据包送到目的地.你要知道的是A就代表了将域名转换成ip,现在好多的工具都有这个功能。

在这里插入图片描述
在这里插入图片描述
对sina.com进行区域传送,结果基本为refused,现在绝大部分dns服务器对区域传送进行了严格的限制,不过尝试一切能够尝试的,才能得到甘甜的果实
在这里插入图片描述
这里是dnsenum进行Google脚步搜索,博主这里未连接到Google自然就无法使用这个功能。
2. 使用字典文件进行dns查询
dnsenum --noreverse -f /usr/share/dnsenum/dns.txt sina.com
在kali Linux中/usr/share/dnsenum/中
前面和上面例子一样

在这里插入图片描述
子域名暴力查询部分
CNAME(别名): 用于将DNS域名的别名映射到另一个主要的或规范的名称 。意思就是通过CNAME将你访问的没有IP地址的域名间接的变成访问另外一个主机。比如你要访问上图的ads.sina.com实际访问的时候,就变成了访问ww1.sinaimg.cn.w.alikunlun.com,它只是起到一个映射的功能。
此部分有非常多的子域名,博主只是截取了其中一部分。
在这里插入图片描述
C类IP地址
在这里插入图片描述
IP块
由于dnsenum会使用反向查询IP地址,所以使用–noreserve跳过这个过程以加快查询速度。

引用文章:

[link]Dnsenum详解
https://blog.csdn.net/qq_37367124/article/details/86475143

  • 6
    点赞
  • 35
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值