2004-12-19 13:46:09 +00:00
|
|
|
/* packet-dcom.c
|
|
|
|
* Routines for DCOM generics
|
|
|
|
*
|
|
|
|
* $Id$
|
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2004-12-19 13:46:09 +00:00
|
|
|
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
/* A few words about DCOM:
|
2004-12-19 13:46:09 +00:00
|
|
|
*
|
|
|
|
* DCOM uses DCERPC as it's underlying "transport" protocol.
|
|
|
|
*
|
|
|
|
* The DCOM dissectors are called by DCERPC request and response calls.
|
|
|
|
* DCOM uses a small header after the DCERPC calls.
|
2010-04-16 14:48:30 +00:00
|
|
|
* (for a DCERPC request call it's called "this",
|
2004-12-19 13:46:09 +00:00
|
|
|
* for a DCERPC response call it's called "that")
|
|
|
|
*
|
|
|
|
* DCOM defines itself some interfaces: oxid, remact, remunk and others
|
|
|
|
*
|
|
|
|
* Implemented is currently "only" a static dissection of packet fields
|
|
|
|
* (no "object recognition" included)
|
|
|
|
*
|
|
|
|
* User's of DCOM can define their own interface's using Microsoft IDL.
|
|
|
|
*
|
2010-04-16 14:48:30 +00:00
|
|
|
* Hint: The registered DCOM interface names can be found in the
|
2004-12-19 13:46:09 +00:00
|
|
|
* windows registry at: "HKEY_CLASSES_ROOT\Interface"
|
|
|
|
*
|
|
|
|
*
|
2010-04-16 14:48:30 +00:00
|
|
|
* Ressources on the web:
|
2004-12-19 13:46:09 +00:00
|
|
|
*
|
|
|
|
* "Understanding the DCOM Wire Protocol by Analyzing Network Data Packets"
|
|
|
|
* http:// www.microsoft.com/msj/0398/dcom.htm
|
|
|
|
*
|
|
|
|
* "Distributed Component Object Model Protocol -- DCOM/1.0"
|
|
|
|
* http://www.microsoft.com/com/resources/specs.asp (link is currently down)
|
2010-04-16 14:48:30 +00:00
|
|
|
*
|
2004-12-19 13:46:09 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* Files involved dissecting DCOM:
|
|
|
|
*
|
2010-04-16 14:48:30 +00:00
|
|
|
* packet-dcom.c: generic DCOM things (this, that, ...) and
|
2004-12-19 13:46:09 +00:00
|
|
|
* generic DCOM datatype (DWORD, VARIANT, ...)
|
|
|
|
*
|
|
|
|
* DCOM common Interfaces:
|
|
|
|
* packet-dcom-oxid.c: IOXIDResolver
|
|
|
|
* packet-dcom-remact.c: IRemoteActivation
|
|
|
|
* packet-dcom-remunk.c: IRemUnknown, IRemUnknown2
|
|
|
|
* packet-dcom-dispatch.c: IDispatch
|
|
|
|
* packet-dcom-sysact.c: ISystemActivator
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2004-12-20 22:25:13 +00:00
|
|
|
/*
|
|
|
|
* XXX - are the next two includes necessary?
|
|
|
|
*/
|
2004-12-19 13:46:09 +00:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
# include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif
|
|
|
|
|
2008-10-24 00:42:09 +00:00
|
|
|
#ifdef HAVE_WINSOCK2_H
|
|
|
|
#include <winsock2.h>
|
|
|
|
#endif
|
|
|
|
|
2004-12-20 22:29:24 +00:00
|
|
|
#include <string.h>
|
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
#include <glib.h>
|
|
|
|
#include <epan/packet.h>
|
2005-09-28 16:16:37 +00:00
|
|
|
#include <epan/emem.h>
|
2006-08-11 19:15:12 +00:00
|
|
|
#include <epan/addr_resolv.h>
|
2010-05-28 20:19:55 +00:00
|
|
|
#include <wsutil/inet_aton.h>
|
2009-08-21 20:25:24 +00:00
|
|
|
#include <epan/expert.h>
|
|
|
|
#include <epan/prefs.h>
|
2007-06-18 01:42:17 +00:00
|
|
|
#include <ctype.h>
|
2006-10-18 19:42:10 +00:00
|
|
|
#include <isprint.h>
|
2004-12-19 13:46:09 +00:00
|
|
|
#include "packet-dcerpc.h"
|
|
|
|
#include "packet-dcom.h"
|
|
|
|
|
|
|
|
static int proto_dcom = -1;
|
|
|
|
|
2008-09-26 17:06:44 +00:00
|
|
|
gboolean dcom_prefs_display_unmarshalling_details = FALSE;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
2009-10-11 14:33:04 +00:00
|
|
|
static gint ett_dcom_this = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_this_version_major = -1;
|
|
|
|
static int hf_dcom_this_version_minor = -1;
|
|
|
|
static int hf_dcom_this_flags = -1;
|
|
|
|
static int hf_dcom_this_res = -1;
|
|
|
|
static int hf_dcom_this_cid = -1;
|
|
|
|
|
2009-10-11 14:33:04 +00:00
|
|
|
static gint ett_dcom_that = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_that_flags = -1;
|
|
|
|
|
2009-10-11 14:33:04 +00:00
|
|
|
static gint ett_dcom_extent = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_extent = -1;
|
|
|
|
static int hf_dcom_extent_array_count = -1;
|
|
|
|
static int hf_dcom_extent_array_res = -1;
|
|
|
|
static int hf_dcom_extent_size = -1;
|
|
|
|
static int hf_dcom_extent_id = -1;
|
|
|
|
|
|
|
|
static int hf_dcom_hresult = -1;
|
|
|
|
static int hf_dcom_tobedone = -1;
|
2006-09-07 20:30:48 +00:00
|
|
|
static int hf_dcom_nospec = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_array_size = -1;
|
|
|
|
static int hf_dcom_pointer_val = -1;
|
|
|
|
|
|
|
|
/* COMVERSION */
|
|
|
|
static int hf_dcom_version_major = -1;
|
|
|
|
static int hf_dcom_version_minor = -1;
|
|
|
|
|
2009-10-11 14:33:04 +00:00
|
|
|
static gint ett_dcom_lpwstr = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_max_count = -1;
|
|
|
|
static int hf_dcom_offset = -1;
|
|
|
|
static int hf_dcom_byte_length = -1;
|
|
|
|
static int hf_dcom_actual_count = -1;
|
|
|
|
|
2009-10-11 14:33:04 +00:00
|
|
|
static gint ett_dcom_objref = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_objref = -1;
|
|
|
|
static int hf_dcom_objref_signature = -1;
|
|
|
|
static int hf_dcom_objref_flags = -1;
|
2006-08-11 19:15:12 +00:00
|
|
|
int hf_dcom_iid = -1;
|
|
|
|
int hf_dcom_clsid = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_objref_resolver_address = -1;
|
2006-06-28 18:51:24 +00:00
|
|
|
static int hf_dcom_objref_cbextension = -1;
|
|
|
|
static int hf_dcom_objref_size = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2009-10-11 14:33:04 +00:00
|
|
|
static gint ett_dcom_stdobjref = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_stdobjref = -1;
|
|
|
|
static int hf_dcom_stdobjref_flags = -1;
|
|
|
|
static int hf_dcom_stdobjref_public_refs = -1;
|
2006-08-11 19:15:12 +00:00
|
|
|
int hf_dcom_oxid = -1;
|
|
|
|
int hf_dcom_oid = -1;
|
|
|
|
int hf_dcom_ipid = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2009-10-11 14:33:04 +00:00
|
|
|
static gint ett_dcom_dualstringarray = -1;
|
|
|
|
static gint ett_dcom_dualstringarray_binding = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_dualstringarray_num_entries = -1;
|
|
|
|
static int hf_dcom_dualstringarray_security_offset = -1;
|
|
|
|
static int hf_dcom_dualstringarray_string = -1;
|
|
|
|
static int hf_dcom_dualstringarray_string_network_addr = -1;
|
|
|
|
static int hf_dcom_dualstringarray_string_tower_id = -1;
|
|
|
|
static int hf_dcom_dualstringarray_security = -1;
|
|
|
|
static int hf_dcom_dualstringarray_security_authn_svc = -1;
|
|
|
|
static int hf_dcom_dualstringarray_security_authz_svc = -1;
|
|
|
|
static int hf_dcom_dualstringarray_security_princ_name = -1;
|
|
|
|
|
2009-10-11 14:33:04 +00:00
|
|
|
static gint ett_dcom_interface_pointer = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_interface_pointer = -1;
|
|
|
|
static int hf_dcom_ip_cnt_data = -1;
|
|
|
|
|
2009-10-11 14:33:04 +00:00
|
|
|
static gint ett_dcom_safearray = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_safearray = -1;
|
|
|
|
static int hf_dcom_sa_dims32 = -1;
|
|
|
|
static int hf_dcom_sa_dims16 = -1;
|
|
|
|
static int hf_dcom_sa_features = -1;
|
|
|
|
static int hf_dcom_sa_element_size = -1;
|
|
|
|
static int hf_dcom_sa_locks = -1;
|
|
|
|
static int hf_dcom_sa_vartype32 = -1;
|
|
|
|
static int hf_dcom_sa_vartype16 = -1;
|
|
|
|
static int hf_dcom_sa_elements = -1;
|
|
|
|
static int hf_dcom_sa_bound_elements = -1;
|
|
|
|
static int hf_dcom_sa_low_bound = -1;
|
|
|
|
|
2009-10-11 14:33:04 +00:00
|
|
|
static gint ett_dcom_sa_features = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_sa_features_auto = -1;
|
|
|
|
static int hf_dcom_sa_features_static = -1;
|
|
|
|
static int hf_dcom_sa_features_embedded = -1;
|
|
|
|
static int hf_dcom_sa_features_fixedsize = -1;
|
|
|
|
static int hf_dcom_sa_features_record = -1;
|
|
|
|
static int hf_dcom_sa_features_have_iid = -1;
|
|
|
|
static int hf_dcom_sa_features_have_vartype = -1;
|
|
|
|
static int hf_dcom_sa_features_bstr = -1;
|
|
|
|
static int hf_dcom_sa_features_unknown = -1;
|
|
|
|
static int hf_dcom_sa_features_dispatch = -1;
|
|
|
|
static int hf_dcom_sa_features_variant = -1;
|
|
|
|
|
2009-10-11 14:33:04 +00:00
|
|
|
static gint ett_dcom_variant = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
static int hf_dcom_variant = -1;
|
|
|
|
static int hf_dcom_variant_type = -1;
|
|
|
|
static int hf_dcom_variant_size = -1;
|
|
|
|
static int hf_dcom_variant_rpc_res = -1;
|
|
|
|
static int hf_dcom_variant_wres = -1;
|
|
|
|
static int hf_dcom_variant_type32 = -1;
|
|
|
|
|
|
|
|
static int hf_dcom_vt_bool = -1;
|
|
|
|
static int hf_dcom_vt_i1 = -1;
|
|
|
|
static int hf_dcom_vt_i2 = -1;
|
|
|
|
static int hf_dcom_vt_i4 = -1;
|
|
|
|
static int hf_dcom_vt_i8 = -1; /* only inside a SAFEARRAY, not in VARIANTs */
|
|
|
|
static int hf_dcom_vt_ui1 = -1;
|
|
|
|
static int hf_dcom_vt_ui2 = -1;
|
|
|
|
static int hf_dcom_vt_ui4 = -1;
|
|
|
|
static int hf_dcom_vt_r4 = -1;
|
|
|
|
static int hf_dcom_vt_r8 = -1;
|
|
|
|
static int hf_dcom_vt_date = -1;
|
|
|
|
static int hf_dcom_vt_bstr = -1;
|
2006-03-17 21:41:56 +00:00
|
|
|
static int hf_dcom_vt_byref = -1;
|
|
|
|
static int hf_dcom_vt_dispatch = -1;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2006-08-17 19:09:41 +00:00
|
|
|
/* this/that extension UUIDs */
|
2006-08-16 23:13:26 +00:00
|
|
|
static e_uuid_t uuid_debug_ext = { 0xf1f19680, 0x4d2a, 0x11ce, { 0xa6, 0x6a, 0x00, 0x20, 0xaf, 0x6e, 0x72, 0xf4} };
|
|
|
|
static e_uuid_t uuid_ext_error_ext ={ 0xf1f19681, 0x4d2a, 0x11ce, { 0xa6, 0x6a, 0x00, 0x20, 0xaf, 0x6e, 0x72, 0xf4} };
|
|
|
|
|
2006-08-17 19:09:41 +00:00
|
|
|
/* general DCOM UUIDs */
|
2008-06-27 16:15:30 +00:00
|
|
|
static const e_uuid_t ipid_rem_unknown = { 0x00000131, 0x1234, 0x5678, { 0xCA, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} };
|
|
|
|
static const e_uuid_t iid_unknown = { 0x00000000, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} };
|
|
|
|
static const e_uuid_t uuid_null = { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} };
|
|
|
|
static const e_uuid_t iid_class_factory = { 0x00000001, 0x0000, 0x0000, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} };
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2010-02-09 17:48:41 +00:00
|
|
|
static GList *dcom_machines = NULL;
|
|
|
|
static GList *dcom_interfaces = NULL;
|
2006-08-11 19:15:12 +00:00
|
|
|
|
2006-08-14 23:39:48 +00:00
|
|
|
static const value_string dcom_thisthat_flag_vals[] = {
|
|
|
|
{ 0, "INFO_NULL" },
|
2006-08-28 21:14:36 +00:00
|
|
|
{ 1, "INFO_LOCAL" },
|
2006-08-14 23:39:48 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-11 19:15:12 +00:00
|
|
|
void dcom_interface_dump(void) {
|
2010-02-09 17:48:41 +00:00
|
|
|
dcom_machine_t *machine;
|
|
|
|
dcom_object_t *object;
|
|
|
|
dcom_interface_t *interf;
|
|
|
|
GList *machines;
|
|
|
|
GList *objects;
|
|
|
|
GList *interfaces;
|
|
|
|
|
|
|
|
|
|
|
|
for(machines = dcom_machines; machines != NULL; machines = g_list_next(machines)) {
|
|
|
|
machine = machines->data;
|
|
|
|
g_warning("Machine(#%4u): IP:%s", machine->first_packet, ip_to_str(machine->ip));
|
|
|
|
|
|
|
|
for(objects = machine->objects; objects != NULL; objects = g_list_next(objects)) {
|
|
|
|
object = objects->data;
|
|
|
|
g_warning(" Object(#%4u): OID:0x%" G_GINT64_MODIFIER "x private:%p", object->first_packet, object->oid, object->private_data);
|
|
|
|
|
|
|
|
for(interfaces = object->interfaces; interfaces != NULL; interfaces = g_list_next(interfaces)) {
|
|
|
|
interf = interfaces->data;
|
2010-04-16 14:48:30 +00:00
|
|
|
g_warning(" Interface(#%4u): iid:%s",
|
2010-02-09 17:48:41 +00:00
|
|
|
interf->first_packet, guids_resolve_uuid_to_str(&interf->iid));
|
|
|
|
g_warning(" ipid:%s", guids_resolve_uuid_to_str(&interf->ipid));
|
|
|
|
}
|
|
|
|
}
|
2010-04-16 14:48:30 +00:00
|
|
|
}
|
2006-08-11 19:15:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
dcom_interface_t *dcom_interface_find(packet_info *pinfo _U_, const guint8 *ip _U_, e_uuid_t *ipid)
|
2006-08-11 19:15:12 +00:00
|
|
|
{
|
2010-02-09 17:48:41 +00:00
|
|
|
dcom_interface_t *interf;
|
|
|
|
GList *interfaces;
|
2006-08-11 19:15:12 +00:00
|
|
|
|
|
|
|
|
2010-02-09 17:48:41 +00:00
|
|
|
if(memcmp(ipid, &uuid_null, sizeof(uuid_null)) == 0)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
2006-08-11 19:15:12 +00:00
|
|
|
|
2010-02-09 17:48:41 +00:00
|
|
|
for(interfaces = dcom_interfaces; interfaces != NULL; interfaces = g_list_next(interfaces)) {
|
|
|
|
interf = interfaces->data;
|
2006-08-11 19:15:12 +00:00
|
|
|
|
2010-02-09 17:48:41 +00:00
|
|
|
if(memcmp(&interf->ipid, ipid, sizeof(e_uuid_t)) == 0) {
|
|
|
|
return interf;
|
|
|
|
}
|
|
|
|
}
|
2006-08-11 19:15:12 +00:00
|
|
|
|
2010-02-09 17:48:41 +00:00
|
|
|
return NULL;
|
2006-08-11 19:15:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dcom_interface_t *dcom_interface_new(packet_info *pinfo, const guint8 *ip, e_uuid_t *iid, guint64 oxid, guint64 oid, e_uuid_t *ipid)
|
|
|
|
{
|
2010-02-09 17:48:41 +00:00
|
|
|
GList *dcom_iter;
|
|
|
|
dcom_machine_t *machine;
|
|
|
|
dcom_object_t *object;
|
|
|
|
dcom_interface_t *interf;
|
|
|
|
|
|
|
|
|
|
|
|
if( memcmp(iid, &uuid_null, sizeof(uuid_null)) == 0 ||
|
|
|
|
memcmp(ipid, &uuid_null, sizeof(uuid_null)) == 0)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(oxid == 0 || oid == 0) {
|
|
|
|
/*g_warning("interface_new#%u", pinfo->fd->num);*/
|
|
|
|
|
|
|
|
interf = se_alloc(sizeof(dcom_interface_t));
|
|
|
|
interf->parent = NULL;
|
|
|
|
interf->private_data = NULL;
|
|
|
|
interf->first_packet = pinfo->fd->num;
|
|
|
|
interf->iid = *iid;
|
|
|
|
interf->ipid = *ipid;
|
|
|
|
|
|
|
|
dcom_interfaces = g_list_append(dcom_interfaces, interf);
|
|
|
|
return interf;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* find machine */
|
|
|
|
dcom_iter = dcom_machines;
|
|
|
|
while(dcom_iter != NULL) {
|
|
|
|
machine = dcom_iter->data;
|
|
|
|
if(memcmp(machine->ip, ip, 4) == 0) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
dcom_iter = g_list_next(dcom_iter);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* create new machine if not found */
|
|
|
|
if(dcom_iter == NULL) {
|
2010-04-16 14:48:30 +00:00
|
|
|
machine = g_malloc(sizeof(dcom_machine_t));
|
2010-02-09 17:48:41 +00:00
|
|
|
memcpy(machine->ip, ip, 4);
|
|
|
|
machine->objects = NULL;
|
|
|
|
machine->first_packet = pinfo->fd->num;
|
|
|
|
dcom_machines = g_list_append(dcom_machines, machine);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* find object */
|
|
|
|
dcom_iter = machine->objects;
|
|
|
|
while(dcom_iter != NULL) {
|
|
|
|
object = dcom_iter->data;
|
|
|
|
if(object->oid == oid) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
dcom_iter = g_list_next(dcom_iter);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* create new object if not found */
|
|
|
|
if(dcom_iter == NULL) {
|
2010-04-16 14:48:30 +00:00
|
|
|
object = g_malloc(sizeof(dcom_object_t));
|
2010-02-09 17:48:41 +00:00
|
|
|
object->parent = machine;
|
|
|
|
object->interfaces = NULL;
|
|
|
|
object->private_data = NULL;
|
|
|
|
object->first_packet = pinfo->fd->num;
|
|
|
|
object->oid = oid;
|
|
|
|
object->oxid = oxid;
|
|
|
|
|
|
|
|
machine->objects = g_list_append(machine->objects, object);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* find interface */
|
|
|
|
dcom_iter = object->interfaces;
|
|
|
|
while(dcom_iter != NULL) {
|
|
|
|
interf = dcom_iter->data;
|
|
|
|
if(memcmp(&interf->ipid, ipid, sizeof(e_uuid_t)) == 0) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
dcom_iter = g_list_next(dcom_iter);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* create new interface if not found */
|
|
|
|
if(dcom_iter == NULL) {
|
2010-04-16 14:48:30 +00:00
|
|
|
interf = g_malloc(sizeof(dcom_interface_t));
|
2010-02-09 17:48:41 +00:00
|
|
|
interf->parent = object;
|
|
|
|
interf->private_data = NULL;
|
|
|
|
interf->first_packet = pinfo->fd->num;
|
|
|
|
interf->iid = *iid;
|
|
|
|
interf->ipid = *ipid;
|
|
|
|
|
|
|
|
object->interfaces = g_list_append(object->interfaces, interf);
|
|
|
|
dcom_interfaces = g_list_append(dcom_interfaces, interf);
|
|
|
|
}
|
|
|
|
|
|
|
|
return interf;
|
2006-08-11 19:15:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
/*
|
|
|
|
* Flag bits in connection-oriented PDU header.
|
|
|
|
*/
|
2008-10-20 20:51:04 +00:00
|
|
|
#define WIRESHARK_FADF_AUTO 0x0001
|
2006-05-21 04:49:01 +00:00
|
|
|
#define WIRESHARK_FADF_STATIC 0x0002
|
|
|
|
#define WIRESHARK_FADF_EMBEDDED 0x0004
|
2008-10-20 20:51:04 +00:00
|
|
|
#define WIRESHARK_FADF_FIXEDSIZE 0x0010
|
2006-05-21 04:49:01 +00:00
|
|
|
#define WIRESHARK_FADF_RECORD 0x0020
|
|
|
|
#define WIRESHARK_FADF_HAVEIID 0x0040
|
|
|
|
#define WIRESHARK_FADF_HAVEVARTYPE 0x0080
|
2008-10-20 20:51:04 +00:00
|
|
|
#define WIRESHARK_FADF_BSTR 0x0100
|
2006-05-21 04:49:01 +00:00
|
|
|
#define WIRESHARK_FADF_UNKNOWN 0x0200
|
|
|
|
#define WIRESHARK_FADF_DISPATCH 0x0400
|
|
|
|
#define WIRESHARK_FADF_VARIANT 0x0800
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
typedef enum {
|
2008-10-20 20:51:04 +00:00
|
|
|
WIRESHARK_VT_EMPTY = 0,
|
|
|
|
WIRESHARK_VT_NULL = 1,
|
|
|
|
WIRESHARK_VT_I2 = 2,
|
|
|
|
WIRESHARK_VT_I4 = 3,
|
|
|
|
WIRESHARK_VT_R4 = 4,
|
|
|
|
WIRESHARK_VT_R8 = 5,
|
|
|
|
WIRESHARK_VT_CY = 6,
|
|
|
|
WIRESHARK_VT_DATE = 7,
|
|
|
|
WIRESHARK_VT_BSTR = 8,
|
|
|
|
WIRESHARK_VT_DISPATCH = 9,
|
|
|
|
WIRESHARK_VT_ERROR = 10,
|
|
|
|
WIRESHARK_VT_BOOL = 11,
|
|
|
|
WIRESHARK_VT_VARIANT = 12,
|
|
|
|
WIRESHARK_VT_UNKNOWN = 13,
|
|
|
|
WIRESHARK_VT_DECIMAL = 14,
|
|
|
|
WIRESHARK_VT_I1 = 16,
|
|
|
|
WIRESHARK_VT_UI1 = 17,
|
|
|
|
WIRESHARK_VT_UI2 = 18,
|
|
|
|
WIRESHARK_VT_UI4 = 19,
|
|
|
|
WIRESHARK_VT_I8 = 20,
|
|
|
|
WIRESHARK_VT_UI8 = 21,
|
|
|
|
WIRESHARK_VT_INT = 22,
|
|
|
|
WIRESHARK_VT_UINT = 23,
|
|
|
|
WIRESHARK_VT_VOID = 24,
|
|
|
|
WIRESHARK_VT_HRESULT = 25,
|
|
|
|
WIRESHARK_VT_PTR = 26,
|
|
|
|
WIRESHARK_VT_SAFEARRAY = 27,
|
|
|
|
WIRESHARK_VT_CARRAY = 28,
|
|
|
|
WIRESHARK_VT_USERDEFINED = 29,
|
|
|
|
WIRESHARK_VT_LPSTR = 30,
|
|
|
|
WIRESHARK_VT_LPWSTR = 31,
|
|
|
|
WIRESHARK_VT_RECORD = 36,
|
|
|
|
WIRESHARK_VT_FILETIME = 64,
|
|
|
|
WIRESHARK_VT_BLOB = 65,
|
|
|
|
WIRESHARK_VT_STREAM = 66,
|
|
|
|
WIRESHARK_VT_STORAGE = 67,
|
|
|
|
WIRESHARK_VT_STREAMED_OBJECT = 68,
|
|
|
|
WIRESHARK_VT_STORED_OBJECT = 69,
|
|
|
|
WIRESHARK_VT_BLOB_OBJECT = 70,
|
|
|
|
WIRESHARK_VT_CF = 71,
|
|
|
|
WIRESHARK_VT_CLSID = 72,
|
|
|
|
|
|
|
|
WIRESHARK_VT_BSTR_BLOB = 0x0fff,
|
|
|
|
|
|
|
|
WIRESHARK_VT_VECTOR = 0x1000,
|
|
|
|
WIRESHARK_VT_ARRAY = 0x2000,
|
|
|
|
WIRESHARK_VT_BYREF = 0x4000,
|
|
|
|
WIRESHARK_VT_RESERVED = 0x8000,
|
|
|
|
|
|
|
|
WIRESHARK_VT_ILLEGAL = 0xffff,
|
|
|
|
WIRESHARK_VT_ILLEGALMASKED = 0x0fff,
|
|
|
|
WIRESHARK_VT_TYPEMASK = 0x0fff
|
2004-12-19 13:46:09 +00:00
|
|
|
} dcom_vartype_t;
|
|
|
|
|
|
|
|
const value_string dcom_variant_type_vals[] = {
|
2008-10-20 21:38:53 +00:00
|
|
|
{ WIRESHARK_VT_EMPTY, "VT_EMPTY"},
|
2006-05-21 04:49:01 +00:00
|
|
|
{ WIRESHARK_VT_NULL, "VT_NULL"},
|
|
|
|
{ WIRESHARK_VT_I2, "VT_I2"},
|
|
|
|
{ WIRESHARK_VT_I4, "VT_I4"},
|
|
|
|
{ WIRESHARK_VT_R4, "VT_R4"},
|
|
|
|
{ WIRESHARK_VT_R8, "VT_R8"},
|
|
|
|
{ WIRESHARK_VT_CY, "VT_CY"},
|
|
|
|
{ WIRESHARK_VT_DATE, "VT_DATE"},
|
|
|
|
{ WIRESHARK_VT_BSTR, "VT_BSTR"},
|
2008-10-20 21:38:53 +00:00
|
|
|
{ WIRESHARK_VT_DISPATCH, "VT_DISPATCH"},
|
|
|
|
{ WIRESHARK_VT_ERROR, "VT_ERROR"},
|
2006-05-21 04:49:01 +00:00
|
|
|
{ WIRESHARK_VT_BOOL, "VT_BOOL"},
|
|
|
|
{ WIRESHARK_VT_I1, "VT_I1"},
|
|
|
|
{ WIRESHARK_VT_UI1, "VT_UI1"},
|
|
|
|
{ WIRESHARK_VT_UI2, "VT_UI2"},
|
|
|
|
{ WIRESHARK_VT_UI4, "VT_UI4"},
|
|
|
|
{ WIRESHARK_VT_I8, "VT_I8"},
|
|
|
|
{ WIRESHARK_VT_UI8, "VT_UI8"},
|
2008-10-20 21:38:53 +00:00
|
|
|
{ WIRESHARK_VT_ARRAY, "VT_ARRAY"},
|
|
|
|
{ WIRESHARK_VT_UNKNOWN, "VT_UNKNOWN"},
|
|
|
|
{ WIRESHARK_VT_USERDEFINED, "VT_USERDEFINED"},
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
/* XXX: this could be done better */
|
2008-10-20 21:38:53 +00:00
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_I2, "VT_ARRAY|VT_I2"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_I4, "VT_ARRAY|VT_I4"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_R4, "VT_ARRAY|VT_R4"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_R8, "VT_ARRAY|VT_R8"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_DATE, "VT_ARRAY|VT_DATE"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_BSTR, "VT_ARRAY|VT_BSTR"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_ERROR, "VT_ARRAY|VT_ERROR"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_BOOL, "VT_ARRAY|VT_BOOL"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_I1, "VT_ARRAY|VT_I1"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_UI1, "VT_ARRAY|VT_UI1"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_UI2, "VT_ARRAY|VT_UI2"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_UI4, "VT_ARRAY|VT_UI4"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_I8, "VT_ARRAY|VT_I8"},
|
|
|
|
{ WIRESHARK_VT_ARRAY | WIRESHARK_VT_UI8, "VT_ARRAY|VT_UI8"},
|
|
|
|
|
|
|
|
{ WIRESHARK_VT_BYREF | WIRESHARK_VT_I2, "VT_BYREF|VT_I2"},
|
|
|
|
{ WIRESHARK_VT_BYREF | WIRESHARK_VT_BSTR, "VT_BYREF|VT_BSTR"},
|
|
|
|
{ WIRESHARK_VT_BYREF | WIRESHARK_VT_VARIANT, "VT_BYREF|VT_VARIANT"},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
/* XXX: append more types here */
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* we need an extension mechanism here (be able to append entries by user protocol) */
|
|
|
|
const value_string dcom_hresult_vals[] = {
|
|
|
|
{ 0x00000000, "S_OK" },
|
|
|
|
{ 0x00000001, "S_FALSE" },
|
|
|
|
{ 0x8000FFFF, "E_UNEXPECTED" },
|
|
|
|
{ 0x80004001, "E_NOTIMPL" },
|
|
|
|
{ 0x80004002, "E_NOINTERFACE" },
|
2006-04-07 22:05:34 +00:00
|
|
|
{ 0x80004003, "E_POINTER" },
|
2004-12-19 13:46:09 +00:00
|
|
|
{ 0x80004004, "E_ABORT" },
|
|
|
|
{ 0x80004005, "E_FAIL" },
|
|
|
|
{ 0x80070005, "E_ACCESSDENIED" },
|
|
|
|
{ 0x80070006, "E_HANDLE" },
|
|
|
|
{ 0x8007000E, "E_OUTOFMEMORY" },
|
|
|
|
{ 0x80070057, "E_INVALIDARG" },
|
|
|
|
|
|
|
|
{ 0x80010108, "RPC_E_DISCONNECTED" },
|
2005-09-11 16:55:34 +00:00
|
|
|
{ 0x80010113, "RPC_E_INVALID_IPID" },
|
2006-06-28 18:51:24 +00:00
|
|
|
{ 0x8001011F, "RPC_E_TIMEOUT" },
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2006-03-17 21:41:56 +00:00
|
|
|
{ 0x80020003, "DISP_E_MEMBERNOTFOUND" },
|
2004-12-19 13:46:09 +00:00
|
|
|
{ 0x80020004, "DISP_E_PARAMNOTFOUND" },
|
2006-03-17 21:41:56 +00:00
|
|
|
{ 0x80020005, "DISP_E_TYPEMISMATCH" },
|
|
|
|
{ 0x80020006, "DISP_E_UNKNOWNNAME" },
|
|
|
|
{ 0x80020008, "DISP_E_BADVARTYPE" },
|
|
|
|
{ 0x80020009, "DISP_E_EXCEPTION" },
|
|
|
|
{ 0x8002000A, "DISP_E_OVERFLOW" },
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2006-09-07 20:30:48 +00:00
|
|
|
{ 0x8002801D, "TYPE_E_LIBNOTREGISTERED" },
|
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
{ 0x80040154, "REGDB_E_CLASSNOTREG" },
|
2005-09-11 16:55:34 +00:00
|
|
|
{ 0x80040201, "CO_E_FAILEDTOGETSECCTX" },
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
/* following are CBA application specific values */
|
|
|
|
{ 0x0004CA00, "CBA_S_PERSISTPENDING" },
|
|
|
|
{ 0x0004CA01, "CBA_S_ESTABLISHING" },
|
|
|
|
{ 0x0004CA02, "CBA_S_NOCONNECTION" },
|
|
|
|
{ 0x0004CA03, "CBA_S_VALUEBUFFERED" },
|
|
|
|
{ 0x0004CA04, "CBA_S_VALUEUNCERTAIN" },
|
|
|
|
{ 0x0004CA05, "CBA_S_NOCONNECTIONDATA" },
|
|
|
|
{ 0x0004CA06, "CBA_S_FRAMEEMPTY" },
|
|
|
|
|
|
|
|
{ 0x8004CB00, "CBA_E_MALFORMED" },
|
|
|
|
{ 0x8004CB01, "CBA_E_UNKNOWNOBJECT" },
|
|
|
|
{ 0x8004CB02, "CBA_E_UNKNOWNMEMBER" },
|
|
|
|
{ 0x8004CB03, "CBA_E_TYPEMISMATCH" },
|
|
|
|
{ 0x8004CB04, "CBA_E_INVALIDENUMVALUE" },
|
|
|
|
{ 0x8004CB05, "CBA_E_INVALIDID" },
|
|
|
|
{ 0x8004CB06, "CBA_E_INVALIDEPSILON" },
|
|
|
|
{ 0x8004CB07, "CBA_E_INVALIDSUBSTITUTE" },
|
|
|
|
{ 0x8004CB08, "CBA_E_INVALIDCONNECTION" },
|
|
|
|
{ 0x8004CB09, "CBA_E_INVALIDCOOKIE" },
|
|
|
|
{ 0x8004CB0A, "CBA_E_TIMEVALUEUNSUPPORTED" },
|
|
|
|
{ 0x8004CB0B, "CBA_E_QOSTYPEUNSUPPORTED" },
|
|
|
|
{ 0x8004CB0C, "CBA_E_QOSVALUEUNSUPPORTED" },
|
|
|
|
{ 0x8004CB0D, "CBA_E_PERSISTRUNNING" },
|
|
|
|
{ 0x8004CB0E, "CBA_E_INUSE" },
|
|
|
|
{ 0x8004CB0F, "CBA_E_NOTAPPLICABLE" },
|
|
|
|
{ 0x8004CB10, "CBA_E_NONACCESSIBLE" },
|
|
|
|
{ 0x8004CB11, "CBA_E_DEFECT" },
|
|
|
|
{ 0x8004CB12, "CBA_E_LIMITVIOLATION" },
|
|
|
|
{ 0x8004CB13, "CBA_E_QOSTYPENOTAPPLICABLE" },
|
|
|
|
{ 0x8004CB14, "CBA_E_QCNOTAPPLICABLE" },
|
|
|
|
{ 0x8004CB15, "CBA_E_ACCESSBLOCKED" },
|
|
|
|
{ 0x8004CB16, "CBA_E_COUNTEXCEEDED" },
|
|
|
|
{ 0x8004CB17, "CBA_E_SIZEEXCEEDED" },
|
|
|
|
{ 0x8004CB18, "CBA_E_OUTOFPARTNERACCOS" },
|
|
|
|
{ 0x8004CB19, "CBA_E_OUTOFACCOPAIRS" },
|
|
|
|
{ 0x8004CB1A, "CBA_E_ITEMTOOLARGE" },
|
|
|
|
{ 0x8004CB1B, "CBA_E_CRDATALENGTH" },
|
|
|
|
{ 0x8004CB1C, "CBA_E_FLAGUNSUPPORTED" },
|
|
|
|
{ 0x8004CB1D, "CBA_E_CAPACITYEXCEEDED" },
|
|
|
|
{ 0x8004CB1E, "CBA_E_SUBELEMENTMISMATCH" },
|
|
|
|
{ 0x8004CB1F, "CBA_E_STATIONFAILURE" },
|
|
|
|
{ 0x8004CB20, "CBA_E_NOTROUTABLE" },
|
|
|
|
{ 0x8004CB21, "CBA_E_DISCONNECTRUNNING" },
|
|
|
|
{ 0x8004CB22, "CBA_E_LOCATIONCHANGED" },
|
|
|
|
{ 0x8004CB23, "CBA_E_FRAMECOUNTUNSUPPORTED" },
|
|
|
|
{ 0x8004CB24, "CBA_E_LINKFAILURE" },
|
|
|
|
{ 0x8004CB25, "CBA_E_MODECHANGE" },
|
2005-09-11 16:55:34 +00:00
|
|
|
|
|
|
|
{ 0x80080004, "CO_E_BAD_PATH" },
|
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string dcom_objref_flag_vals[] = {
|
|
|
|
{ 0x1, "OBJREF_STANDARD" },
|
|
|
|
{ 0x2, "OBJREF_HANDLER" },
|
|
|
|
{ 0x4, "OBJREF_CUSTOM" },
|
2008-10-20 21:38:53 +00:00
|
|
|
{ 0, NULL }
|
2004-12-19 13:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string dcom_objref_signature_vals[] = {
|
|
|
|
{ 0x574f454d, "MEOW" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2005-05-24 20:00:14 +00:00
|
|
|
/* although flags, they doesn't seem to be used as such */
|
|
|
|
static const value_string dcom_stdobjref_flag_vals[] = {
|
|
|
|
{ 0x0000, "SORF_NULL" },
|
|
|
|
{ 0x0001, "SORF_OXRES1" },
|
|
|
|
{ 0x0020, "SORF_OXRES2" },
|
|
|
|
{ 0x0040, "SORF_OXRES3" },
|
|
|
|
{ 0x0080, "SORF_OXRES4" },
|
|
|
|
{ 0x0100, "SORF_OXRES5" },
|
|
|
|
{ 0x0200, "SORF_OXRES6" },
|
|
|
|
{ 0x0400, "SORF_OXRES7" },
|
|
|
|
{ 0x0800, "SORF_OXRES8" },
|
|
|
|
{ 0x1000, "SORF_NOPING" },
|
2008-10-20 21:38:53 +00:00
|
|
|
{ 0, NULL }
|
2005-05-24 20:00:14 +00:00
|
|
|
};
|
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
static const value_string dcom_dcerpc_pointer_vals[] = {
|
|
|
|
{ 0x72657355, "User" },
|
|
|
|
{ 0x42535452, "BSTR" },
|
|
|
|
{ 0x00000000, "NULL" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
2004-12-19 16:13:05 +00:00
|
|
|
static const value_string dcom_dualstringarray_authz[] = {
|
|
|
|
{ 0x0000, "RPC_C_AUTHZ_NONE" },
|
|
|
|
{ 0x0001, "RPC_C_AUTHZ_NAME"},
|
|
|
|
{ 0x0002, "RPC_C_AUTHZ_DCE"},
|
|
|
|
{ 0xffff, "Default"},
|
2008-10-20 21:38:53 +00:00
|
|
|
{ 0, NULL}
|
2004-12-19 16:13:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string dcom_dualstringarray_authn[] = {
|
2008-10-20 20:51:04 +00:00
|
|
|
{ 00, "RPC_C_AUTHN_NONE" },
|
|
|
|
{ 1, "RPC_C_AUTHN_DCE_PRIVATE"},
|
|
|
|
{ 2, "RPC_C_AUTHN_DCE_PUBLIC"},
|
|
|
|
{ 4, "RPC_C_AUTHN_DEC_PUBLIC"},
|
|
|
|
{ 9, "RPC_C_AUTHN_GSS_NEGOTIATE"},
|
|
|
|
{ 10, "RPC_C_AUTH_WINNT"},
|
|
|
|
{ 14, "RPC_C_AUTHN_GSS_SCHANNEL"},
|
|
|
|
{ 16, "RPC_C_AUTHN_GSS_KERBEROS"},
|
|
|
|
{ 17, "RPC_C_AUTHN_MSN"},
|
|
|
|
{ 18, "RPC_C_AUTHN_DPA"},
|
2004-12-19 16:13:05 +00:00
|
|
|
{ 100, "RPC_C_AUTHN_MQ"},
|
|
|
|
{ 0xffff, "RPC_C_AUTHN_DEFAULT"},
|
2008-10-20 21:38:53 +00:00
|
|
|
{ 0, NULL}
|
2004-12-19 16:13:05 +00:00
|
|
|
};
|
|
|
|
|
2006-08-14 23:39:48 +00:00
|
|
|
const value_string dcom_protseq_vals[] = {
|
2004-12-19 16:13:05 +00:00
|
|
|
{ 0x04, "NCACN_DNET_NSP" },
|
|
|
|
{ 0x07, "NCACN_IP_TCP" },
|
|
|
|
{ 0x08, "NCADG_IP_UDP" },
|
|
|
|
{ 0x09, "NCACN_IP" },
|
|
|
|
{ 0x0C, "NCACN_SPX" },
|
|
|
|
{ 0x0D, "NCACN_NB_IPX" },
|
|
|
|
{ 0x0E, "NCADG_IPX" },
|
|
|
|
{ 0x12, "NCACN_NB_NB" },
|
|
|
|
{ 0x1F, "NCACN_HTTP" },
|
2004-12-19 13:46:09 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const value_string dcom_vt_bool_vals[] = {
|
2006-05-05 19:29:50 +00:00
|
|
|
{ 0x0000, "FALSE" },
|
|
|
|
{ 0xFFFF, "TRUE" },
|
2008-10-20 20:51:04 +00:00
|
|
|
{ 0, NULL }
|
2004-12-19 13:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect extension to DCOM "this" and "that" */
|
2005-07-30 01:01:02 +00:00
|
|
|
static int
|
2004-12-19 13:46:09 +00:00
|
|
|
dissect_dcom_extent(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree, guint8 *drep)
|
|
|
|
{
|
2008-10-20 20:51:04 +00:00
|
|
|
guint32 u32ArraySize;
|
|
|
|
guint32 u32ArraySize2;
|
|
|
|
guint32 u32Pointer;
|
|
|
|
guint32 u32VariableOffset;
|
2004-12-19 13:46:09 +00:00
|
|
|
guint32 u32Idx;
|
|
|
|
guint32 u32SubStart;
|
|
|
|
proto_item *sub_item;
|
|
|
|
proto_tree *sub_tree;
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
guint32 u32ArrayCount;
|
|
|
|
guint32 u32ArrayRes;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
guint32 u32ExtentSize;
|
2004-12-19 13:46:09 +00:00
|
|
|
e_uuid_t uuidExtend;
|
2008-10-20 20:51:04 +00:00
|
|
|
const char *uuid_name;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, &u32Pointer);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if (u32Pointer == 0) {
|
|
|
|
return offset;
|
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_extent_array_count, &u32ArrayCount);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_extent_array_res, &u32ArrayRes);
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, &u32Pointer);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if (u32Pointer == 0) {
|
|
|
|
return offset;
|
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
&u32ArraySize);
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
u32VariableOffset = offset + u32ArraySize*4;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
u32Idx = 1;
|
|
|
|
while (u32ArraySize--) {
|
2004-12-19 13:46:09 +00:00
|
|
|
sub_item = proto_tree_add_item(tree, hf_dcom_extent, tvb, offset, 0, FALSE);
|
|
|
|
sub_tree = proto_item_add_subtree(sub_item, ett_dcom_extent);
|
|
|
|
u32SubStart = offset;
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep, &u32Pointer);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if(u32Pointer != 0) {
|
2010-04-16 14:48:30 +00:00
|
|
|
u32VariableOffset = dissect_dcom_DWORD(tvb, u32VariableOffset, pinfo, sub_tree, drep,
|
2008-10-20 20:51:04 +00:00
|
|
|
hf_dcom_extent_size, &u32ExtentSize);
|
2010-04-16 14:48:30 +00:00
|
|
|
|
|
|
|
dissect_dcom_UUID(tvb, u32VariableOffset, pinfo, NULL, drep,
|
2008-10-20 20:51:04 +00:00
|
|
|
hf_dcom_extent_id, &uuidExtend);
|
|
|
|
|
|
|
|
/* look for a registered uuid name */
|
|
|
|
if((uuid_name = guids_get_uuid_name(&uuidExtend)) != NULL) {
|
|
|
|
proto_tree_add_guid_format_value(sub_tree, hf_dcom_extent_id, tvb,
|
2010-04-16 14:48:30 +00:00
|
|
|
offset, sizeof(e_uuid_t), (e_guid_t *) &uuidExtend,
|
2008-10-20 20:51:04 +00:00
|
|
|
"%s (%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x)",
|
|
|
|
uuid_name,
|
|
|
|
uuidExtend.Data1, uuidExtend.Data2, uuidExtend.Data3,
|
|
|
|
uuidExtend.Data4[0], uuidExtend.Data4[1],
|
|
|
|
uuidExtend.Data4[2], uuidExtend.Data4[3],
|
|
|
|
uuidExtend.Data4[4], uuidExtend.Data4[5],
|
|
|
|
uuidExtend.Data4[6], uuidExtend.Data4[7]);
|
|
|
|
u32VariableOffset += 16;
|
|
|
|
} else {
|
2010-04-16 14:48:30 +00:00
|
|
|
u32VariableOffset = dissect_dcom_UUID(tvb, u32VariableOffset, pinfo, sub_tree, drep,
|
2008-10-20 20:51:04 +00:00
|
|
|
hf_dcom_extent_id, &uuidExtend);
|
|
|
|
}
|
2006-08-14 23:39:48 +00:00
|
|
|
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
u32VariableOffset = dissect_dcom_dcerpc_array_size(tvb, u32VariableOffset, pinfo, sub_tree, drep,
|
2008-10-20 20:51:04 +00:00
|
|
|
&u32ArraySize2);
|
|
|
|
u32VariableOffset = dissect_dcom_nospec_data(tvb, u32VariableOffset, pinfo, sub_tree, drep, u32ArraySize2);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* update subtree header */
|
|
|
|
if(uuid_name != NULL) {
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_item_append_text(sub_item, "[%u]: %s, Bytes=%u",
|
2008-10-20 20:51:04 +00:00
|
|
|
u32Idx, uuid_name, u32ArraySize2);
|
|
|
|
} else {
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_item_append_text(sub_item, "[%u]: Bytes=%u",
|
2008-10-20 20:51:04 +00:00
|
|
|
u32Idx, u32ArraySize2);
|
|
|
|
}
|
|
|
|
proto_item_set_len(sub_item, offset - u32SubStart);
|
|
|
|
} else {
|
|
|
|
/* update subtree header */
|
|
|
|
proto_item_append_text(sub_item, "[%u]: NULL", u32Idx);
|
|
|
|
proto_item_set_len(sub_item, offset - u32SubStart);
|
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
u32Idx++;
|
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
return u32VariableOffset;
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect DCOM "this" (start of every DCOM request) */
|
|
|
|
int
|
|
|
|
dissect_dcom_this(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree, guint8 *drep)
|
|
|
|
{
|
|
|
|
guint16 u16VersionMajor;
|
|
|
|
guint16 u16VersionMinor;
|
|
|
|
guint32 u32Flags;
|
|
|
|
guint32 u32Res;
|
|
|
|
e_uuid_t uuidCausality;
|
|
|
|
proto_item *sub_item;
|
|
|
|
proto_tree *sub_tree;
|
|
|
|
guint32 u32SubStart;
|
2008-06-27 16:15:30 +00:00
|
|
|
proto_item *pi;
|
|
|
|
dcerpc_info *info = (dcerpc_info *)pinfo->private_data;
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
sub_item = proto_tree_add_protocol_format(tree, proto_dcom, tvb, offset, 0,
|
2008-10-20 20:51:04 +00:00
|
|
|
"DCOM, ORPCThis");
|
2004-12-19 13:46:09 +00:00
|
|
|
sub_tree = proto_item_add_subtree(sub_item, ett_dcom_this);
|
|
|
|
|
|
|
|
offset = dissect_dcom_COMVERSION(tvb, offset, pinfo, sub_tree, drep,
|
|
|
|
&u16VersionMajor, &u16VersionMinor);
|
|
|
|
u32SubStart = offset - 4;
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_this_flags, &u32Flags);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_this_res, &u32Res);
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_UUID(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_this_cid, &uuidCausality);
|
|
|
|
|
2008-06-27 16:15:30 +00:00
|
|
|
offset = dissect_dcom_extent(tvb, offset, pinfo, sub_tree, drep);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
/* update subtree header */
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_item_append_text(sub_item, ", V%u.%u, Causality ID: %s",
|
2006-08-17 19:09:41 +00:00
|
|
|
u16VersionMajor, u16VersionMinor, guids_resolve_uuid_to_str(&uuidCausality));
|
2004-12-19 13:46:09 +00:00
|
|
|
proto_item_set_len(sub_item, offset - u32SubStart);
|
|
|
|
|
2008-06-27 16:15:30 +00:00
|
|
|
if(memcmp(&info->call_data->object_uuid, &uuid_null, sizeof(uuid_null)) != 0) {
|
2010-04-16 14:48:30 +00:00
|
|
|
pi = proto_tree_add_guid_format(tree, hf_dcom_ipid, tvb, offset, 0,
|
2008-06-27 16:15:30 +00:00
|
|
|
(e_guid_t *) &info->call_data->object_uuid,
|
|
|
|
"Object UUID/IPID: %s", guids_resolve_uuid_to_str(&info->call_data->object_uuid));
|
2008-10-20 20:51:04 +00:00
|
|
|
PROTO_ITEM_SET_GENERATED(pi);
|
2008-06-27 16:15:30 +00:00
|
|
|
}
|
2006-08-11 19:15:12 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect DCOM "that" (start of every DCOM response) */
|
|
|
|
int
|
|
|
|
dissect_dcom_that(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree, guint8 *drep) {
|
|
|
|
guint32 u32Flags;
|
|
|
|
proto_item *sub_item;
|
|
|
|
proto_tree *sub_tree;
|
|
|
|
guint32 u32SubStart;
|
2008-06-27 16:15:30 +00:00
|
|
|
proto_item *pi;
|
|
|
|
dcerpc_info *info = (dcerpc_info *)pinfo->private_data;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
sub_item = proto_tree_add_protocol_format(tree, proto_dcom, tvb, offset, 0,
|
2008-10-20 20:51:04 +00:00
|
|
|
"DCOM, ORPCThat");
|
2004-12-19 13:46:09 +00:00
|
|
|
sub_tree = proto_item_add_subtree(sub_item, ett_dcom_that);
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2008-10-20 20:51:04 +00:00
|
|
|
hf_dcom_that_flags, &u32Flags);
|
2004-12-19 13:46:09 +00:00
|
|
|
u32SubStart = offset - 4;
|
|
|
|
|
2008-06-27 16:15:30 +00:00
|
|
|
offset = dissect_dcom_extent(tvb, offset, pinfo, sub_tree, drep);
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
/* update subtree header */
|
|
|
|
proto_item_set_len(sub_item, offset - u32SubStart);
|
|
|
|
|
2008-06-27 16:15:30 +00:00
|
|
|
if(memcmp(&info->call_data->object_uuid, &uuid_null, sizeof(uuid_null)) != 0) {
|
2010-04-16 14:48:30 +00:00
|
|
|
pi = proto_tree_add_guid_format(tree, hf_dcom_ipid, tvb, offset, 0,
|
2008-06-27 16:15:30 +00:00
|
|
|
(e_guid_t *) &info->call_data->object_uuid,
|
|
|
|
"Object UUID/IPID: %s", guids_resolve_uuid_to_str(&info->call_data->object_uuid));
|
2008-10-20 20:51:04 +00:00
|
|
|
PROTO_ITEM_SET_GENERATED(pi);
|
2008-06-27 16:15:30 +00:00
|
|
|
}
|
2006-08-11 19:15:12 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect simple dcom request, DCOM "this" only */
|
2010-04-16 14:48:30 +00:00
|
|
|
int
|
2004-12-19 13:46:09 +00:00
|
|
|
dissect_dcom_simple_rqst(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree, guint8 *drep)
|
|
|
|
{
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
offset = dissect_dcom_this(tvb, offset, pinfo, tree, drep);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect simple dcom response, DCOM "that" and returned HRESULT only */
|
2010-04-16 14:48:30 +00:00
|
|
|
int
|
2004-12-19 13:46:09 +00:00
|
|
|
dissect_dcom_simple_resp(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree, guint8 *drep)
|
|
|
|
{
|
|
|
|
guint32 u32HResult;
|
|
|
|
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
offset = dissect_dcom_that(tvb, offset, pinfo, tree, drep);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, tree, drep,
|
2008-10-20 20:51:04 +00:00
|
|
|
&u32HResult);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)) {
|
2010-04-16 14:48:30 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s",
|
2008-10-20 20:51:04 +00:00
|
|
|
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%08x)") );
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect a dcerpc array size */
|
|
|
|
int
|
|
|
|
dissect_dcom_dcerpc_array_size(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, guint8 *drep, guint32 *pu32ArraySize)
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
/* en-/disable this by preference setting */
|
|
|
|
if (!dcom_prefs_display_unmarshalling_details) {
|
|
|
|
/* this will read in the data, but prevent output to tree */
|
|
|
|
tree = NULL;
|
|
|
|
}
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_array_size, pu32ArraySize);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect a dcerpc pointer value */
|
|
|
|
int
|
|
|
|
dissect_dcom_dcerpc_pointer(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, guint8 *drep, guint32 *pu32Pointer)
|
|
|
|
{
|
|
|
|
|
|
|
|
/* en-/disable this by preference setting */
|
|
|
|
if (!dcom_prefs_display_unmarshalling_details) {
|
|
|
|
/* this will read in the data, but prevent output to tree */
|
|
|
|
tree = NULL;
|
|
|
|
}
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_ndr_uint32(tvb, offset, pinfo, tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_pointer_val, pu32Pointer);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* mark data as "ToBeDone" */
|
|
|
|
/* XXX: handout data to generic "unkown data" dissector? */
|
|
|
|
extern int
|
|
|
|
dissect_dcom_tobedone_data(tvbuff_t *tvb, int offset,
|
2004-12-20 22:29:24 +00:00
|
|
|
packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int length)
|
2004-12-19 13:46:09 +00:00
|
|
|
{
|
2005-09-11 16:55:34 +00:00
|
|
|
proto_item *item;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
2011-01-16 03:29:03 +00:00
|
|
|
item = proto_tree_add_item(tree, hf_dcom_tobedone, tvb, offset, length, ENC_NA);
|
2006-09-07 20:30:48 +00:00
|
|
|
PROTO_ITEM_SET_GENERATED(item);
|
2006-10-18 19:42:10 +00:00
|
|
|
expert_add_info_format(pinfo, item, PI_UNDECODED, PI_WARN, "Dissection incomplete");
|
2006-09-07 20:30:48 +00:00
|
|
|
|
|
|
|
offset += length;
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* mark data as "No Specification Available" */
|
|
|
|
/* XXX: handout data to generic "unkown data" dissector? */
|
|
|
|
extern int
|
|
|
|
dissect_dcom_nospec_data(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo _U_, proto_tree *tree, guint8 *drep _U_, int length)
|
|
|
|
{
|
|
|
|
proto_item *item;
|
|
|
|
|
|
|
|
|
2011-01-16 03:29:03 +00:00
|
|
|
item = proto_tree_add_item(tree, hf_dcom_nospec, tvb, offset, length, ENC_NA);
|
2006-09-07 20:30:48 +00:00
|
|
|
PROTO_ITEM_SET_GENERATED(item);
|
2006-10-18 19:42:10 +00:00
|
|
|
expert_add_info_format(pinfo, item, PI_UNDECODED, PI_NOTE, "No specification available, dissection not possible");
|
2005-09-11 16:55:34 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
offset += length;
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect an indexed WORD, something like: "FieldName[1]: 0x1234" */
|
|
|
|
int
|
|
|
|
dissect_dcom_indexed_WORD(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_tree *tree, guint8 *drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
int hfindex, guint16 * pu16WORD, int field_index)
|
|
|
|
{
|
2008-10-20 20:51:04 +00:00
|
|
|
guint16 u16WORD;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* dissect the WORD, but don't add to tree */
|
|
|
|
dissect_dcom_WORD(tvb, offset, pinfo, NULL /*tree*/, drep,
|
|
|
|
hfindex, &u16WORD);
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if (tree) {
|
2004-12-19 13:46:09 +00:00
|
|
|
/* special formatted output of indexed value */
|
2008-10-20 20:51:04 +00:00
|
|
|
proto_tree_add_uint_format(tree, hfindex, tvb, offset, 2, (drep[0] & 0x10),
|
2010-04-16 14:48:30 +00:00
|
|
|
"%s[%u]: 0x%04x",
|
2004-12-19 13:46:09 +00:00
|
|
|
proto_registrar_get_name(hfindex),
|
|
|
|
field_index, u16WORD);
|
2008-10-20 20:51:04 +00:00
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
offset += 2;
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if (pu16WORD)
|
|
|
|
*pu16WORD = u16WORD;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
return offset;
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
/* dissect an indexed DWORD, something like: "FieldName[1]: 0x12345678" */
|
|
|
|
int
|
|
|
|
dissect_dcom_indexed_DWORD(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_tree *tree, guint8 *drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
int hfindex, guint32 * pu32DWORD, int field_index)
|
|
|
|
{
|
2008-10-20 20:51:04 +00:00
|
|
|
guint32 u32DWORD;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* dissect the DWORD, but don't add to tree */
|
|
|
|
dissect_dcom_DWORD(tvb, offset, pinfo, NULL /*tree*/, drep,
|
|
|
|
hfindex, &u32DWORD);
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if (tree) {
|
2004-12-19 13:46:09 +00:00
|
|
|
/* special formatted output of indexed value */
|
2008-10-20 20:51:04 +00:00
|
|
|
proto_tree_add_uint_format(tree, hfindex, tvb, offset, 4, (drep[0] & 0x10),
|
2010-04-16 14:48:30 +00:00
|
|
|
"%s[%u]: 0x%08x",
|
2004-12-19 13:46:09 +00:00
|
|
|
proto_registrar_get_name(hfindex),
|
|
|
|
field_index, u32DWORD);
|
2008-10-20 20:51:04 +00:00
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
offset += 4;
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if (pu32DWORD)
|
|
|
|
*pu32DWORD = u32DWORD;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
return offset;
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2007-02-25 15:48:43 +00:00
|
|
|
/* dissect hresult field of a usual DCOM call (create "raw" item) */
|
|
|
|
int
|
|
|
|
dissect_dcom_HRESULT_item(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_tree *tree, guint8 *drep,
|
2007-02-25 15:48:43 +00:00
|
|
|
guint32 * pu32HResult, int field_index, proto_item **item)
|
|
|
|
{
|
2008-10-20 20:51:04 +00:00
|
|
|
guint32 u32HResult;
|
2007-02-25 15:48:43 +00:00
|
|
|
|
|
|
|
/* dissect the DWORD, but don't add to tree */
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, NULL /*tree*/, drep,
|
2007-02-25 15:48:43 +00:00
|
|
|
field_index, &u32HResult);
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if (tree) {
|
2007-02-25 15:48:43 +00:00
|
|
|
/* special formatted output of indexed value */
|
2008-10-20 20:51:04 +00:00
|
|
|
*item = proto_tree_add_item (tree, field_index, tvb, offset-4, 4, (drep[0] & 0x10));
|
|
|
|
}
|
2007-02-25 15:48:43 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if (pu32HResult)
|
|
|
|
*pu32HResult = u32HResult;
|
2007-02-25 15:48:43 +00:00
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2007-02-25 15:48:43 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
/* dissect hresult field of a usual DCOM call (seperate method, because often used) */
|
|
|
|
int
|
|
|
|
dissect_dcom_HRESULT(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_tree *tree, guint8 *drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
guint32 * pu32HResult)
|
|
|
|
{
|
2008-10-20 20:51:04 +00:00
|
|
|
guint32 u32HResult;
|
2005-09-11 16:55:34 +00:00
|
|
|
proto_item *item = NULL;
|
|
|
|
|
|
|
|
/* dissect the DWORD, but don't add to tree */
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, NULL /*tree*/, drep,
|
2005-09-11 16:55:34 +00:00
|
|
|
hf_dcom_hresult, &u32HResult);
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if (tree) {
|
2005-09-11 16:55:34 +00:00
|
|
|
/* special formatted output of indexed value */
|
2008-10-20 20:51:04 +00:00
|
|
|
item = proto_tree_add_item (tree, hf_dcom_hresult, tvb, offset-4, 4, (drep[0] & 0x10));
|
|
|
|
}
|
2005-09-11 16:55:34 +00:00
|
|
|
|
|
|
|
/* expert info only if severity is set */
|
|
|
|
/* XXX - move this to the callers of this function, to provide a more detailed error output */
|
|
|
|
if(u32HResult & 0x80000000) {
|
2005-09-11 17:15:00 +00:00
|
|
|
expert_add_info_format(pinfo, item, PI_RESPONSE_CODE, PI_NOTE, "Hresult: %s",
|
2005-09-11 16:55:34 +00:00
|
|
|
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%x)"));
|
|
|
|
}
|
2008-10-20 20:51:04 +00:00
|
|
|
if (pu32HResult)
|
|
|
|
*pu32HResult = u32HResult;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
/* partial results of indexed DCOM subcalls (e.g.: from a kind of array) */
|
|
|
|
int
|
|
|
|
dissect_dcom_indexed_HRESULT(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_tree *tree, guint8 *drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
guint32 * pu32HResult, int field_index)
|
|
|
|
{
|
2008-10-20 20:51:04 +00:00
|
|
|
guint32 u32HResult;
|
2005-09-11 16:55:34 +00:00
|
|
|
proto_item *item = NULL;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* dissect the DWORD, but don't add to tree */
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, NULL /*tree*/, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_hresult, &u32HResult);
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if (tree) {
|
2004-12-19 13:46:09 +00:00
|
|
|
/* special formatted output of indexed value */
|
2008-10-20 20:51:04 +00:00
|
|
|
item = proto_tree_add_uint_format(tree, hf_dcom_hresult, tvb, offset-4, 4, u32HResult,
|
2004-12-19 13:46:09 +00:00
|
|
|
"HResult[%u]: %s (0x%08x)", field_index,
|
|
|
|
val_to_str(u32HResult, dcom_hresult_vals, "Unknown"),
|
|
|
|
u32HResult);
|
2008-10-20 20:51:04 +00:00
|
|
|
}
|
2005-09-11 16:55:34 +00:00
|
|
|
/* expert info only if severity flag is set */
|
|
|
|
/* XXX - move this to the callers of this function, to provide a more detailed error output */
|
|
|
|
if(u32HResult & 0x80000000) {
|
2005-09-11 17:15:00 +00:00
|
|
|
expert_add_info_format(pinfo, item, PI_RESPONSE_CODE, PI_NOTE, "Hresult: %s",
|
2005-09-11 16:55:34 +00:00
|
|
|
val_to_str(u32HResult, dcom_hresult_vals, "Unknown (0x%x)"));
|
|
|
|
}
|
2008-10-20 20:51:04 +00:00
|
|
|
if (pu32HResult)
|
|
|
|
*pu32HResult = u32HResult;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_dcom_COMVERSION(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, guint8 *drep,
|
|
|
|
guint16 * pu16VersionMajor, guint16 * pu16VersionMinor)
|
|
|
|
{
|
2010-04-16 14:48:30 +00:00
|
|
|
|
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_version_major, pu16VersionMajor);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_version_minor, pu16VersionMinor);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2007-02-06 01:33:39 +00:00
|
|
|
int
|
2004-12-19 13:46:09 +00:00
|
|
|
dissect_dcom_SAFEARRAY(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
2007-02-06 01:33:39 +00:00
|
|
|
proto_tree *tree, guint8 *drep, int hfindex _U_, sa_callback_t sacb)
|
2004-12-19 13:46:09 +00:00
|
|
|
{
|
|
|
|
guint32 u32Dims;
|
|
|
|
guint16 u16Dims;
|
|
|
|
guint16 u16Features;
|
|
|
|
guint32 u32ElementSize;
|
|
|
|
guint32 u32VarType;
|
|
|
|
guint32 u32Elements;
|
|
|
|
guint32 u32Pointer;
|
|
|
|
guint32 u32BoundElements;
|
|
|
|
guint32 u32LowBound;
|
|
|
|
gchar cData[100];
|
|
|
|
guint32 u32ArraySize;
|
|
|
|
guint32 u32VariableOffset;
|
|
|
|
guint32 u32Data;
|
|
|
|
guint16 u16Data;
|
|
|
|
guint8 u8Data;
|
|
|
|
guint16 u16Locks;
|
|
|
|
guint16 u16VarType;
|
|
|
|
proto_item *sub_item;
|
|
|
|
proto_tree *sub_tree;
|
|
|
|
guint32 u32SubStart;
|
|
|
|
guint32 u32TmpOffset;
|
|
|
|
|
|
|
|
proto_item *feature_item;
|
|
|
|
proto_tree *feature_tree;
|
|
|
|
|
|
|
|
|
|
|
|
/* XXX: which alignment do we need here? */
|
|
|
|
|
|
|
|
sub_item = proto_tree_add_item(tree, hf_dcom_safearray, tvb, offset, 0, FALSE);
|
|
|
|
sub_tree = proto_item_add_subtree(sub_item, ett_dcom_safearray);
|
|
|
|
u32SubStart = offset;
|
|
|
|
|
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep, &u32Pointer);
|
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep, &u32Pointer);
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_sa_dims32, &u32Dims);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_sa_dims16, &u16Dims);
|
|
|
|
|
|
|
|
/* feature flags */
|
2010-04-16 14:48:30 +00:00
|
|
|
u32TmpOffset = dissect_dcom_WORD(tvb, offset, pinfo, NULL, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_sa_features, &u16Features);
|
2008-10-20 20:51:04 +00:00
|
|
|
feature_item = proto_tree_add_uint (sub_tree, hf_dcom_sa_features, tvb, offset, 2, u16Features);
|
|
|
|
feature_tree = proto_item_add_subtree (feature_item, ett_dcom_sa_features);
|
|
|
|
if (feature_tree) {
|
|
|
|
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_variant, tvb, offset, 2, u16Features);
|
|
|
|
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_dispatch, tvb, offset, 2, u16Features);
|
|
|
|
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_unknown, tvb, offset, 2, u16Features);
|
|
|
|
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_bstr, tvb, offset, 2, u16Features);
|
|
|
|
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_have_vartype, tvb, offset, 2, u16Features);
|
|
|
|
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_have_iid, tvb, offset, 2, u16Features);
|
|
|
|
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_record, tvb, offset, 2, u16Features);
|
|
|
|
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_fixedsize, tvb, offset, 2, u16Features);
|
|
|
|
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_embedded, tvb, offset, 2, u16Features);
|
|
|
|
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_static, tvb, offset, 2, u16Features);
|
|
|
|
proto_tree_add_boolean (feature_tree, hf_dcom_sa_features_auto, tvb, offset, 2, u16Features);
|
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
offset = u32TmpOffset;
|
2010-04-16 14:48:30 +00:00
|
|
|
|
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_sa_element_size, &u32ElementSize);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_sa_locks, &u16Locks);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_sa_vartype16, &u16VarType);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_sa_vartype32, &u32VarType);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_sa_elements, &u32Elements);
|
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep, &u32Pointer);
|
2007-03-22 22:41:16 +00:00
|
|
|
|
2009-10-05 16:40:38 +00:00
|
|
|
u32BoundElements = 0;
|
2007-03-22 22:41:16 +00:00
|
|
|
while(u32Dims--) {
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2007-03-22 22:41:16 +00:00
|
|
|
hf_dcom_sa_bound_elements, &u32BoundElements);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2007-03-22 22:41:16 +00:00
|
|
|
hf_dcom_sa_low_bound, &u32LowBound);
|
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, sub_tree, drep, &u32ArraySize);
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
tvb_ensure_bytes_exist(tvb, offset, u32ArraySize * u32ElementSize);
|
2004-12-19 13:46:09 +00:00
|
|
|
u32VariableOffset = offset + u32ArraySize * u32ElementSize;
|
|
|
|
|
2007-02-06 01:33:39 +00:00
|
|
|
if(sacb) {
|
2008-10-20 20:51:04 +00:00
|
|
|
sacb(tvb, offset, pinfo, tree, drep, u32VarType, u32ArraySize);
|
2007-02-06 01:33:39 +00:00
|
|
|
}
|
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
while(u32ArraySize--) {
|
|
|
|
switch(u32VarType) {
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_ERROR):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
&u32Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_I1):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_BYTE(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_i1, &u8Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_I2):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_i2, &u16Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_I4):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_i4, &u32Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_I8):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_I8(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_i8, NULL);
|
2008-10-20 20:51:04 +00:00
|
|
|
/* take care of the 8 byte alignment */
|
|
|
|
u32VariableOffset = offset;
|
2004-12-19 13:46:09 +00:00
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_BSTR):
|
2004-12-19 13:46:09 +00:00
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep, &u32Pointer);
|
|
|
|
if (u32Pointer) {
|
2010-04-16 14:48:30 +00:00
|
|
|
u32VariableOffset = dissect_dcom_BSTR(tvb, u32VariableOffset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_bstr, cData, sizeof(cData) );
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
/* XXX: other types possible, but still not implemented:
|
|
|
|
VT_UNKNOWN
|
|
|
|
VT_DISPATCH
|
|
|
|
VT_VARIANT
|
|
|
|
VT_RECORD
|
|
|
|
VT_UNKNOWN|VT_RESERVED
|
|
|
|
*/
|
2010-04-16 14:48:30 +00:00
|
|
|
u32VariableOffset = dissect_dcom_tobedone_data(tvb, u32VariableOffset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
10000);
|
|
|
|
}
|
2008-10-20 20:51:04 +00:00
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* update subtree header */
|
|
|
|
proto_item_append_text(sub_item, ": Elements: %u/%u VarType: %s",
|
|
|
|
u32Elements, u32BoundElements,
|
|
|
|
val_to_str(u32VarType, dcom_variant_type_vals, "Unknown (0x%08x)") );
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
proto_item_set_len(sub_item, u32VariableOffset - u32SubStart);
|
|
|
|
|
|
|
|
return u32VariableOffset;
|
|
|
|
}
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
int
|
2010-04-16 14:48:30 +00:00
|
|
|
dissect_dcom_VARTYPE(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
2004-12-19 13:46:09 +00:00
|
|
|
proto_tree *tree, guint8 *drep,
|
|
|
|
guint16 *pu16VarType)
|
|
|
|
{
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_variant_type, pu16VarType);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int
|
2010-04-16 14:48:30 +00:00
|
|
|
dissect_dcom_VARIANT(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
2004-12-19 13:46:09 +00:00
|
|
|
proto_tree *tree, guint8 *drep, int hfindex)
|
|
|
|
{
|
|
|
|
guint32 u32Size;
|
|
|
|
guint32 u32RPCRes;
|
|
|
|
guint16 u16Res;
|
|
|
|
guint32 u32SubStart;
|
|
|
|
proto_item *sub_item;
|
|
|
|
proto_tree *sub_tree;
|
|
|
|
guint16 u16VarType;
|
|
|
|
guint32 u32VarType;
|
|
|
|
|
|
|
|
guint8 u8Data;
|
|
|
|
guint16 u16Data;
|
|
|
|
guint32 u32Data;
|
|
|
|
gchar cData[500];
|
|
|
|
guint32 u32Pointer;
|
2008-10-20 20:51:04 +00:00
|
|
|
gfloat f32Data;
|
|
|
|
gdouble f64Data;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
/* alignment of 8 needed for a VARIANT */
|
2008-10-20 20:51:04 +00:00
|
|
|
if (offset % 8) {
|
|
|
|
offset += 8 - (offset % 8);
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub_item = proto_tree_add_item(tree, hfindex, tvb, offset, 0, FALSE);
|
|
|
|
sub_tree = proto_item_add_subtree(sub_item, ett_dcom_variant);
|
|
|
|
u32SubStart = offset;
|
|
|
|
|
|
|
|
/* the following size can be VERY confusing:
|
|
|
|
* It is NOT the maximum size of the variant, as one could expect,
|
|
|
|
* but the current size of the variant padded to 8 bytes.
|
|
|
|
* BUT: The following data does not start AFTER this padding,
|
|
|
|
* it starts just after the variant-data (without padding)!!! */
|
|
|
|
/* Conclusion: the size given here can be LONGER than the actual size */
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_variant_size, &u32Size);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_variant_rpc_res, &u32RPCRes);
|
|
|
|
offset = dissect_dcom_VARTYPE(tvb, offset, pinfo, sub_tree, drep,
|
|
|
|
&u16VarType);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_variant_wres, &u16Res);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_variant_wres, &u16Res);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_variant_wres, &u16Res);
|
|
|
|
|
|
|
|
/* 32 bit VarType (slightly different to the 16 bit one) */
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_variant_type32, &u32VarType);
|
|
|
|
|
2006-05-21 04:49:01 +00:00
|
|
|
if (u32VarType & WIRESHARK_VT_BYREF) {
|
|
|
|
u32VarType &=~WIRESHARK_VT_BYREF;
|
2004-12-19 13:46:09 +00:00
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep, &u32Pointer);
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (u32VarType) {
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_EMPTY):
|
2004-12-19 13:46:09 +00:00
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_BOOL):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_VARIANT_BOOL(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_bool, &u16Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_I1):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_BYTE(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_i1, &u8Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_UI1):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_BYTE(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_ui1, &u8Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_I2):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_i2, &u16Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_UI2):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_ui2, &u16Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_I4):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_i4, &u32Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_UI4):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_ui4, &u32Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_R4):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_FLOAT(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_r4, &f32Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_R8):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DOUBLE(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_r8, &f64Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_DATE):
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DATE(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_date, &f64Data);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_BSTR):
|
2004-12-19 13:46:09 +00:00
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep, &u32Pointer);
|
|
|
|
if (u32Pointer) {
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_BSTR(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_vt_bstr, cData, sizeof(cData) );
|
|
|
|
}
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_DISPATCH):
|
2006-03-17 21:41:56 +00:00
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep, &u32Pointer);
|
|
|
|
if (u32Pointer) {
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_MInterfacePointer(tvb, offset, pinfo, sub_tree, drep,
|
2006-08-11 19:15:12 +00:00
|
|
|
hf_dcom_vt_dispatch, NULL); /* XXX - how to handle this? */
|
2006-03-17 21:41:56 +00:00
|
|
|
}
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_ARRAY):
|
2004-12-19 13:46:09 +00:00
|
|
|
offset = dissect_dcom_SAFEARRAY(tvb, offset, pinfo, sub_tree, drep,
|
2007-02-06 01:33:39 +00:00
|
|
|
0, NULL);
|
2004-12-19 13:46:09 +00:00
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_ERROR):
|
2004-12-19 13:46:09 +00:00
|
|
|
offset = dissect_dcom_HRESULT(tvb, offset, pinfo, sub_tree, drep,
|
|
|
|
0);
|
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_VARIANT):
|
2006-03-17 21:41:56 +00:00
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep, &u32Pointer);
|
|
|
|
if (u32Pointer) {
|
|
|
|
offset = dissect_dcom_VARIANT(tvb, offset, pinfo, sub_tree, drep,
|
|
|
|
hf_dcom_vt_byref /* must be BYREF */);
|
2008-10-20 20:51:04 +00:00
|
|
|
}
|
2006-03-17 21:41:56 +00:00
|
|
|
break;
|
2006-05-21 04:49:01 +00:00
|
|
|
case(WIRESHARK_VT_UNKNOWN):
|
2004-12-19 13:46:09 +00:00
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, sub_tree, drep, &u32Pointer);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
/* XXX: add more types here! */
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_tobedone_data(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
10000);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* update subtree header */
|
|
|
|
proto_item_append_text(sub_item, ": %s",
|
|
|
|
val_to_str(u16VarType, dcom_variant_type_vals, "Unknown (0x%08x)") );
|
|
|
|
|
|
|
|
proto_item_set_len(sub_item, offset - u32SubStart);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-08-16 23:13:26 +00:00
|
|
|
int
|
|
|
|
dissect_dcom_UUID(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree, guint8 *drep,
|
|
|
|
int hfindex, e_uuid_t *pdata)
|
|
|
|
{
|
|
|
|
const gchar *uuid_name;
|
2008-10-20 20:51:04 +00:00
|
|
|
header_field_info *hfi;
|
|
|
|
e_uuid_t uuid;
|
2006-08-16 23:13:26 +00:00
|
|
|
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* get the UUID, but don't put it into the tree */
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_ndr_uuid_t(tvb, offset, pinfo, NULL, drep,
|
2006-08-16 23:13:26 +00:00
|
|
|
hfindex, &uuid);
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* add to the tree */
|
|
|
|
hfi = proto_registrar_get_nth(hfindex);
|
|
|
|
uuid_name = guids_get_uuid_name(&uuid);
|
|
|
|
if(uuid_name) {
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_tree_add_guid_format(tree, hfindex, tvb, offset-16, 16, (e_guid_t *) &uuid,
|
|
|
|
"%s: %s (%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x)",
|
|
|
|
hfi->name, uuid_name,
|
2006-08-17 19:09:41 +00:00
|
|
|
uuid.Data1, uuid.Data2, uuid.Data3,
|
|
|
|
uuid.Data4[0], uuid.Data4[1],
|
|
|
|
uuid.Data4[2], uuid.Data4[3],
|
|
|
|
uuid.Data4[4], uuid.Data4[5],
|
|
|
|
uuid.Data4[6], uuid.Data4[7]);
|
2008-10-20 20:51:04 +00:00
|
|
|
} else {
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_tree_add_guid_format(tree, hfindex, tvb, offset-16, 16, (e_guid_t *) &uuid,
|
2006-08-17 19:09:41 +00:00
|
|
|
"%s: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
|
|
|
hfi->name,
|
2006-08-16 23:13:26 +00:00
|
|
|
uuid.Data1, uuid.Data2, uuid.Data3,
|
|
|
|
uuid.Data4[0], uuid.Data4[1],
|
|
|
|
uuid.Data4[2], uuid.Data4[3],
|
|
|
|
uuid.Data4[4], uuid.Data4[5],
|
|
|
|
uuid.Data4[6], uuid.Data4[7]);
|
2008-10-20 20:51:04 +00:00
|
|
|
}
|
2006-08-16 23:13:26 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if(pdata != NULL) {
|
|
|
|
*pdata = uuid;
|
|
|
|
}
|
2006-08-16 23:13:26 +00:00
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
int
|
|
|
|
dissect_dcom_append_UUID(tvbuff_t *tvb, int offset,
|
|
|
|
packet_info *pinfo, proto_tree *tree, guint8 *drep,
|
2006-08-16 23:13:26 +00:00
|
|
|
int hfindex, int field_index, e_uuid_t *uuid)
|
2004-12-19 13:46:09 +00:00
|
|
|
{
|
2005-07-24 19:01:28 +00:00
|
|
|
const gchar *uuid_name;
|
2008-10-20 20:51:04 +00:00
|
|
|
proto_item *pi;
|
|
|
|
header_field_info *hfi;
|
2006-08-16 23:13:26 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* XXX - this is far from being performance optimized! */
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* get the UUID, but don't put it into the tree */
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_ndr_uuid_t(tvb, offset, pinfo, NULL, drep,
|
2006-08-11 19:15:12 +00:00
|
|
|
hfindex, uuid);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2006-08-16 23:13:26 +00:00
|
|
|
/* look for a registered uuid name */
|
2008-10-20 20:51:04 +00:00
|
|
|
uuid_name = guids_get_uuid_name(uuid);
|
2006-08-16 23:13:26 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* add to the tree */
|
|
|
|
hfi = proto_registrar_get_nth(hfindex);
|
2006-08-16 23:13:26 +00:00
|
|
|
pi = proto_tree_add_guid_format(tree, hfindex, tvb, offset-16, 16, (e_guid_t *) uuid, "%s", hfi->name);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if (field_index != -1) {
|
|
|
|
proto_item_append_text(pi, "[%u]: ", field_index);
|
|
|
|
} else {
|
|
|
|
proto_item_append_text(pi, ": ");
|
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if(uuid_name) {
|
|
|
|
proto_item_append_text(pi, "%s (", uuid_name);
|
|
|
|
}
|
2006-08-16 23:13:26 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
proto_item_append_text(pi, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
2006-08-16 23:13:26 +00:00
|
|
|
uuid->Data1, uuid->Data2, uuid->Data3,
|
|
|
|
uuid->Data4[0], uuid->Data4[1],
|
|
|
|
uuid->Data4[2], uuid->Data4[3],
|
|
|
|
uuid->Data4[4], uuid->Data4[5],
|
|
|
|
uuid->Data4[6], uuid->Data4[7]);
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if(uuid_name) {
|
|
|
|
proto_item_append_text(pi, ")");
|
|
|
|
}
|
2006-08-16 23:13:26 +00:00
|
|
|
|
|
|
|
/* update column info now */
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)) {
|
2004-12-19 13:46:09 +00:00
|
|
|
if (field_index != -1) {
|
2010-04-16 14:48:30 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " %s[%u]=%s",
|
2006-08-16 23:13:26 +00:00
|
|
|
hfi->name, field_index, (uuid_name) ? uuid_name : "???");
|
2004-12-19 13:46:09 +00:00
|
|
|
} else {
|
2010-04-16 14:48:30 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " %s=%s",
|
2006-08-16 23:13:26 +00:00
|
|
|
hfi->name, (uuid_name) ? uuid_name : "???");
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-06-13 18:18:53 +00:00
|
|
|
/* get a wide character string from tvb (zero terminated or limited through inLength) */
|
|
|
|
/* the string will be converted to ASCII if possible or simple hexdump otherwise */
|
|
|
|
/* outLength is in output bytes including zero termination output */
|
2005-07-30 01:01:02 +00:00
|
|
|
static int
|
2006-06-13 18:18:53 +00:00
|
|
|
dcom_tvb_get_nwstringz0(tvbuff_t *tvb, gint offset, guint32 inLength, gchar *pszStr, guint32 outLength, gboolean *isPrintable)
|
2004-12-19 13:46:09 +00:00
|
|
|
{
|
|
|
|
guint32 u32Idx;
|
2006-06-13 18:18:53 +00:00
|
|
|
guint32 u32IdxA;
|
|
|
|
guint32 u32IdxW;
|
|
|
|
|
|
|
|
guint8 u8Tmp1;
|
|
|
|
guint8 u8Tmp2;
|
|
|
|
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
*isPrintable = TRUE;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* we must have at least the space for the zero termination */
|
2006-06-13 18:18:53 +00:00
|
|
|
DISSECTOR_ASSERT(outLength >= 1);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2006-06-13 18:18:53 +00:00
|
|
|
/* determine length and printablility of the string */
|
|
|
|
for(u32Idx = 0; u32Idx < inLength-1; u32Idx+=2) {
|
|
|
|
/* the marshalling direction of a WCHAR is fixed! */
|
|
|
|
u8Tmp1 = tvb_get_guint8(tvb, offset+u32Idx);
|
|
|
|
u8Tmp2 = tvb_get_guint8(tvb, offset+u32Idx+1);
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* is this the zero termination? */
|
2006-06-13 18:18:53 +00:00
|
|
|
if (u8Tmp1 == 0 && u8Tmp2 == 0) {
|
2008-10-20 20:51:04 +00:00
|
|
|
u32Idx+=2;
|
2004-12-19 13:46:09 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* is this character printable? */
|
|
|
|
/* XXX - there are probably more printable chars than isprint() */
|
|
|
|
if(!isprint(u8Tmp1) || u8Tmp2 != 0) {
|
|
|
|
*isPrintable = FALSE;
|
|
|
|
}
|
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* u32Idx now contains the string length in bytes */
|
|
|
|
/* (including optional zero termination) */
|
|
|
|
|
|
|
|
/* if this is a printable string? */
|
|
|
|
if(*isPrintable == TRUE) {
|
|
|
|
/* convert to ascii (every "2nd char") */
|
|
|
|
/* XXX - is it possible to convert to UTF8, so the output functions work with it? */
|
|
|
|
for(u32IdxA = 0, u32IdxW = 0;
|
|
|
|
u32IdxW < u32Idx && u32IdxA < outLength-2;
|
|
|
|
u32IdxW+=2, u32IdxA++) {
|
|
|
|
pszStr[u32IdxA] = tvb_get_guint8(tvb, offset+u32IdxW);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
/* convert to hexdump */
|
2010-04-16 14:48:30 +00:00
|
|
|
for(u32IdxA = 0, u32IdxW = 0;
|
2008-10-20 20:51:04 +00:00
|
|
|
u32IdxW < u32Idx && u32IdxA < outLength-2;
|
|
|
|
u32IdxW++, u32IdxA+=2) {
|
|
|
|
g_snprintf(&pszStr[u32IdxA], 3, "%02X", tvb_get_guint8(tvb, offset+u32IdxW));
|
|
|
|
}
|
|
|
|
}
|
2006-06-13 18:18:53 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* zero terminate the string, space must be available */
|
2006-06-13 18:18:53 +00:00
|
|
|
DISSECTOR_ASSERT(u32IdxA < outLength);
|
2008-10-20 20:51:04 +00:00
|
|
|
pszStr[u32IdxA] = 0;
|
2006-06-13 18:18:53 +00:00
|
|
|
|
|
|
|
return offset + u32Idx;
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect a LPWSTR into a given buffer */
|
|
|
|
/* use FT_STRING for hfindex */
|
|
|
|
/* u32MaxStr is maximum length of string (including trailing zero) */
|
|
|
|
int
|
|
|
|
dissect_dcom_indexed_LPWSTR(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, guint8 *drep, int hfindex,
|
|
|
|
gchar *pszStr, guint32 u32MaxStr, int field_index)
|
|
|
|
{
|
|
|
|
guint32 u32MaxCount;
|
|
|
|
guint32 u32Offset;
|
|
|
|
guint32 u32ArraySize;
|
|
|
|
guint32 u32StrStart;
|
|
|
|
proto_item *sub_item;
|
|
|
|
proto_tree *sub_tree;
|
|
|
|
guint32 u32SubStart;
|
2008-10-20 20:51:04 +00:00
|
|
|
gboolean isPrintable;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* alignment of 4 needed */
|
2008-10-20 20:51:04 +00:00
|
|
|
if (offset % 4) {
|
|
|
|
offset += 4 - (offset % 4);
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* add subtree item */
|
2004-12-19 13:46:09 +00:00
|
|
|
sub_item = proto_tree_add_string(tree, hfindex, tvb, offset, 0, "");
|
|
|
|
sub_tree = proto_item_add_subtree(sub_item, ett_dcom_lpwstr);
|
|
|
|
u32SubStart = offset;
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_max_count, &u32MaxCount);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_offset, &u32Offset);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
&u32ArraySize);
|
|
|
|
|
|
|
|
u32StrStart = offset;
|
2008-10-20 20:51:04 +00:00
|
|
|
offset = dcom_tvb_get_nwstringz0(tvb, offset, u32ArraySize*2, pszStr, u32MaxStr, &isPrintable);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
proto_tree_add_string(sub_tree, hfindex, tvb, u32StrStart, offset - u32StrStart, pszStr);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
/* update subtree header */
|
2004-12-19 13:46:09 +00:00
|
|
|
if (field_index != -1) {
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_item_set_text(sub_item, "%s[%u]: %s%s%s",
|
2004-12-19 13:46:09 +00:00
|
|
|
proto_registrar_get_name(hfindex),
|
2010-04-16 14:48:30 +00:00
|
|
|
field_index,
|
2008-10-20 20:51:04 +00:00
|
|
|
isPrintable ? "\"" : "", pszStr, isPrintable ? "\"" : "");
|
2004-12-19 13:46:09 +00:00
|
|
|
} else {
|
2006-06-13 18:18:53 +00:00
|
|
|
proto_item_append_text(sub_item, "%s%s%s",
|
2008-10-20 20:51:04 +00:00
|
|
|
isPrintable ? "\"" : "", pszStr, isPrintable ? "\"" : "");
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|
|
|
|
proto_item_set_len(sub_item, offset - u32SubStart);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
dissect_dcom_LPWSTR(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, guint8 *drep, int hfindex,
|
|
|
|
gchar *pszStr, guint32 u32MaxStr)
|
|
|
|
{
|
2010-04-16 14:48:30 +00:00
|
|
|
|
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
return dissect_dcom_indexed_LPWSTR(tvb, offset, pinfo, tree, drep,
|
|
|
|
hfindex, pszStr, u32MaxStr, -1);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect a BSTR to tree and into a given buffer (use FT_STRING for hfindex) */
|
|
|
|
/* u32MaxStr is maximum length of string (including trailing zero) */
|
|
|
|
/* (Hint: the BSTR space is always as long as the maximum size) */
|
|
|
|
int
|
|
|
|
dissect_dcom_BSTR(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
|
|
|
proto_tree *tree, guint8 *drep, int hfindex,
|
|
|
|
gchar *pszStr, guint32 u32MaxStr)
|
|
|
|
{
|
|
|
|
guint32 u32MaxCount;
|
|
|
|
guint32 u32ArraySize;
|
|
|
|
guint32 u32StrStart;
|
|
|
|
proto_item *sub_item;
|
|
|
|
proto_tree *sub_tree;
|
|
|
|
guint32 u32SubStart;
|
|
|
|
guint32 u32ByteLength;
|
|
|
|
guint32 u32RealOffset;
|
2008-10-20 20:51:04 +00:00
|
|
|
gboolean isPrintable;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
/* alignment of 4 needed */
|
2008-10-20 20:51:04 +00:00
|
|
|
if (offset % 4) {
|
|
|
|
offset += 4 - (offset % 4);
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* add subtree item */
|
|
|
|
sub_item = proto_tree_add_string(tree, hfindex, tvb, offset, 0, "");
|
|
|
|
sub_tree = proto_item_add_subtree(sub_item, ett_dcom_lpwstr);
|
|
|
|
u32SubStart = offset;
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_max_count, &u32MaxCount);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_byte_length, &u32ByteLength);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
&u32ArraySize);
|
|
|
|
|
|
|
|
u32RealOffset = offset + u32ArraySize*2;
|
|
|
|
|
|
|
|
u32StrStart = offset;
|
2008-10-20 20:51:04 +00:00
|
|
|
offset = dcom_tvb_get_nwstringz0(tvb, offset, u32ArraySize*2, pszStr, u32MaxStr, &isPrintable);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2006-06-13 18:18:53 +00:00
|
|
|
proto_tree_add_string(sub_tree, hfindex, tvb, u32StrStart, offset - u32StrStart, pszStr);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
/* update subtree header */
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_item_append_text(sub_item, "%s%s%s",
|
2006-06-13 18:18:53 +00:00
|
|
|
isPrintable ? "\"" : "", pszStr, isPrintable ? "\"" : "");
|
2005-04-30 16:08:29 +00:00
|
|
|
if ((int) (u32RealOffset - u32SubStart) <= 0)
|
2008-10-20 20:51:04 +00:00
|
|
|
THROW(ReportedBoundsError);
|
2004-12-19 13:46:09 +00:00
|
|
|
proto_item_set_len(sub_item, u32RealOffset - u32SubStart);
|
|
|
|
|
|
|
|
return u32RealOffset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect an DUALSTRINGARRAY */
|
|
|
|
int
|
|
|
|
dissect_dcom_DUALSTRINGARRAY(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
2006-08-11 19:15:12 +00:00
|
|
|
proto_tree *tree, guint8 *drep, int hfindex, gchar *ip)
|
2004-12-19 13:46:09 +00:00
|
|
|
{
|
|
|
|
guint16 u16NumEntries;
|
|
|
|
guint16 u16SecurityOffset;
|
|
|
|
gchar szStr[1000];
|
|
|
|
guint32 u32MaxStr = sizeof(szStr);
|
|
|
|
guint32 u32Start;
|
|
|
|
guint16 u16TowerId;
|
|
|
|
guint16 u16SecurityAuthnSvc;
|
|
|
|
guint16 u16SecurityAuthzSvc;
|
|
|
|
proto_item *sub_item;
|
|
|
|
proto_tree *sub_tree;
|
|
|
|
guint32 u32SubStart;
|
|
|
|
guint32 u32StringBindings = 0;
|
|
|
|
guint32 u32SecurityBindings = 0;
|
|
|
|
proto_item *subsub_item;
|
|
|
|
proto_tree *subsub_tree;
|
|
|
|
guint32 u32SubSubStart;
|
2008-10-20 20:51:04 +00:00
|
|
|
gboolean isPrintable;
|
|
|
|
guint32 first_ip = 0;
|
|
|
|
guint32 curr_ip = 0;
|
|
|
|
struct in_addr ipaddr;
|
|
|
|
proto_item *pi;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* add subtree header */
|
|
|
|
sub_item = proto_tree_add_item(tree, hfindex, tvb, offset, 0, FALSE);
|
|
|
|
sub_tree = proto_item_add_subtree(sub_item, ett_dcom_dualstringarray);
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_dualstringarray_num_entries, &u16NumEntries);
|
|
|
|
/* from here, alignment is ok */
|
|
|
|
u32SubStart = offset - 2;
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_dualstringarray_security_offset, &u16SecurityOffset);
|
|
|
|
|
|
|
|
/* STRINGBINDINGs until first wchar zero */
|
|
|
|
while ( tvb_get_ntohs(tvb, offset) ) {
|
|
|
|
u32StringBindings++;
|
|
|
|
|
|
|
|
subsub_item = proto_tree_add_item(sub_tree, hf_dcom_dualstringarray_string, tvb, offset, 0, FALSE);
|
|
|
|
subsub_tree = proto_item_add_subtree(subsub_item, ett_dcom_dualstringarray_binding);
|
|
|
|
u32SubSubStart = offset;
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, subsub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_dualstringarray_string_tower_id, &u16TowerId);
|
|
|
|
u32Start = offset;
|
2006-06-13 18:18:53 +00:00
|
|
|
/* we don't know the (zero terminated) input length, use the buffer length instead */
|
|
|
|
offset = dcom_tvb_get_nwstringz0(tvb, offset, u32MaxStr, szStr, u32MaxStr, &isPrintable);
|
2010-04-16 14:48:30 +00:00
|
|
|
pi = proto_tree_add_string(subsub_tree, hf_dcom_dualstringarray_string_network_addr,
|
2004-12-19 13:46:09 +00:00
|
|
|
tvb, u32Start, offset - u32Start, szStr);
|
|
|
|
|
2006-08-11 19:15:12 +00:00
|
|
|
/* convert ip address (if it is dotted decimal) */
|
|
|
|
/* XXX - this conversion is ugly */
|
2008-10-20 20:51:04 +00:00
|
|
|
if (inet_aton(szStr, &ipaddr)) {
|
|
|
|
if(get_host_ipaddr(szStr, &curr_ip)) {
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
/*expert_add_info_format(pinfo, NULL, PI_UNDECODED, PI_WARN, "DUALSTRINGARRAY: IP:%s",
|
2009-02-14 01:18:11 +00:00
|
|
|
ip_to_str( (guint8 *) &curr_ip));*/
|
2008-10-20 20:51:04 +00:00
|
|
|
|
|
|
|
if(first_ip == 0) {
|
|
|
|
if(ip != NULL) {
|
|
|
|
memcpy(ip, &curr_ip, sizeof(curr_ip));
|
|
|
|
}
|
|
|
|
first_ip = curr_ip;
|
|
|
|
} else {
|
|
|
|
if(first_ip != curr_ip) {
|
2010-04-16 14:48:30 +00:00
|
|
|
expert_add_info_format(pinfo, pi, PI_UNDECODED, PI_NOTE,
|
|
|
|
"DUALSTRINGARRAY: multiple IP's %s %s",
|
2009-02-14 01:18:11 +00:00
|
|
|
ip_to_str( (guint8 *) &first_ip), ip_to_str( (guint8 *) &curr_ip));
|
2008-10-20 20:51:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2006-08-11 19:15:12 +00:00
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_item_append_text(subsub_item, "[%u]: TowerId=%s, NetworkAddr=\"%s\"",
|
|
|
|
u32StringBindings,
|
2006-08-14 23:39:48 +00:00
|
|
|
val_to_str(u16TowerId, dcom_protseq_vals, "Unknown (0x%04x"),
|
2004-12-19 13:46:09 +00:00
|
|
|
szStr);
|
|
|
|
proto_item_set_len(subsub_item, offset - u32SubSubStart);
|
|
|
|
}
|
|
|
|
offset += 2;
|
|
|
|
|
|
|
|
/* SECURITYBINDINGs until first wchar zero */
|
|
|
|
while ( tvb_get_ntohs(tvb, offset) ) {
|
|
|
|
u32SecurityBindings++;
|
|
|
|
|
|
|
|
subsub_item = proto_tree_add_item(sub_tree, hf_dcom_dualstringarray_security, tvb, offset, 0, FALSE);
|
|
|
|
subsub_tree = proto_item_add_subtree(subsub_item, ett_dcom_dualstringarray_binding);
|
|
|
|
u32SubSubStart = offset;
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, subsub_tree, drep,
|
|
|
|
hf_dcom_dualstringarray_security_authn_svc,
|
2004-12-19 13:46:09 +00:00
|
|
|
&u16SecurityAuthnSvc);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_WORD(tvb, offset, pinfo, subsub_tree, drep,
|
|
|
|
hf_dcom_dualstringarray_security_authz_svc,
|
2004-12-19 13:46:09 +00:00
|
|
|
&u16SecurityAuthzSvc);
|
|
|
|
|
|
|
|
u32Start = offset;
|
2006-06-13 18:18:53 +00:00
|
|
|
/* we don't know the (zero terminated) input length, use the buffer length instead */
|
|
|
|
offset = dcom_tvb_get_nwstringz0(tvb, offset, u32MaxStr, szStr, u32MaxStr, &isPrintable);
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_tree_add_string(subsub_tree, hf_dcom_dualstringarray_security_princ_name,
|
2004-12-19 13:46:09 +00:00
|
|
|
tvb, u32Start, offset - u32Start, szStr);
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_item_append_text(subsub_item, "[%u]: AuthnSvc=0x%04x, AuthzSvc=0x%04x, PrincName=\"%s\"",
|
2004-12-19 13:46:09 +00:00
|
|
|
u32SecurityBindings, u16SecurityAuthnSvc, u16SecurityAuthzSvc, szStr);
|
|
|
|
proto_item_set_len(subsub_item, offset - u32SubSubStart);
|
|
|
|
}
|
|
|
|
offset += 2;
|
|
|
|
|
|
|
|
/* append info to subtree header */
|
|
|
|
proto_item_append_text(sub_item, ": STRINGBINDINGs=%u, SECURITYBINDINGs=%u",
|
|
|
|
u32StringBindings, u32SecurityBindings);
|
|
|
|
proto_item_set_len(sub_item, offset - u32SubStart);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect an STDOBJREF */
|
|
|
|
int
|
|
|
|
dissect_dcom_STDOBJREF(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
2010-04-16 14:48:30 +00:00
|
|
|
proto_tree *tree, guint8 *drep, int hfindex _U_,
|
2006-08-11 19:15:12 +00:00
|
|
|
guint64 *oxid, guint64 *oid, e_uuid_t *ipid)
|
2004-12-19 13:46:09 +00:00
|
|
|
{
|
|
|
|
guint32 u32Flags;
|
|
|
|
guint32 u32PublicRefs;
|
|
|
|
proto_item *sub_item;
|
|
|
|
proto_tree *sub_tree;
|
|
|
|
guint32 u32SubStart;
|
|
|
|
|
|
|
|
|
|
|
|
/* add subtree header */
|
|
|
|
sub_item = proto_tree_add_item(tree, hf_dcom_stdobjref, tvb, offset, 0, FALSE);
|
|
|
|
sub_tree = proto_item_add_subtree(sub_item, ett_dcom_stdobjref);
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_stdobjref_flags, &u32Flags);
|
|
|
|
/* from here, alignment is ok */
|
|
|
|
u32SubStart = offset - 4;
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_stdobjref_public_refs, &u32PublicRefs);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_ID(tvb, offset, pinfo, sub_tree, drep,
|
2006-08-11 19:15:12 +00:00
|
|
|
hf_dcom_oxid, oxid);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_ID(tvb, offset, pinfo, sub_tree, drep,
|
2006-08-11 19:15:12 +00:00
|
|
|
hf_dcom_oid, oid);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_UUID(tvb, offset, pinfo, sub_tree, drep,
|
2006-08-11 19:15:12 +00:00
|
|
|
hf_dcom_ipid, ipid);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
/* append info to subtree header */
|
|
|
|
proto_item_append_text(sub_item, ": PublicRefs=%u IPID=%s",
|
2006-08-17 19:09:41 +00:00
|
|
|
u32PublicRefs, guids_resolve_uuid_to_str(ipid));
|
2004-12-19 13:46:09 +00:00
|
|
|
proto_item_set_len(sub_item, offset - u32SubStart);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect an OBJREF */
|
|
|
|
int
|
|
|
|
dissect_dcom_OBJREF(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
2006-08-11 19:15:12 +00:00
|
|
|
proto_tree *tree, guint8 *drep, int hfindex, dcom_interface_t **interf)
|
2004-12-19 13:46:09 +00:00
|
|
|
{
|
|
|
|
guint32 u32Signature;
|
|
|
|
guint32 u32Flags;
|
|
|
|
e_uuid_t iid;
|
|
|
|
e_uuid_t clsid;
|
|
|
|
proto_item *sub_item;
|
|
|
|
proto_tree *sub_tree;
|
|
|
|
guint32 u32SubStart;
|
2006-06-28 18:51:24 +00:00
|
|
|
guint32 u32CBExtension;
|
|
|
|
guint32 u32Size;
|
2008-10-20 20:51:04 +00:00
|
|
|
guint64 oxid;
|
|
|
|
guint64 oid;
|
|
|
|
e_uuid_t ipid;
|
|
|
|
dcom_interface_t *dcom_if = NULL;
|
|
|
|
gchar ip[4];
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* add subtree header */
|
|
|
|
sub_item = proto_tree_add_item(tree, hf_dcom_objref, tvb, offset, 0, FALSE);
|
|
|
|
sub_tree = proto_item_add_subtree(sub_item, ett_dcom_objref);
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_objref_signature, &u32Signature);
|
|
|
|
/* from here, alignment is ok */
|
|
|
|
u32SubStart = offset - 4;
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_objref_flags, &u32Flags);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_UUID(tvb, offset, pinfo, sub_tree, drep,
|
2006-08-11 19:15:12 +00:00
|
|
|
hf_dcom_iid, &iid);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
switch(u32Flags) {
|
|
|
|
case(0x1): /* standard */
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_STDOBJREF(tvb, offset, pinfo, sub_tree, drep, hfindex,
|
2008-10-20 20:51:04 +00:00
|
|
|
&oxid, &oid, &ipid);
|
2004-12-19 13:46:09 +00:00
|
|
|
offset = dissect_dcom_DUALSTRINGARRAY(tvb, offset, pinfo, sub_tree, drep,
|
2006-08-11 19:15:12 +00:00
|
|
|
hf_dcom_objref_resolver_address, ip);
|
2004-12-19 13:46:09 +00:00
|
|
|
break;
|
|
|
|
case(0x2): /* handler (untested) */
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_STDOBJREF(tvb, offset, pinfo, sub_tree, drep, hfindex,
|
2008-10-20 20:51:04 +00:00
|
|
|
&oxid, &oid, &iid);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_UUID(tvb, offset, pinfo, sub_tree, drep,
|
2006-08-11 19:15:12 +00:00
|
|
|
hf_dcom_clsid, &clsid);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DUALSTRINGARRAY(tvb, offset, pinfo, sub_tree, drep,
|
2006-08-11 19:15:12 +00:00
|
|
|
hf_dcom_objref_resolver_address, ip);
|
2004-12-19 13:46:09 +00:00
|
|
|
break;
|
2006-06-28 18:51:24 +00:00
|
|
|
case(0x4): /* custom */
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_UUID(tvb, offset, pinfo, sub_tree, drep,
|
2006-08-11 19:15:12 +00:00
|
|
|
hf_dcom_clsid, &clsid);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2008-10-20 20:51:04 +00:00
|
|
|
hf_dcom_objref_cbextension, &u32CBExtension);
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2008-10-20 20:51:04 +00:00
|
|
|
hf_dcom_objref_size, &u32Size);
|
|
|
|
/* the following data depends on the CLSID, no docs available on this */
|
2006-09-07 20:30:48 +00:00
|
|
|
offset = dissect_dcom_nospec_data(tvb, offset, pinfo, sub_tree, drep, u32Size);
|
2004-12-19 13:46:09 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if(u32Flags == 0x1 || u32Flags == 0x2) {
|
|
|
|
/* add interface instance to database (we currently only handle IPv4) */
|
|
|
|
if(pinfo->net_src.type == AT_IPv4) {
|
2010-04-16 14:48:30 +00:00
|
|
|
dcom_if = dcom_interface_new(pinfo,
|
2009-02-14 01:18:11 +00:00
|
|
|
(guint8 *) ip,
|
2008-10-20 20:51:04 +00:00
|
|
|
&iid, oxid, oid, &ipid);
|
|
|
|
}
|
|
|
|
}
|
2006-08-11 19:15:12 +00:00
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
if(interf != NULL) {
|
|
|
|
*interf = dcom_if;
|
|
|
|
}
|
2006-08-11 19:15:12 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
/* append info to subtree header */
|
|
|
|
proto_item_set_len(sub_item, offset - u32SubStart);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect an MInterfacePointer */
|
|
|
|
int
|
|
|
|
dissect_dcom_MInterfacePointer(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
2006-08-11 19:15:12 +00:00
|
|
|
proto_tree *tree, guint8 *drep, int hfindex, dcom_interface_t **interf)
|
2004-12-19 13:46:09 +00:00
|
|
|
{
|
|
|
|
guint32 u32CntData;
|
|
|
|
guint32 u32ArraySize;
|
|
|
|
proto_item *sub_item;
|
|
|
|
proto_tree *sub_tree;
|
|
|
|
guint32 u32SubStart;
|
|
|
|
|
|
|
|
|
|
|
|
if (!hfindex) {
|
|
|
|
hfindex = hf_dcom_interface_pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* add subtree header */
|
|
|
|
sub_item = proto_tree_add_item(tree, hfindex, tvb, offset, 0, FALSE);
|
|
|
|
sub_tree = proto_item_add_subtree(sub_item, ett_dcom_interface_pointer);
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
offset = dissect_dcom_DWORD(tvb, offset, pinfo, sub_tree, drep,
|
2004-12-19 13:46:09 +00:00
|
|
|
hf_dcom_ip_cnt_data, &u32CntData);
|
|
|
|
u32SubStart = offset - 4;
|
|
|
|
|
|
|
|
offset = dissect_dcom_dcerpc_array_size(tvb, offset, pinfo, sub_tree, drep, &u32ArraySize);
|
|
|
|
|
2006-08-11 19:15:12 +00:00
|
|
|
offset = dissect_dcom_OBJREF(tvb, offset, pinfo, sub_tree, drep, hfindex, interf);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
/* append info to subtree header */
|
|
|
|
proto_item_set_len(sub_item, offset - u32SubStart);
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* dissect a pointer to a MInterfacePointer */
|
|
|
|
int
|
|
|
|
dissect_dcom_PMInterfacePointer(tvbuff_t *tvb, gint offset, packet_info *pinfo,
|
2006-08-11 19:15:12 +00:00
|
|
|
proto_tree *tree, guint8 *drep, int hfindex, dcom_interface_t **interf)
|
2004-12-19 13:46:09 +00:00
|
|
|
{
|
|
|
|
guint32 u32Pointer;
|
|
|
|
|
|
|
|
|
|
|
|
offset = dissect_dcom_dcerpc_pointer(tvb, offset, pinfo, tree, drep, &u32Pointer);
|
|
|
|
|
|
|
|
if (u32Pointer) {
|
2006-08-11 19:15:12 +00:00
|
|
|
offset = dissect_dcom_MInterfacePointer(tvb, offset, pinfo, tree, drep, hfindex, interf);
|
2008-10-20 20:51:04 +00:00
|
|
|
} else {
|
|
|
|
if(interf != NULL) {
|
|
|
|
*interf = NULL;
|
|
|
|
}
|
|
|
|
}
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
return offset;
|
|
|
|
}
|
|
|
|
|
2010-02-09 14:43:30 +00:00
|
|
|
static void dcom_reinit( void) {
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2010-02-09 17:48:41 +00:00
|
|
|
if (dcom_machines != NULL) {
|
|
|
|
GList *machines;
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2010-02-09 17:48:41 +00:00
|
|
|
for(machines = dcom_machines; machines != NULL; machines = g_list_next(machines)) {
|
|
|
|
dcom_machine_t *machine = machines->data;
|
|
|
|
|
|
|
|
if (machine->objects != NULL) {
|
|
|
|
GList *objects;
|
|
|
|
for(objects = machine->objects; objects != NULL; objects = g_list_next(objects)) {
|
|
|
|
dcom_object_t *object = objects->data;
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2010-02-09 17:48:41 +00:00
|
|
|
if (object->interfaces != NULL) {
|
2010-04-16 14:48:30 +00:00
|
|
|
GList *interface;
|
|
|
|
for(interface = object->interfaces; interface != NULL; interface = g_list_next(interface)) {
|
|
|
|
g_free(interface->data);
|
|
|
|
interface->data = NULL; /* for good measure */
|
|
|
|
}
|
2010-02-09 17:48:41 +00:00
|
|
|
g_list_free(object->interfaces);
|
|
|
|
object->interfaces = NULL; /* for good measure */
|
|
|
|
}
|
2010-04-16 14:48:30 +00:00
|
|
|
|
|
|
|
g_free(objects->data);
|
|
|
|
objects->data = NULL; /* for good measure */
|
2010-02-09 17:48:41 +00:00
|
|
|
}
|
|
|
|
g_list_free(machine->objects);
|
|
|
|
machine->objects = NULL; /* for good measure */
|
|
|
|
}
|
2010-04-16 14:48:30 +00:00
|
|
|
|
|
|
|
g_free(machines->data);
|
|
|
|
machines->data = NULL; /* for good measure */
|
2010-02-09 17:48:41 +00:00
|
|
|
}
|
|
|
|
g_list_free(dcom_machines);
|
|
|
|
dcom_machines = NULL;
|
|
|
|
}
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
/* The data in dcom_interfaces is se_alloc'd so there's no need to free
|
|
|
|
* the data pointers.
|
|
|
|
*/
|
2010-02-09 17:48:41 +00:00
|
|
|
if (dcom_interfaces != NULL) {
|
|
|
|
g_list_free(dcom_interfaces);
|
|
|
|
dcom_interfaces = NULL;
|
|
|
|
}
|
2006-08-11 19:15:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
void
|
|
|
|
proto_register_dcom (void)
|
|
|
|
{
|
|
|
|
|
|
|
|
static hf_register_info hf_dcom_this_array[] = {
|
|
|
|
{ &hf_dcom_this_version_major,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VersionMajor", "dcom.this.version_major", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_this_version_minor,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VersionMinor", "dcom.this.version_minor", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_this_flags,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Flags", "dcom.this.flags", FT_UINT32, BASE_HEX, VALS(dcom_thisthat_flag_vals), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_this_res,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Reserved", "dcom.this.res", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_this_cid,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Causality ID", "dcom.this.uuid", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL }}
|
2004-12-19 13:46:09 +00:00
|
|
|
};
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
static hf_register_info hf_dcom_that_array[] = {
|
|
|
|
{ &hf_dcom_that_flags,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Flags", "dcom.that.flags", FT_UINT32, BASE_HEX, VALS(dcom_thisthat_flag_vals), 0x0, NULL, HFILL }}
|
2004-12-19 13:46:09 +00:00
|
|
|
};
|
|
|
|
|
2008-10-20 20:51:04 +00:00
|
|
|
static hf_register_info hf_dcom_extent_array[] = {
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_extent,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Extension", "dcom.extent", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_extent_array_count,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Extension Count", "dcom.extent.array_count", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_extent_array_res,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Reserved", "dcom.extent.array_res", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_extent_size,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Extension Size", "dcom.extent.size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_extent_id,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Extension Id", "dcom.extent.id", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL }}
|
2008-10-20 20:51:04 +00:00
|
|
|
};
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
static hf_register_info hf_dcom_array[] = {
|
|
|
|
{ &hf_dcom_version_major,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VersionMajor", "dcom.version_major", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_version_minor,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VersionMinor", "dcom.version_minor", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_hresult,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "HResult", "dcom.hresult", FT_UINT32, BASE_HEX, VALS(dcom_hresult_vals), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_max_count,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "MaxCount", "dcom.max_count", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_offset,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Offset", "dcom.offset", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_byte_length,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "ByteLength", "dcom.byte_length", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_actual_count,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "ActualCount", "dcom.actual_count", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_tobedone,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "To Be Done", "dcom.tobedone", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2006-09-07 20:30:48 +00:00
|
|
|
{ &hf_dcom_nospec,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "No Specification Available", "dcom.nospec", FT_BYTES, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_variant,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Variant", "dcom.variant", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_variant_type,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VarType", "dcom.variant_type", FT_UINT16, BASE_HEX, VALS(dcom_variant_type_vals), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_variant_type32,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VarType32", "dcom.variant_type32", FT_UINT32, BASE_HEX, VALS(dcom_variant_type_vals), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_variant_size,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Size", "dcom.variant_size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_variant_rpc_res,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "RPC-Reserved", "dcom.variant_rpc_res", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_variant_wres,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Reserved", "dcom.variant_wres", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_array_size,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "(ArraySize)", "dcom.array_size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_pointer_val,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "(PointerVal)", "dcom.pointer_val", FT_UINT32, BASE_HEX, VALS(dcom_dcerpc_pointer_vals), 0x0, NULL, HFILL }}
|
2004-12-19 13:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static hf_register_info hf_dcom_interface_pointer_array[] = {
|
|
|
|
{ &hf_dcom_interface_pointer,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "InterfacePointer", "dcom.ifp", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_ip_cnt_data,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "CntData", "dcom.ip_cnt_data", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}
|
2004-12-19 13:46:09 +00:00
|
|
|
};
|
2010-04-16 14:48:30 +00:00
|
|
|
|
2004-12-19 13:46:09 +00:00
|
|
|
static hf_register_info hf_dcom_objref_array[] = {
|
|
|
|
{ &hf_dcom_objref,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "OBJREF", "dcom.objref", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_objref_signature,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Signature", "dcom.objref.signature", FT_UINT32, BASE_HEX, VALS(dcom_objref_signature_vals), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_objref_flags,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Flags", "dcom.objref.flags", FT_UINT32, BASE_HEX, VALS(dcom_objref_flag_vals), 0x0, NULL, HFILL }},
|
2006-08-11 19:15:12 +00:00
|
|
|
{ &hf_dcom_iid,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "IID", "dcom.iid", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2006-08-11 19:15:12 +00:00
|
|
|
{ &hf_dcom_clsid,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "CLSID", "dcom.clsid", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_objref_resolver_address,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "ResolverAddress", "dcom.objref.resolver_address", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2006-06-28 18:51:24 +00:00
|
|
|
{ &hf_dcom_objref_cbextension,
|
|
|
|
{ "CBExtension", "dcom.objref.cbextension", FT_UINT32, BASE_DEC, NULL, 0x0, "Size of extension data", HFILL }},
|
|
|
|
{ &hf_dcom_objref_size,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Size", "dcom.objref.size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}
|
2004-12-19 13:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static hf_register_info hf_dcom_stdobjref_array[] = {
|
|
|
|
{ &hf_dcom_stdobjref,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "STDOBJREF", "dcom.stdobjref", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_stdobjref_flags,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Flags", "dcom.stdobjref.flags", FT_UINT32, BASE_HEX, VALS(dcom_stdobjref_flag_vals), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_stdobjref_public_refs,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "PublicRefs", "dcom.stdobjref.public_refs", FT_UINT32, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
2006-08-11 19:15:12 +00:00
|
|
|
{ &hf_dcom_oxid,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "OXID", "dcom.oxid", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
2006-08-11 19:15:12 +00:00
|
|
|
{ &hf_dcom_oid,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "OID", "dcom.oid", FT_UINT64, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
2006-08-11 19:15:12 +00:00
|
|
|
{ &hf_dcom_ipid,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "IPID", "dcom.ipid", FT_GUID, BASE_NONE, NULL, 0x0, NULL, HFILL }}
|
2004-12-19 13:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static hf_register_info hf_dcom_dualstringarray_array[] = {
|
|
|
|
{ &hf_dcom_dualstringarray_num_entries,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "NumEntries", "dcom.dualstringarray.num_entries", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_dualstringarray_security_offset,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "SecurityOffset", "dcom.dualstringarray.security_offset", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_dualstringarray_string,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "StringBinding", "dcom.dualstringarray.string", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_dualstringarray_string_tower_id,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "TowerId", "dcom.dualstringarray.tower_id", FT_UINT16, BASE_HEX, VALS(dcom_protseq_vals), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_dualstringarray_string_network_addr,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "NetworkAddr", "dcom.dualstringarray.network_addr", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_dualstringarray_security,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "SecurityBinding", "dcom.dualstringarray.security", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_dualstringarray_security_authn_svc,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "AuthnSvc", "dcom.dualstringarray.security_authn_svc", FT_UINT16, BASE_HEX, VALS(dcom_dualstringarray_authn), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_dualstringarray_security_authz_svc,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "AuthzSvc", "dcom.dualstringarray.security_authz_svc", FT_UINT16, BASE_HEX, VALS(dcom_dualstringarray_authz), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_dualstringarray_security_princ_name,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "PrincName", "dcom.dualstringarray.security_princ_name", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}
|
2004-12-19 13:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static hf_register_info hf_dcom_vt_array[] = {
|
|
|
|
{ &hf_dcom_vt_bool,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_BOOL", "dcom.vt.bool", FT_UINT16, BASE_HEX, VALS(dcom_vt_bool_vals), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_vt_i1,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_I1", "dcom.vt.i1", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_vt_i2,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_I2", "dcom.vt.i2", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_vt_i4,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_I4", "dcom.vt.i4", FT_INT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_vt_i8,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_I8", "dcom.vt.i8", FT_INT64, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_vt_ui1,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_UI1", "dcom.vt.ui1", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_vt_ui2,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_UI2", "dcom.vt.ui2", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_vt_ui4,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_UI4", "dcom.vt.ui4", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_vt_r4,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_R4", "dcom.vt.r4", FT_FLOAT, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_vt_r8,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_R8", "dcom.vt.r8", FT_DOUBLE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_vt_date,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_DATE", "dcom.vt.date", FT_DOUBLE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_vt_bstr,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_BSTR", "dcom.vt.bstr", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2006-03-17 21:41:56 +00:00
|
|
|
{ &hf_dcom_vt_byref,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "BYREF", "dcom.vt.byref", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2006-03-17 21:41:56 +00:00
|
|
|
{ &hf_dcom_vt_dispatch,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VT_DISPATCH", "dcom.vt.dispatch", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }}
|
2004-12-19 13:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static hf_register_info hf_dcom_sa_array[] = {
|
|
|
|
{ &hf_dcom_safearray,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "SAFEARRAY", "dcom.sa", FT_NONE, BASE_NONE, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_sa_dims32,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Dims32", "dcom.sa.dims32", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_sa_dims16,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Dims16", "dcom.sa.dims16", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_sa_features,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Features", "dcom.sa.features", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_sa_element_size,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "ElementSize", "dcom.sa.element_size", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_sa_locks,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Locks", "dcom.sa.locks", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_sa_vartype32,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VarType32", "dcom.sa.vartype", FT_UINT32, BASE_DEC, VALS(dcom_variant_type_vals), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_sa_vartype16,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "VarType16", "dcom.sa.vartype", FT_UINT16, BASE_DEC, VALS(dcom_variant_type_vals), 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_sa_elements,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "Elements", "dcom.sa.elements", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_sa_bound_elements,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "BoundElements", "dcom.sa.bound_elements", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
{ &hf_dcom_sa_low_bound,
|
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
|
|
|
{ "LowBound", "dcom.sa.low_bound", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }},
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2008-09-26 17:12:15 +00:00
|
|
|
{ &hf_dcom_sa_features_auto,
|
2009-07-07 14:54:15 +00:00
|
|
|
{ "AUTO", "dcom.sa.features_auto", FT_BOOLEAN, 16, TFS (&tfs_set_notset), WIRESHARK_FADF_AUTO, NULL, HFILL }},
|
2008-09-26 17:12:15 +00:00
|
|
|
{ &hf_dcom_sa_features_static,
|
2009-07-07 14:54:15 +00:00
|
|
|
{ "STATIC", "dcom.sa.features_static", FT_BOOLEAN, 16, TFS (&tfs_set_notset), WIRESHARK_FADF_STATIC, NULL, HFILL }},
|
2008-09-26 17:12:15 +00:00
|
|
|
{ &hf_dcom_sa_features_embedded,
|
2009-07-07 14:54:15 +00:00
|
|
|
{ "EMBEDDED", "dcom.sa.features_embedded", FT_BOOLEAN, 16, TFS (&tfs_set_notset), WIRESHARK_FADF_EMBEDDED, NULL, HFILL }},
|
2008-09-26 17:12:15 +00:00
|
|
|
{ &hf_dcom_sa_features_fixedsize,
|
2009-07-07 14:54:15 +00:00
|
|
|
{ "FIXEDSIZE", "dcom.sa.features_fixedsize", FT_BOOLEAN, 16, TFS (&tfs_set_notset), WIRESHARK_FADF_FIXEDSIZE, NULL, HFILL }},
|
2008-09-26 17:12:15 +00:00
|
|
|
{ &hf_dcom_sa_features_record,
|
2009-07-07 14:54:15 +00:00
|
|
|
{ "RECORD", "dcom.sa.features_record", FT_BOOLEAN, 16, TFS (&tfs_set_notset), WIRESHARK_FADF_RECORD, NULL, HFILL }},
|
2008-09-26 17:12:15 +00:00
|
|
|
{ &hf_dcom_sa_features_have_iid,
|
2009-07-07 14:54:15 +00:00
|
|
|
{ "HAVEIID", "dcom.sa.features_have_iid", FT_BOOLEAN, 16, TFS (&tfs_set_notset), WIRESHARK_FADF_HAVEIID, NULL, HFILL }},
|
2008-09-26 17:12:15 +00:00
|
|
|
{ &hf_dcom_sa_features_have_vartype,
|
2009-07-07 14:54:15 +00:00
|
|
|
{ "HAVEVARTYPE", "dcom.sa.features_have_vartype", FT_BOOLEAN, 16, TFS (&tfs_set_notset), WIRESHARK_FADF_HAVEVARTYPE, NULL, HFILL }},
|
2008-09-26 17:12:15 +00:00
|
|
|
{ &hf_dcom_sa_features_bstr,
|
2009-07-07 14:54:15 +00:00
|
|
|
{ "BSTR", "dcom.sa.features_bstr", FT_BOOLEAN, 16, TFS (&tfs_set_notset), WIRESHARK_FADF_BSTR, NULL, HFILL }},
|
2008-09-26 17:12:15 +00:00
|
|
|
{ &hf_dcom_sa_features_unknown,
|
2009-07-07 14:54:15 +00:00
|
|
|
{ "UNKNOWN", "dcom.sa.features_unknown", FT_BOOLEAN, 16, TFS (&tfs_set_notset), WIRESHARK_FADF_UNKNOWN, NULL, HFILL }},
|
2008-09-26 17:12:15 +00:00
|
|
|
{ &hf_dcom_sa_features_dispatch,
|
2009-07-07 14:54:15 +00:00
|
|
|
{ "DISPATCH", "dcom.sa.features_dispatch", FT_BOOLEAN, 16, TFS (&tfs_set_notset), WIRESHARK_FADF_DISPATCH, NULL, HFILL }},
|
2008-09-26 17:12:15 +00:00
|
|
|
{ &hf_dcom_sa_features_variant,
|
2009-07-07 14:54:15 +00:00
|
|
|
{ "VARIANT", "dcom.sa.features_variant", FT_BOOLEAN, 16, TFS (&tfs_set_notset), WIRESHARK_FADF_VARIANT, NULL, HFILL }}
|
2004-12-19 13:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static gint *ett_dcom[] = {
|
|
|
|
&ett_dcom_this,
|
|
|
|
&ett_dcom_that,
|
2008-10-20 20:51:04 +00:00
|
|
|
&ett_dcom_extent,
|
2004-12-19 13:46:09 +00:00
|
|
|
&ett_dcom_lpwstr,
|
|
|
|
&ett_dcom_interface_pointer,
|
|
|
|
&ett_dcom_objref,
|
|
|
|
&ett_dcom_stdobjref,
|
|
|
|
&ett_dcom_dualstringarray,
|
|
|
|
&ett_dcom_dualstringarray_binding,
|
|
|
|
&ett_dcom_variant,
|
|
|
|
&ett_dcom_safearray,
|
|
|
|
&ett_dcom_sa_features
|
|
|
|
};
|
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
module_t *dcom_module;
|
2004-12-19 13:46:09 +00:00
|
|
|
|
|
|
|
/* currently, the DCOM protocol "itself" has no real protocol dissector */
|
|
|
|
/* we only need this, to register some generic elements */
|
|
|
|
proto_dcom = proto_register_protocol ("DCOM", "DCOM", "dcom");
|
2008-09-26 17:12:15 +00:00
|
|
|
proto_register_field_array(proto_dcom, hf_dcom_this_array, array_length(hf_dcom_this_array));
|
|
|
|
proto_register_field_array(proto_dcom, hf_dcom_that_array, array_length(hf_dcom_that_array));
|
|
|
|
proto_register_field_array(proto_dcom, hf_dcom_extent_array, array_length(hf_dcom_extent_array));
|
|
|
|
proto_register_field_array(proto_dcom, hf_dcom_array, array_length(hf_dcom_array));
|
|
|
|
proto_register_field_array(proto_dcom, hf_dcom_objref_array, array_length(hf_dcom_objref_array));
|
|
|
|
proto_register_field_array(proto_dcom, hf_dcom_stdobjref_array, array_length(hf_dcom_stdobjref_array));
|
|
|
|
proto_register_field_array(proto_dcom, hf_dcom_dualstringarray_array, array_length(hf_dcom_dualstringarray_array));
|
|
|
|
proto_register_field_array(proto_dcom, hf_dcom_interface_pointer_array, array_length(hf_dcom_interface_pointer_array));
|
|
|
|
proto_register_field_array(proto_dcom, hf_dcom_vt_array, array_length(hf_dcom_vt_array));
|
|
|
|
proto_register_field_array(proto_dcom, hf_dcom_sa_array, array_length(hf_dcom_sa_array));
|
2004-12-19 13:46:09 +00:00
|
|
|
proto_register_subtree_array (ett_dcom, array_length (ett_dcom));
|
|
|
|
|
|
|
|
/* preferences */
|
2008-09-26 17:06:44 +00:00
|
|
|
dcom_module = prefs_register_protocol(proto_dcom, NULL);
|
2004-12-19 13:46:09 +00:00
|
|
|
|
2010-04-16 14:48:30 +00:00
|
|
|
prefs_register_bool_preference(dcom_module, "display_unmarshalling_details",
|
|
|
|
"Display DCOM unmarshalling details",
|
2004-12-19 13:46:09 +00:00
|
|
|
"Display some DCOM unmarshalled fields "
|
|
|
|
"usually hidden",
|
|
|
|
&dcom_prefs_display_unmarshalling_details);
|
2006-08-11 19:15:12 +00:00
|
|
|
|
2008-09-26 17:12:15 +00:00
|
|
|
register_init_routine(dcom_reinit);
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_dcom (void)
|
|
|
|
{
|
2008-09-26 17:12:15 +00:00
|
|
|
/* register some "well known" UUID's */
|
|
|
|
guids_add_uuid(&uuid_debug_ext, "Debug Information Body Extension");
|
|
|
|
guids_add_uuid(&uuid_ext_error_ext, "Extended Error Info Body Extension");
|
|
|
|
guids_add_uuid(&ipid_rem_unknown, "IRemUnknown");
|
|
|
|
guids_add_uuid(&iid_unknown, "IUnknown");
|
|
|
|
guids_add_uuid(&uuid_null, "NULL");
|
|
|
|
guids_add_uuid(&iid_class_factory, "IClassFactory");
|
|
|
|
|
|
|
|
/* Currently, we have nothing to register for DCOM */
|
2004-12-19 13:46:09 +00:00
|
|
|
}
|