Nov 8, 2011

[Tutorial] Directing All Requests From A Machine In LAN To Another Address.

Tools Used:

1) Backtrack 5 R1
2) Dsniff Package (Pre-Installed in BT5)
3) Arpspoof and Dnsspoof (Tools Included In Dsniff Package)

Principle Used:

It uses a simple principle. Since we are in the same network (LAN), we spoof the request and replies of our victim and the gateway by making them send all requests through our machine and forging the replies.

Victim's IP:
Gateway IP (router ip):
Our IP:

Normal Condition:


Compromised Condition:


Thus, everyting can be compromised, which can be used for both good results as well as bad, which we will discuss later.

Attack method:

1) First, we need to ip forward so that we do not DOS the network.

echo 1 > /proc/sys/net/ipv4/ip_forward

2) Secondly, we use arpspoof on victim and gateway which will make the victim think we are gateway and vice-versa.

arpspoof -t
arpspoof -t

After this attack we becomd the ManInTheMiddle. We can do almost anything we want, not only spoof addresses. :D

3) We need to create a simple text file with addresses that we want to redirect. is ip addr of

(This will redirect all request to *
(This will redirect all the addresses to

4) Execute the dnsspoof command to forge the requests and replies:

dnsspoof -i wlan1 -f hostfile host and udp port 53

*hostfile is the file we created on step 3.
**wlan1 is my network interface, it may differ.

Now all the requests from the victim will be forged and he will be redirected to the addresses we have setup.

Uses and Misuses of dnsspoofing:

1) It can be used by people to prevent others in their lan from accessing certain sites (porn,social sites, voilent sites etc.)

2) Can be used to play pranks on friends..

3) It can be used by Hacker's to redirect their victim's to some malicious sites and force them to download/execute/click on whatever stuffs they have uploaded there which can be used to exploit the victim.

1 comment:

  1. Awesome things here. I am very glad to peer your article.
    Thank you so much and I'm having a look forward to contact you. Will you kindly drop me a e-mail?
    Also visit my site ; proxies