Skip to content

Instantly share code, notes, and snippets.

@4poc
Last active November 4, 2016 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 4poc/6b41291bb1eef8f9720fa5344c4d8600 to your computer and use it in GitHub Desktop.
Save 4poc/6b41291bb1eef8f9720fa5344c4d8600 to your computer and use it in GitHub Desktop.
Local SSL/TLS Sniffing
# Route local connections to the remote target to localhost port 4440:
iptables -t nat -A OUTPUT -p tcp --dport 443 -d [REMOTE_HOST] -j DNAT --to-destination 127.0.0.1:4440
# Route local connections to port 4441 to the original target:
iptables -t nat -A OUTPUT -p tcp --dport 4441 -d 127.0.0.1 -j DNAT --to-destination [REMOTE_HOST]:443
# Use sslsplit to proxy connections inbetween and save plaintext contents:
sslsplit -D -l connections.log -S logs -k ca.key -c ca.crt https 127.0.0.1 4440 127.0.0.1 4441
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment