2013-04-04 2 views
11

Я запускаю Wireshark 1.8.6 на Windows Server 2008 R2 и пытаюсь расшифровать входящую связь HTTPS, чтобы отладить проблему, которую я вижу.Расшифровка трафика HTTPS в Wireshark не работает

У меня есть список ключей RSA правильно настроен (я думаю), но Wireshark по какой-то причине не расшифрует SSL-трафик. Я получил это, чтобы работать в прошлом, отлаживая обмены с другими клиентскими системами, поэтому мне интересно, является ли это чем-то конкретным с TLS, используемым здесь (т.е. я читал, что вы не можете расшифровать, если используете Diffie-Hellman, но я могу 't сказать, если это то, что используется).

У меня есть RSA Ключи элемент списка выглядит следующим образом:

IP Address: 192.168.1.27 (the IP address of the server) 
Port: 7447 
Protocol: http 
Key File: set to my .pem (which I created using openssl from a .pfx containing both the public and private key). 
Password: blank because it doesn't seem to need it for a .pem (Wireshark actually throws an error if I enter one). 

В моей Wireshark след, я могу видеть клиент Привет и сервер Привет, но данные приложения не расшифрованы (правой кнопкой мыши -> Follow SSL Поток ничего не показывает).

Мой SSL-журнал вклеен ниже - есть ли что-то здесь, здесь отсутствует, что скажет мне, почему дешифрование не работает? Я вижу несколько записей, как это, что волнует меня, но я не уверен, как интерпретировать их:

packet_from_server: is from server - FALSE 
decrypt_ssl3_record: using client decoder 
decrypt_ssl3_record: no decoder available 
dissect_ssl3_handshake iteration 1 type 16 offset 5 length 258 bytes, remaining 267 
ssl_decrypt_pre_master_secret key exchange 0 different from KEX_RSA (16) 
dissect_ssl3_handshake can't decrypt pre master secret 
    record: offset = 267, reported_length_remaining = 59 

SSL журнала:

ssl_association_remove removing TCP 7447 - http handle 00000000041057D0 
Private key imported: KeyID 02:bb:83:4f:80:cf:39:59:39:cd:74:ab:b4:4b:c7:20:... 
ssl_load_key: swapping p and q parameters and recomputing u 
ssl_init IPv4 addr '192.168.1.27' (192.168.1.27) port '7447' filename 'C:\Users\username\Desktop\Certs\server_cert.pem.pem' password(only for p12 file) '' 
ssl_init private key file C:\Users\username\Desktop\Certs\server_cert.pem.pem successfully loaded. 
association_add TCP port 7447 protocol http handle 00000000041057D0 

dissect_ssl enter frame #2968 (first time) 
ssl_session_init: initializing ptr 0000000006005E40 size 680 
    conversation = 00000000060056C0, ssl_session = 0000000006005E40 
    record: offset = 0, reported_length_remaining = 123 
dissect_ssl3_record: content_type 22 Handshake 
decrypt_ssl3_record: app_data len 118, ssl state 0x00 
association_find: TCP port 59050 found 0000000000000000 
packet_from_server: is from server - FALSE 
decrypt_ssl3_record: using client decoder 
decrypt_ssl3_record: no decoder available 
dissect_ssl3_handshake iteration 1 type 1 offset 5 length 114 bytes, remaining 123 
packet_from_server: is from server - FALSE 
ssl_find_private_key server 192.168.1.27:7447 
dissect_ssl3_hnd_hello_common found CLIENT RANDOM -> state 0x01 

dissect_ssl enter frame #2971 (first time) 
    conversation = 00000000060056C0, ssl_session = 0000000006005E40 
    record: offset = 0, reported_length_remaining = 326 
dissect_ssl3_record found version 0x0301(TLS 1.0) -> state 0x11 
dissect_ssl3_record: content_type 22 Handshake 
decrypt_ssl3_record: app_data len 262, ssl state 0x11 
packet_from_server: is from server - FALSE 
decrypt_ssl3_record: using client decoder 
decrypt_ssl3_record: no decoder available 
dissect_ssl3_handshake iteration 1 type 16 offset 5 length 258 bytes, remaining 267 
ssl_decrypt_pre_master_secret key exchange 0 different from KEX_RSA (16) 
dissect_ssl3_handshake can't decrypt pre master secret 
    record: offset = 267, reported_length_remaining = 59 
dissect_ssl3_record: content_type 20 Change Cipher Spec 
dissect_ssl3_change_cipher_spec 
packet_from_server: is from server - FALSE 
ssl_change_cipher CLIENT 
    record: offset = 273, reported_length_remaining = 53 
dissect_ssl3_record: content_type 22 Handshake 
decrypt_ssl3_record: app_data len 48, ssl state 0x11 
packet_from_server: is from server - FALSE 
decrypt_ssl3_record: using client decoder 
decrypt_ssl3_record: no decoder available 
dissect_ssl3_handshake iteration 1 type 166 offset 278 length 4253081 bytes, remaining 326 

dissect_ssl enter frame #2972 (first time) 
    conversation = 00000000060056C0, ssl_session = 0000000006005E40 
    record: offset = 0, reported_length_remaining = 59 
dissect_ssl3_record: content_type 20 Change Cipher Spec 
dissect_ssl3_change_cipher_spec 
packet_from_server: is from server - TRUE 
ssl_change_cipher SERVER 
    record: offset = 6, reported_length_remaining = 53 
dissect_ssl3_record: content_type 22 Handshake 
decrypt_ssl3_record: app_data len 48, ssl state 0x11 
packet_from_server: is from server - TRUE 
decrypt_ssl3_record: using server decoder 
decrypt_ssl3_record: no decoder available 
dissect_ssl3_handshake iteration 1 type 8 offset 11 length 5212462 bytes, remaining 59 

dissect_ssl enter frame #2973 (first time) 
    conversation = 00000000060056C0, ssl_session = 0000000006005E40 
    record: offset = 0, reported_length_remaining = 277 
dissect_ssl3_record: content_type 23 Application Data 
decrypt_ssl3_record: app_data len 272, ssl state 0x11 
packet_from_server: is from server - FALSE 
decrypt_ssl3_record: using client decoder 
decrypt_ssl3_record: no decoder available 
association_find: TCP port 59050 found 0000000000000000 
association_find: TCP port 7447 found 0000000004FCF520 

dissect_ssl enter frame #2990 (first time) 
    conversation = 00000000060056C0, ssl_session = 0000000006005E40 
    record: offset = 0, reported_length_remaining = 53 
dissect_ssl3_record: content_type 23 Application Data 
decrypt_ssl3_record: app_data len 48, ssl state 0x11 
packet_from_server: is from server - TRUE 
decrypt_ssl3_record: using server decoder 
decrypt_ssl3_record: no decoder available 
association_find: TCP port 7447 found 0000000004FCF520 

dissect_ssl enter frame #2991 (first time) 
    conversation = 00000000060056C0, ssl_session = 0000000006005E40 
    record: offset = 0, reported_length_remaining = 1380 
    need_desegmentation: offset = 0, reported_length_remaining = 1380 

dissect_ssl enter frame #2999 (first time) 
    conversation = 00000000060056C0, ssl_session = 0000000006005E40 
    record: offset = 0, reported_length_remaining = 8565 
dissect_ssl3_record: content_type 23 Application Data 
decrypt_ssl3_record: app_data len 8560, ssl state 0x11 
packet_from_server: is from server - FALSE 
decrypt_ssl3_record: using client decoder 
decrypt_ssl3_record: no decoder available 
association_find: TCP port 59050 found 0000000000000000 
association_find: TCP port 7447 found 0000000004FCF520 

dissect_ssl enter frame #3805 (first time) 
    conversation = 00000000060056C0, ssl_session = 0000000006005E40 
    record: offset = 0, reported_length_remaining = 389 
dissect_ssl3_record: content_type 23 Application Data 
decrypt_ssl3_record: app_data len 384, ssl state 0x11 
packet_from_server: is from server - FALSE 
decrypt_ssl3_record: using client decoder 
decrypt_ssl3_record: no decoder available 
association_find: TCP port 59050 found 0000000000000000 
association_find: TCP port 7447 found 0000000004FCF520 

dissect_ssl enter frame #3807 (first time) 
    conversation = 00000000060056C0, ssl_session = 0000000006005E40 
    record: offset = 0, reported_length_remaining = 53 
dissect_ssl3_record: content_type 23 Application Data 
decrypt_ssl3_record: app_data len 48, ssl state 0x11 
packet_from_server: is from server - TRUE 
decrypt_ssl3_record: using server decoder 
decrypt_ssl3_record: no decoder available 
association_find: TCP port 7447 found 0000000004FCF520 

dissect_ssl enter frame #3808 (first time) 
    conversation = 00000000060056C0, ssl_session = 0000000006005E40 
    record: offset = 0, reported_length_remaining = 1380 
    need_desegmentation: offset = 0, reported_length_remaining = 1380 

dissect_ssl enter frame #3815 (first time) 
    conversation = 00000000060056C0, ssl_session = 0000000006005E40 
    record: offset = 0, reported_length_remaining = 8469 
dissect_ssl3_record: content_type 23 Application Data 
decrypt_ssl3_record: app_data len 8464, ssl state 0x11 
packet_from_server: is from server - FALSE 
decrypt_ssl3_record: using client decoder 
decrypt_ssl3_record: no decoder available 
association_find: TCP port 59050 found 0000000000000000 
association_find: TCP port 7447 found 0000000004FCF520 

dissect_ssl enter frame #2968 (already visited) 
    conversation = 00000000060056C0, ssl_session = 0000000000000000 
    record: offset = 0, reported_length_remaining = 123 
dissect_ssl3_record: content_type 22 Handshake 
dissect_ssl3_handshake iteration 1 type 1 offset 5 length 114 bytes, remaining 123 

dissect_ssl enter frame #2971 (already visited) 
    conversation = 00000000060056C0, ssl_session = 0000000000000000 
    record: offset = 0, reported_length_remaining = 326 
dissect_ssl3_record: content_type 22 Handshake 
dissect_ssl3_handshake iteration 1 type 16 offset 5 length 258 bytes, remaining 267 
    record: offset = 267, reported_length_remaining = 59 
dissect_ssl3_record: content_type 20 Change Cipher Spec 
dissect_ssl3_change_cipher_spec 
    record: offset = 273, reported_length_remaining = 53 
dissect_ssl3_record: content_type 22 Handshake 
dissect_ssl3_handshake iteration 1 type 166 offset 278 length 4253081 bytes, remaining 326 

dissect_ssl enter frame #2973 (already visited) 
    conversation = 00000000060056C0, ssl_session = 0000000000000000 
    record: offset = 0, reported_length_remaining = 277 
dissect_ssl3_record: content_type 23 Application Data 
association_find: TCP port 59050 found 0000000000000000 
association_find: TCP port 7447 found 0000000004FCF520 

dissect_ssl enter frame #2999 (already visited) 
    conversation = 00000000060056C0, ssl_session = 0000000000000000 
    record: offset = 0, reported_length_remaining = 8565 
dissect_ssl3_record: content_type 23 Application Data 
association_find: TCP port 59050 found 0000000000000000 
association_find: TCP port 7447 found 0000000004FCF520 

dissect_ssl enter frame #3805 (already visited) 
    conversation = 00000000060056C0, ssl_session = 0000000000000000 
    record: offset = 0, reported_length_remaining = 389 
dissect_ssl3_record: content_type 23 Application Data 
association_find: TCP port 59050 found 0000000000000000 
association_find: TCP port 7447 found 0000000004FCF520 

dissect_ssl enter frame #2968 (already visited) 
    conversation = 00000000060056C0, ssl_session = 0000000000000000 
    record: offset = 0, reported_length_remaining = 123 
dissect_ssl3_record: content_type 22 Handshake 
dissect_ssl3_handshake iteration 1 type 1 offset 5 length 114 bytes, remaining 123 

dissect_ssl enter frame #2968 (already visited) 
    conversation = 00000000060056C0, ssl_session = 0000000000000000 
    record: offset = 0, reported_length_remaining = 123 
dissect_ssl3_record: content_type 22 Handshake 
dissect_ssl3_handshake iteration 1 type 1 offset 5 length 114 bytes, remaining 123 
+0

Если вы просто работаете с HTTP/HTTPS считают Чарльз прокси, гораздо более удобным для пользователя! – zaph

ответ

9

ssl_decrypt_pre_master_secret обмена ключами 0 отличается от KEX_RSA (16)

похоже, вы используете DHE шифры (по крайней мере, не в шифрах с обменом ключей RSA), который обеспечит Совершенной Форвард SECR ecy и предотвратить дешифрование этих пакетов, даже если у вас есть закрытый ключ.

Вы могли бы быть заинтересованы в:

Если это для отладки, попробуйте отключить шифров DHE.

Вы должны быть в состоянии видеть, какую ширму вы используете, посмотрев в пакете Server Hello в Wireshark.


Новые версии также можно использовать предварительно мастер секрет непосредственно (читай "Используя (Pre) -Master-Secret" раздел Wireshark wiki SSL page). В некоторых случаях вы также можете получить доступ со стороны клиента. В любом случае, для того, чтобы это сработало, вам нужно завладеть секретным ключом от одной из двух сторон. Вот несколько ссылок из этого раздела вики Wireshark:

+0

В моем сервере Привет, я вижу Cipher Suite: TLS_RSA_WITH_AES_128_CBC_SHA, но затем есть пакет исправлений Cipher Spec, который отправляется от клиента, и я не могу сказать, какой шифр он хочет. – js80

+0

Хотя я и не смог определить точный шифр, который был пересмотрен, кажется, проблема связана с используемым шифром. Сервер, на котором я использую Wireshark, на самом деле является обратным прокси-сервером, который отправляет запросы на сервер контента через HTTPS. Когда я запускаю wirehark на сервере контента, я могу расшифровать трафик. Поэтому я думаю, что проблема связана с шифром, выбранным между моим обратным прокси и подключенной к нему клиентской системой. – js80

+0

@bruno не могли бы вы посмотреть мой вопрос: http://stackoverflow.com/questions/41227491/non-rsa-tls1-2-packet-decryption –

Смежные вопросы