This is a mitmproxy script which will decrypt Netflix MSL requests and responses
- Install mitmproxy: https://docs.mitmproxy.org/stable/overview-installation/
- Install HTTPS certificate: https://docs.mitmproxy.org/stable/concepts-certificates/
- Configure your browser or system to use localhost:8080 as HTTP and HTTPS proxy
- Run
mitmdump -s msl_decrypt.py
(8080 is the default port, can be changed with-p
option) - Analyze the generated
proxy.log
- Profit
- Install Python 3
- On shell run:
pip install mitmproxy
pip install pycryptodomex - Install HTTPS certificate as described in the mitmproxy guide
- Run
mitmdump -s msl_decrypt.py
(8080 is the default port, can be changed with-p
option) - Open settings, and click Network & Internet, so click Proxy
- In the Manual Proxy Setup section, set the
Use a Proxy Server
switch to On - In the Address field 127.0.0.1, in the Port field the choosen proxy port (default 8080)
- Press Save, after about ten seconds mitmproxy will begin to receive
Don't use the mitmproxy Windows installer because it includes a bundled python runtime which won't see any libraries installed with pip.
Installing mitmproxy with pip should work. Alternatively, the Linux version can be used in WSL.
For the decryption to work, mitmproxy has to intercept MSL handshake. That usually happens only after the very first login to Netflix or when a previous session has expired.
To force new handshake, either clear all cookies and local storage for all Netflix domains or just create a new browser profile which will have empty history.
After the script is first run, it will save the negotiated AES key to current working directory and use it next time.