Much has been written about WannaCry, and the security community has learned countless valuable lessons from the unprecedented ransomware attack. One thing that is seldom mentioned, however, is how to protect your infrastructure against future Server Message Block (SMB) exploits.
Removing the Insecure SMB Protocol
Microsoft has three different versions of this protocol. The first version has the least security and should be disabled or removed immediately. You can do this by using the group policy management console and adding a registry rule to disable or delete the protocol entirely using the remove programs/features dialog. You should apply this rule to all PCs across your network by running gpupdate/force from a command prompt.
Finally, review the target machines to ensure the registry settings are being applied correctly. Microsoft cautioned that this may prevent older Linux or XP machines from being able to access certain network resources such as shared directories. You should also reboot all your PCs once the policy is applied.
The second version of SMB was introduced with Vista and Windows Server 2008, and the third came along with Windows 8 and Windows Server 2012. These two later SMB versions should not be disabled permanently, since they are used for a variety of network-based activities such as supporting file sharing, encryption, large MTU packets and messages.
If you are running at least Windows 8 or Windows Server 2012, you can use the Set-SMBServerConfiguration in a PowerShell command session. This allows you to enable or disable the SMBv1, SMBv2 and SMBv3 protocols on the server component with a few keywords. However, the process is a bit more involved if you are using older Windows versions, and you might need to edit specific registry keys.
Additional Network Security Measures
In addition to making these changes, now is also a good time to review your network isolation policies, such as virtual private networks (VPNs) and virtual local area networks (VLANs). Make sure you group your PCs according to least network privileges, segregate by functional areas and review access policies for your various user groups.
SMB protocols are the backbone of many applications that keep our enterprises running. You must know which versions you are supporting, as well as which servers and devices are using the outdated protocols, to keep your networks secure and operating under the best possible conditions.