# 53 - DNS

### Enumeration

Note: Many of the techniques accomplished below can also be accomplished using DNS repositories, such as [DNSdumpster.com ](https://dnsdumpster.com/)

### **nslookup**

```
nslookup $domain.com
nslookup $ipaddress (reverse lookup)
```

### dig

```
Basic syntax: dig @<nameserver> somesite.com options
dig somesite.com -t any (all available records)
dig somesite.com -t mx (mx records only)
dig somesite.com -t axfr (zone transfer)
dig -x $ipaddress (reverse lookup)
```

### host

```
Host www.somesite.com (web server)
Host -t ns somesite.com (nameservers)
Host -t mx somesite.com (mail servers)
host -l <domain name> <dns server address> (zone transfer)
```

### Automated tools

#### DNSRECON

```
dnsrecon -d somesite.com -t axfr
dnsrecon -r CIDR (reverse DNS lookup of net block)
-d: used to specify domain name
-r: IP range for reverse lookup
-t: used to specify the type of enumeration
    Common types include:
    std - SOA, NS, A, AAAA, MX and SRV
    axfr - test all nameservers for zone transfer
    brt - brute force domains and hosts using a given dictionary
```

#### DNSenum

```
dnsenum $domain.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.oncyberwar.com/3.-enumeration/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.
