Commit Graph

108 Commits

Author SHA1 Message Date
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Bill Meier a8cb768921 Fix crash in Bug #2410: restore saved 'packet_info.private_data' for two fail returns
svn path=/trunk/; revision=25218
2008-05-02 19:03:00 +00:00
Ronnie Sahlberg 4284906aba based on the novell idllib sources :
add dissection of the 16 byte header prior to the NDR data when NDR is 
transported as a blob ontop of !dcerpc
like the LOGON_INFO in the PAC in kerberos


svn path=/trunk/; revision=24289
2008-02-08 09:20:02 +00:00
Anders Broman de16039c51 Get rid of dissect_ber_boolean_value() and change the signature of
dissect_ber_boolean() to return a value and update asn2wrs to generate the new signature.
Regenerate all BER dissectors.

svn path=/trunk/; revision=24015
2008-01-04 16:21:07 +00:00
Anders Broman a6d82ae12e Get rid of ber_last_created_item().
svn path=/trunk/; revision=24008
2008-01-04 12:39:52 +00:00
Jeff Morriss dd0a4750b0 s/stat/eth_stat/ and s/unlink/eth_unlink/ to avoid non-ASCII filename problems on Windows.
svn path=/trunk/; revision=23605
2007-11-26 18:35:37 +00:00
Anders Broman 90753a169e Apply yet another set of the optimization patches:
When offset parameter is 0 replace tvb_bytes_exist() with the faster tvb_length().
non heuristic dissectors

svn path=/trunk/; revision=23405
2007-11-08 22:40:20 +00:00
Jörg Mayer b312e64f6a get_ber_length doesn't need the tree argument, get rid of it.
Rebuild asn1 dissectors.

svn path=/trunk/; revision=22627
2007-08-24 07:12:04 +00:00
Jeff Morriss 3b6cd9fc91 From Ted Percival: Support for PA-S4U2Self Kerberos packet type based on ASN.1
description in Heimdal.

svn path=/trunk/; revision=22364
2007-07-20 18:57:02 +00:00
Ronnie Sahlberg 960af5e5ba dissect a new AD-IF-RELEVANT type seen in some vista traces
it is essentially 

Checksum ::= SEQUENCE {
   type     [0] INTEGER  # -138 == HMAC-MD5
   checksum [1] OCTET STRING
}

SignTicket ::= SEQUENCE {
   enctype   [0] INTEGER
   signature [1] Checksum
}



svn path=/trunk/; revision=22235
2007-07-03 12:02:16 +00:00
Anders Broman dca634c4de Prepare for the use of the new -X parameter for BER encoded protocols.
svn path=/trunk/; revision=21889
2007-05-22 16:17:54 +00:00
Anders Broman f08cd1e5e3 actx in the rest of dissect_ber..()l
svn path=/trunk/; revision=21773
2007-05-15 05:49:43 +00:00
Anders Broman c01f382974 Second step in introducing asn context to BER dissectors just like in PER.
svn path=/trunk/; revision=21753
2007-05-13 20:58:29 +00:00
Anders Broman 4c692a62b6 Start introducing actx to ber functions.
svn path=/trunk/; revision=21705
2007-05-06 22:34:05 +00:00
Jeff Morriss 00cf2ec89c Frame numbers are unsigned, print them as such
svn path=/trunk/; revision=21443
2007-04-16 04:52:51 +00:00
Stephen Fisher 8dabc0ded1 Fix some more warnings under gcc 4.0
svn path=/trunk/; revision=21237
2007-03-27 23:14:13 +00:00
Ulf Lamping c436a70b49 /* prevent redefinition warnings in kfw-2.5\inc\win_mac.h */
#undef HAVE_STDARG_H
#undef HAVE_SYS_TYPES_H

svn path=/trunk/; revision=21144
2007-03-23 01:56:09 +00:00
Luis Ontanon 403fa20bf1 Make sure ENDTRY is evaluated.
On windows if ENDTRY is not evaluated after a exception is being thrown wireshark will crash in dissect_packet() while attempting to pop the last frame of the exception stack.

svn path=/trunk/; revision=21014
2007-03-10 02:11:51 +00:00
Ronnie Sahlberg 657bf78561 if the KRB-ERROR PDU contains a pw-salt containing an NT status code, show that NT status code on the summary line since it gives more precise error description to why there was an kerberos error.
svn path=/trunk/; revision=20827
2007-02-17 00:47:09 +00:00
Ronnie Sahlberg ffc2333ea8 decode the known 4 bytes of the 16 byte blob that prepends the ndr encoded logoninfo and constraineddelegation ndr encoded blobs inside the PAC
svn path=/trunk/; revision=20826
2007-02-17 00:13:57 +00:00
Ronnie Sahlberg 7214c88fa2 when decrypting a blob allocate a new private memory area to return to the caller instead of reusing the same one over and over (g_free followed by g_malloc by the same size often result in the same area being returned)
this resolves some issues where the decode is ok  but the hexpane shows corrupted memory where the decrypted blob should be.



svn path=/trunk/; revision=20824
2007-02-16 21:04:45 +00:00
Jaap Keuter dd98f8bd4a From Gisle Vanem:
* <epan/crypt/crypt-md5.h> must come after <glib.h> because of
  'guint8' etc.
* Include <wiretap/file_util.h> because of eth_fopen().

svn path=/trunk/; revision=20456
2007-01-16 19:27:25 +00:00
Gerald Combs 53689800e6 Move epan/crypt-md5.[ch] to epan/crypt. Remove
epan/crypt/airpdcap_md5.[ch].  Fix up whitespace.

svn path=/trunk/; revision=20277
2007-01-02 22:49:57 +00:00
Ronnie Sahlberg fd00fc9cb2 kerberos error with ERR_ETYPE_NOSUPP which is issued when the kdc does not support the specified enctype in AS REQ contains in the e-type field for optional additional data a PA_DATA sequence of sequence just as PREAUTH_REQ/FAILED does.
(it would make much more sense if the KDC here would list the enctypes that are supported)




svn path=/trunk/; revision=20125
2006-12-12 08:28:37 +00:00
Anders Broman d61e373bb4 As ponted out by Stig Bjørlykke change a whole bunch of dissector_handle_t to static.
svn path=/trunk/; revision=20062
2006-12-07 20:34:08 +00:00
Ronnie Sahlberg 2d1bb39121 change the signature for the get_pdu_len() function pointer passed to tcp_dissect_pdus() to also include a packet_info pointer.
there are many reasons why some protocols actually need to be able to access the pinfo structure while determining the pdu size



svn path=/trunk/; revision=19751
2006-10-31 09:29:07 +00:00
Jaap Keuter 7ded21f336 Squelch compiler warnings
svn path=/trunk/; revision=19597
2006-10-18 19:42:10 +00:00
Jaap Keuter 52499b3dd4 Patch in bug 1149, adds DCE-style flag for gss-api
svn path=/trunk/; revision=19438
2006-10-05 11:35:41 +00:00
Ronnie Sahlberg 6e040b3a83 krb4 is a new style dissector and is called through a handle from krb5 which is also new style.
use call_dissector_only()  which is new-style aware and not call_dissector() which is not.

this fixes a recent bug found on the heimdal list.



svn path=/trunk/; revision=19129
2006-09-04 08:18:52 +00:00
Ronnie Sahlberg c771b251eb this is a blob not a policyhandle
svn path=/trunk/; revision=18865
2006-08-10 07:35:26 +00:00
Ronnie Sahlberg 4ac1c1fae5 metze pointed out that the last four bytes of the 20 byte blob prepenfing the ndr encoded data in the pac must be a unique pointer
make sense,   decode it as a unique pointer then



svn path=/trunk/; revision=18859
2006-08-09 11:25:20 +00:00
Ronnie Sahlberg 9149665c5c decode the field of type 11
(it could theoretically also be a union with arm:1 selected instead of a conformant array)


svn path=/trunk/; revision=18858
2006-08-09 08:25:01 +00:00
Ronnie Sahlberg 2e9f554669 testing the win32 decryp[tion out i noticed a lot of new previously not decoded info in the captures for constrained delegation on the Kerberos wiki page.
a new bit 0x00020000 is usde in the TGS-REQ packets and this results in a return of a PAC containing an unknown type 11 field.


the blob in the pac is 200 bytes and NDR encoded.   its structure is obvious since it contains 2 conformant and varying arrays  and three unique pointers.



enable decoding of this new KDCOptions bit and call it "constrained delegation"




svn path=/trunk/; revision=18857
2006-08-09 07:37:57 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg ac1721573d from Guenther Deschner
Two more Kerberos error codes where it has been witnessed that the payload contains a PA-DATA structure with the magic salt containing an nt status code



svn path=/trunk/; revision=18088
2006-05-04 08:54:58 +00:00
Ronnie Sahlberg 7edd136c88 implement decryption of and dissection of
EncKrbCredPart

Packet 18 in sample capture kerberos-Delegation.zip on the wiki contains this structure.



svn path=/trunk/; revision=18069
2006-05-02 08:42:19 +00:00
Ronnie Sahlberg d1da7d875d MS KDC sends a PA_DATA with a magic salt containing an nt status code also for ERR_BADOPTION which can be seen in the constrained-delegation.zip capture on the wiki sample captures page.
svn path=/trunk/; revision=18055
2006-05-01 08:48:33 +00:00
Ronnie Sahlberg 10a0fd2105 a krb_error pdu with the error_code ERR_CLIENT_REVOKED
issued by ms kdc contains a PA_DATA structure with a salt that contains an
nt_status code explaining why the client was not allowed to get a (tgt) ticket



svn path=/trunk/; revision=17796
2006-04-03 08:55:04 +00:00
Ronnie Sahlberg fd58413224 start decoding PA_PW_SALT in the PA-DATA structure.
for the time being   since i have never seen this salt being used elsewhere,
assume everything is the MS style salt:

guint32 nt_status
guint32 unknown
guint32 unknown


if the MS KDC does nopt allow a client to grab a ticket (due to policy   client can only log in at certain hours or such)
KDC will repsond with a failuer with edata like above   and nt-status ==  STATUS_LOGON_HOURS




svn path=/trunk/; revision=17722
2006-03-24 21:41:01 +00:00
Ronnie Sahlberg 54f9da2135 the edata field is PA-DATA for error PREAUTH_FAILED just the same as for PREAUTH_REQUIRED
add decode of edata field for the error code PREAUTH_FAILED



svn path=/trunk/; revision=17721
2006-03-24 21:16:47 +00:00
Ronnie Sahlberg f331077a60 waste a couple of bytes per tcp conversation and make the tree for acked_packets (i.e. packets that have interesting tcp properties such as being retransmissions etc) hang off the per conversation tcpd struct instead of being global.
while this should improve performance by unmeasurably little it does have the sideeffect that once we finish the rewrite   tcp analysis might actually work and work well even for tcp over tcp tunnelling. 

this also means that if you include packet-tcp.h   you also need to include emem.h .




svn path=/trunk/; revision=17681
2006-03-20 10:52:53 +00:00
Ronnie Sahlberg a1c15f7ab2 add rfc1964 stuff and (incomplete) KRB_CRED support.
KRB_CRED does not currently even try to decrypt EncKrbCredPart   but it is better than no KRB_CRED dissection at all.



svn path=/trunk/; revision=17272
2006-02-12 13:18:48 +00:00
Jörg Mayer a052b3a98b packet-bgp.c: Fix incorrect use of g_snprintf return value
mp_addr_to_str was unnecessary 'complex' - simplified it
packet-dns.c: Fix incorrect use of g_snprintf return value
packet-dcm.c: Fix incorrect use of g_snprintf return value
        Someone who understands the protocol should look at the
        "vr, tr might be used uninitialized..." warning.
packet-x11.c: Fix incorrect use of g_snprintf return value
packet-kerberos.c: Fix incorrect use of g_snprintf return value
        Someone should take a look at the
        "longjump might clobber ..." messages
packet-diameter.c: Fix incorrect use of g_snprintf return value
        Get rid of unsigned < 0 check
packet-pgm.c: Fix incorrect use of g_snprintf return value
packet-nbns.c: Fix incorrect use of g_snprintf return value
packet-winsrepl.c: Collateral damage to packet-nbns.c fix
packet-netbios.c: Collateral damage to packet-nbns.c fix
packet-netbios.h: Collateral damage to packet-nbns.c fix
packet-kerberos.c: Collateral damage to packet-nbns.c fix
packet-nbipx.c: Collateral damage to packet-nbns.c fix


svn path=/trunk/; revision=17065
2006-01-20 21:18:18 +00:00
Ronnie Sahlberg 80720ebcab from eric wedel
kpasswd over tcp support


svn path=/trunk/; revision=16885
2005-12-23 03:43:56 +00:00
Jörg Mayer eff40f65db Trivial warning fixes
svn path=/trunk/; revision=16561
2005-11-22 12:51:14 +00:00
Ulf Lamping c3187174bf replace *a lot* of file related calls by their GLib counterparts. This is necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.

deleted related things from config.h.win32

As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.

svn path=/trunk/; revision=16403
2005-11-06 22:43:25 +00:00
Ronnie Sahlberg ccaded007c From William Fiveash
Support for PA_ENCTYPE_INFO2
and defines for new aes crypto



svn path=/trunk/; revision=16156
2005-10-07 22:51:25 +00:00
Guy Harris c5b0fc27d7 Fix a bunch of places where we were calling "dissect_ber_octet_string()"
with a non-null pointer-to-pointer-to-tvbuff and not checking whether
the returned tvbuff pointer was non-null.

svn path=/trunk/; revision=15948
2005-09-22 00:51:11 +00:00
Guy Harris 3287558c94 In at least some captures, some Kerberos packets contain just a Ticket
structure.  Handle that.

Don't muck with the columns, or put a top-level Kerberos protocol item
into the protocol tree, until we decide that we really have a Kerberos
packet.

Do, however, clear the Info column if we're dissecting the Kerberos
protocol.

svn path=/trunk/; revision=15589
2005-08-28 06:40:59 +00:00
Ronnie Sahlberg 60f819daf7 removal of sprintf
svn path=/trunk/; revision=15558
2005-08-27 01:19:12 +00:00