Closed mssalvatore closed 1 year ago
It seems that the preferred dialect is SMBv1: https://github.com/fortra/impacket/blob/master/impacket/smb.py#L69
Initial test:
Enabled SMBv1:
Disabled SMBv1: I was able to reproduce the issue with the same message: error_message="Failed to authenticate over SMB with identity=Username(username='m0nk3y') secret=Password(password=SecretStr('**')): Error occurs while reading from remote(104)")]
Configured a machine to only use SMBv1 and a machine to use SMBv2/v3. Based on the fix in which I have added log statement to check the SMB dialect in use, we can see that one of the machines is using NT LM 0.12 which is SMBv1 and the other uses 768 which is SMBv2 or 0x300 in hexdecimal.
Describe the bug
A user has reported that the SMB exploiter only works if SMBv1 is enabled. If SMBv1 is disabled, propagation fails with the following event:
Tasks
Hints
I haven't investigated this much, but my money is on the
preferred_dialect
parameter being the cause of the issue.https://github.com/guardicore/monkey/blob/e587368339a9c23a9045f0ff9eeece15e7f03a7b/monkey/agent_plugins/exploiters/smb/src/smb_client.py#L77C5-L83C13