Domain Name System (DNS)

Default port: 53

Enumeration

nmap -p53 -Pn -sV -sC <TARGET-IP>

DNS Zone Transfer

Copy a portion of their database to another DNS server.

dig AXFR @ns1.inlanefreight.htb inlanefreight.htb

Fierce

fierce --domain zonetransfer.me

DNS Spoofing

Altering legitimate DNS records with false information so that they can be used to redirect online traffic to a fraudulent website.

Local DNS Cache Poisoning

Edit the /etc/ettercap/etter.dns file to map the target domain name that we want to spoof and the attacker's IP address that we want to redirect a user to.

cat /etc/ettercap/etter.dns

inlanefreight.com      A   192.168.225.110
*.inlanefreight.com    A   192.168.225.110

Start the Ettercap tool and scan for live hosts within the network by navigating to Hosts > Scan for Hosts.

Once completed, add the target IP address (e.g., 192.168.152.129) to Target1 and add a default gateway IP (e.g., 192.168.152.2) to Target2.

Activate dns_spoof attack by navigating to Plugins > Manage Plugins. This sends the target machine with fake DNS responses that will resolve inlanefreight.com to IP address 192.168.225.110

Resources

Last updated