Linux-CIFS Archive on lore.kernel.org
 help / color / Atom feed
* Linux Mint 4.15 Kernel and NTLMv2 account lockout with empty string password.
@ 2020-03-20 10:19 Stefan Metzmacher
  0 siblings, 0 replies; only message in thread
From: Stefan Metzmacher @ 2020-03-20 10:19 UTC (permalink / raw)
  To: linux-cifs; +Cc: Samba Technical

[-- Attachment #1.1: Type: text/plain, Size: 1964 bytes --]

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...

Otherwise any idea how to debug that?

metze


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20 10:19 Linux Mint 4.15 Kernel and NTLMv2 account lockout with empty string password Stefan Metzmacher

Linux-CIFS Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-cifs/0 linux-cifs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-cifs linux-cifs/ https://lore.kernel.org/linux-cifs \
		linux-cifs@vger.kernel.org
	public-inbox-index linux-cifs

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-cifs


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git