diff options
author | Stefan Metzmacher <metze@samba.org> | 2016-05-20 07:57:02 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2020-03-18 18:30:37 +0000 |
commit | 8f00b7011fb0a1508fb5550633a8c10cec0b5409 (patch) | |
tree | 0e378a1bfcb19199587986e7da03cb840ecea66e | |
parent | fa7584898d86b38b961dd4d140a1aa2886a55df4 (diff) |
packet-kerberos: dissect names of new PAC_* types
For now we don't dissect the details, but it's already useful,
if they are not unknown elements.
Change-Id: I38b521262b688ba0afbbb9c58b99c3b50dbd2b24
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/36467
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | epan/dissectors/asn1/kerberos/packet-kerberos-template.c | 63 | ||||
-rw-r--r-- | epan/dissectors/packet-kerberos.c | 75 |
2 files changed, 120 insertions, 18 deletions
diff --git a/epan/dissectors/asn1/kerberos/packet-kerberos-template.c b/epan/dissectors/asn1/kerberos/packet-kerberos-template.c index 3b267eae04..5e1b7d05df 100644 --- a/epan/dissectors/asn1/kerberos/packet-kerberos-template.c +++ b/epan/dissectors/asn1/kerberos/packet-kerberos-template.c @@ -179,6 +179,9 @@ static gint hf_krb_pac_upn_dns_name = -1; static gint hf_krb_pac_server_checksum = -1; static gint hf_krb_pac_privsvr_checksum = -1; static gint hf_krb_pac_client_info_type = -1; +static gint hf_krb_pac_client_claims_info = -1; +static gint hf_krb_pac_device_info = -1; +static gint hf_krb_pac_device_claims_info = -1; static gint hf_krb_pa_supported_enctypes = -1; static gint hf_krb_pa_supported_enctypes_des_cbc_crc = -1; static gint hf_krb_pa_supported_enctypes_des_cbc_md5 = -1; @@ -1469,15 +1472,21 @@ static const value_string krb5_error_codes[] = { #define PAC_PRIVSVR_CHECKSUM 7 #define PAC_CLIENT_INFO_TYPE 10 #define PAC_S4U_DELEGATION_INFO 11 -#define PAC_UPN_DNS_INFO 12 +#define PAC_UPN_DNS_INFO 12 +#define PAC_CLIENT_CLAIMS_INFO 13 +#define PAC_DEVICE_INFO 14 +#define PAC_DEVICE_CLAIMS_INFO 15 static const value_string w2k_pac_types[] = { { PAC_LOGON_INFO , "Logon Info" }, - { PAC_CREDENTIAL_TYPE , "Credential Type" }, - { PAC_SERVER_CHECKSUM , "Server Checksum" }, - { PAC_PRIVSVR_CHECKSUM , "Privsvr Checksum" }, - { PAC_CLIENT_INFO_TYPE , "Client Info Type" }, - { PAC_S4U_DELEGATION_INFO, "S4U Delegation Info" }, + { PAC_CREDENTIAL_TYPE , "Credential Type" }, + { PAC_SERVER_CHECKSUM , "Server Checksum" }, + { PAC_PRIVSVR_CHECKSUM , "Privsvr Checksum" }, + { PAC_CLIENT_INFO_TYPE , "Client Info Type" }, + { PAC_S4U_DELEGATION_INFO , "S4U Delegation Info" }, { PAC_UPN_DNS_INFO , "UPN DNS Info" }, + { PAC_CLIENT_CLAIMS_INFO , "Client Claims Info" }, + { PAC_DEVICE_INFO , "Device Info" }, + { PAC_DEVICE_CLAIMS_INFO , "Device Claims Info" }, { 0, NULL }, }; @@ -2222,6 +2231,30 @@ dissect_krb5_PAC_UPN_DNS_INFO(proto_tree *parent_tree, tvbuff_t *tvb, int offset } static int +dissect_krb5_PAC_CLIENT_CLAIMS_INFO(proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) +{ + proto_tree_add_item(parent_tree, hf_krb_pac_client_claims_info, tvb, offset, -1, ENC_NA); + + return offset; +} + +static int +dissect_krb5_PAC_DEVICE_INFO(proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) +{ + proto_tree_add_item(parent_tree, hf_krb_pac_device_info, tvb, offset, -1, ENC_NA); + + return offset; +} + +static int +dissect_krb5_PAC_DEVICE_CLAIMS_INFO(proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) +{ + proto_tree_add_item(parent_tree, hf_krb_pac_device_claims_info, tvb, offset, -1, ENC_NA); + + return offset; +} + +static int dissect_krb5_PAC_SERVER_CHECKSUM(proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) { proto_item *item; @@ -2334,6 +2367,15 @@ dissect_krb5_AD_WIN2K_PAC_struct(proto_tree *tree, tvbuff_t *tvb, int offset, as case PAC_UPN_DNS_INFO: dissect_krb5_PAC_UPN_DNS_INFO(tr, next_tvb, 0, actx); break; + case PAC_CLIENT_CLAIMS_INFO: + dissect_krb5_PAC_CLIENT_CLAIMS_INFO(tr, next_tvb, 0, actx); + break; + case PAC_DEVICE_INFO: + dissect_krb5_PAC_DEVICE_INFO(tr, next_tvb, 0, actx); + break; + case PAC_DEVICE_CLAIMS_INFO: + dissect_krb5_PAC_DEVICE_CLAIMS_INFO(tr, next_tvb, 0, actx); + break; default: break; @@ -2767,6 +2809,15 @@ void proto_register_kerberos(void) { { &hf_krb_pac_upn_dns_name, { "DNS Name", "kerberos.pac.upn.dns_name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }}, + { &hf_krb_pac_client_claims_info, { + "PAC_CLIENT_CLAIMS_INFO", "kerberos.pac_client_claims_info", FT_BYTES, BASE_NONE, + NULL, 0, "PAC_CLIENT_CLAIMS_INFO structure", HFILL }}, + { &hf_krb_pac_device_info, { + "PAC_DEVICE_INFO", "kerberos.pac_device_info", FT_BYTES, BASE_NONE, + NULL, 0, "PAC_DEVICE_INFO structure", HFILL }}, + { &hf_krb_pac_device_claims_info, { + "PAC_DEVICE_CLAIMS_INFO", "kerberos.pac_device_claims_info", FT_BYTES, BASE_NONE, + NULL, 0, "PAC_DEVICE_CLAIMS_INFO structure", HFILL }}, { &hf_krb_pa_supported_enctypes, { "SupportedEnctypes", "kerberos.supported_entypes", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, diff --git a/epan/dissectors/packet-kerberos.c b/epan/dissectors/packet-kerberos.c index fad8e36b29..5e5f460495 100644 --- a/epan/dissectors/packet-kerberos.c +++ b/epan/dissectors/packet-kerberos.c @@ -187,6 +187,9 @@ static gint hf_krb_pac_upn_dns_name = -1; static gint hf_krb_pac_server_checksum = -1; static gint hf_krb_pac_privsvr_checksum = -1; static gint hf_krb_pac_client_info_type = -1; +static gint hf_krb_pac_client_claims_info = -1; +static gint hf_krb_pac_device_info = -1; +static gint hf_krb_pac_device_claims_info = -1; static gint hf_krb_pa_supported_enctypes = -1; static gint hf_krb_pa_supported_enctypes_des_cbc_crc = -1; static gint hf_krb_pa_supported_enctypes_des_cbc_md5 = -1; @@ -415,7 +418,7 @@ static int hf_kerberos_PAC_OPTIONS_FLAGS_forward_to_full_dc = -1; static int hf_kerberos_PAC_OPTIONS_FLAGS_resource_based_constrained_delegation = -1; /*--- End of included file: packet-kerberos-hf.c ---*/ -#line 196 "./asn1/kerberos/packet-kerberos-template.c" +#line 199 "./asn1/kerberos/packet-kerberos-template.c" /* Initialize the subtree pointers */ static gint ett_kerberos = -1; @@ -509,7 +512,7 @@ static gint ett_kerberos_PA_FX_FAST_REPLY = -1; static gint ett_kerberos_KrbFastArmoredRep = -1; /*--- End of included file: packet-kerberos-ett.c ---*/ -#line 213 "./asn1/kerberos/packet-kerberos-template.c" +#line 216 "./asn1/kerberos/packet-kerberos-template.c" static expert_field ei_kerberos_decrypted_keytype = EI_INIT; static expert_field ei_kerberos_address = EI_INIT; @@ -629,7 +632,7 @@ typedef enum _KERBEROS_PADATA_TYPE_enum { } KERBEROS_PADATA_TYPE_enum; /*--- End of included file: packet-kerberos-val.h ---*/ -#line 225 "./asn1/kerberos/packet-kerberos-template.c" +#line 228 "./asn1/kerberos/packet-kerberos-template.c" static void call_kerberos_callbacks(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int tag, kerberos_callbacks *cb) @@ -1877,15 +1880,21 @@ static const value_string krb5_error_codes[] = { #define PAC_PRIVSVR_CHECKSUM 7 #define PAC_CLIENT_INFO_TYPE 10 #define PAC_S4U_DELEGATION_INFO 11 -#define PAC_UPN_DNS_INFO 12 +#define PAC_UPN_DNS_INFO 12 +#define PAC_CLIENT_CLAIMS_INFO 13 +#define PAC_DEVICE_INFO 14 +#define PAC_DEVICE_CLAIMS_INFO 15 static const value_string w2k_pac_types[] = { { PAC_LOGON_INFO , "Logon Info" }, - { PAC_CREDENTIAL_TYPE , "Credential Type" }, - { PAC_SERVER_CHECKSUM , "Server Checksum" }, - { PAC_PRIVSVR_CHECKSUM , "Privsvr Checksum" }, - { PAC_CLIENT_INFO_TYPE , "Client Info Type" }, - { PAC_S4U_DELEGATION_INFO, "S4U Delegation Info" }, + { PAC_CREDENTIAL_TYPE , "Credential Type" }, + { PAC_SERVER_CHECKSUM , "Server Checksum" }, + { PAC_PRIVSVR_CHECKSUM , "Privsvr Checksum" }, + { PAC_CLIENT_INFO_TYPE , "Client Info Type" }, + { PAC_S4U_DELEGATION_INFO , "S4U Delegation Info" }, { PAC_UPN_DNS_INFO , "UPN DNS Info" }, + { PAC_CLIENT_CLAIMS_INFO , "Client Claims Info" }, + { PAC_DEVICE_INFO , "Device Info" }, + { PAC_DEVICE_CLAIMS_INFO , "Device Claims Info" }, { 0, NULL }, }; @@ -2630,6 +2639,30 @@ dissect_krb5_PAC_UPN_DNS_INFO(proto_tree *parent_tree, tvbuff_t *tvb, int offset } static int +dissect_krb5_PAC_CLIENT_CLAIMS_INFO(proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) +{ + proto_tree_add_item(parent_tree, hf_krb_pac_client_claims_info, tvb, offset, -1, ENC_NA); + + return offset; +} + +static int +dissect_krb5_PAC_DEVICE_INFO(proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) +{ + proto_tree_add_item(parent_tree, hf_krb_pac_device_info, tvb, offset, -1, ENC_NA); + + return offset; +} + +static int +dissect_krb5_PAC_DEVICE_CLAIMS_INFO(proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) +{ + proto_tree_add_item(parent_tree, hf_krb_pac_device_claims_info, tvb, offset, -1, ENC_NA); + + return offset; +} + +static int dissect_krb5_PAC_SERVER_CHECKSUM(proto_tree *parent_tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_) { proto_item *item; @@ -2742,6 +2775,15 @@ dissect_krb5_AD_WIN2K_PAC_struct(proto_tree *tree, tvbuff_t *tvb, int offset, as case PAC_UPN_DNS_INFO: dissect_krb5_PAC_UPN_DNS_INFO(tr, next_tvb, 0, actx); break; + case PAC_CLIENT_CLAIMS_INFO: + dissect_krb5_PAC_CLIENT_CLAIMS_INFO(tr, next_tvb, 0, actx); + break; + case PAC_DEVICE_INFO: + dissect_krb5_PAC_DEVICE_INFO(tr, next_tvb, 0, actx); + break; + case PAC_DEVICE_CLAIMS_INFO: + dissect_krb5_PAC_DEVICE_CLAIMS_INFO(tr, next_tvb, 0, actx); + break; default: break; @@ -5327,7 +5369,7 @@ dissect_kerberos_EncryptedChallenge(gboolean implicit_tag _U_, tvbuff_t *tvb _U_ /*--- End of included file: packet-kerberos-fn.c ---*/ -#line 2373 "./asn1/kerberos/packet-kerberos-template.c" +#line 2415 "./asn1/kerberos/packet-kerberos-template.c" /* Make wrappers around exported functions for now */ int @@ -5725,6 +5767,15 @@ void proto_register_kerberos(void) { { &hf_krb_pac_upn_dns_name, { "DNS Name", "kerberos.pac.upn.dns_name", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }}, + { &hf_krb_pac_client_claims_info, { + "PAC_CLIENT_CLAIMS_INFO", "kerberos.pac_client_claims_info", FT_BYTES, BASE_NONE, + NULL, 0, "PAC_CLIENT_CLAIMS_INFO structure", HFILL }}, + { &hf_krb_pac_device_info, { + "PAC_DEVICE_INFO", "kerberos.pac_device_info", FT_BYTES, BASE_NONE, + NULL, 0, "PAC_DEVICE_INFO structure", HFILL }}, + { &hf_krb_pac_device_claims_info, { + "PAC_DEVICE_CLAIMS_INFO", "kerberos.pac_device_claims_info", FT_BYTES, BASE_NONE, + NULL, 0, "PAC_DEVICE_CLAIMS_INFO structure", HFILL }}, { &hf_krb_pa_supported_enctypes, { "SupportedEnctypes", "kerberos.supported_entypes", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }}, @@ -6606,7 +6657,7 @@ void proto_register_kerberos(void) { NULL, HFILL }}, /*--- End of included file: packet-kerberos-hfarr.c ---*/ -#line 2811 "./asn1/kerberos/packet-kerberos-template.c" +#line 2862 "./asn1/kerberos/packet-kerberos-template.c" }; /* List of subtrees */ @@ -6702,7 +6753,7 @@ void proto_register_kerberos(void) { &ett_kerberos_KrbFastArmoredRep, /*--- End of included file: packet-kerberos-ettarr.c ---*/ -#line 2830 "./asn1/kerberos/packet-kerberos-template.c" +#line 2881 "./asn1/kerberos/packet-kerberos-template.c" }; static ei_register_info ei[] = { |