This can be carried out if an attacker achieves to compromise the Primary DNS Server of the victim i.e. usually the DC on Active Directory environments, or sets up a rogue DNS Server on the network which becomes the Primary DNS Server of the victim
The latter can be achieved through DHCPv6 Spoofing, where an attacker uses tools such as mitm6 to send IPv6 RA (Router Adversitement) to the network hosts and waits for clients to respond back with a DHCPv6 SOLICIT message
The client ends with an IPv6 configuration where the DNS Primary Server is the attacker’s DNS Rogue Server
Therefore, any NR (Name Resolution) via DNS from the victim is sent to the attacker
Let’s suppose that we are able to disclose the content of any file in the system through a security flaw discovered in a web application hosted on the target e.g. LFI
We have seen previously that the 53 DNS Port is open in the victim and it’s a Linux system, so it’s probably a Bind9 DNS Server
So, we list the content of the /etc/bind/named.conf and see that there is a RNDC-Key, which is a symmetric key used to manage a DNS server remotely