From 93b753343a1f584b894a481d527436bd99205cc5 Mon Sep 17 00:00:00 2001 From: Shutdown <40902872+ShutdownRepo@users.noreply.github.com> Date: Sat, 17 Feb 2024 18:06:28 +0100 Subject: [PATCH] fixing incorrect gss wrap padding --- impacket/krb5/gssapi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/impacket/krb5/gssapi.py b/impacket/krb5/gssapi.py index 948e723b4d..f30060acfb 100644 --- a/impacket/krb5/gssapi.py +++ b/impacket/krb5/gssapi.py @@ -132,7 +132,8 @@ def GSS_Wrap(self, sessionKey, data, sequenceNumber, direction = 'init', encrypt token = self.WRAP() # Let's pad the data - pad = (8 - (len(data) % 8)) & 0x7 + # pad = (8 - (len(data) % 8)) & 0x7 + pad = (16 - (len(data) % 16)) & 15 padStr = b(chr(pad)) * pad data += padStr