Copyright 1998-2009 Gerald Combs <gerald@wireshark.org> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled with GTK+ 2.4.9, with GLib 2.4.1, with libpcap 0.9.4, with libz 1.2.3,
without POSIX capabilities, without libpcre, without SMI, without ADNS, without
Lua, with GnuTLS 2.0.4, with Gcrypt 1.4.1, without Kerberos, without PortAudio,
without AirPcap.
NOTE: this build doesn't support the "matches" operator for Wireshark filter
syntax.
Running on SunOS 5.10, with libpcap version 0.9.4.
Built using Sun C 5.9
No SSL decryption for IPv6> Running verison 1.0.6 of wireshark compiled on Sparc Solaris 10. Using > the private key of my server I am able to decode SSL/TLSv1 packets > between my client and server using IPv4 but if the same client and > server use IPv6 I am not able to decode the SSL/TLSv1 packets. I have > the correct addresses both IPv4 and IPv6 and ports configured on the > RSA Key List parameter along with the private key. email response from Steve FischerI just took a look at the source code(epan/dissectors/packet-ssl-utils.c: ssl_parse_key_list) and much to mysurprise, it doesn't appear to support IPv6 addresses for SSLdecryption. Would you mind opening a bug marked as an enhancementrequest on https://bugs.wireshark.org to ask for IPv6 support for SSLdecryption?
hi all,i managed some ipv6 www servers and to my suprise to know that WS doesnt decrypt over SSL. So i did something and im attaching the patch here. I'm positive that there's a lot of room for improvements for this patch. for your review and comments please.thanks,format:(taken from http://wiki.wireshark.org/SSL)127.0.0.1,443,http,/path/to/snakeoil2.key;10.1.1.1,8080,smtp,/other/path/key.pem(proposed)2001:db8:dead:beef:cd53:5203:efb:4e80,443,http,/path/to/snakeoil2.key;2001:db8:dead:beef:0:0:0:1,8080,smtp,/other/path/key.pemNotes:- tested with 443 https only (TLS-RSA with RC4 128 SHA)- patch still uses the sscanf technique, i think there's something there to redo.- "any" is supported for ipv4 only.----Version 1.3.3svn31120Copyright 1998-2009 Gerald Combs <gerald@wireshark.org> and contributors.This is free software; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Compiled with GTK+ 2.16.6, with GLib 2.22.2, with WinPcap (version unknown),with libz 1.2.3, without POSIX capabilities, with libpcre 7.0, with SMI 0.4.8,with c-ares 1.6.0, with Lua 5.1, without Python, with GnuTLS 2.8.5, with Gcrypt1.4.4, with MIT Kerberos, with GeoIP, with PortAudio V19-devel (built Nov 302009), with AirPcap, with new_packet_list.Running on 32-bit Windows Vista Service Pack 2, build 6002, with WinPcap version4.1.1 (packet.dll version 4.1.0.1753), based on libpcap version 1.0 branch1_0_rel0b (20091008), GnuTLS 2.8.5, Gcrypt 1.4.4, without AirPcap.Built using Microsoft Visual C++ 9.0 build 21022Wireshark is Open Source Software released under the GNU General Public License.Check the man page and http://www.wireshark.org for more information.
Here's some of the list of possible things to expound this support.TODOs (not part of the patch)- test other protocols?(list from: http://wiki.wireshark.org/SSL)# 636 ldaps# 989 ftps-data# 990 ftps# 992 telnets# 993 imaps# 994 ircs# 995 pop3s# 5061 sips- to support compressed ipv6 address string.Question: do we have existing function? that uncompressed IPv6 addresses?- nice to have: support for "any ipv4", "any ipv6" and "any" for both.Question: if Any IPv4 is represented like this:char ip_addr_any[] = {0,0,0,0};how is this represented in IPv6? I suppose that would be ::- i think its also best to trim out the ipv6 address from "[]" and (doublequotes)Question: need more tips :)- replace sscanf (if possible)see line#72 of the attached patch, im quite sure there's a more elegant way todo this..
(In reply to comment #3) > - to support compressed ipv6 address string. > Question: do we have existing function? that uncompressed IPv6 addresses? You might try get_host_ipaddr6 in epan/addr_resolv.c.> - nice to have: support for "any ipv4", "any ipv6" and "any" for both. > Question: if Any IPv4 is represented like this: > char ip_addr_any[] = {0,0,0,0}; > > how is this represented in IPv6? I suppose that would be :: I'm pretty sure :: is correct.> - replace sscanf (if possible) > see line#72 of the attached patch, im quite sure there's a more elegant way to > do this.. The SSL decryption preferences should probably be replaced with a UAT (User Accessible Table). UATs are defined in epan/uat.h and you can find examples in several dissectors including ISAKMP, HTTP, and SNMP.
thanks for the advise, I'm currently working on this, learning UAT and dealing with extending ssl decryption.attached is a work-in-progress, those interested can provide feedback and more tips! :)done so far:1. IPv6 support2. UI for UAT3. loop thru the UAT entries and add the SSL associations4. able to have multiple IPv4 addresses and IPv6 addresses in UAT, once a packet capture is opened, it will decrypt and outputs the debug to one file.current issues:1. Sometimes (1 out of 5 times), after building and running wireshark through on a Vista with VS2008. A message will display:"This application has requested the Runtime to terminate it ... "2. (2 out of 5 times) when I close WS, "Wireshark has stopped working"3. rarely, there's "Runtime Error!"4. need debugging tools.5. how to tie packet-dtls with these changes. or just use another function name?in progress:1. uncompress ipv6 address2. support for 'any', 'anyipv4' and 'anyipv6'3. to write debug on multiple ssl_debug_file (one per UAT entry).4. validate/exclude the UAT entries if the keyfile is not accessible, and if password is not good for the p12 file. debug accordingly (if it passed validation)5. validate IPv4/v6 address input, port number and if the protocol dissector exists.wishlist:1. migrate contents of an existing ssl_key_list file to UAT entries, and advise that the file can be deleted. (as a pop-up message?)2. adding SSL association is done automatically upon opening wireshark. should'nt this be configurable instead? or triggered on the toolbar or something?
Created attachment 4027Proposed patch for SSL/DTLS encryption with UAT- Support for DTLS and SSL RSA keys list using User Accessible Table- Support for IPv6 SSL as posted by bug#3343 comment#1- 'any' and 'anyipv4' for IPv4 wildcard- 'anyipv6' for IPv6 wildcard- UAT fields validation.
(In reply to comment #11) > Created an attachment (id=4071) [details] > bug-3343-proposed.fixpatch > > more cleanup. > fld checks are in ssl-utils.h > comments and tips are highly appreciated. Indeed looks interesting. Have to take some time to go through this.
Created attachment 4725Updated SSL decryption patchThe attached patch updates bug-3343-proposed.fixpatch with the following changes:Register obsolete preferences for "keys_list" in the SSL and DTLS dissectors.Mark a lot of parameters unused.Updat uat_new() calls to match API changes.Chang the IPv6 address sscanf format at packet-ssl-utils.c:3109 to something that will compile on OS X.Should the sscanf()s be replaced with get_host_ipaddr and get_host_ipaddr6? That would make the code more consistent with the rest of the program and let the user use hostnames.
Thanks for the tips. I'll try to pick this up. compiled it with SVN this morning (my morning) but it crashed. I'll work on further improvements over the weekend.ill look closely on sscanf. im also planning to convert existing key_list (if the user alredy have the keylist file) to UAT. is that possible?also, how do we add a help content of a UAT?, seen below im just re-using ChK12ProtocolsSection. I wish to do some write-up for wireshark as well.+ uat_t *dtlsdecrypt_uat = uat_new("DTLS RSA Keylist",+ sizeof(ssldecrypt_assoc_t),+ "dtlsdecrypttablefile", /* filename */+ TRUE, /* from_profile */+ (void*) &dtlskeylist_uats, /* data_ptr */+ &ndtlsdecrypt, /* numitems_ptr */+ UAT_CAT_FFMT, /* category */+ "ChK12ProtocolsSection", /* TODO, need revision - help */+ dtlsdecrypt_copy_cb,+ NULL, /* dtlsdecrypt_update_cb? */+ dtlsdecrypt_free_cb,+ NULL,+ dtlskeylist_uats_flds);
Is there a patch that just adds IPv6 support for SSL decoding, but not with the UAT changes? Would it be possible to put that in a release as a first step, and follow up with UAT change later?
I checked in an updated version of Ivan's patch (attachment 4071) in r36875 with the following changes:- Update paramaters to match UAT API changes.- Change the UAT filename.- Fix buffer overflow for IPv6 addresses.- Don't convert strings to addresses twice.- Don't use the same variable name for different data types.- Make "any" mean "any IPv4 or any IPv6".- Allow the use of hostnames along with numeric addresses.- Bend the concept of obsolete preferences slightly so that we can convert and old-style key list to a UAT.- Clean up whitespace.- Don't point to a User's Guide section for now; it may make more sense to keep using the wiki page.