Commit Graph

36 Commits

Author SHA1 Message Date
Ronnie Sahlberg e3da788a2a Updated the DCERPC service response time to also offer the menu to
Filter, Find and Colorize selected procedures
in the same way as SMB and ONC-RPC already does.

svn path=/trunk/; revision=8667
2003-10-10 11:11:37 +00:00
Tim Potter 2d33b62811 This commit refactors the dcerpc authentication subdissectors for
handling encrypted request/response PDUs.  Instead of having
dissection function pointers which perform both decryption and
dissection, the function pointers now only decrypt the DCERPC fragment
payload.  Dissection is handled by the dcerpc_try_handoff() function
(with DCERPC fragment reassembly if necessary).

Details:

 - Move the dcerpc_auth_info struct into dcerpc.h as it is now used in
   the function prototype for the decryption function handlers.

 - decode_encrypted_data() was refactored to take a boolean request
   parameter instead of passing the DCERPC PDU packet type.

 - A tvbuff_t * data field was added to dcerpc_auth to hold the
   verifier.  This is passed as an argument to the decryption function
   handlers.

 - Dissection of verifiers in request and response PDUs was moved to
   before the payload.

 - The dissect_dcerpc_cn_stub() function was refactored to perform
   the decryption process and hand decrypted data to the reassembly
   code instead of performing the decryption after reassembly.

 - Removed references to decrypted_info_t as it's not necessary
   anymore.

Code was tested using encrypted and unencrypted fragmented PDUs.
Before this commit ethereal could not dissect unencrypted (!)
fragmented PDUs correctly.

svn path=/trunk/; revision=8546
2003-09-26 06:30:13 +00:00
Tim Potter 4ccbfa3edc Guy suggested that the dcerpc opnum value_string code could be simplified
somewhat.  Now the dynamic initialisation of the value_string is contained
in the value_string_from_subdissectors() function instead of being
distributed amongst the dcerpc dissectors.

svn path=/trunk/; revision=8123
2003-08-04 02:49:04 +00:00
Tim Potter 8b89bd76ee Move all DCERPC authentication/encryption dissection code from packet-dcerpc.c
to the dissector that handles the particular authentication flavour.  This
gets rid of a couple of ugly switch statements and allows other authentication
modules to be written easily.

svn path=/trunk/; revision=8026
2003-07-16 04:20:33 +00:00
Tim Potter 623f5b865d Dynamically create DCERPC opnum value_strings from the subdissector
list rather than duplicating this information in the dissector.  Some
of the opnum strings were starting to get out of date as developers
forgot to update the information in both places.

svn path=/trunk/; revision=7936
2003-06-26 04:30:31 +00:00
Guy Harris e345e5640e Rename "fake_unicode()" to "tvb_fake_unicode()" as it works on a tvbuff,
give it a byte-order argument, and move it to "epan/tvbuff.c".

Use it to handle UCS-2 strings in version 1 of the Service Location
Protocol.  In SRVLOC V1, use registered fields that are already there
for SRVLOC V2, and add some as needed.  Fix some field names.

svn path=/trunk/; revision=7186
2003-02-24 01:22:30 +00:00
Tim Potter c112d781b1 Allow dissect_ndr_cvstring to return a malloced copy of the string.
svn path=/trunk/; revision=7109
2003-02-10 02:06:28 +00:00
Guy Harris e9f0f4b74f Rename "dissect_ndr_char_string()" and "dissect_ndr_wchar_string()" to
"dissect_ndr_char_cvstring()" and "dissect_ndr_wchar_cvstring()", to
indicate that they're for conformant varying strings.

Rename "dissect_ndr_character_array()" to "dissect_ndr_cvstring()", to
indicate that it's for conformant varying strings.

svn path=/trunk/; revision=7096
2003-02-07 22:44:54 +00:00
Guy Harris 9a348d5736 Rename "dissect_ndr_char_array" and "disect_ndr_wchar_array" to
"dissect_ndr_char_string" and "dissect_ndr_wchar_string", to make it
clearer what it does.

svn path=/trunk/; revision=7095
2003-02-07 22:31:32 +00:00
Guy Harris 579d05d1f3 Fix a typo in the multiple-include protection in "packet-dcerpc-nt.h".
Rename "dissect_ndr_element_array()" to "dissect_ndr_character_array()",
move it out of "packet-dcerpc-nt.c" to "packet-dcerpc.c", and have it
use the standard DCE RPC array max count/offset/count fields rather than
their own private versions of those fields.  Give it an option to create
a subtree, and an argument to specify the field to use for the actual
data buffer, and export it.

Move the routines for handling arrays of "char" and "wchar" as strings
out of "packet-dcerpc-nt.c" to "packet-dcerpc.c".

Add a routine to handle an array of "char" as an opaque blob of bytes.

Use "dissect_ndr_character_array()" to dissect character strings in MAPI
(the strings in question are ASCII, not Unicode), and use the routine to
handle an array of "char" as an opaque blob of bytes to dissect
encrypted data (again, it's bytes, not 16-bit quantities).  Show them as
encrypted data, not unknown data.

Use "dissect_ndr_character_array()" to dissect a form name in
"dissect_form_name()" in the SPOOLSS dissector.

svn path=/trunk/; revision=7091
2003-02-07 08:56:12 +00:00
Tim Potter 2bccc6dcf0 Replace the 'levels' argument to dissect_ndr_pointer() with a callback
function and a void * callback args.  The callback is executed after
the dissection of the ndr pointer buffer which may be called,
depending on the number of pointers in the structure, after the return
of the dissect_ndr_pointer() call.

The callback function is of type:

void (dcerpc_callback_fnct_t)(packet_info *pinfo, proto_tree *tree,
proto_item *item, tvbuff_t *tvb, int start_offset, int end_offset,
void *callback_args);

where the proto tree and item are the tree and item created by
dissect_ndr_pointer() and the tvb plus offsets are the buffer pointed
to by the pointer.

svn path=/trunk/; revision=7015
2003-01-28 06:17:09 +00:00
Ronnie Sahlberg d5e3008fff From Jean-Baptiste Marchand update the proto_tree_add_ for UUIDs in the
dcerpc layer (and the subdissectors using dissect_ndr_uuid_t()) so that
it is possible to use display filters on these items.

svn path=/trunk/; revision=6547
2002-11-02 22:14:21 +00:00
Guy Harris 35c1970720 From Ronnie Sahlberg: Ethereal support for DCERPCSTAT.
svn path=/trunk/; revision=6499
2002-10-25 01:08:49 +00:00
Guy Harris a71d1d910e From Ronnie Sahlberg: add a tap for statistics for DCERPC interfaces.
svn path=/trunk/; revision=6479
2002-10-23 03:49:13 +00:00
Guy Harris abbd3e0dea From Ronnie Sahlberg: track and display the time between requests and
replies for DCERPC similar to what is already done for ONC-RPC.

svn path=/trunk/; revision=6465
2002-10-22 00:59:25 +00:00
Ronnie Sahlberg 8ca1d857f6 From Jaime Fournier: updates to dcerpc conversation manager
svn path=/trunk/; revision=6339
2002-09-26 06:13:08 +00:00
Ronnie Sahlberg 957f38e57c From Ulf Lamping, support for ieee float and double types in the dcerpc
dissectors.

svn path=/trunk/; revision=6170
2002-09-03 08:39:16 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Tim Potter 6d6dce305d Change each DCERPC dissector to pass in a hf value on initialisation
for a value_string that corresponds to that dissectors opnums.  Pass
in -1 if no such table is available.

svn path=/trunk/; revision=5749
2002-06-24 00:03:18 +00:00
Guy Harris 309f192e02 Dissect the bodies of some additional PDU types.
Show presentation context negotiation results and rejection reasons, PDU
rejection reasons, and rejection status codes symbolically.  Show the
presentation context negotiation rejection reason only if there was a
rejection, and, if so, show it in the Info column as well as the
protocol tree.

Show more fields in the Info column.

Show the packet type in decimal in the protocol tree - it's shown as
decimal in the Info column and the values are shown as decimal in the
DCE RPC 1.1 spec.

Show the sequence number for connectionless PDUs as decimal in the
protcool tree - it's snown as decimal in the Info column, and the call
ID for connection-oriented PDUs is shown as decimal in the protocol
tree.

svn path=/trunk/; revision=5701
2002-06-19 08:34:38 +00:00
Ronnie Sahlberg c33e33fb7e Additions to the MAPI dissector. Function 02 for MAPI.
The function request/call are dissected but the main body of the function
in/out parameters consists of a unidimensional conformant and varying array of bytes which content is encrypted/obfuscated.
Whoever can tell me how to decrypt/unobfuscate these bytes will get
a case of VB next time in Sydney.

svn path=/trunk/; revision=5532
2002-05-23 12:23:29 +00:00
Tim Potter 8b5ff6898b Added a private data member to the dcerpc_info structure. This second
level of private data turns out to be needed to pass something other than
an int to dcerpc_dissect_fnct_t functions passed to dissect_ndr_pointer.

A nicer way of doing this would be to convert the levels parameter to a
void *state type of variable but this turns out to be a lot more work as
opposed to a one line change here.  (-:

svn path=/trunk/; revision=5434
2002-05-10 02:30:22 +00:00
Ronnie Sahlberg 04158638ae Added extra check in the function that parses NDR pointers.
When the representation for a pointer type gets dissected, the dissector
is actually called twice. Once with conformant_run==1 and once ==0.
The idea is that when conformant_run is ==1, the ONLY bytes that will be
dissected and would be the array structure preceeding the actual data.
And the normal data and content will be dissected when conformant_run ==0.
This is to handle the case properly when conformant arrays are embedded inside
aggregated types, in which case there will be other data inserted between
these array control data, and the array content.

The check that is added will assert that no other data is actually eaten
for conformant_run==1 than just this data.
This will help debugging dcerpc dissectors.

svn path=/trunk/; revision=5412
2002-05-07 10:07:55 +00:00
Guy Harris ab96c5694e Frame numbers are unsigned, and 0 is not a valid frame number; make the
frame number arguments, and elements in data structures, unsigned,
display them with "%u" rather than "%d", and use 0, rather than -1, as
"not known".

svn path=/trunk/; revision=5223
2002-04-22 09:43:03 +00:00
Guy Harris a8fc99ae5a From Ronnie Sahlberg:
SAMR updates;

	a bugfix in dissect_ndr_pointer() (should not check referent id
	for aliases for unique pointers);

	enhancement to dissect_ndr_pointer() to make it possible to
	hand a generic int value to the dissector for the pointer object
	in a similar way as hf_index values are passed through the
	pointer layer.

svn path=/trunk/; revision=4721
2002-02-12 07:35:21 +00:00
Guy Harris 04228a94a3 From Ronnie Sahlberg:
fix to LookupRids to match what the IDL file says;

	fix to "dissect_ndr_uint64()" to specify the right length to
	"proto_tree_add_item()";

	give the protocol tree items for array header counts and offsets
	the correct offsets in the packet.

svn path=/trunk/; revision=4719
2002-02-11 08:19:09 +00:00
Guy Harris d5df557923 DCE RPC enhancements, and SAMR improvements, from Ronnie Sahlberg.
svn path=/trunk/; revision=4618
2002-01-29 09:13:28 +00:00
Guy Harris 55bed21e45 From Ronnie Sahlberg:
NDR pointer handling in DCE RPC
	SAMR updates

svn path=/trunk/; revision=4608
2002-01-25 08:35:59 +00:00
Guy Harris 20d4266049 From Ronnie Sahlberg: add support for finding the response that matches
a request.

svn path=/trunk/; revision=4600
2002-01-23 05:38:32 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris 98b2ecb304 SPOOLSS RPC dissector, from Tim Potter. This includes adding additional
DOS error codes to the table of them, and exporting that table to other
dissectors for protocols using DOS error codes.

svn path=/trunk/; revision=4470
2002-01-03 20:42:41 +00:00
Guy Harris 787a331ae6 From Todd Sabin:
add "dissect_ndr_ctx_hnd()" for dissecting context handles, and
	use it in various DCERPC dissectors;

	beef up the MS Security Account Manager dissector.

Also, export "NT_errors[]" for use by that dissector.

svn path=/trunk/; revision=4350
2001-12-06 23:30:36 +00:00
Guy Harris 5ebf118bf3 From Todd Sabin:
o Modifies the dcerpc handoff to subdissectors slightly.  It
	  also needs to pass the data representation to the
	  subdissector.  Also, if no subdissector is found, it puts a
	  "Stub data" entry in the tree.

	o Adds optional TCP desegmentation to the dcerpc layer.  Note
	  that dcerpc has it's own ability to fragment PDUs.  This isn't
	  for dealing with that, but with the case of a single PDU being
	  broken over more than one TCP segment.

	o Adds a little bit of dissection to packet-dcerpc-epm.c.
	  Mainly just proof of concept for the dcerpc handoff stuff.
	  (Writing this is how I realized the need for the drep.)

	o Adds packet-dcerpc-ndr.c, which will contain NDR dissection
	  routines for use by subdissectors.

Also, support added for multiple PDUs per segment for DCERPC-over-TCP
(and, potentially, other byte-stream transports).

svn path=/trunk/; revision=4285
2001-11-27 09:27:29 +00:00
Guy Harris 8c358fd83e From Tim Potter: use the FID, for DCE RPC-over-SMB, as part of the
conversation matching.

svn path=/trunk/; revision=4220
2001-11-18 22:44:08 +00:00
Guy Harris 317a2651f9 Support for dissectors of protocols running atop DCE RPC registering
themselves with the DCE RPC dissector, and support for some of the
protocols atop DCE RPC that are part of DCE RPC, from Todd Sabin.

svn path=/trunk/; revision=3681
2001-07-11 01:25:45 +00:00
Guy Harris 88ba07d41b DCE RPC updates from Todd Sabin.
svn path=/trunk/; revision=3338
2001-04-19 23:39:27 +00:00