Commit Graph

87 Commits

Author SHA1 Message Date
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
Ronnie Sahlberg 2edce4224d when kerberos claims a conversation, it only claims it for the source port
since a KDC MIGTH send the reply back from a different port.

Then comes X.L's capture (ethereal-dev) 816fc4.cap from 16Aug2005 where
the client is reusing the same source port to talk to DNS after finishing
doing the port 88 KDC stuff.


==>

Make kerberos/udp able to test the packet for sanity and reject packets that
do not look like kerberos (even if there was a conversation that said it was kerberos)
and thus let other dissectors have a go at it.


in doubt,   try 816fc4.cap  before and after this patch :-)



svn path=/trunk/; revision=15405
2005-08-18 10:37:41 +00:00
Ronnie Sahlberg efa1f43005 convert some tvb_fake_unicode() to tvb_get_ephemeral_faked_unicode()
svn path=/trunk/; revision=15272
2005-08-10 14:17:27 +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
Gerald Combs b992c73391 In packet-frame.c, don't free static memory when we throw a
DissectorError.  In packet-kerberos.c, restore pinfo->private_data if
we throw an exception, which keeps the SMB dissector from throwing
a DissectorError.  Initialize variables in other places to squelch
valgrind warnings.

svn path=/trunk/; revision=15235
2005-08-06 03:43:42 +00:00
Jörg Mayer 7b2ff03d8c Fix more "no previous declaration" warnings
svn path=/trunk/; revision=15169
2005-08-02 04:31:42 +00:00
Ronnie Sahlberg 34c10c4c7e packet_ber has for some time been doing sanity checking of the BER Length fields
that they are not longer than the reported length of the tvb.

this triggers some bugs since in packet-ber we are a bit too lax in setting reported_length of the tvb_new_subset() tvb.

this cause short kerberos packets to not be decoded at all and the same for other short asn based packets as well.


fix some of these instances.


svn path=/trunk/; revision=15127
2005-07-28 08:18:18 +00:00
Jörg Mayer 88895e2f02 Warning fixes
svn path=/trunk/; revision=15067
2005-07-25 21:08:14 +00:00
Ronnie Sahlberg 0ca30abe65 change the symbol dissect_ber_CHOICE back into dissect_ber_choice
svn path=/trunk/; revision=14980
2005-07-21 21:12:09 +00:00
Guy Harris 8647bbf353 Make a bunch of items in encryption code arrays of guint8, and make some
pointers either "void *" or "guint8 *", to reduce the level of compiler
warnings (the data in question is largely binary in those cases).

svn path=/trunk/; revision=14886
2005-07-09 03:25:25 +00:00
Guy Harris 34ae8c850f Fix up a bunch of arguments to "dissect_ber_identifier()" to match its
current signature ("class" is a "gint8 *", not a "guint8 *", and "tag"
is a "gint32 *", not a "guint32 *").  Re-generate the dissectors from
the ASN.1 and the .cnf files in the cases where the arguments were fixed
in a .cnf file.

Give some dissectors the right svn:keywords and svn:eol-style settings.

svn path=/trunk/; revision=14885
2005-07-09 02:58:07 +00:00
Ronnie Sahlberg 3a51ba4293 make dissect_ber_choice take a guint* that will return the
index of the branch taken or -1  to make prettifications easier to implement.


change the signature of dissect_ber_choice and rename it to dissect_ber_CHOICE to catch all
occurences of the use of this function

update asn2eth to use the new name/signature

update all occurences of this function to the new name and new signature.



svn path=/trunk/; revision=14758
2005-06-26 05:48:50 +00:00
Ronnie Sahlberg b958accede move one function only used by SPNEGO to packet-spnego.c
remove the include of <epan/asn1.h> from kerberos, ntlmssp and gssapi since they no longer need to include that file.


svn path=/trunk/; revision=14709
2005-06-20 05:28:56 +00:00
Jörg Mayer 3b785e39ec Fix trivial warning
svn path=/trunk/; revision=14701
2005-06-19 15:17:42 +00:00
Ronnie Sahlberg 94d8512749 From T.Nakashima
updates to KINK


svn path=/trunk/; revision=14453
2005-05-27 08:53:07 +00:00
Ronnie Sahlberg 20a4d3257e Add a tree parameter to get_ber_length() so that
IF the length seems bogus, like longer than the reported tvb_length
we add a helpful text item to the tree  and generate a [malformed packet]


change all callers of get_ber_length to the new signature.



svn path=/trunk/; revision=14145
2005-04-20 08:35:47 +00:00
Ronnie Sahlberg c2bfab2249 some updates from T Anders
svn path=/trunk/; revision=14125
2005-04-18 10:46:17 +00:00
Ronnie Sahlberg 2bc81b2a48 Major speed improvement for filtering and dissection.
It should not dump core as far as all my tests are concerned and Menu_Statistics/ProtocolHierStats work

It needs more testing and there might still be cases where it will crash that will need to be fixed  but I feel it will be worth it since it will decrease the time to filter very large capture files dramatically.

Real significant performance boost for very large captures.


(If we cant fix all the problems we can just revert this patch)



svn path=/trunk/; revision=14051
2005-04-11 08:43:51 +00:00
Ronnie Sahlberg 9e7a393c1f make ethereal decrypt gss-krb (secure ldap and ms signandseal for dce)
also when linked with mit kerberos




svn path=/trunk/; revision=13850
2005-03-21 10:52:57 +00:00
Ronnie Sahlberg 31f7bd0e60 remove some heimdal dependencies we dont really need
and prepare for gssapi mit support


svn path=/trunk/; revision=13849
2005-03-21 10:07:55 +00:00
Guy Harris 0eaac18fff Check whether we have a first byte before checking it.
svn path=/trunk/; revision=13778
2005-03-16 21:40:34 +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