Commit Graph

32 Commits

Author SHA1 Message Date
Hadriel Kaplan ceb8d954d2 Lua: Expose tcp_dissect_pdus() to Lua
Provide a way for Lua-based dissectors to invoke tcp_dissect_pdus()
to make TCP-based dissection easier.

Bug: 9851
Change-Id: I91630ebf1f1fc1964118b6750cc34238e18a8ad3
Reviewed-on: https://code.wireshark.org/review/6778
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Tested-by: Hadriel Kaplan <hadrielk@yahoo.com>
2015-01-27 15:14:12 +00:00
Guy Harris 5981dab95b Declare read_keytab_file() in epan/dissectors/packet-kerberos.h.
Don't throw its declaration in file.h, as it's not defined in file.c.
Instead, include it in epan/dissectors/packet-kerberos.h and include
that wherever read_keytab_file() is called.

Yes, that means you also have to include <epan/asn1.h> and, therefore,
you have to include <epan/packet.h>.  Yes, that should be cleaned up,
perhaps by splitting the Kerberos support code into "stuff that handles
encryption keys without any reference to dissection" and "stuff that
does dissection-related work".

Change-Id: Ide5c31e6d85e6011d57202f728dbc656e36138ef
Reviewed-on: https://code.wireshark.org/review/6210
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 23:05:57 +00:00
Guy Harris 219d37e2d1 Let routines from the Kerberos dissector be called from C++.
Wrap its declarations in the usual "extern "C"" stuff.

Change-Id: I353ab334bc08a69fdacaaab5672edf758b14766a
Reviewed-on: https://code.wireshark.org/review/6201
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01 12:13:34 +00:00
Stig Bjørlykke 1fb902f217 Use new BER functions in kpasswd.
Added RFC 3244 ChangePasswdData to the kerberos dissector.

This is the last dissector using the "old BER" functions.

Change-Id: I1d79047103c07c268d08e652745391f1ac37c82c
Reviewed-on: https://code.wireshark.org/review/1198
Reviewed-by: Tomáš Kukosa <tomas.kukosa@unify.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-18 21:42:51 +00:00
AndersBroman dea68bf00f Switch to using the ASN1 based kerberos dissector.
Change-Id: Ib8945cdad149b71e3f79bd88032fd10f55ba556d
Reviewed-on: https://code.wireshark.org/review/1174
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-17 08:29:39 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Stefan Metzmacher 9db0e02fb3 packet-kerberos: remember in what frame a key was learned
Change-Id: Icd05d4941fdacac44094fafbad07f08ec4cbe976
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/364
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-25 21:47:27 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +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 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
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
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
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
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 80720ebcab from eric wedel
kpasswd over tcp support


svn path=/trunk/; revision=16885
2005-12-23 03:43:56 +00:00
Guy Harris d7f391d333 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=15590
2005-08-28 06:41:49 +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 7556ea3783 Declare "decrypt_krb5_data()" for use by the KINK dissector.
svn path=/trunk/; revision=14809
2005-06-28 21:25: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 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
Ronnie Sahlberg 31a9522aa2 export some symbols we will need later.
svn path=/trunk/; revision=13646
2005-03-07 09:02:33 +00:00
Ronnie Sahlberg 26dd060797 export decrypt_krb5_data
svn path=/trunk/; revision=13641
2005-03-06 22:34:13 +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 2f4cb22585 make ethereal able to decrypt KRB_PRIV which kpasswd uses
svn path=/trunk/; revision=13583
2005-03-04 12:21:40 +00:00
Gerald Combs 24f30a8850 Add support for pkauthdata and pkdhkeydata OIDs.
svn path=/trunk/; revision=12426
2004-10-28 22:06:55 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00