DNS (Domain Name Systems) Pentesting
DNS is often called as a phonebook for internet. A default port is 53.
Enumeration
You can use Nmap to enumerate automatically.
Investigation
DNSdumpster is an online tool for reconnaissance DNS records.
IP Address from the Domain
DNS Records
Zone Transfer
The zone transfer is the process of copying the zone file on a primary DNS server to a secondary DNS server.
BIND
BIND is the most commonly used DNS server.
Configuration Files
Update DNS Zone
If we found the secret key such like below, we can update DNS zone.
To update, run the following command using the key.
Reverse Lookup
Resolves a domain name from given IP address.
Resolve Domains and IP Addresses in /etc/hosts
Edit /etc/hosts file as root to add custom domains.
If you want to force the system to reflect the changes, restart hostnamed.
Set DNS Resolver in /etc/resolv.conf
Edit /etc/resolv.conf file as root to add custom nameservers.
Google Nameservers
Cloudflare Nameservers
If you want to force the system to reflect the changes, restart resolved.
DNS Spoofing
Also known as DNS cache poisoning. It corrupts Domain Name System data is introduced into the DNS resolver's cache, causing the name server to return an incorrect result record, e.g. an IP address.
Flush the DNS Cache
Clear IP addresses or DNS records from caches.
Check DNS caches are actually flushed
DNS Exfiltration
DNS Infiltration
Coming soon...
DNS Tunneling
Last updated