You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using usernames with non-ASCII characters breaks NTLMv2 authentication. The ntlmv2_hashmethod, which generates a NTLMv2 hash, transforms the unicode encoded username to uppercase. This encoding is previously done with EncodeUtil.encode_utf16le. Uppercase operation on such encoded username containing non-ASCII characters generates a wrong NTLMv2 and breaks authentication.
This can be replicated using the ruby_smb's authenticate.rb example script against a Windows system with such users:
> ruby examples/authenticate.rb 10.0.0.68 юзер 123456
SMB3 : (0xc000006d) STATUS_LOGON_FAILURE: The attempted logon is invalid. This is either due to a bad username or authentication information.
Netbios Name: MYWYN2016
Netbios Domain: TESTLAB
FQDN of the computer: mywin2016.testlab.local
FQDN of the domain: testlab.local
FQDN of the forest: testlab.local
Dialect: 0x0311
OS Version: 10.0.14393
SMB2 : (0xc000006d) STATUS_LOGON_FAILURE: The attempted logon is invalid. This is either due to a bad username or authentication information.
Netbios Name: MYWYN2016
Netbios Domain: TESTLAB
FQDN of the computer: mywin2016.testlab.local
FQDN of the domain: testlab.local
FQDN of the forest: testlab.local
Dialect: 0x0210
OS Version: 10.0.14393
SMB1 : (0xc000006d) STATUS_LOGON_FAILURE: The attempted logon is invalid. This is either due to a bad username or authentication information.
Native OS: Windows Server 2016 Standard 14393
Native LAN Manager: Windows Server 2016 Standard 6.3
Netbios Name: MYWYN2016
Netbios Domain: TESTLAB
FQDN of the computer: mywin2016.testlab.local
FQDN of the domain: testlab.local
FQDN of the forest: testlab.local
Dialect: NT LM 0.12
OS Version: 10.0.14393
SMB2 : (0xc000006d) STATUS_LOGON_FAILURE: The attempted logon is invalid. This is either due to a bad username or authentication information.
Netbios Name: MYWYN2016
Netbios Domain: TESTLAB
FQDN of the computer: mywin2016.testlab.local
FQDN of the domain: testlab.local
FQDN of the forest: testlab.local
Dialect: 0x0210
OS Version: 10.0.14393
SMB3 : (0xc000006d) STATUS_LOGON_FAILURE: The attempted logon is invalid. This is either due to a bad username or authentication information.
Netbios Name: MYWYN2016
Netbios Domain: TESTLAB
FQDN of the computer: mywin2016.testlab.local
FQDN of the domain: testlab.local
FQDN of the forest: testlab.local
Dialect: 0x0311
OS Version: 10.0.14393
I've already fixed this and a PR will be submitted soon.
The text was updated successfully, but these errors were encountered:
Using usernames with non-ASCII characters breaks NTLMv2 authentication. The
ntlmv2_hash
method, which generates a NTLMv2 hash, transforms the unicode encoded username to uppercase. This encoding is previously done withEncodeUtil.encode_utf16le
. Uppercase operation on such encoded username containing non-ASCII characters generates a wrong NTLMv2 and breaks authentication.This can be replicated using the ruby_smb's
authenticate.rb
example script against a Windows system with such users:I've already fixed this and a PR will be submitted soon.
The text was updated successfully, but these errors were encountered: