Commit graph

332 commits

Author SHA1 Message Date
Guy Harris
d359286841 Add a pointer to an hf_ value for a "reassembled_in" field (which can be
null) to the "fragment_items" structure, and don't pass that value into
"process_reassembled_data()", just have it use the value in the
"fragment_items" structure passed to it.

Make "process_reassembled_data()" capable of handling reassembly done by
"fragment_add_seq_check()", and use it in the ATP and 802.11 dissectors;
give them "reassembled_in" fields.  Make "process_reassembled_data()"
handle only the case of a completed reassembly (fd_head != NULL) so that
we can use it in those dissectors without gunking the code up too much.

svn path=/trunk/; revision=7513
2003-04-20 11:36:16 +00:00
Richard Sharpe
15a665d461 Add some comments about the 0x10 bit in the Flags field of an NTcreate&X.
svn path=/trunk/; revision=7493
2003-04-18 18:07:50 +00:00
Guy Harris
197b9b228b Add a heuristic dissector table to Vines SPP, use it for dissecting SPP
data packets, and register the SMB dissector with it.

Dissect the Control field of SPP packets.

svn path=/trunk/; revision=7480
2003-04-17 20:30:43 +00:00
Guy Harris
8c06187052 Update a URL, and note that the Open Group publications are now
available for free download.

svn path=/trunk/; revision=7476
2003-04-17 07:55:42 +00:00
Guy Harris
9dcf00fe5c Support SMB as one of the protocols that can run over OSI COTP.
svn path=/trunk/; revision=7474
2003-04-17 00:13:26 +00:00
Guy Harris
579ab38577 Add a new routine "dissect_file_data_maybe_dcerpc()" to handle file
read/write data that might, or might not, be DCE RPC information on a
pipe, and use that routine rather than duplicating similar code in
multiple places.

svn path=/trunk/; revision=7455
2003-04-14 17:38:49 +00:00
Guy Harris
82ff4f49a5 Fix up some comments.
svn path=/trunk/; revision=7454
2003-04-14 17:31:42 +00:00
Ronnie Sahlberg
176c885a3d The two extra bytes in the write_andx request is only present if both
the MEssageStart and the Raw bits are set.

svn path=/trunk/; revision=7452
2003-04-14 10:58:21 +00:00
Guy Harris
46416f7b7e Use symbolic names for the various write mode bits.
To test whether a single bit is set, just do "if (mode&bit)", not
"if ((mode&bit)==bit)".

In the places where read and write data is processed, have both a
comment indicating that it's file data and that you can transport DCERPC
over SMB just with reads and writes, to indicate why we may call the
DCERPC-over-a-pipe dissector.

svn path=/trunk/; revision=7450
2003-04-14 00:27:00 +00:00
Guy Harris
f2b07ad411 "dcerpc_fragment_table" is used only in packet-smb-pipe.c, except for
the call to initialize it; move the call to initialize it to the
registration routine for the dissector that uses it, move the definition
of ""dcerpc_fragment_table" to packet-smb-pipe.c, make it static, and
remove the declaration of it from smb.h.

Add some casts to squelch compiler complaints.

svn path=/trunk/; revision=7449
2003-04-13 23:58:37 +00:00
Ronnie Sahlberg
f469559385 Rewrite the DCERPC over SMB reassembly completely.
Move the actual reassembly to packet-smb-pipe.c instead of having it inside
the packet-smb.b/Write_andX and ReadAndX dissectors.

Change the dissector to only call dcerpc dissector from the packet where
reassembly was completed instead of always from the first fragment.
Add display fiulter field for the other fragments that display which frame the dcerpc pdu was reassembled in.

This is needed in order to be able to reassemble the type of dcerpc fragments
that are sent between nt4 dc's.
The DCERPC fragment reassembly in the dcerpc layer is still broken though, and
i think it has been broken for quite some time.   That will be addressed shortly.

svn path=/trunk/; revision=7445
2003-04-12 08:14:02 +00:00
Ronnie Sahlberg
1294318b4d The NT Security Descriptor revision field is only one byte, not two.
Make the dissector decode the first two bytes of the security descriptor as
one byte for the revision and the second byte as nothing/should be zero.

svn path=/trunk/; revision=7436
2003-04-10 08:41:58 +00:00
Guy Harris
4727ca154d Squelch a compiler warning - the problem "should not happen", as a
WriteAndX request should have a full complement of word parameters, but,
just in cast it doesn't....

(Should we somehow arrange to throw an exception if there aren't enough
word or byte parameters in SMBs, i.e. impose a minimum in some cases?)

svn path=/trunk/; revision=7430
2003-04-09 18:35:27 +00:00
Ronnie Sahlberg
d1b5e90a50 Update to WriteAndX request decoding so it can handle the pipe bits properly.
If both mode bits  MessageStart and WriteRaw are set, then the first two bytes of the byte-field is the total length of the data written to the pipe.

svn path=/trunk/; revision=7428
2003-04-09 09:35:57 +00:00
Guy Harris
be0dfb63e0 Add some additional fields to SMB-over-IPX dissection, as per what
NetMon 2.x does.

svn path=/trunk/; revision=7403
2003-04-03 22:58:54 +00:00
Guy Harris
61a448bb25 Add support for SMB-over-IPX.
svn path=/trunk/; revision=7402
2003-04-03 09:12:46 +00:00
Tim Potter
795926735d When dissecting specific rights, pass a name string down so the
proto item says "foo specific rights" instead of just "specific
rights".

svn path=/trunk/; revision=7401
2003-04-03 05:43:59 +00:00
Ronnie Sahlberg
cec5c81ac3 Added SMB option : sid_name_snooping.
This feature, when enabled through Edit/preferences/protocols/smb,
will look at certain SMB and CIFS related protocols to discover the
mapping between SIDs and their Names.

For those SIDs whose name has been snooped/discovered ethereal will
also add "(<name>)" to the end of the SID when printed in the tree pane
through the function dissect_nt_sid().

Currently the feature is not too exciting since the only thing that packet-smb-sidsnooping.c will look at to build this mapping table is
replies to the LSA/QueryInfoPolicy infolevel 3  packets and thus
discover mappings between a Domain SID and a Domain Name.
In the near future this future will be enhanced to also look at more interesting calls such as LSA/LookupSIDs2 and similar.

svn path=/trunk/; revision=7362
2003-03-25 09:41:42 +00:00
Ronnie Sahlberg
3cde372091 Turn SIDs into FT_STRING fields so that we can filter for them using
display filters.

svn path=/trunk/; revision=7355
2003-03-17 09:02:49 +00:00
Ronnie Sahlberg
a86693c355 Rename hf_smb_sid to the more appropriate hf_smb_search_id
since we will need hf_smb_sid for the SID string later

svn path=/trunk/; revision=7354
2003-03-17 08:28:56 +00:00
Richard Sharpe
daea30c214 Make sure that we display all the file attributes ...
svn path=/trunk/; revision=7352
2003-03-14 00:46:54 +00:00
Richard Sharpe
043ef892af Make sure we don't obliterate the UNICODE flag ...
svn path=/trunk/; revision=7278
2003-03-04 23:09:59 +00:00
Tim Potter
41b5162c2c Added 'server unavailable' dos error message.
svn path=/trunk/; revision=7192
2003-02-25 02:00:33 +00:00
Guy Harris
e6b5a93461 Properly set the ACE type in the summary line for an ACE - and, while
we're at it, avoid going past the end of a packet.  Put the ACE type's
hex value into that line if it's an unknown type.

svn path=/trunk/; revision=7144
2003-02-14 04:54:47 +00:00
Tim Potter
6f4661637a Decorate ACE items in an ACL with the SID and flag values.
svn path=/trunk/; revision=7122
2003-02-11 04:33:24 +00:00
Guy Harris
dae6dd9bcf Update some comments.
svn path=/trunk/; revision=7112
2003-02-10 02:38:24 +00:00
Guy Harris
fcea88589c At least in regular SMB requests, the access mask in an ACE is not
guaranteed to be aligned on a 4-byte boundary, so, if we're not
dissecting an ACE from a DCE RPC request or reply, don't use
"dissect_ndr_uint32()" to extract the access mask.  (Is it guaranteed to
be so aligned even if the ACE is part of a DCE RPC message?  Or are ACLs
just opaque blobs from the point of view of DCE RPC?)

Use "%u", not "%d", to print unsigned quantities.

svn path=/trunk/; revision=7106
2003-02-08 08:55:13 +00:00
Tim Potter
45d316639a Move dissect_nt_access_mask() from packet-dcerpc-nt.c to packet-smb.c
Give dissect_nt_sec_desc() and dissect_nt_access_mask() a specific rights
function parameter for dissecting specific access rights.

Fix callers in packet-smb.c to use the new interface.

svn path=/trunk/; revision=7086
2003-02-07 06:01:49 +00:00
Tim Potter
1e85fd9ed5 Modify dissect_nt_sid() function to return a string version of the SID.
Fix all callers to use the new function form.

svn path=/trunk/; revision=7054
2003-01-31 04:11:25 +00:00
Ronnie Sahlberg
48d3d8eb26 SMB RTT statistics for tethereal and ethereal.
SMB RTT statistics are similar to the RTT statistics already supported by ONC-RPC and DCE-RPC.
It will present a table with all seen SMB commands and present the Min/Max and Avg response time in ms.

Transaction2 and NT-Transaction commands are broken out and presented in its own subtables.

tethereal feature is activated with -z smb,rtt    switch
and in ethereal it is activated either through -0z smb,rtt switch or through the Menu.

svn path=/trunk/; revision=6966
2003-01-22 00:40:36 +00:00
Richard Sharpe
3340b685d7 Small fix from Andrew Bartlett to make Is Directory come out right.
svn path=/trunk/; revision=6823
2002-12-31 04:24:18 +00:00
Ronnie Sahlberg
e4633bc783 Update reassemble.c/show_item and all callers to use FT_FRAMENUM for the list of packets corresponding to a reassembled pdu
svn path=/trunk/; revision=6807
2002-12-19 11:22:38 +00:00
Ronnie Sahlberg
54ac42f379 Update packet-smb.c to use the new FT_FRAMENUM type
svn path=/trunk/; revision=6806
2002-12-19 10:31:38 +00:00
Ronnie Sahlberg
6488851a0b Fix for DCERPC detection when carried ontop of SMB.
If we do not see the TreeConnect call when a TID is connected, we did not
know it was a IPC share.
If we do not know what kind of share it is we assume it being a normal one
and thus read/write data to that share is normal file i/o.


Update the dissector so that IF it sees a Transaction SMB carrying PIPE (dcerpc)
then we assume that all other read/write to that TID is also DCERPC.
I.e. we assume the entire TID is IPC.

svn path=/trunk/; revision=6747
2002-12-05 22:15:54 +00:00
Tim Potter
a20ae99262 Only display errors in SMB headers in the COL_INFO field. This gets
rid of the annoying STATUS_BUFFER_OVERFLOW messages when dissecting
large DCERPC responses as a buffer overflow is only a informational
message not an error.

svn path=/trunk/; revision=6632
2002-11-14 23:14:14 +00:00
Guy Harris
1177828349 Use the same ett_ value for all security blobs, regardless of whether
they're raw NTLMSSP or GSS-API.

svn path=/trunk/; revision=6584
2002-11-08 05:51:33 +00:00
Richard Sharpe
e914e4fa6a A small fix to NtCreat&X from Jim McDonough ...
svn path=/trunk/; revision=6562
2002-11-05 19:44:51 +00:00
Guy Harris
07d0032f1c Add a "fragment_add_seq_next()" to reassemble fragments that don't have
sequence numbers or offsets and are thus assumed to be received in order
with no duplicates or dropped fragments (e.g., for NetBIOS Frame, where
802.2 LLC guarantees in-order delivery to NetBIOS with no duplicates or
dropped fragments).

"show_fragment_tree()' and "show_fragment_seq_tree()" don't modify the
"fragment_items" to which the "fit" argument points, so make that
argument a "const fragment_items *".

Make all the "fragment_items" tables "static" (as they're not used
outside the modules defining them) and "const" (as they're not
modified).

Add support for reassembly of NetBIOS fragmented requests and responses.

Get rid of an unnecessary include of "packet-tr.c" in the NetBIOS
dissector, and make its table of dissection function pointers static.

Fix some typos in the AppleTalk and NetBIOS dissectors.

svn path=/trunk/; revision=6491
2002-10-24 06:17:36 +00:00
Richard Sharpe
29eb4e3c65 More pretty-boy stuff for Write&X responses ...
svn path=/trunk/; revision=6307
2002-09-20 07:43:02 +00:00
Richard Sharpe
c2e6d4fcb2 Add more info in the info col for write&X.
svn path=/trunk/; revision=6306
2002-09-20 07:28:20 +00:00
Richard Sharpe
6605085126 Fix the handling of the NTLMSSP blobs in the case when the server asks
for RAW NTLMSSP, but the client actually sends SPNEGO encapsulated NTLMSSP.

svn path=/trunk/; revision=6173
2002-09-04 05:46:02 +00:00
Richard Sharpe
2d8152c072 Further fixes. Properly account for the length of headers. Still some headers
that we do not account for properly, like Octet Strings.

svn path=/trunk/; revision=6152
2002-08-31 07:26:10 +00:00
Richard Sharpe
7dd034e9bf Properly handle raw ntlmssp ...
svn path=/trunk/; revision=6151
2002-08-31 05:31:42 +00:00
Richard Sharpe
284d6547e2 Handle the lack of a security blob in negprot response when raw NTLMSSP is
being used properly.

svn path=/trunk/; revision=6149
2002-08-31 00:12:14 +00:00
Richard Sharpe
f44c41f4ed Add support for raw NTLMSSP blobs when talking to XP etc ...
More to do yet though ...

svn path=/trunk/; revision=6148
2002-08-30 23:49:22 +00:00
Guy Harris
3f4397bbb0 From Ulf Lamping: change some #define names to avoid name collisions on
Windows that cause compiler warnings.

svn path=/trunk/; revision=6129
2002-08-29 19:05:41 +00:00
Richard Sharpe
0934975cc1 Guided by Guy and an examination of RFC2078 and RFC2478, I have added some
comments about what we need to do to get SPNEGO properly implemented.

More work to do.

svn path=/trunk/; revision=6121
2002-08-29 05:26:45 +00:00
Richard Sharpe
e0523f9acb Fix up dissect_file_attributes
svn path=/trunk/; revision=6119
2002-08-29 00:35:55 +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
Guy Harris
9aaf4916af Expand on a note in a comment.
svn path=/trunk/; revision=6085
2002-08-25 22:57:26 +00:00