LoginSignup
13

More than 5 years have passed since last update.

SSLDumpでサーバに来ているコネクションをSSLv3かTLS1.xか判断する

Posted at

サーバに来ているSSL/TLSコネクションのクライアントバージョンを確認したい時、ssldumpコマンドが使える。

Debian系ならaptでapt-get install ssldump、結構古い。

クライアントバージョンをClientHelloでチェック

ヘッダ表示と逆引きしないオプションあたりを付けて、ssldumpを実行してみた。
ClientHelloのバージョンから判断できる。

# ssldump -v
ssldump 0.9b3


# ssldump -n -H -i eth0 


## SSLV3の時はVersion 3.0
New TCP connection #1: xxx.xxx.xxx.xxx(64235) <-> xxx.xxx.xxx.xxx(443)
1 1  0.0651 (0.0651)  C>S  Handshake
      ClientHello
        Version 3.0 
        cipher suites

-- snip --

### TLS1の時はVersion 3.1
New TCP connection #3: xxx.xxx.xxx.xxx(64288) <-> xxx.xxx.xxx.xxx(443)
3 1  0.0651 (0.0651)  C>S  Handshake
      ClientHello
        Version 3.1 
        cipher suites

あと、SSLv2 compatible client helloを送ってくるのもいるので、そういう手合はその後のVersionで判断。

opensslコマンドでクライアント役

挙動確認のクライアント役にはopensslコマンドをつかってもOK。

openssl s_client -connect xxx.example.com:443 -ssl3  ## ClientHello 3.0
openssl s_client -connect xxx.example.com:443 -tls1  ## ClientHello 3.1
openssl s_client -connect xxx.example.com:443        ## SSLv2 compatible Hello

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
13