Last active
November 4, 2016 12:36
-
-
Save 4poc/6b41291bb1eef8f9720fa5344c4d8600 to your computer and use it in GitHub Desktop.
Local SSL/TLS Sniffing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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