SMB / CIFS
What is Port 445?
Port 445 is used by the Server Message Block (SMB) protocol for file sharing, printer sharing, and inter-process communication on Windows networks. Starting with Windows 2000, Microsoft enabled SMB to run directly over TCP on port 445, eliminating the need for the NetBIOS layer (ports 137-139). SMB allows clients to read and write files on remote servers, discover shared resources, and communicate between processes. SMBv1 was the original protocol, but serious vulnerabilities (exploited by EternalBlue/WannaCry) led to its deprecation. SMBv2 and SMBv3 add significant improvements including better performance, larger reads/writes, and encryption. SMB is also implemented by the Samba project for Linux/Unix interoperability with Windows networks.
Common Uses
- Windows file and printer sharing across networks
- Network drive mapping in enterprise environments
- Cross-platform file sharing via Samba
- Group Policy distribution in Active Directory
Technical Details
Copy-paste commands to check port 445 (SMB / CIFS) from your terminal
Test connectivity
nc -zv example.com 445
curl -v --max-time 5 http://example.com:445/
telnet example.com 445
nmap -p 445 -sV example.com
(echo > /dev/tcp/example.com/445) 2>/dev/null && echo "open" || echo "closed"
Open port in firewall
sudo ufw allow 445/tcp
sudo iptables -A INPUT -p tcp --dport 445 -j ACCEPT
sudo firewall-cmd --permanent --add-port=445/tcp && sudo firewall-cmd --reload
Security Considerations
Port 445 is one of the most attacked ports on the internet. The EternalBlue exploit targeting SMBv1 enabled WannaCry and NotPetya ransomware. Disable SMBv1 completely. Use SMBv3 with encryption. Never expose port 445 to the internet. Apply all Windows security patches promptly. Use network segmentation to limit SMB access. Implement access controls and audit file share permissions.
Popular Ports Reference
The most commonly used and referenced network ports