Skip to content

Commit bb2f3ec

Browse files
authored
Merge pull request Pennyw0rth#418 from a-urth/main
Encode delegate/impersonate user name string as utf8 unicode, not latin1
2 parents 2eebb7c + 0dbea8e commit bb2f3ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nxc/protocols/smb/kerberos.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def kerberos_login_with_S4U(domain, hostname, username, password, nthash, lmhash
8888
client_name = Principal(impersonate, type=constants.PrincipalNameType.NT_PRINCIPAL.value)
8989

9090
s4u_byte_array = struct.pack("<I", constants.PrincipalNameType.NT_PRINCIPAL.value)
91-
s4u_byte_array += b(impersonate) + b(domain) + b"Kerberos"
91+
s4u_byte_array += impersonate.encode() + b(domain) + b"Kerberos"
9292

9393
# Finally cksum is computed by calling the KERB_CHECKSUM_HMAC_MD5 hash
9494
# with the following three parameters: the session key of the TGT of

0 commit comments

Comments
 (0)