![Kali Linux:An Ethical Hacker's Cookbook(Second Edition)](https://wfqqreader-1252317822.image.myqcloud.com/cover/772/36698772/b_36698772.jpg)
上QQ阅读APP看书,第一时间看更新
How to do it...
- To view the help, we type the following:
dnsrecon -h
The following screenshot shows the output of the preceding command:
![](https://epubservercos.yuewen.com/E581D7/19470380608818806/epubprivate/OEBPS/Images/28b32f7d-f647-4137-a0d1-86988a995e30.png?sign=1738844083-27HXmzXvQ3og6IQcFIL9njw1dssc3Mhq-0-a634d7bb29bbf1d828b3d4d4577a745b)
- To do a simple recon of name servers, A records, SOA records, MX records, and so on, we can run the following command:
dnsrecon -d packtpub.com -n 8.8.8.8
The following screenshot shows the output of the preceding command:
![](https://epubservercos.yuewen.com/E581D7/19470380608818806/epubprivate/OEBPS/Images/27cf3c99-5195-448e-87c5-8e180cd6c36c.png?sign=1738844083-FJ3jpZiNYVIV1dczbvx56aoAFsewgwrl-0-be4ea69b80b3eb32672cc160e19f4e85)
- Now let's take an example of a domain that has NSEC records. To do a zone walk, we can simply run the following command:
dnsrecon -z -d icann.org -n 8.8.8.8
The following screenshot shows the output of the preceding command:
![](https://epubservercos.yuewen.com/E581D7/19470380608818806/epubprivate/OEBPS/Images/ed33bfbd-63af-4180-ae6a-a571da2f6bbb.png?sign=1738844083-uNSHzh62Ba0JkNzuylkfJf1b82vjFlpv-0-680cc41f58908de9c00a29abb9509c0e)
- We can do this manually by using the dig command along with dig +short NSEC domainname.com.
- The previous dig command will throw us one subdomain, and then we can rerun the same command with the subdomain we got in previous step to find the next subdomain: dig +short NSEC a.domain.com.