- Kali Linux Network Scanning Cookbook(Second Edition)
- Michael Hixon Justin Hutchens
- 222字
- 2021-07-09 20:36:13
Brute-force
Where the dnsenum command really shines is brute-forcing, which it does recursively. This means that when it identifies subdomain.domain.com, it will start brute-forcing subdomain.subdomain.domain.com. Obviously, this can take a while even though it is a multithreaded script.
In the next example, we will use the dnsenum command to brute-force subdomains, but first, we need a list of subdomains for dnsenum to use. There is a very interesting project called dnspop that identifies top subdomains.
The project can be found here at https://github.com/bitquark/dnspop. We do not need to download and install the Python script, as the results are also published at https://github.com/bitquark/dnspop/tree/master/results. I have downloaded the list with the top 1,000 most popular subdomains and placed it in the /usr/share/wordlists/subdomains/ directory.
Now we have a list of names dnsenum can use to brute-force with. The command to brute-force subdomains uses the file (-f) flag followed by the file path/name and, if you want, the recursive (-r) flag to enumerate the subdomains recursively. The command looks like this:
dnsenum -f /usr/share/wordlists/subdomains/subdomains_popular_1000 -r google.com
The aforementioned command does the following:
- First, the dnsenum command performs the default lookups:
- Next, dnsenum begins brute-forcing subdomains:
![](https://epubservercos.yuewen.com/B47322/19470409201646106/epubprivate/OEBPS/Images/Screenshot-from-2017-04-11-10-39-42-1024x704.png?sign=1738769780-sVHZHZSl65Ho1M0af9Y1BHGxLp4dU2ZB-0-16ef2449810aa756dc505934b32512d7)
- Once it has completed brute-forcing the subdomains, it will begin brute-forcing recursively:
![](https://epubservercos.yuewen.com/B47322/19470409201646106/epubprivate/OEBPS/Images/Screenshot-from-2017-04-11-10-40-28-1024x704.png?sign=1738769780-povuabosfpFq2h31tIcYbXFdxmmlML07-0-86a448ebcc1c54b3628d26f716823ca5)