Linux Mint 4.15 Kernel and NTLMv2 account lockout with empty string password.

Stefan Metzmacher metze at samba.org
Wed Apr 8 15:43:25 UTC 2020


Am 20.03.20 um 11:19 schrieb Stefan Metzmacher:
> Hi,
> 
> I recently noticed the following problem with a 4.15 Kernel
> on Linux Mint:
> 
> /etc/fstab has something like this:
> 
>> //172.31.9.132/share1           /media/cifs/share1      cifs vers=1.0,credentials=/media/cifs/cifsmount.creds.txt 0 1
>> //172.31.9.132/share2           /media/cifs/share2      cifs vers=1.0,credentials=/media/cifs/cifsmount.creds.txt 0 1
>> //172.31.9.132/share3           /media/cifs/share3      cifs vers=1.0,credentials=/media/cifs/cifsmount.creds.txt 0 1
>> //172.31.9.132/share4           /media/cifs/share4      cifs vers=1.0,credentials=/media/cifs/cifsmount.creds.txt 0 1
> 
> 172.31.9.132 is a Windows Server in a Domain with Samba AD-DCs.
> 
> The initial mounting works fine, but after some time Samba
> logs WRONG_PASSWORD and finally ACCOUNT_LOCKED_OUT.
> 
> From various clients this happens about once per hour!
> 
> In order to debug this I extended wireshark.
> wireshark was already able to decrypt NTLMSSP encryption
> when an NTLMSSP password and/or a keytab is provided.
> I extended that in order add some useful expert info
> that shows which NTHASH was used for a given authentication.
> That is also available with an Schannel encrypted Netr_LogonSamLogon*
> call. This landed in wiresharks master branch a few days ago.
> 
> The customers capture didn't show that information,
> which meant that the client used a wrong password
> when it got LOGON_FAILURE from the Windows fileserver
> (because that got WRONG_PASSWORD or ACCOUNT_LOCKED_OUT
> from the AD-DC).
> 
> I cross checked that with smbclient and there wireshark
> showed the correct password was used.
> 
> This is very strange and I had the idea to just check
> if maybe an empty string password was used by the client.
> So I created a keytab with the NTHASH of an empty string.
> And wireshark showed that this NTHASH was actually used...
> 
> Has anybody seen this before? We'll retry this with a newer
> kernel next week...

I was able to capture that in more detail
and it's actually not a problem with cifs.ko.

The dialects in the SMB Negprot request contain "Samba", so
the problem is triggered by some [lib]smbclient user, maybe it's gvfs
related. I hope to find more in the next days.

The bahavior was seen with Samba 4.3.* and 4.7.* where 4.7 sends an
empty NTLM response instead of using the nthash of an empty string.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20200408/e8dcf554/signature.sig>


More information about the samba-technical mailing list