Ettercap is a tool for performing ARP spoofing sniffing, which is commonly used for man-in-the-middle attacks.
I'm using Kali Linux 2.0; Before you start using Ettercap, configure it first:
To edit a configuration file/etc/ettercap/etter.conf:
# vim /etc/ettercap/etter.conf
Find the Privs section, instead:
ec_uid = 0 # nobody is the defaultec_gid = 0 # nobody is the default
In line 176 "If you use Iptables", remove the comment:
redir_command_on = "iptables -t nat -A PREROUTING -i %iface -p tcp --dpor t %port -j REDIRECT --to-port %rport" redir_command_off = "iptables -t nat -D PREROUTING -i %iface -p tcp --dpo rt %port -j REDIRECT --to-port %rport"
Save exit.
Ettercap graphical User interface: Applications->sniffing & spoofing->ettercap-graphical:
In the Options menu, make sure to select Promisc mode;
Sniff menu Select Unified Sniffing: Select the network interface used, I use wlan0; if you use cable, select eth0;
Host->scan for hosts, scans all hosts in the current network.
Host->host list, scan to the host listing:
Then we can choose the target to attack, for example, select the IP address of 192.168.0.105, click Add to Target 1 (added to target 1), then select the IP address of the gateway 192.168.0.1, click Add to Target 2 (added to target 2). All data sent from 192.168.0.105 will go through Kali Linux.
If you also intercept data sent to 192.168.0.105, add 192.168.0.1 to target 1,192.168.0.105 to target 2, which implements bidirectional listening data.
Multiple hosts can be added.
To view the added attack target: targets->current Targets:
Make sure that port forwarding is turned on again, and sometimes it shuts itself down and doesn't know why:
# echo ‘1‘ > /proc/sys/net/ipv4/ip_forward
Start attack: Mitm->arp poisoning, select parameters, Sniff remote connections.
This time the target host of all traffic is through the attacker's host out, want to catch what to catch what.
Used in conjunction with the Wireshark:
Kali Use of Linux Ettercap