InfrastructureApril 8, 2024Decoding SMB Signing: Boosting Network Security

Enter the intriguing realm of SMBs, also known as Server Message Singular, extensively utilized within Windows systems. This comprehensive guide delves into their intricate mechanics and sheds light on SMB Signing, a pivotal security component. Prepare yourself for an amazing journey as we venture deep into SMB Server Message Singular; fasten your seat belt for an exciting voyage of discovery! 

Introduction to SMB Server Message Singular 

In the realm of network security, understanding SMB Signing is essential for bolstering defenses against unauthorized access and data manipulation. It facilitates communication between networked devices, allowing them to access shared data and services. SMB operates on the application layer of the TCP/IP model and is widely used in environments running Microsoft Windows operating systems. Understanding the mechanics of SMB is crucial for enhancing network security, as it enables administrators to implement measures such as SMB signing to protect against unauthorized access and data manipulation.

Understanding SMB Signing 

SMB Signing, short for Server Message Block Signing, is a security feature within the Server Message Block (SMB) protocol, used predominantly in Windows-based environments for file and printer sharing.

It ensures the integrity and authenticity of SMB packets exchanged between clients and servers by digitally signing them.

This cryptographic signing process helps prevent tampering or interception of data in transit, thereby enhancing the security of network communications.

When SMB Signing is enabled, both the client and server encrypt each message exchanged during the SMB session using a digital signature.

This signature includes information about the sender, receiver, and the contents of the message. Upon receipt, the receiving party can verify the signature to ensure that the data has not been altered and that it originates from a legitimate source.

By implementing SMB Signing, organizations can mitigate the risk of man-in-the-middle attacks and unauthorized access to sensitive data.

The Evolution of SMB Signing 

SMB Signing has undergone vast advancements since its first introduction in Windows 2000. When Vista and Server 2008 introduced SMB2, its signing mechanism was upgraded with the HMAC SHA-256 hashing algorithm instead of the MD5 hashing algorithm to increase security while improving performance across modern CPUs and faster networks. 

 SMB Signing in Windows Server/Client 

SMB Signing is available across all supported versions of Windows. However, it is only enabled by default on Domain Controllers. This is because SMB is the protocol used by clients to download Group Policy information, and enabling signing ensures the authenticity of the received Group Policy. For non-Domain Controllers, SMB Signing can be configured based on specific requirements. 

SMB1 Signing Configuration and Defaults 

  • In SMB1, there are two main ways to configure signing for clients and servers: Group Policy settings and registry keys.
  • For SMB1 clients, the signing settings can be set to “Required,” “Enabled,” or “Disabled,” depending on the desired level of security.
  • Similarly, SMB1 servers can be configured to require signing, enable signing if the client agrees, or disable signing altogether. 
Setting  Group Policy Setting  Registry Keys 
Required  Digitally sign communications (always) – Enabled  RequireSecuritySignature = 1 
Enabled*  Digitally sign communications (if server agrees) – Enabled  EnableSecuritySignature = 1, RequireSecuritySignature = 0 
Disabled  Digitally sign communications (if server agrees) – Disabled  EnableSecuritySignature = 0, RequireSecuritySignature = 0 
  • The default setting for signing on SMB1 Clients is “Enabled.” 

 SMB2 Signing Configuration and Defaults 

SMB2 simplified the signing configuration by introducing a single setting: whether signing is required or not. This setting can be configured through Group Policy or registry settings for both SMB2 clients and servers. The options include “Required” and “Not Required,” allowing administrators to balance security and performance based on their specific needs. 

Setting  Group Policy Setting  Registry Key 
Required *  Digitally sign communications (always) – Enabled  RequireSecuritySignature = 1 
Not Required **  Digitally sign communications (always) – Disabled  RequireSecuritySignature = 0 

The default setting for signing on a Domain Controller is “Required.” ** The default setting for signing on SMB2 Servers and SMB Clients is “Not Required.” 

 Effective Behaviour of SMB Signing 

The behaviour of SMB Signing is determined through a negotiation process between the client and the server. The table below summarizes the effective behaviour for SMB2: 

Server Required  Server-Not Required 
Client-Required  Signed 
Client-Not Required  Signed* 

The default behaviour for non-Domain Controller SMB traffic. For SMB1 in current Windows versions, the effective behaviour varies based on the server’s signing configuration: 

Server – Required  Server – Enabled  Server – Disabled 
Client – Required  Signed  Signed 
Client – Enabled  Signed*  Signed 
Client – Disabled  Signed  Not Signed 

The default behaviour for Domain Controller SMB traffic. 

Old SMB1 Signing Behaviour 

It’s important to note that older versions of Windows had different signing behaviour for SMB1. In 2008, Microsoft altered this behaviour in line with Windows Server 2008 and Vista, so early versions of Windows Server 2003 and XP (or earlier) should now behave similarly: 

Old Server- Required  Old Server-Enabled  Old Server-Disabled 
Old Client-Required  Signed  Signed 
Old Client- Enabled  Signed*  Signed 
Old Client- Disabled  Fails to connect  Not Signed 

The default behaviour for Domain Controller SMB1 traffic. If you have an old SMB1 server or client, it is recommended to update and patch them to eliminate any potential connection failures in a misconfigured environment. 

Changing SMB Signing Behaviour 
  • While it is generally recommended to keep the default SMB signing settings, there might be situations where customization is required.  
  • For example, you may want to increase SMB performance on Domain Controllers by disabling the “Required” setting, although this exposes your Group Policy to tampering and man-in-the-middle attacks. 
  • In other cases, you should allow the use of WAN optimization devices to accelerate SMB traffic between branch offices and the head office. However, this again involves trading performance for security, as these devices act as intermediaries and could relay obsolete or tampered Group Policy settings. 
  • To increase security for SMB clients or servers that are not Domain Controllers, you can enable the “Required” setting. 
  •  However, signing all SMB traffic is not recommended due to the additional processing overhead and potential performance degradation. 
  • If you decide to change the SMB signing settings, it is recommended to use the “Digitally sign communications (always)” Group Policy setting or the “RequireSecuritySignature” registry setting.  
  • The “Digitally sign communications” and “Digitally sign communications” Group Policy settings, as well as the “EnableSecuritySignature” registry settings, are no longer recommended and can be effectively replaced by the alternatives above. 
SMB Signing Best Practices 

When it comes to SMB signing, following best practices is paramount for optimal security and performance. Here are some key recommendations: 

  • Keep the default SMB signing settings unless specific requirements dictate otherwise. 
  • Regularly update and patch your SMB servers and clients to mitigate potential vulnerabilities. 
  • Perform thorough testing before implementing any changes to ensure compatibility and performance. 
  • Consider leveraging encryption instead of or in addition to signing for enhanced security. 
  • Familiarize yourself with the relevant Group Policy settings and registry keys for fine-tuning SMB signing configuration. 
TL;DR 

In conclusion, SMB signing serves as a crucial security measure for protecting data transmission within a network environment. Implementation of SMB signing can enhance the integrity and authenticity of SMB traffic, furthering networked security posture. Organizations should utilize this security measure as part of their protocols to reduce risks related to unauthorized access and data manipulation; doing so allows for the creation of more resilient network infrastructure that protects critical assets against threats or vulnerabilities. 

Redfox Security is a diverse network of expert security consultants with a global mindset and a collaborative culture. If you are looking to improve your organization’s security posture, contact us today to discuss your security testing needs. Our team of security professionals can help you identify vulnerabilities and weaknesses in your systems and provide recommendations to remediate them.

“Join us on our journey of growth and development by signing up for our comprehensive courses.”

Ganesh Bakare

by Ganesh Bakare

Security Consultant | Redfox Security