Fixing 'SMB Signing Disabled or SMB Signing Not Required' vulnerability.
If your organization is using a vulnerability scanning tool then more often than not, vulnerability like SMB Signing Disabled or SMB Signing Not Required will flag up and probably make it to the top of the list. This is because most organizations may not have SMB signing enabled by default for all their client and server communications.
What is SMB signing?
SMB signing is a security mechanism in the SMB protocol which is designed to help improve the security of the SMB protocol. SMB signing adds security to a network using NetBIOS, avoiding man-in-the-middle attacks and when enabled on both the client and server, SMB sessions are authenticated between the machines on the packet level.
According to Microsoft, following SMB configuration scenarios can play out -
If SMB Signing is enabled and required at both the client and the server, or if SMB signing is disabled at both the client and the server, the connection is successful.
If SMB signing is enabled and required at the client and disabled at the server, the connection to the TCP session is gracefully closed after the Dialect Negotiation, and the client receives the following "1240 (ERROR_LOGIN_WKSTA_RESTRICTION)" error message:
System error 1240 has occurred. The account is not authorized to log in from this station.
If SMB signing is disabled at the client and enabled and required at the server, the client receives the "STATUS_ACCESS_DENIED" error message when it receives a response to a Tree Connect or Transact2 for DFS referrals.
How to fix the vulnerability?
While GPO is the preferred way to configure the SMB configuration settings, one can set the desired registry values to achieve the same. I will cover both these methods in this blog.
Setting registry values -
If you manage your servers using an On-prem infrastructure management tool like ConfigMgr, then you can easily set the registry values using compliance baseline settings.
The registry values that I am setting will ensure that SMB signing is enabled and required on both Clients and Servers at all times. This is in line with the requirement for vulnerability I am addressing under QID 90043.
Please note that this configuration can have serious implications, therefore please use this configuration in accordance to your infrastructure setup and requirements. Also, ensure that your GPO policies are in line with the settings below or else GPO will take precedence.
HKLM\System\CurrentControlSet\Services\LanManWorkstation\Parameters requiresecuritysignature = 1
HKLM\System\CurrentControlSet\Services\LanManServer\Parameters
requiresecuritysignature = 1
HKLM\System\CurrentControlSet\Services\LanManSever\Parameters enablesecuritysignature = 1
HKLM\System\CurrentControlSet\Services\LanManWorkstation\Parameters
enablesecuritysignature = 1
After the CI is created, deploy it in a baseline with remediation enabled.
Setting Group Policy -
In Group Policy Management, navigate to the location Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options for the intended policy and Enable the following settings.
Conclusion
It is important to enable SMB signing as attackers can potentially intercept the traffic after gaining unauthorized access to the network and modify unsigned Server Message Block (SMB) packets. They can perform session hijacking, posing as the server or client device using a legitimate authentication session and gain unauthorized access to data.
Hi, where in AD should the GPO be applied? Servers OU? Workstations OU? Default Domain Policy?
ReplyDeleteSMB settings should match on both servers and clients. I will suggest to apply through a separate hardening policy rather than using the default domain policy.
Delete