# 53 - DNS

## Nmap

Para facilitar información de este puerto puedes usar sus NSE's correspondientes

{% code overflow="wrap" %}

```
#opcion 1 - todos los que contengan *telnet* en el NSE
nmap -p 53 -sV --script=*dns* IP

#opcion 2 - específicamente los siguientes
nmap -p 53 -sV --script=dns-nsec-enum,dns-service-discovery,dns-zone-transfer,dns-srv-enum,dns-brute,dns-recursion,dns-nsec3-enum,dns-zeustracker IP
```

{% endcode %}

## Probar

* Transferencia zona&#x20;

```bash
dig axfr blah.com @ns1.blah.com
```

```bash
whois domain.com
```

```bash
dig {a|txt|ns|mx} domain.com
dig {a|txt|ns|mx} domain.com @ns1.domain.com
```

```bash
host -t {a|txt|ns|mx} megacorpone.com
host -a megacorpone.com
host -l megacorpone.com ns1.megacorpone.com
```

```bash
dnsrecon -d megacorpone.com -t axfr @ns2.megacorpone.com
```

```bash
dnsenum domain.com
```

* DNS Tunneling

En el servidor

```
iodined -f 10.0.0.1 domain
```

En el cliente

```
iodine -f domain.com
```

* DNS Spoofing

```
ettercap -T -q -i <interface> -M arp:remote /<target_ip>/ /<gateway_ip>/
```

* Caché poisoning

```
dnsspoof -i <interface> -f <hosts_file>
```

* DNS Open Resolver

```
nmap --script dns-recursion IP
```

* Conexión a través de los siguientes comandos

```
nslookup domain.com
host domain.com
dig domain.com
```

## Máquinas resueltas que usan DNS

* HTB
  * Trick
  * Litter
  * Bank

## Referencias


---

# 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://wiki.securiters.com/securiters-wiki/puertos-and-servicios/53-dns.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.
