ICMP Redirect Lab Report
ICMP Redirect Lab Report
Now we run the ICMP redirect attack code from the attacker machine.
We us traceroute command again to see the result:
We run the code on attacker, while still pinging and using traceroute on victim
side to see the results:
We can confirm this by running ip route show cache command before and after
the attack to see the packet flow.
the packet flow was constant and did not change in either of the cases.
In order for attack to happen, the host needs to be on the same network.
Question2:
I was not able to apply ICMP redirect attack to redirect a non-existing machine.
The code to prove the claim above:
We run the code on attacker, while still pinging and using traceroute on victim
side to see the results:
We can confirm this by running ip route show cache command before and after
the attack to see the packet flow.
the packet flow was constant and did not change in either of the cases.
As the router is offline, there is no way to connect to it. Which is why the attack
didn’t work as it was intended to.
Question3:
Following are the entries for the malicious router container:
net.ipv4.conf.all.send_redirects=0,
net.ipv4.conf.default.send_redirects=0,
net.ipv4.conf.eth0.send_redirects=0.
WE now changed the values inside the container, rebuilt the container and ran it
with the fresh new settings.
We observed that the malicious router enables all the IPv4 ICMP redirected
packets to be sent on all the interfaces along with eth0 interface. This way
whenever a new interface is added it is automatically sent the ICMP requests.
The results are shown below:
Task2: Launching the MITM Attack
First we ping the destination from the victim:
We run traceroute to see the results which are verified using ip route command:
Now we run the ICMP redirect attack code on attacker machine to see the
result:
MITM code:
Results:
Question 4:
WE can see that the attack is run only on one side and not both as I tried typing
in gaurav on the server side but it did not change on the victim side. But the
reverse was happening successfully.
Explanation:
Client sends messages only to the server and not viceversa, the direction of
packet flow is from, victim machine to malicious router to router to destination
machine.
Question 5:
1. First we use A’s Ip address: 10.9.0.5 in the Code:
We run the code and see the attack happening successfully. The packets are sent
continuously of length 7 regardless of the message beig sent. :
2. Now we use A’s MAC address: 02:42:0a:09:00:05
Code:
We run the code on malicious router and see the result as follows:
We observed that the malicious router sends only one packet at a time typed on
the victim side along with the length of the message typed with the attack.
To conclude, we can use the A’s MAC address instead of IP address as it does
not create unneccesary flooding where continuous TCP retransmission occurs.