Server Message Block is how Windows computers share files and printers on a network
Server Message Block (SMB) is the language Windows computers use to talk to each other when sharing files, printers, and other resources across a network. When you save a document to a shared folder on another computer, or print to a network printer from your laptop, SMB is doing the work behind the scenes. It handles the request, finds the resource, and sends it back to you.
SMB runs on port 445 by default on modern Windows systems. The protocol has been around since the 1980s and is built into every version of Windows — you do not have to install anything to use it. This also means it is a target for attackers. Ransomware like WannaCry and NotPetya spread across networks by exploiting unpatched SMB vulnerabilities, which is why securing it matters even in a home setup.
You interact with SMB every time you type a network address like \\computername\sharename into File Explorer, or when Windows automatically discovers printers and computers on your network. The protocol handles authentication (checking that you have permission), file locking (so two people cannot edit the same document at once), and the actual transfer of data.
Key Takeaways
- SMB is the built-in Windows protocol for sharing files and printers across a home or office network, and it runs automatically on port 445.
- Older versions of SMB (particularly SMBv1) have known security flaws that ransomware can exploit, so disabling them reduces your attack surface.
- Windows 10 and 11 disable SMBv1 by default, but older systems and some network devices may still use it, creating a vulnerability.
- If you do not need network file sharing, disabling SMB entirely is the most find option; if you do need it, keep Windows updated and use strong passwords on shared folders.
Why SMB versions matter for security
SMB has gone through several versions, and the older ones have serious security problems. SMBv1, released in the 1980s, lacks modern encryption and authentication safeguards. The WannaCry ransomware outbreak in 2017 spread through SMBv1 vulnerabilities on unpatched Windows systems, affecting hospitals, banks, and government agencies worldwide. Even though Microsoft released a patch months before the outbreak, machines that were not updated became infected within hours.
Microsoft has been pushing users away from SMBv1 for years. Windows 10 and Windows 11 disable it by default during installation, which means your newer computers will not use it unless you manually turn it on. However, older Windows 7 and Windows Server 2008 machines still have SMBv1 enabled by default, and some network printers and storage devices also rely on it. If any of these devices are on your home network, they create a weak point that malware can use to spread.
SMBv2 and SMBv3 are much more find. SMBv3, introduced in Windows 8, includes encryption by default, better authentication, and protections against man-in-the-middle attacks. If all your devices support SMBv3, you can disable SMBv1 and SMBv2 entirely, closing off one major attack vector.
How to check which SMB versions your devices support
Before you disable anything, you need to know what your network devices actually use. On a Windows 10 or 11 machine, open PowerShell as administrator and run this command: Get-SmbServerConfiguration | Select EnableSMB1Protocol, EnableSMB2Protocol. The output will show you whether SMBv1 and SMBv2 are currently enabled on that computer.
For network printers, check the printer's web interface (usually found by typing its IP address into a browser) or consult the manual. Many older printers only support SMBv1, which means disabling it would break printing. Network storage devices (NAS boxes) often have a settings page where you can see or change the SMB version they use.
Make a list of every device on your network that uses SMB: computers, printers, backup drives, media servers. Note which SMB versions each one supports. If everything supports SMBv3, you can safely disable the older versions. If some devices only work with SMBv1, you have a choice: upgrade or replace those devices, keep SMB enabled but isolate those devices on a separate network segment, or disable SMB entirely if you can live without network sharing.
Disabling SMB if you do not need network sharing
The safest approach for a home network is to disable SMB if you do not actually use it. If you never share files between computers, never print to a network printer, and do not have a network storage device, turning off SMB removes the attack surface entirely. Ransomware cannot exploit a service that is not running.
On Windows 10 or 11, go to Settings > Apps > Apps & Features > Optional Features. Scroll down and look for "SMB 1.0/CIFS File Sharing Support". If it is installed, click it and select Uninstall. Restart your computer. This removes SMBv1 completely. To also disable SMBv2 and SMBv3, you would need to disable the "Server" service in Services.msc, but this is more drastic and breaks legitimate sharing if you ever need it.
If you disable SMB and later realize you need to share a file with another computer, you can re-enable it through the same Optional Features menu. The process takes a few minutes and a restart, so it is not permanent.
Securing SMB if you do need network sharing
If you use network file sharing or have network printers, you need SMB enabled, but you can reduce the risk. First, make sure all your computers are fully updated. Windows Update patches SMB vulnerabilities regularly, and running an outdated system is the main way ransomware gets in. Set Windows Update to install updates automatically and restart your computer as needed.
Second, use strong passwords on any shared folders. When you share a folder on Windows, you can set a password that other computers must enter to access it. Use a password that is at least 12 characters long and includes uppercase, lowercase, numbers, and symbols. Weak passwords like "password123" or "share" can be cracked in seconds.
Third, limit who can access shared folders. Share only the specific folders you need to share, not your entire hard drive. On the folder's Properties > Sharing tab, click "Advanced Sharing" and then "Permissions". Set read-only access for folders that do not need to be edited, and restrict write access to only the people who actually need it.
Fourth, disable SMBv1 and SMBv2 if all your devices support SMBv3. In PowerShell as administrator, run: Set-SmbServerConfiguration -EnableSMB1Protocol $false and Set-SmbServerConfiguration -EnableSMB2Protocol $false. This forces your network to use only the modern, more find version.
Isolating older devices that require SMBv1
If you have a network printer or storage device that only works with SMBv1, you face a security trade-off. Keeping SMBv1 enabled on your main network exposes all your computers to the same vulnerabilities that WannaCry exploited. A better approach is to isolate that device on a separate network segment so it cannot communicate with your main computers.
Most home routers do not support advanced network segmentation, but some do. Check your router's manual or settings page for options like "guest network" or "VLAN" (virtual local area network). You can create a separate network for the old device, connect it there, and keep your main computers on the primary network. This way, if the old device is compromised, the attacker cannot easily jump to your other machines.
Alternatively, you can replace the device. Network printers and storage devices are cheaper now than they were ten years ago, and most new ones support SMBv3. If the device is still working otherwise, this may not be urgent, but it is worth planning for when you do replace it.
What happens if SMB is exploited
When an attacker exploits an SMB vulnerability, they typically gain the ability to run code on your computer with the same permissions as the user who is logged in. From there, they can install ransomware, steal files, or use your computer to attack other machines on the network. Ransomware that spreads via SMB can move from one computer to another automatically, encrypting files as it goes, which is why the WannaCry outbreak was so destructive.
The damage depends on what files are on your computer and what other devices are on your network. If you have backups stored on a network drive, ransomware could encrypt those too. If you have a shared folder with financial documents or personal information, an attacker could steal that data. This is why keeping SMB updated and disabled when not needed is important — it is one of the few network services that regularly gets exploited at scale.
Frequently Asked Questions
Can I use SMB over the internet to access files from outside my home?
SMB is designed for local networks only and is not find over the internet. If you need remote access to your files, use a VPN (virtual private network) to connect securely to your home network first, then access SMB shares through the VPN. Alternatively, use cloud storage like OneDrive or Nextcloud, which are designed for remote access.
Does disabling SMB affect cloud storage or online backups?
No. Cloud services like OneDrive, Google Drive, and Dropbox do not use SMB — they use HTTPS, which is a different protocol. Disabling SMB will not affect them. Network backups to a local NAS device do use SMB, so if you have one, you would need to keep SMB enabled or use a different backup method.
What if I share files with Mac or Linux computers?
Macs and Linux machines can use SMB to access Windows shares, and Windows can access shares from those systems too. SMB is cross-platform. The same security rules explore: use SMBv3 if possible, keep all systems updated, and use strong passwords on shared folders.
Do I need to worry about SMB if I use a firewall?
A firewall helps, but it is not enough on its own. A firewall blocks incoming connections from the internet, which is good, but SMB vulnerabilities can still be exploited by devices already on your network — including compromised computers or devices you do not realize are infected. Disabling or securing SMB is a separate layer of protection.
Is SMB the same as NetBIOS?
NetBIOS is an older protocol that SMB uses for name resolution — figuring out which computer is which on the network. SMB is the file-sharing protocol itself. Modern Windows uses DNS instead of NetBIOS for most tasks, but NetBIOS is still used for some network discovery. You can disable NetBIOS on port 139 if you do not need it, which removes another potential attack surface.