Skip to content

Instantly share code, notes, and snippets.

@sekkr1
Last active August 26, 2019 15:57
Show Gist options
  • Save sekkr1/73f20246430b46dd2a38052beffa6d09 to your computer and use it in GitHub Desktop.
Save sekkr1/73f20246430b46dd2a38052beffa6d09 to your computer and use it in GitHub Desktop.
Getting mitmproxy to work with Facebook apps (TLSv1.3)

Cause of the issue

Due to package version restrictions by mitm the OpenSSL version it uses is old and causes issues (we want OpenSSL 1.1.1+)

How to fix

git clone https://github.com/mitmproxy/mitmproxy.git # Clone repo
cd mitmproxy
sed -ie "s/pyOpenSSL[^\"]*/pyOpenSSL/;s/cryptography[^\"]*/cryptography/" setup.py # Remove restrictions on package versions
pip install .
mitmproxy

Notes

To find the SSL version mitmproxy uses

mitmproxy --version

This version is tied to the version of PyOpenSSL and cryptography (not python's), and it also seems to be capped by the system's OpenSSL version

Troubleshooting

If mitmproxy still refuses to work try:

  • Using python3.6 (3.6.8 and 3.6.9 tested and working)
  • Upgrading the system's OpenSSL to at least 1.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment