Commit Graph

75 Commits

Author SHA1 Message Date
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
Jörg Mayer 8de6e67f08 Fix a small typo that would prevent compilation with MIT Kerberos
svn path=/trunk/; revision=13647
2005-03-07 10:15:03 +00:00
Ronnie Sahlberg 31a9522aa2 export some symbols we will need later.
svn path=/trunk/; revision=13646
2005-03-07 09:02:33 +00:00
Jörg Mayer f2bab830dc Make packet-kerberos.c compile again:
Replace the use of the undefined type krb5_keyusage (at least with heimdal)
in decrypt_krb5_data with the old int. The change wasn't complete anyway
as the .h file wasn't changed and the third implemenitation of
decrypt_krb5_data was left out also.

Disclaimer: I only made sure it compiles again, I don't know whether the
  change has any side effects.


svn path=/trunk/; revision=13645
2005-03-07 08:47:48 +00:00
Ronnie Sahlberg 26dd060797 export decrypt_krb5_data
svn path=/trunk/; revision=13641
2005-03-06 22:34:13 +00:00
Guy Harris 5ba3adf134 Omit some stuff when building without a Kerberos library, as it's unused
if you don't have a Kerberos library to do decryption.

svn path=/trunk/; revision=13593
2005-03-05 01:00:15 +00:00
Lars Roland e434150f99 fix kerberos dissector for those having no kerberos decryption
svn path=/trunk/; revision=13591
2005-03-05 00:21:46 +00:00
Ronnie Sahlberg 7671b98bac make kpasswd privide subdissectors to handle the user-data field for the KRB_PRIV structure for kpasswd requests and replies.
decrypt and behold the new password in plaintext in all its glory
(given you have the keytab with the old one of course)


svn path=/trunk/; revision=13586
2005-03-04 13:39:15 +00:00
Ronnie Sahlberg 6fec8dca5f some authentication stuff from metze
svn path=/trunk/; revision=13584
2005-03-04 12:28:00 +00:00
Ronnie Sahlberg 2f4cb22585 make ethereal able to decrypt KRB_PRIV which kpasswd uses
svn path=/trunk/; revision=13583
2005-03-04 12:21:40 +00:00
Guy Harris 5639b87daf The Kerberos-over-UDP dissector can decide not to dissect packets, so it
needs to be a new-style dissector and explicitly reject them so that
other dissectors can pick them up.

svn path=/trunk/; revision=13528
2005-02-26 00:14:22 +00:00
Ronnie Sahlberg 7f86cffa58 add support to call krb4 for suspected krb4 stuff soming in on udp port 88
weirdo krb4 implementations apparently do this.


svn path=/trunk/; revision=13516
2005-02-25 11:38:56 +00:00
Ronnie Sahlberg fbf762bda5 update asn2eth and all generated dissectors to new dissect_ber_boolean that takes a implicit_tag parameter
svn path=/trunk/; revision=13479
2005-02-23 08:57:47 +00:00