# 53 - DNS

## Commands

{% tabs %}
{% tab title="Info Leak" %}
```bash
nslookup server 10.10.10.103
> 127.0.0.1
```
{% endtab %}

{% tab title="Zone Transfer" %}
```bash
dig axfr @10.10.10.248 intelligence.htb
```
{% endtab %}

{% tab title="dnsrecon" %}
```bash
dnsrecon -r 127.0.0.0/24 -n 192.168.138.130 -d domain.com
```
{% endtab %}

{% tab title="dnsenum (D)" %}
{% code overflow="wrap" %}
```bash
dnsenum --dnsserver 10.10.10.248 -f /usr/share/seclists/Discovery/DNS/bitquark-subdomains-top100000.txt intelligence.htb
```
{% endcode %}
{% endtab %}
{% endtabs %}

Adding a DNS entry.

{% code overflow="wrap" %}
```bash
sudo python3 /opt/krbrelayx/dnstool.py -u 'intelligence\tiffany.molina' -p $(cat tiffany_pass) -a add -r 'webx7331' -d '10.10.14.121' 10.10.10.248
```
{% endcode %}

## Resources

{% tabs %}
{% tab title=" krbrelayx" %}
{% embed url="https://github.com/dirkjanm/krbrelayx" %}
{% endtab %}

{% tab title="dnsrecon" %}
{% embed url="https://github.com/darkoperator/dnsrecon" %}
{% endtab %}
{% endtabs %}
