Set SSLKEYLOGFILE on MacBook to decrypt HTTPS traffic
Create keylogfile
mkdir ~/sslkeylogfile && touch ~/sslkeylogfile/keylogfile.log # create keylogfile.log
sudo chmod 777 ~/sslkeylogfile/keylogfile.log # change permissions so Chrome can write on startup
Configure environment variable
vim ~/.zshrc # open config file
export SSLKEYLOGFILE=~/sslkeylogfile/keylogfile.log # set environment variable
source ~/.zshrc # reload config
Configure Wireshark
preferences -> Protocols -> TLS
- Set TLS debug file to record decryption logs
- Set (Pre)-Master-Secret log filename to the absolute path of keylogfile.log
Start Chrome from terminal
open -a 'Google Chrome' https://www.baidu.com/
Note: start Chrome from terminal to ensure it can read the SSLKEYLOGFILE environment variable.
