Commit Graph

71 Commits

Author SHA1 Message Date
Ulf Lamping 67e90082a7 add "RPC_E_TIMEOUT" to the reject status codes
svn path=/trunk/; revision=17053
2006-01-19 02:00:28 +00:00
Ronnie Sahlberg 728323e533 add initial decode of dcerpc over smb2
it does not yet multiplex between different files   but it is better than nothing


svn path=/trunk/; revision=16484
2005-11-12 08:48:02 +00:00
Gerald Combs 93b99abf30 In packet-dcerpc-nt.c, make sure we call init_pol_hash() each time we load
a capture file.  This should fix bug #536.

Make sure we initialize our hash tables in packet-dcerpc-nt.c and several 
other files.  Fix up whitespace while we're at it.

svn path=/trunk/; revision=16255
2005-10-17 18:56:27 +00:00
Ulf Lamping 9a42ef9536 fix #480: Change defaults for all reassembling settings to ON
I've changed all settings I could find to TRUE. It might be reasonable to change some protocol settings back to FALSE, if reassembling fails very often.

svn path=/trunk/; revision=16048
2005-09-28 22:15:38 +00:00
Guy Harris d77101151a If "dissect_dcerpc_cn()" throws an exception when called by
"dissect_dcerpc_cn_bs_body()", it's because it recognized the packet as
a DCE RPC packet, but it ran out of data dissecting it as such;
increment the count of DCE RPC PDUs, so "dissect_dcerpc_cn_bs_body()"
returns TRUE, and its caller doesn't think nothing was dissected.

Fuzzed with some DCE RPC captures.

svn path=/trunk/; revision=16000
2005-09-25 09:06:48 +00:00
Ronnie Sahlberg b52e2939d7 remove some compiler warnings
svn path=/trunk/; revision=15974
2005-09-23 10:31:39 +00:00
Ulf Lamping 9d1af7d6fb add two more bind reject reasons from the specs
svn path=/trunk/; revision=15962
2005-09-22 21:07:25 +00:00
Ulf Lamping e8dd2e9279 fix: packet-dcerpc.c(4019) : warning C4018: '<' : signed/unsigned mismatch
svn path=/trunk/; revision=15892
2005-09-20 08:55:50 +00:00
Ulf Lamping 485d75946c split call id's with a #, if more than one DCE/RPC call is in a data PDU
svn path=/trunk/; revision=15841
2005-09-16 22:05:50 +00:00
Ulf Lamping 1d0e5b105c add E_OUTOFMEMORY
svn path=/trunk/; revision=15803
2005-09-14 20:09:17 +00:00
Ronnie Sahlberg 6f8fbd169d Allow dissection of dcerpc of short frames instead of aborting as soon as it is detected the pdu is "short"
svn path=/trunk/; revision=15796
2005-09-14 16:06:11 +00:00
Ulf Lamping ff50ef8490 add number of defragmented bytes to the expert info output
svn path=/trunk/; revision=15771
2005-09-12 20:02:58 +00:00
Ulf Lamping f9b1686883 fix fault defragmentation the same way as in the request/response path
Unfortunately, I don't have a capture file to test this...

svn path=/trunk/; revision=15763
2005-09-12 00:29:19 +00:00
Ulf Lamping 55c3e85a95 fix reassembling problem I've introduced yesterday, by using fragment_add_seq_next() function instead of fragment_add()
in addition, I had to implement fragment_get_reassembled() in addition to fragment_get(), which works with reassembled_table

svn path=/trunk/; revision=15762
2005-09-12 00:16:57 +00:00
Ulf Lamping 0bb7a6e003 rename fragment_add_dcerpc -> fragment_add_dcerpc_dg to avoid confusion a bit,
as connection oriented (cn) and connectionless (dg) DCE/RPC uses different ways to handle defragmentation and this function is only used for dg

svn path=/trunk/; revision=15757
2005-09-11 21:10:26 +00:00
Ulf Lamping 57d099a0c2 some things fixed, leftover from code cleanup (thanks to the buggy MSVC dependencies)
svn path=/trunk/; revision=15755
2005-09-11 17:15:00 +00:00
Ulf Lamping 642467ad5c I'm adding the "Expert Info" prototype now, as it seems to be in a state where others might have a look and probably already find it useful :-). Anyway, we can easily disable it at one or two places in the code if it get's in our way of a new release.
Please see: http://wiki.ethereal.com/Development/ExpertInfo for a complete overview of the intended feature and it's current state of implementation.

While I'm working on this, I've also added some more status result codes to the DCE/RPC and DCOM dissectors.

svn path=/trunk/; revision=15754
2005-09-11 16:55:34 +00:00
Ulf Lamping 541fd750b8 fix DCE/RPC defragmentation, if both middle and last DCE/RPC fragments are in the same TCP desegmented data blob
reassemble.c:
I had to change the way the reassemble code works if the dissector is telling that more fragments *will* follow. In this case the reassemble code shouldn't try to reassemble already at that time ...

I've also changed the way if a fragment was already seen or not, as it's not enough to check for the frame number, in the scenario described above.

Unfortunately both changes *might* broke other protocols from reassemble properly. I've checked with excessive TCP desegmentation and it's still working without any changes :-)

packet-dcerpc.c:
use a tvb subset to limit the "end of bytes" processed in a single fragment dissect run, as each fragment has it's own DCE/RPC header (and isn't part of the stub data of the previous packet).

svn path=/trunk/; revision=15744
2005-09-10 15:11:21 +00:00
Ronnie Sahlberg 8bdc79d8f4 from Michal & Yaniv Kaul
Updates to prettify the Bind ACK context handles



svn path=/trunk/; revision=15722
2005-09-08 10:08:01 +00:00
Ulf Lamping 6f43fbb2f0 EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry!
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ...

What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere.

As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon.

Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way...

As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number...

svn path=/trunk/; revision=15520
2005-08-24 21:31:56 +00:00
Ulf Lamping 495eb1b788 snprintf -> g_snprintf
svn path=/trunk/; revision=15398
2005-08-17 23:10:28 +00:00
Ronnie Sahlberg c30eeef7d8 some more gmemchunk -> se_alloc() updates
there are only 5 gmemchunks left   but they have different litetime for their allocations   than the 100+   ones that have been removed.

The remaining 5 should be converted some other way.




svn path=/trunk/; revision=15328
2005-08-13 01:29:31 +00:00
Gerald Combs 86d66bc85c Fix the length that we pass to proto_tree_add_uint_format() so that we don't
throw a dissector error.  Fixes bug 348.

svn path=/trunk/; revision=15314
2005-08-12 15:27:11 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Ulf Lamping 20c5d50269 bugfix: in an attepmt to fix a crash while doing reassemling of connection oriented packets, some weeks ago I've added some tvb_ensure_bytes_exist() calls to test the case that the alloc_hint value is bogus (found in private fuzz testing).
Unfortunately, this is *very* safe now as it will mark a lot of DCE/RPC packets as malformed, thus the reassembling code won't work with most packets :-(

I've replaced this with the correct check and used THROW(ReportedBoundsError) instead which is hopefully the right error in this case.

BTW: could someone please add a description of the ReportedBoundsError vs. BoundsError to the code as I still don't get it.

In addition: Use a toplevel tree item to display the DCE/RPC defragmentation just as it's done in the TCP desegmentation code.

svn path=/trunk/; revision=15188
2005-08-02 07:26:57 +00:00
Jörg Mayer 7949c7f31c char -> const char warning fixes
svn path=/trunk/; revision=15079
2005-07-26 08:01:16 +00:00
Jörg Mayer 88895e2f02 Warning fixes
svn path=/trunk/; revision=15067
2005-07-25 21:08:14 +00:00
Guy Harris 554f620001 Constify to remove a bunch of warnings. Add some casts to squelch
(presumably-)harmless-but-otherwise-unremovable const-to-nonconst
warnings.

In the TACACS dissector, clean up the variables used in option parsing
to avoid some const-to-nonconst warnings.

Clean up some white space.

svn path=/trunk/; revision=15043
2005-07-24 19:01:28 +00:00
Ronnie Sahlberg 3905fca8bc make idl2eth generate FT_GUID hf fields for uuid_t and GUID types.
make dissect_dcerpc_uuid_t() accept eitehr FT_STRING (old style) and FT_GUID (new style) hf fields. once all dissectors are modified to use FT_GUID we can remove the FT_STRING support here.

regenerate the DRSUAPI interface with the new FT_GUID support.




svn path=/trunk/; revision=14912
2005-07-13 08:00:15 +00:00
Ulf Lamping dd1287fc71 add some more information to the DCE/RPC packet details summary line
svn path=/trunk/; revision=14827
2005-06-30 22:51:17 +00:00
Ulf Lamping 3d831f4bfb add a new DCE/RPC related column, which contains the call_id for connection oriented packets or the sequence number for connectionless (datagram) packets.
This is extremely useful, to keep track of the corresponding request/response packets of a DCE/RPC call (which can be quite a lot packets if fragmentation is used).

svn path=/trunk/; revision=14826
2005-06-30 22:46:19 +00:00
Ulf Lamping 2cecaba970 add references to the corresponding request of datagram ping and ack packets
svn path=/trunk/; revision=14815
2005-06-29 08:03:06 +00:00
Ulf Lamping fdb5b1af02 just to get things straight: a dissector should *never* do any g_assert() calls!
in a simple approach, I've replaced all g_assert() and g_assert_not_reached() calls by their exception throwing counterparts DISSECTOR_ASSERT() and DISSECTOR_ASSERT_NOT_REACHED()

this will replace application crash by showing a dissector bug, which is the desired behaviour

there were some g_assert calls in the protocol registering functions, which might not be acting as expected now, but to be able to simply search for g_assert in the future I've replaced that calls too

one g_assert remained, the one when someone throws an unknown exception "into" packet_frame.c, but IMHO this one should remain.

svn path=/trunk/; revision=14608
2005-06-10 18:28:22 +00:00
Ulf Lamping 56a9fe6d2a add a generated toplevel line between the connectionless DCE/RPC protocol and the defragmented DCE/RPC content, to better understand what's going on if defragmentation is done.
svn path=/trunk/; revision=14531
2005-06-02 20:55:58 +00:00
Ulf Lamping e2c3b60280 add a generated toplevel line between the TCP protocol and the desegmented content, to better understand what's going on while desegmenting.
We'll have to add similar mechanisms for other protocols as well...

svn path=/trunk/; revision=14527
2005-06-02 18:52:55 +00:00
Ulf Lamping 3c4401b95d bugfix (fuzz_tested): add tvb_ensure_bytes_exist() before adding a fragment at two places, otherwise we get an access violation
svn path=/trunk/; revision=14525
2005-06-02 18:39:45 +00:00
Ulf Lamping cb51c2662a fix highlighting length, if more than one RPC call is in a TCP PDU
set "n*DCERPC" in the proto column if more than one RPC call in a TCP PDU, overwriting the interface name, as there's probably more than one interface involved

add some more RPC info to the toplevel RPC proto_item

add a comment, if some bytes are not dissected but might be in the next TCP PDU

svn path=/trunk/; revision=14490
2005-05-30 18:37:19 +00:00
Ronnie Sahlberg cb2fc4e58b from martin m
prettify dcerpc


svn path=/trunk/; revision=14369
2005-05-14 22:05:56 +00:00
Ronnie Sahlberg 3a6778b8e7 fix for bug 91
make the heuristics for detecting connection-less dce/rpc a bit sharper to reduce the number of false positives



svn path=/trunk/; revision=14190
2005-04-26 09:03:30 +00:00
Gerald Combs 50d0f95328 Add more tvb_ensure_bytes_exist() calls.
svn path=/trunk/; revision=14171
2005-04-23 13:24:57 +00:00
Gerald Combs 028075b673 Add a couple of tvb_ensure_bytes_exist() calls to avoid dissector bug
exceptions.

svn path=/trunk/; revision=14170
2005-04-23 04:06:45 +00:00
Ronnie Sahlberg 1fe0f9022e a lot of people dont specify top level pointers in teh idl and just
cerlare it as a parameter that is a struct/union and not a ref pointer to one.

this is ok since toplevel ref pointers are invisible in the wire encoding anyway.

unfortunatelky  ethereal dce runtime needed to see that pointer to keep track of whisch one was a toplevel and which one wasnt.


implement a new api to call pointers which explicitely specifies whether the pointer is toplevel or embedded.
eventually all dce dissectors will use this new interface and the generic dissect_ndr_pointer() can be retired.



svn path=/trunk/; revision=13755
2005-03-14 20:51:13 +00:00
Ronnie Sahlberg 8123288f6d some auth padding update from metze
svn path=/trunk/; revision=13736
2005-03-12 21:01:38 +00:00
Ronnie Sahlberg 8700645d54 add support to decrypt and dissect sign-and-sealed traffic.
(cifs: dc's talking to eachother   and when longhorn comes out: anyone wanting to talk dce to a dc!)

((this is an incredibly advanced feature well worthy of mentioning in NEWS))


svn path=/trunk/; revision=13690
2005-03-10 10:16:49 +00:00
Ronnie Sahlberg 0180d280fe change the signature for the functions to decrypt data for the
dcerpc_auth_subdissector_fns structure.

the SignAndSeal decryption (which works really well) needs this.



svn path=/trunk/; revision=13688
2005-03-10 08:50:18 +00:00
Ronnie Sahlberg 4a338216da pinfo->private_data was a quite subptimal idea
change the decodeas for dcerpc so that it actually works again for dcerpc over smb



svn path=/trunk/; revision=13515
2005-02-25 10:30:21 +00:00
Ronnie Sahlberg 1d8e70b969 add extra sanity check.
dont match a request with a reply that came earlier in the trace or SRT will
look funny :-)



svn path=/trunk/; revision=13409
2005-02-16 00:19:52 +00:00
Ronnie Sahlberg 1c644d6ff7 add support for varying arrays
svn path=/trunk/; revision=13399
2005-02-14 19:43:34 +00:00
Lars Roland ec9ca01616 Move the following files from /trunk to /trunk/epan:
asn1.[ch]
follow.[ch]
ptvcursor.[ch]
reassemble.[ch]
xmlstub.[ch]

fix #include statements accordingly.

svn path=/trunk/; revision=13366
2005-02-09 23:38:00 +00:00
Ronnie Sahlberg e95485ff81 add support for varying strings in addition to conformant and varying strings that we already support
svn path=/trunk/; revision=13278
2005-02-04 04:02:36 +00:00