User Tools

Site Tools


This is an old revision of the document!

Multithreaded perl script to enumerate DNS information of a domain and to discover non-contiguous ip blocks.


  Get the host’s addresse (A record).
  Get the namservers (threaded).
  Get the MX record (threaded).
  Perform axfr queries on nameservers and get BIND VERSION (threaded).
  Get extra names and subdomains via google scraping (google query = “allinurl: -www site:domain”).
  Brute force subdomains from file, can also perform recursion on subdomain that have NS records (all threaded).
  Calculate C class domain network ranges and perform whois queries on them (threaded).
  Perform reverse lookups on netranges ( C class or/and whois netranges) (threaded).
  Write to domain_ips.txt file ip-blocks.

Source: dnsenum Homepage | Kali dnsenum Repo

  Author: Filip Waeytens, tix tixxDZ
  License: GPLv2

Tools included in the dnsenum package dnsenum root@kali:~# dnsenum -h VERSION:1.2.3 Usage: [Options] <domain> [Options]: Note: the brute force -f switch is obligatory. GENERAL OPTIONS:

  1. -dnsserver <server>

Use this DNS server for A, NS and MX queries.

  1. -enum Shortcut option equivalent to –threads 5 -s 15 -w.
  2. h, –help Print this help message.
  3. -noreverse Skip the reverse lookup operations.
  4. -private Show and save private ips at the end of the file domain_ips.txt.
  5. -subfile <file> Write all valid subdomains to this file.
  6. t, –timeout <value> The tcp and udp timeout values in seconds (default: 10s).
  7. -threads <value> The number of threads that will perform different queries.
  8. v, –verbose Be verbose: show all the progress and all the error messages.


  1. 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.

  1. s, –scrap <value> The maximum number of subdomains that will be scraped from Google (default 15).


  1. f, –file <file> Read subdomains from this file to perform brute force.
  2. 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.


  1. d, –delay <value> The maximum value of seconds to wait between whois queries, the value is defined randomly, default: 3s.
  2. 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.


  1. e, –exclude <regexp>

Exclude PTR records that match the regexp expression from reverse lookup results, useful on invalid hostnames. OUTPUT OPTIONS:

  1. o –output <file> Output in XML format. Can be imported in MagicTree (

dnsenum Usage Example

Don’t do a reverse lookup (–noreverse) and save the output to a file (-o mydomain.xml) for the domain root@kali:~# dnsenum –noreverse -o mydomain.xml VERSION:1.2.3

—– —–

Host's addresses: 392 IN A Name Servers: 122 IN A 122 IN A

Mail (MX) Servers:

dnsenum.1541513702.txt.gz · Last modified: 2018/11/06 14:15 by admin

(C) BlackWeb Security 2017 - 2020