From 49ba6cb05d91582afc3388805f112e555cb4f44a Mon Sep 17 00:00:00 2001 From: philsmd Date: Tue, 14 Feb 2017 17:45:05 +0100 Subject: [PATCH] -m 13100 = Kerberos 5 TGS-REP: parser failed to correctly verify the hash --- docs/changes.txt | 1 + src/interface.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 060174e17..b3fe2a74d 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -51,6 +51,7 @@ - Fixed string not null terminated while reading maskfiles - Fixed pointer to local outside scope in case -j or -k is used - Fixed pointer to local outside scope in case --markov-hcstat is not used +- Fixed a problem within the Kerberos 5 TGS-REP (-m 13100) hash parser ## ## Technical diff --git a/src/interface.c b/src/interface.c index 470dc02f9..bef3835c0 100644 --- a/src/interface.c +++ b/src/interface.c @@ -12186,11 +12186,11 @@ int krb5tgs_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_UN data_pos = (u8 *) strchr ((const char *) account_pos, '*'); + if (data_pos == NULL) return (PARSER_SEPARATOR_UNMATCHED); + /* Skip '*' */ data_pos++; - if (data_pos == NULL) return (PARSER_SEPARATOR_UNMATCHED); - u32 account_len = data_pos - account_pos + 1; if (account_len >= 512) return (PARSER_SALT_LENGTH);