# Dnsenum

<figure><img src="/files/O1ndreDvIIcvZnxS4ZPy" alt="" width="256"><figcaption></figcaption></figure>

Пример использования dnsenum:

Не выполнять обратный поиск (`-noreverse`) и сохраните результаты в файл (`-o mydomain.xml`) для домена `example.com`:

```
root@kali:~# dnsenum --noreverse -o mydomain.xml example.com
dnsenum VERSION:1.2.4

-----   example.com   -----


Host's addresses:
__________________

example.com.                             392      IN    A        93.184.216.119


Name Servers:
______________

b.iana-servers.net.                      122      IN    A        199.43.133.53
a.iana-servers.net.                      122      IN    A        199.43.132.53


Mail (MX) Servers:
___________________
```

***

## Пакеты и бинарные файлы:

### dnsenum

Dnsenum - это многопоточный perl-скрипт для перечисления DNS-информации домена и обнаружения несмежных ip-блоков. Основная цель Dnsenum - собрать как можно больше информации о домене. В настоящее время программа выполняет следующие операции:

* Получение адреса хостов (запись A).&#x20;
* Получение namservers (потоковое).&#x20;
* Получение MX-записей (потоковое).&#x20;
* Выполнить axfr-запросы к серверам имен и получить версии BIND (потоковый).&#x20;
* Получение дополнительных имен и поддоменов через google scraping (запрос google = "allinurl: -www site:domain").&#x20;
* Перебор поддоменов из файла, также может выполнять рекурсию по поддоменам, имеющим NS-записи (все потоковые).&#x20;
* Вычисление сетевых диапазонов доменов класса C и выполнение запросов whois по ним (потоковые).&#x20;
* Выполнять обратный поиск по сетевым диапазонам (C-класс или/и whois-сетевые диапазоны) (потоковый).&#x20;
* Запись в файл domain\_ips.txt ip-блоков.

Команда для установки: `sudo apt install dnsenum`

#### **dnsenum**

* Многопоточный скрипт для перечисления информации о домене и обнаружения несмежных блоков IP-адресов

```
dnsenum -h
dnsenum VERSION:1.2.6
Usage: dnsenum [Options] <domain>
[Options]:
Note: If no -f tag supplied will default to /usr/share/dnsenum/dns.txt or
the dns.txt file in the same directory as dnsenum
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. (Takes priority over default dns.txt)
  -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 discovered 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 perform 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)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://notes.kraken-security.ru/kraken/tools/sbor-informacii/dnsenum.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
