LoginSignup
2
1

More than 1 year has passed since last update.

Wireshark + Mac Chrome で SSLKEYLOGFILE を使って暗号化された TLS 通信を見る方法

Posted at

SSLKEYLOGFILE 環境変数で client が使った Pre-master-secret を記録できる。
それを wireshark に入れることで EncryptedExtensions などを見ることができるらしい。

https://www.youtube.com/watch?v=5qecyZHL-GU
Windowsでの方法

Mac で TLS 通信を解読する方法

  1. SSLKEYLOGFILE 付きの chrome を開く
    1.

    cd /tmp
    Date="$(date)"
    mkdir -p -- "$Date"
    cd "$Date"
    export SSLKEYLOGFILE=$PWD/keylog.log
    open -n /Applications/Google\ Chrome.app
    
    1. こんな感じで keylog.log にsecretが記録されていく
      1. image.png
  2. wiresharkを起動

  3. wiresharkのconfigに keylog.log を設定する

    1. Preferences > Protocols > TLS > (Pre)-Master-Secret log filename
      1. image.png
  4. wiresharkでrecord開始する

  5. 開いた chrome でどこかにアクセス

  6. wiresharkで解析する

成功するとこうなる

image.png

Encrypted Extentions, CertiicateなどのTLSに加えて、見えないはずの HTTP2 通信まで見れるようになる。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1