Sounds like you are trying to do DNS cache poisoning, Thank GOD for DNSSEC,
But you are not a HACKER - No Way..
If we are talking about your network and the pc's are using your network assigned DNS resolve server, then all you need is Unbound.
(unless you are trying to hack a dns record request, if that is the case, then i can't help you)
Unbound is a validating, recursive, and caching DNS server designed as a high-performance alternative for BIND: http://unbound.net/
https://calomel.org/unbound_dns.html - A Quick Overview of Unbound Settings.
http://npr.me.uk/unbound.html - install info.
You can use unbound on any pc on your network that is always on, it's install on my xbmc media pc.
I use unbound with a HOSTS file to block ads, with unbound you can put theses hosts in the config file and block them or even redirect them. - i Thank The redirect is the part you are looking for.
Find hosts file info here: http://www.accs-net.com/hosts/what_is_hosts.html - no linger updated
More hosts file info: http://winhelp2002.mvps.org/hosts.htm
Utility to convert a standard hosts file list to the correct format for Unbound:
http://npr.me.uk/makefilter.zip
i don't yet understand all of unbound setting, i only been using it a few weeks.
my unbound config:
////////////////////////////////////////////////////////
server:
directory: "c:\Program Files\Unbound"
root-hints: "c:\Program Files\Unbound\root.hints"
auto-trust-anchor-file: "c:\Program Files\Unbound\root.key"
dlv-anchor-file: "C:\Program Files\Unbound\dlv.isc.org.key"
logfile: “unbound.log”
use-syslog: no
access-control: 192.168.0.0/16 allow_snoop
interface: 0.0.0.0
verbosity: 1
hide-identity: yes
hide-version: yes
prefetch: yes
do-ip4: yes
do-ip6: no
do-udp: yes
do-tcp: yes
private-address: 10.0.0.0/8
private-address: 172.16.0.0/12
private-address: 192.168.0.0/16
private-address: 192.168.11.0/24
private-address: 127.0.0.1/8
port: 53
include: "c:\Program Files\Unbound\filter.conf"
///////////////////////////////////////////////////////
Short example of filter.conf
///////////////////////////////////////////////////////
# Blocking Ad Server domains or any domain.
local-zone: "google-analytics.com" redirect
local-data: "google-analytics.com A 127.0.0.1"
local-zone: "googleadservices.com" redirect
local-data: "googleadservices.com A 127.0.0.1"
local-zone: "googlesyndication.com" redirect
local-data: "googlesyndication.com A 127.0.0.1"
local-zone: "gostats.com" redirect
local-data: "gostats.com A 127.0.0.1"
local-zone: "gp.dejanews.com" redirect
///////////////////////////////////////////////////////
If you put facebook in the filter.conf with the ip 216.178.47.11
facebook.com will not be blocked, DNS request will resolve to mypace.com
example:
local-zone: "facebook.com" redirect
local-data: "facebook.com A 216.178.47.11"
local-zone: "facebook.com" redirect
local-data: "facebook.com A 216.178.47.11"
just to note, i use "DHCP Server" to assigns IP addresses and my DNS Resolve Server to all client computers that enter my network: http://www.dhcpserver.de/dhcpsrv.htm