2012-08-10 00:35:00 +00:00
|
|
|
/* packet-skype.c
|
|
|
|
* Routines for the disassembly of Skype
|
|
|
|
*
|
|
|
|
* Copyright 2009 Joerg Mayer (see AUTHORS file)
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2012-08-13 16:52:12 +00:00
|
|
|
* Documentation that formed the basis of the packet decoding:
|
2012-08-10 00:35:00 +00:00
|
|
|
* https://github.com/matthiasbock/OpenSkype/wiki/Skype's-UDP-Format
|
2015-03-10 17:46:50 +00:00
|
|
|
* For additional information see: https://wiki.wireshark.org/Skype
|
2012-08-13 16:52:12 +00:00
|
|
|
*
|
|
|
|
* TODO:
|
|
|
|
* - Authentication
|
|
|
|
* - TCP
|
|
|
|
* - Conversation stuff (to obtain external IPs for decryption)
|
|
|
|
* - Decryption (with given keys)
|
|
|
|
* - Test CRC check (requires working decryption)
|
|
|
|
* - Heuristics to reliably detect Skype traffic - most likely impossible
|
|
|
|
* to implement in Wireshark (see http://en.wikipedia.org/wiki/Skype)
|
|
|
|
* - Improve tests
|
2012-08-10 00:35:00 +00:00
|
|
|
*/
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2012-08-10 00:35:00 +00:00
|
|
|
|
|
|
|
#include <epan/packet.h>
|
2012-08-13 18:07:28 +00:00
|
|
|
#include <epan/conversation.h>
|
|
|
|
|
2013-12-11 19:46:38 +00:00
|
|
|
void proto_register_skype(void);
|
|
|
|
void proto_reg_handoff_skype(void);
|
|
|
|
|
2012-08-13 18:07:28 +00:00
|
|
|
/* Things we may want to remember for a whole conversation */
|
|
|
|
typedef struct _skype_udp_conv_info_t {
|
|
|
|
guint32 global_src_ip;
|
|
|
|
guint32 global_dst_ip;
|
|
|
|
} skype_udp_conv_info_t;
|
2012-08-10 00:35:00 +00:00
|
|
|
|
|
|
|
/* protocol handles */
|
|
|
|
static int proto_skype = -1;
|
|
|
|
|
|
|
|
/* ett handles */
|
|
|
|
static int ett_skype = -1;
|
|
|
|
|
2012-08-10 08:08:50 +00:00
|
|
|
#define SKYPE_SOM_UNK_MASK 0xF0
|
|
|
|
#define SKYPE_SOM_TYPE_MASK 0x0F
|
2012-08-10 00:35:00 +00:00
|
|
|
|
|
|
|
/* hf elements */
|
|
|
|
/* Start of Message */
|
|
|
|
static int hf_skype_som_id = -1;
|
2012-08-10 08:08:50 +00:00
|
|
|
static int hf_skype_som_unk = -1;
|
2012-08-10 00:35:00 +00:00
|
|
|
static int hf_skype_som_type = -1;
|
|
|
|
/* Message body */
|
2012-08-10 08:35:21 +00:00
|
|
|
/* Unknown_0 */
|
|
|
|
static int hf_skype_unknown_0_unk1 = -1;
|
2012-08-10 00:35:00 +00:00
|
|
|
/* Payload */
|
|
|
|
static int hf_skype_payload_iv = -1;
|
|
|
|
static int hf_skype_payload_crc = -1;
|
|
|
|
static int hf_skype_payload_enc_data = -1;
|
|
|
|
/* Resend */
|
|
|
|
static int hf_skype_ffr_num = -1;
|
|
|
|
static int hf_skype_ffr_unk1 = -1;
|
|
|
|
static int hf_skype_ffr_iv = -1;
|
|
|
|
static int hf_skype_ffr_crc = -1;
|
|
|
|
static int hf_skype_ffr_enc_data = -1;
|
|
|
|
/* Nat info */
|
|
|
|
static int hf_skype_natinfo_srcip = -1;
|
2012-08-13 16:52:12 +00:00
|
|
|
static int hf_skype_natinfo_dstip = -1;
|
2012-08-10 00:35:00 +00:00
|
|
|
/* Nat request */
|
|
|
|
static int hf_skype_natrequest_srcip = -1;
|
2012-08-13 16:52:12 +00:00
|
|
|
static int hf_skype_natrequest_dstip = -1;
|
2012-08-10 00:35:00 +00:00
|
|
|
/* Audio */
|
|
|
|
static int hf_skype_audio_unk1 = -1;
|
2012-08-10 08:35:21 +00:00
|
|
|
/* Unknown_f */
|
2012-08-10 00:35:00 +00:00
|
|
|
static int hf_skype_unknown_f_unk1 = -1;
|
2012-08-27 07:46:23 +00:00
|
|
|
/* Unknown packet type */
|
|
|
|
static int hf_skype_unknown_packet = -1;
|
2012-08-10 00:35:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
#define PROTO_SHORT_NAME "SKYPE"
|
|
|
|
#define PROTO_LONG_NAME "SKYPE"
|
|
|
|
|
|
|
|
typedef enum {
|
2012-08-10 08:35:21 +00:00
|
|
|
SKYPE_TYPE_UNKNOWN_0 = 0,
|
2012-08-10 00:35:00 +00:00
|
|
|
SKYPE_TYPE_PAYLOAD = 2,
|
|
|
|
SKYPE_TYPE_FFR = 3,
|
|
|
|
SKYPE_TYPE_NAT_INFO = 5,
|
|
|
|
SKYPE_TYPE_NAT_REPEAT = 7,
|
|
|
|
SKYPE_TYPE_AUDIO = 0xd,
|
2013-07-15 21:37:55 +00:00
|
|
|
SKYPE_TYPE_UNKNOWN_F = 0xf
|
2012-08-10 00:35:00 +00:00
|
|
|
} skype_type_t;
|
|
|
|
|
|
|
|
|
|
|
|
static const value_string skype_type_vals[] = {
|
2012-08-10 08:35:21 +00:00
|
|
|
{ SKYPE_TYPE_UNKNOWN_0, "Unknown_0" },
|
2012-08-10 00:35:00 +00:00
|
|
|
{ SKYPE_TYPE_PAYLOAD, "Payload" },
|
|
|
|
{ SKYPE_TYPE_FFR, "Fragment/Forward/Resend" },
|
|
|
|
{ SKYPE_TYPE_NAT_INFO , "NAT info" },
|
|
|
|
{ SKYPE_TYPE_NAT_REPEAT,"NAT repeat" },
|
|
|
|
{ SKYPE_TYPE_AUDIO, "Audio" },
|
2012-08-10 08:08:50 +00:00
|
|
|
{ SKYPE_TYPE_UNKNOWN_F, "Unknown_F" },
|
2012-08-10 00:35:00 +00:00
|
|
|
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2012-08-27 07:46:23 +00:00
|
|
|
|
|
|
|
static int
|
|
|
|
dissect_skype_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|
|
|
{
|
|
|
|
proto_item *ti;
|
|
|
|
proto_tree *skype_tree = NULL;
|
|
|
|
guint32 offset = 0;
|
|
|
|
guint32 packet_length;
|
|
|
|
guint8 packet_type;
|
|
|
|
|
|
|
|
/* XXX: Just until we know how to decode skype over tcp */
|
|
|
|
packet_type = 255;
|
|
|
|
|
2015-06-22 16:59:50 +00:00
|
|
|
packet_length = tvb_captured_length(tvb);
|
2012-08-27 07:46:23 +00:00
|
|
|
|
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
|
|
|
|
col_add_str(pinfo->cinfo, COL_INFO, val_to_str(packet_type,
|
|
|
|
skype_type_vals, "Type 0x%1x"));
|
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
/* Start of message dissection */
|
|
|
|
ti = proto_tree_add_item(tree, proto_skype, tvb, offset, -1,
|
|
|
|
ENC_NA);
|
|
|
|
skype_tree = proto_item_add_subtree(ti, ett_skype);
|
|
|
|
|
|
|
|
/* Body dissection */
|
|
|
|
switch (packet_type) {
|
|
|
|
|
|
|
|
default:
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_unknown_packet, tvb, offset, -1,
|
|
|
|
ENC_NA);
|
|
|
|
offset = packet_length;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
2012-08-10 00:35:00 +00:00
|
|
|
static int
|
2012-08-13 18:07:28 +00:00
|
|
|
dissect_skype_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
2012-08-10 00:35:00 +00:00
|
|
|
{
|
|
|
|
proto_item *ti;
|
|
|
|
proto_tree *skype_tree = NULL;
|
|
|
|
guint32 offset = 0;
|
|
|
|
guint32 packet_length;
|
2012-08-10 08:08:50 +00:00
|
|
|
guint8 packet_type, packet_unk;
|
2012-08-10 00:35:00 +00:00
|
|
|
|
2012-08-13 18:07:28 +00:00
|
|
|
conversation_t *conversation = NULL;
|
|
|
|
skype_udp_conv_info_t *skype_udp_info;
|
|
|
|
|
|
|
|
/* look up the conversation */
|
|
|
|
conversation = find_or_create_conversation(pinfo);
|
|
|
|
|
|
|
|
/* if conversation found get the data pointer that you stored */
|
2013-03-19 22:03:00 +00:00
|
|
|
skype_udp_info = (skype_udp_conv_info_t *)conversation_get_proto_data(conversation, proto_skype);
|
2012-08-13 18:07:28 +00:00
|
|
|
if (!skype_udp_info) {
|
|
|
|
/* new conversation create local data structure */
|
2013-09-14 14:33:04 +00:00
|
|
|
skype_udp_info = wmem_new(wmem_file_scope(), skype_udp_conv_info_t);
|
2012-08-13 18:07:28 +00:00
|
|
|
skype_udp_info->global_src_ip = 0;
|
|
|
|
skype_udp_info->global_dst_ip = 0;
|
|
|
|
conversation_add_proto_data(conversation, proto_skype,
|
|
|
|
skype_udp_info);
|
|
|
|
}
|
|
|
|
/* at this point the conversation data is ready */
|
|
|
|
|
2012-08-10 00:35:00 +00:00
|
|
|
packet_type = tvb_get_guint8(tvb, 2) & SKYPE_SOM_TYPE_MASK;
|
2012-08-10 08:08:50 +00:00
|
|
|
packet_unk = (tvb_get_guint8(tvb, 2) & SKYPE_SOM_UNK_MASK) >> 4;
|
2012-08-10 00:35:00 +00:00
|
|
|
|
2015-06-22 16:59:50 +00:00
|
|
|
packet_length = tvb_captured_length(tvb);
|
2012-08-10 00:35:00 +00:00
|
|
|
|
2012-08-10 08:08:50 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
|
|
|
|
col_add_str(pinfo->cinfo, COL_INFO, val_to_str(packet_type,
|
|
|
|
skype_type_vals, "Type 0x%1x"));
|
|
|
|
if (packet_unk) {
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " Unk: %1x", packet_unk);
|
|
|
|
}
|
2012-08-10 00:35:00 +00:00
|
|
|
|
|
|
|
if (tree) {
|
|
|
|
/* Start of message dissection */
|
|
|
|
ti = proto_tree_add_item(tree, proto_skype, tvb, offset, -1,
|
|
|
|
ENC_NA);
|
|
|
|
skype_tree = proto_item_add_subtree(ti, ett_skype);
|
|
|
|
|
2012-08-10 08:08:50 +00:00
|
|
|
proto_tree_add_item(skype_tree, hf_skype_som_id, tvb, offset, 2,
|
2012-08-10 00:35:00 +00:00
|
|
|
ENC_BIG_ENDIAN);
|
2012-08-10 08:08:50 +00:00
|
|
|
offset += 2;
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_som_unk, tvb, offset, 1,
|
2014-12-13 17:52:20 +00:00
|
|
|
ENC_BIG_ENDIAN);
|
2012-08-10 08:08:50 +00:00
|
|
|
proto_tree_add_item(skype_tree, hf_skype_som_type, tvb, offset, 1,
|
2014-12-13 17:52:20 +00:00
|
|
|
ENC_BIG_ENDIAN);
|
2012-08-10 08:08:50 +00:00
|
|
|
offset += 1;
|
2012-08-10 00:35:00 +00:00
|
|
|
|
|
|
|
/* Body dissection */
|
|
|
|
switch (packet_type) {
|
|
|
|
|
2012-08-10 08:35:21 +00:00
|
|
|
case SKYPE_TYPE_UNKNOWN_0:
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_unknown_0_unk1, tvb, offset, -1,
|
|
|
|
ENC_NA);
|
|
|
|
offset = packet_length;
|
|
|
|
break;
|
2012-08-10 00:35:00 +00:00
|
|
|
case SKYPE_TYPE_PAYLOAD:
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_payload_iv, tvb, offset, 4,
|
|
|
|
ENC_BIG_ENDIAN);
|
|
|
|
offset += 4;
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_payload_crc, tvb, offset, 4,
|
|
|
|
ENC_BIG_ENDIAN);
|
|
|
|
offset += 4;
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_payload_enc_data, tvb, offset, -1,
|
|
|
|
ENC_NA);
|
|
|
|
offset = packet_length;
|
|
|
|
break;
|
|
|
|
case SKYPE_TYPE_FFR:
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_ffr_num, tvb, offset, 1,
|
2014-12-13 17:52:20 +00:00
|
|
|
ENC_BIG_ENDIAN);
|
2012-08-10 00:35:00 +00:00
|
|
|
offset += 1;
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_ffr_unk1, tvb, offset, 4,
|
|
|
|
ENC_BIG_ENDIAN);
|
|
|
|
offset += 4;
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_ffr_iv, tvb, offset, 4,
|
|
|
|
ENC_BIG_ENDIAN);
|
|
|
|
offset += 4;
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_ffr_crc, tvb, offset, 4,
|
|
|
|
ENC_BIG_ENDIAN);
|
|
|
|
offset += 4;
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_ffr_enc_data, tvb, offset, -1,
|
|
|
|
ENC_NA);
|
|
|
|
offset = packet_length;
|
|
|
|
break;
|
|
|
|
case SKYPE_TYPE_NAT_INFO:
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_natinfo_srcip, tvb, offset, 4,
|
|
|
|
ENC_BIG_ENDIAN);
|
2012-08-13 18:07:28 +00:00
|
|
|
skype_udp_info->global_src_ip = tvb_get_ipv4(tvb, offset);
|
2012-08-10 00:35:00 +00:00
|
|
|
offset += 4;
|
2012-08-13 16:52:12 +00:00
|
|
|
proto_tree_add_item(skype_tree, hf_skype_natinfo_dstip, tvb, offset, 4,
|
2012-08-10 00:35:00 +00:00
|
|
|
ENC_BIG_ENDIAN);
|
2012-08-13 18:07:28 +00:00
|
|
|
skype_udp_info->global_dst_ip = tvb_get_ipv4(tvb, offset);
|
2012-08-10 00:35:00 +00:00
|
|
|
offset += 4;
|
|
|
|
break;
|
|
|
|
case SKYPE_TYPE_NAT_REPEAT:
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_natrequest_srcip, tvb, offset, 4,
|
|
|
|
ENC_BIG_ENDIAN);
|
2012-08-13 18:07:28 +00:00
|
|
|
skype_udp_info->global_src_ip = tvb_get_ipv4(tvb, offset);
|
2012-08-10 00:35:00 +00:00
|
|
|
offset += 4;
|
2012-08-13 16:52:12 +00:00
|
|
|
proto_tree_add_item(skype_tree, hf_skype_natrequest_dstip, tvb, offset, 4,
|
2012-08-10 00:35:00 +00:00
|
|
|
ENC_BIG_ENDIAN);
|
2012-08-13 18:07:28 +00:00
|
|
|
skype_udp_info->global_dst_ip = tvb_get_ipv4(tvb, offset);
|
2012-08-10 00:35:00 +00:00
|
|
|
offset += 4;
|
|
|
|
break;
|
|
|
|
case SKYPE_TYPE_AUDIO:
|
|
|
|
proto_tree_add_item(skype_tree, hf_skype_audio_unk1, tvb, offset, -1,
|
|
|
|
ENC_NA);
|
|
|
|
offset = packet_length;
|
|
|
|
break;
|
2012-08-10 08:08:50 +00:00
|
|
|
case SKYPE_TYPE_UNKNOWN_F:
|
2012-08-10 00:35:00 +00:00
|
|
|
proto_tree_add_item(skype_tree, hf_skype_unknown_f_unk1, tvb, offset, -1,
|
|
|
|
ENC_NA);
|
|
|
|
offset = packet_length;
|
|
|
|
break;
|
|
|
|
default:
|
2012-08-27 07:46:23 +00:00
|
|
|
proto_tree_add_item(skype_tree, hf_skype_unknown_packet, tvb, offset, -1,
|
|
|
|
ENC_NA);
|
|
|
|
offset = packet_length;
|
2012-08-10 00:35:00 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2012-08-13 18:07:28 +00:00
|
|
|
test_skype_udp(tvbuff_t *tvb)
|
2012-08-10 00:35:00 +00:00
|
|
|
{
|
|
|
|
/* Minimum of 3 bytes, check for valid message type */
|
2016-10-19 15:03:15 +00:00
|
|
|
if (tvb_captured_length(tvb) > 3)
|
|
|
|
{
|
|
|
|
guint8 type = tvb_get_guint8(tvb, 2) & 0xF;
|
|
|
|
if ( type == 0 ||
|
2012-08-27 07:46:23 +00:00
|
|
|
/* FIXME: Extend this by minimum or exact length per message type */
|
2016-10-19 15:03:15 +00:00
|
|
|
type == 2 ||
|
|
|
|
type == 3 ||
|
|
|
|
type == 5 ||
|
|
|
|
type == 7 ||
|
|
|
|
type == 0xd ||
|
|
|
|
type == 0xf
|
|
|
|
)
|
|
|
|
{
|
|
|
|
return TRUE;
|
|
|
|
}
|
2012-08-10 00:35:00 +00:00
|
|
|
}
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2013-12-13 20:50:19 +00:00
|
|
|
dissect_skype_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
2012-08-10 00:35:00 +00:00
|
|
|
{
|
2016-10-19 15:03:15 +00:00
|
|
|
if ( !test_skype_udp(tvb) ) {
|
|
|
|
return FALSE;
|
2012-08-10 00:35:00 +00:00
|
|
|
}
|
2016-10-19 15:03:15 +00:00
|
|
|
|
|
|
|
dissect_skype_udp(tvb, pinfo, tree);
|
2012-08-10 00:35:00 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int
|
2012-09-10 21:40:21 +00:00
|
|
|
dissect_skype_static(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
|
2012-08-10 00:35:00 +00:00
|
|
|
{
|
2012-08-27 07:46:23 +00:00
|
|
|
/*
|
|
|
|
* Don't test for valid packet - we only end here when
|
|
|
|
* the user did a decode-as.
|
|
|
|
*/
|
|
|
|
if (pinfo->ptype == PT_UDP) {
|
|
|
|
return dissect_skype_udp(tvb, pinfo, tree);
|
2015-06-06 14:01:51 +00:00
|
|
|
} else if (pinfo->ptype == PT_TCP) {
|
2012-08-27 07:46:23 +00:00
|
|
|
return dissect_skype_tcp(tvb, pinfo, tree);
|
2012-08-10 00:35:00 +00:00
|
|
|
}
|
2012-08-27 07:46:23 +00:00
|
|
|
return 0;
|
2012-08-10 00:35:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_register_skype(void)
|
|
|
|
{
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
|
|
|
|
/* Start of message fields */
|
|
|
|
{ &hf_skype_som_id,
|
2012-08-10 08:08:50 +00:00
|
|
|
{ "ID", "skype.som.id", FT_UINT16, BASE_HEX, NULL,
|
|
|
|
0x0, "Message ID", HFILL }},
|
|
|
|
|
|
|
|
{ &hf_skype_som_unk,
|
|
|
|
{ "Unknown", "skype.som.unk", FT_UINT8, BASE_HEX, NULL,
|
|
|
|
SKYPE_SOM_UNK_MASK, NULL, HFILL }},
|
2012-08-10 00:35:00 +00:00
|
|
|
|
|
|
|
{ &hf_skype_som_type,
|
|
|
|
{ "Type", "skype.som.type", FT_UINT8, BASE_HEX, VALS(skype_type_vals),
|
|
|
|
SKYPE_SOM_TYPE_MASK, "Message type", HFILL }},
|
|
|
|
|
|
|
|
/* Message body */
|
|
|
|
|
2012-08-10 08:35:21 +00:00
|
|
|
/* Unknown_0 */
|
|
|
|
{ &hf_skype_unknown_0_unk1,
|
|
|
|
{ "Unknown1", "skype.unknown_0.unk1", FT_BYTES, BASE_NONE, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
2012-08-10 00:35:00 +00:00
|
|
|
/* Payload */
|
|
|
|
{ &hf_skype_payload_iv,
|
|
|
|
{ "IV", "skype.payload.iv", FT_UINT32, BASE_HEX, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
|
|
|
{ &hf_skype_payload_crc,
|
|
|
|
{ "CRC", "skype.payload.crc", FT_UINT32, BASE_HEX, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
|
|
|
{ &hf_skype_payload_enc_data,
|
|
|
|
{ "Enc Data", "skype.payload.encdata", FT_BYTES, BASE_NONE, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
|
|
|
/* Resend */
|
|
|
|
{ &hf_skype_ffr_num,
|
|
|
|
{ "Num", "skype.ffr.num", FT_UINT8, BASE_HEX, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
|
|
|
{ &hf_skype_ffr_unk1,
|
|
|
|
{ "Unk1", "skype.ffr.unk1", FT_UINT32, BASE_HEX, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
|
|
|
{ &hf_skype_ffr_iv,
|
|
|
|
{ "IV", "skype.ffr.iv", FT_UINT32, BASE_HEX, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
|
|
|
{ &hf_skype_ffr_crc,
|
|
|
|
{ "CRC", "skype.ffr.crc", FT_UINT32, BASE_HEX, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
|
|
|
{ &hf_skype_ffr_enc_data,
|
|
|
|
{ "Enc Data", "skype.ffr.encdata", FT_BYTES, BASE_NONE, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
|
|
|
/* Nat info */
|
|
|
|
{ &hf_skype_natinfo_srcip,
|
|
|
|
{ "Src IP", "skype.natinfo.srcip", FT_IPv4, BASE_NONE, NULL,
|
2012-08-13 16:52:12 +00:00
|
|
|
0x0, "Global source IP", HFILL }},
|
2012-08-10 00:35:00 +00:00
|
|
|
|
2012-08-13 16:52:12 +00:00
|
|
|
{ &hf_skype_natinfo_dstip,
|
|
|
|
{ "Dst IP", "skype.natinfo.dstip", FT_UINT32, BASE_HEX, NULL,
|
|
|
|
0x0, "Global destination IP", HFILL }},
|
2012-08-10 00:35:00 +00:00
|
|
|
|
|
|
|
/* Nat request */
|
|
|
|
{ &hf_skype_natrequest_srcip,
|
|
|
|
{ "Src IP", "skype.natrequest.srcip", FT_IPv4, BASE_NONE, NULL,
|
2012-08-13 16:52:12 +00:00
|
|
|
0x0, "Global source IP", HFILL }},
|
2012-08-10 00:35:00 +00:00
|
|
|
|
2012-08-13 16:52:12 +00:00
|
|
|
{ &hf_skype_natrequest_dstip,
|
|
|
|
{ "Dst IP", "skype.natrequest.dstip", FT_UINT32, BASE_HEX, NULL,
|
2012-08-10 00:35:00 +00:00
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
|
|
|
/* Audio */
|
|
|
|
{ &hf_skype_audio_unk1,
|
|
|
|
{ "Unknown1", "skype.audio.unk1", FT_BYTES, BASE_NONE, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
2012-08-10 08:35:21 +00:00
|
|
|
/* Unknown_F */
|
2012-08-10 00:35:00 +00:00
|
|
|
{ &hf_skype_unknown_f_unk1,
|
|
|
|
{ "Unknown1", "skype.unknown_f.unk1", FT_BYTES, BASE_NONE, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
2012-08-27 07:46:23 +00:00
|
|
|
/* Unknown packet */
|
|
|
|
{ &hf_skype_unknown_packet,
|
|
|
|
{ "Unknown Packet", "skype.unknown_packet", FT_BYTES, BASE_NONE, NULL,
|
|
|
|
0x0, NULL, HFILL }},
|
|
|
|
|
2012-08-10 00:35:00 +00:00
|
|
|
};
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_skype,
|
|
|
|
};
|
|
|
|
|
|
|
|
proto_skype = proto_register_protocol(PROTO_LONG_NAME, PROTO_SHORT_NAME, "skype");
|
|
|
|
proto_register_field_array(proto_skype, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_skype(void)
|
|
|
|
{
|
|
|
|
dissector_handle_t skype_handle;
|
|
|
|
|
2015-12-09 03:49:44 +00:00
|
|
|
skype_handle = create_dissector_handle(dissect_skype_static, proto_skype);
|
2016-10-07 20:25:01 +00:00
|
|
|
dissector_add_for_decode_as_with_preference("tcp.port", skype_handle);
|
2016-10-05 20:33:54 +00:00
|
|
|
dissector_add_for_decode_as_with_preference("udp.port", skype_handle);
|
2012-08-10 00:35:00 +00:00
|
|
|
|
2015-07-13 00:40:31 +00:00
|
|
|
heur_dissector_add("udp", dissect_skype_heur, "Skype over UDP", "skype_udp", proto_skype, HEURISTIC_DISABLE);
|
2012-08-10 00:35:00 +00:00
|
|
|
}
|
|
|
|
|
2014-09-30 20:59:17 +00:00
|
|
|
/*
|
|
|
|
* Editor modelines - http://www.wireshark.org/tools/modelines.html
|
|
|
|
*
|
|
|
|
* Local variables:
|
|
|
|
* c-basic-offset: 8
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: t
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* vi: set shiftwidth=8 tabstop=8 noexpandtab:
|
|
|
|
* :indentSize=8:tabSize=8:noTabs=false:
|
|
|
|
*/
|