Commit Graph

147 Commits

Author SHA1 Message Date
Jaap Keuter 39bd052f7b From Hadar Shoham:
Add support to AP request option reserved bit.

svn path=/trunk/; revision=32910
2010-05-20 18:34:38 +00:00
Bill Meier 1a474d8264 Use consistent indentation; Whitespace & formatting cleanup.
svn path=/trunk/; revision=32754
2010-05-11 15:34:57 +00:00
Bill Meier 2af17da2c1 Fix handling of pa-data-type KRB5_PA_PAC_REQUEST (& KRB5_PA_S4U2SELF).
-Define pa-data-type KRB5_PA_PAC_REQUEST properly so that it is recognized.
  Fixes bug #4752 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4752)
-Also revert definition of  KRB5_PA_S4U2SELF (to be a positive number).
(All of the above reverts part of SVN #31400).

-Display pa-data-type as FT_INT32.
-Display the value for pa-data-type KRB5_PA_PAC_REQUEST as Boolean (not Int).

svn path=/trunk/; revision=32752
2010-05-11 14:34:16 +00:00
Gerald Combs 55a8440162 In our case, not being able to read the Kerberos configuration file
isn't a big deal.

svn path=/trunk/; revision=31626
2010-01-22 22:36:03 +00:00
Gerald Combs 2efa26e0e1 Fix a double-free bug which was causing a crash. Our decryption buffer
length doesn't change, so allocate it just once. Add an expert item for
a successful decryption.

svn path=/trunk/; revision=31571
2010-01-19 19:28:30 +00:00
Bill Meier c5614625ee Fix some gcc -Wshadow warnings ....
svn path=/trunk/; revision=31559
2010-01-18 23:16:10 +00:00
Anders Broman 253ce6255d Try to fix a memory leak.
svn path=/trunk/; revision=31514
2010-01-13 16:35:50 +00:00
Anders Broman 7afd9b0c3b From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164

svn path=/trunk/; revision=31408
2010-01-02 09:46:16 +00:00
Bill Meier c0d270e5f0 Fix Bug #4363: wireshark decodes kerberos AS-REQ PADATA incorrectly.
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4363

svn path=/trunk/; revision=31400
2010-01-01 17:11:38 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.

svn path=/trunk/; revision=31319
2009-12-19 03:17:44 +00:00
Anders Broman 88bb44a51e From Jakub Zawadzki:
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164

svn path=/trunk/; revision=30691
2009-10-25 11:43:30 +00:00
Jeff Morriss fc7304c1a2 If we're on Windows and we don't have kerberos, define a dummy version of read_keytab_file_from_preferences to keep the linker happy (since this function is in libwireshark.def).
svn path=/trunk/; revision=30445
2009-10-09 20:16:23 +00:00
Ronnie Sahlberg d86f67b925 add a new function read_keytab_file_from_preferences(void)
that can be called by dissectoirs using kerberos keytab files.
This function will load a new keytab file on demand, if it is changed in 
the preferences.

The previous code had you save the preferences and then restart 
wireshark which is suboptimal from a user friendly perspective



svn path=/trunk/; revision=30384
2009-10-07 07:03:33 +00:00
Ronnie Sahlberg 28cb748f56 we must create a fake dcerpc_call_value structure when we call into the
dcerpc helpers


svn path=/trunk/; revision=30286
2009-10-04 08:24:04 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00
Kovarththanan Rajaratnam 0a5b014cec Don't guard col_clear with col_check
svn path=/trunk/; revision=29344
2009-08-09 07:36:13 +00:00
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +00:00
Ronnie Sahlberg f8cf2d2c83 When we passed the crytobuffer to krb5_c_decrypt() we never actually
verified that we did have enough data in the buffer/tvb, which could 
lead to a SEGV.
(for example if we enable KRB5 decryption but we do NOT use TCP 
reassembly, and the encrypted data goes beyong the end of the current 
segment)


Change the signature to decrypt_krb5_data() to take a TVB instead of a 
buffer+length.
Actually check that we do have the entire encrypted PDU before calling 
out to the kerberos libraries.



svn path=/trunk/; revision=29213
2009-07-28 13:01:41 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Anders Broman 4ec2c4ff47 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28363
2009-05-14 19:28:07 +00:00
Bill Meier abc0794cc2 The convention is to use TFS(...) when specifying a true_false_string with an FT_BOOLEAN field;
Also: use the global true_false_string tfs_yes_no  in place of a static local string.

svn path=/trunk/; revision=28321
2009-05-08 22:55:22 +00:00
Gerald Combs e2cd2bf4f2 Don't assemble asm_utils_win32_x86 on x64. Export a dummy read_keytab_file
if we're not using any encryption libraries on Windows.

This fixes the last Win64 compilation problems in epan.

svn path=/trunk/; revision=28008
2009-04-08 19:15:10 +00:00
Bill Meier 321506c076 (Trivial) Fix some spelling & etc in comments
svn path=/trunk/; revision=27996
2009-04-08 13:41:30 +00:00
Bill Meier 1f54573f66 From Jakub Zawadzki: g_gnprintf & etc: Use size of buffer [not size -1];
From me:
   - As suggested by Jakub actually use sizeof(...) rather than a numeric constant
      in various places;


svn path=/trunk/; revision=27775
2009-03-18 15:35:55 +00:00
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Bill Meier c0e92cbc04 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27065
2008-12-20 00:09:02 +00:00
Bill Meier c544c20956 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27050
2008-12-18 19:08:49 +00:00
Bill Meier a8f30cbca1 Fix some typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27037
2008-12-17 17:23:37 +00:00
Bill Meier 33c99f44fd Fix typos and spelling (mostly in text strings)
svn path=/trunk/; revision=27028
2008-12-17 00:08:38 +00:00
Bill Meier 931f05c212 Trivial change to use gboolean & etc for TRUE/FALSE variables
svn path=/trunk/; revision=27007
2008-12-15 20:35:13 +00:00
Anders Broman 8384b6976a Revert files checked in by misstake.
svn path=/trunk/; revision=26485
2008-10-16 21:33:00 +00:00
Anders Broman 248049bcbb Add asn1 file from Heimdal use som stuff from it add more dissection in the template and .cnf file.
svn path=/trunk/; revision=26484
2008-10-16 21:27:14 +00:00
Ronnie Sahlberg d83b8b0336 kerberos/gss enhancements
add a parameter *datalen to decrypt_krb5_data() so that we can pass back 
the length of the decrypted blob back to the caller.
This is useful for when there are "junk" at the end of the blob and thus 
the decrypted data is not the same size as the encrypted blob.
GSS CFX is one such example.
(we should have done this earlier since it might have made some other 
stuff easier to imlement...)


make the preference setting krb_decrypt a globally visible variable so 
we can see its value and act on it from callers of krb decryption from 
outside of packet-kerberos.c    i.e.   from GSS CFX


Make keytype == -1  a wildcard that when passed to decrypt_krb5_data() 
will try any/all encryption keys.
This since GSS CFX does not provide the enctype in the GSS layer.
(The GSS CFX enctype is only negotiated during the AP-REQ/REP  so we 
should later pick this value up and store it in a CFX session variable.
That is for a later enhancement.
)


Enhance the GSS decryption (that for hitorical reasons are implemented 
in packet-spnego.c  and not packet-gssapi.c :-)  )
to also handle decryption of GSS CFX

This should make wireshark able to decrypt any/all GSSAPI  RFC4121 
packets, if the keytab file is provided.


I have successfully decrypted LDAP using GSS CFX with AES encryption 
with this.




svn path=/trunk/; revision=26350
2008-10-05 00:28:36 +00:00
Ronnie Sahlberg 24b76bdc14 add a -K command line option to provide the name of the kerberos keytab
file to use for decryption of Krb5 and GSS-KRB


svn path=/trunk/; revision=26343
2008-10-03 05:21:28 +00:00
Ronnie Sahlberg 7d3592fed2 from metze
add support for decryption of gssapi auth type 16


svn path=/trunk/; revision=26293
2008-09-29 18:38:45 +00:00
Jaap Keuter 19e29e857e From Derek Morr:
The Kerberos dissector does not parse IPv6 addresses in AS-REQ messages.
Attached is a patch that adds IPv6 dissection support, and adds a new filter,
kerberos.addr_ipv6, which is analagous to the existing kerberos.addr_ip.

svn path=/trunk/; revision=26241
2008-09-21 13:55:32 +00:00
Guy Harris a1fb6f2e8c If HAVE_KERBEROS isn't defined, enc_authorization_data_etype isn't
defined; make it a local variable in that case.

svn path=/trunk/; revision=26072
2008-08-25 16:13:48 +00:00
Ronnie Sahlberg 640e4d4025 implement pac info type #12 UPN_DNS_INFO
svn path=/trunk/; revision=26069
2008-08-25 03:46:51 +00:00
Ronnie Sahlberg 8d98fcd177 start adding support to decrypt and dissect the enc-authorization-data
of TGS_REQ


svn path=/trunk/; revision=26068
2008-08-25 02:55:04 +00:00
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