Tools
Log in
English

Learn to codeSecurity check

SMBv1 is enabled

HighW05Windows PCs and servers

Turn off SMBv1, the old file sharing protocol WannaCry used.

What is the risk

SMBv1 is a very old file sharing protocol. In 2017 WannaCry and NotPetya spread through an SMBv1 bug (CVE-2017-0144, EternalBlue).

Recent Windows has it off by default, but some places keep it on for old printers or NAS boxes.

How to check

Windows PowerShell (admin)

Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol
Get-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

The second line is for Windows 10 and 11. On Windows Server use Get-WindowsFeature FS-SMB1.

How to fix

Windows PowerShell (admin)

Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

On Windows 10 and 11 run both lines. On Windows Server run the first line, then Uninstall-WindowsFeature -Name FS-SMB1, and reboot.

How to prevent it

  • Never open port 445 to the internet.
  • Replace devices that only speak SMBv1 or move them to an isolated network.

Check again after fixing

Windows PowerShell (admin)

Get-SmbServerConfiguration | Select-Object EnableSMB1Protocol

It should be False.

Run the downloaded check again and make sure this item passes.

Related CVEs

HighCVE-2017-01448.8

Security check home