
This Bash script checks domains for DNS zone transfer misconfigurations (CVE-1999-0532). It queries name servers and attempts AXFR requests; if successful, it reveals full DNS records, indicating a security flaw. Otherwise, it reports the domain as properly secured.
A lightweight Bash-based security tool for testing DNS zone transfer misconfigurations (AXFR), associated with CVE-1999-0532.
This script queries authoritative name servers for a domain and attempts full zone transfers. If successful, it indicates a critical DNS misconfiguration that can expose internal infrastructure and records.
bashdig (from dnsutils or bind-utils)Debian / Ubuntu
sudo apt install dnsutils
RHEL / CentOS
sudo yum install bind-utils
git clone https://github.com/SleepTheGod/dns-zone-audit/
cd dns-zone-audit
chmod +x main.sh
./main.sh
sudo bash ssl.sh target port
example.com test.com target.org
file:domains.txt
Example domains.txt:
example.com
test.com
# comment line
target.org
Retrieves NS records for each domain
Iterates through each authoritative name server
Attempts a DNS zone transfer (AXFR)
Reports
=== Testing domain: example.com ===
Name servers
ns1.example.com
ns2.example.com
Attempting zone transfer from ns1.example.com...
FAILED: Zone transfer refused or not allowed
Attempting zone transfer from ns2.example.com...
SUCCESS: Zone transfer allowed
If a zone transfer succeeds, an attacker can retrieve
This significantly lowers the barrier for further attacks.
To prevent unauthorized zone transfers
This tool is intended for authorized security testing only.
Do not use it against systems you do not own or have explicit permission to assess. Unauthorized testing may be illegal.
Taylor Christian Newsome