What is an SMB Port + Ports 445 and 139 Explained (2024)

The SMB protocol enables “inter-process communication,” which is the protocol that allows applications and services on networked computers to talk to each other. SMB enables the core set of network services such as file, print, and device sharing.

How Does The SMB Protocol Work?

In early versions of Windows, SMB ran on top of the NetBIOS network architecture. Microsoft changed SMB in Windows 2000 to operate on top of TCP and use a dedicated IP port. Current versions of Windows continue to use that same port.

Who is poking your ports?

Weird network traffic and suspicious port connections on your network are signs you might have been breached. Need help figuring things out? Ask Varonis.

Microsoft continues to make advancements to SMB for performance and security: SMB2 reduced the overall chattiness of the protocol, while SMB3 included performance enhancements for virtualized environments and support for strong end-to-end encryption.

SMB Protocol Dialects

Just like any language, computer programmers have created different SMB dialects use for different purposes. For example, Common Internet File System (CIFS) is a specific implementation of SMB that enables file sharing. Many people mistake CIFS as a different protocol than SMB, when in fact they use the same basic architecture.

Important SMB implementations include:

  • CIFS: CIFS is a common file sharing protocol used by Windows servers and compatible NAS devices.
  • Samba: Samba is an open-source implementation of Microsoft Active Directory that allows non-Windows machines to communicate with a Windows network.
  • NQ: NQ is another portable file sharing SMB implementation developed by Visuality Systems.
  • MoSMB: MoSMB is a proprietary SMB implementation by Ryussi Technologies.
  • Tuxera SMB: Tuxera is also a proprietary SMB implementation that runs in either kernel or user-space.
  • Likewise: Likewise is a multi-protocol, identity aware network file sharing protocol that was purchased by EMC in 2012.

What Are Ports 139 And 445?

SMB has always been a network file sharing protocol. As such, SMB requires network ports on a computer or server to enable communication to other systems. SMB uses either IP port 139 or 445.

  • Port 139: SMB originally ran on top of NetBIOS using port 139. NetBIOS is an older transport layer that allows Windows computers to talk to each other on the same network.
  • Port 445: Later versions of SMB (after Windows 2000) began to use port 445 on top of a TCP stack. Using TCP allows SMB to work over the internet.

What is an SMB Port + Ports 445 and 139 Explained (1)

How To Keep These Ports Secure

Leaving network ports open to enable applications to function is a security risk. So how do we manage to keep our networks secure and maintain application functionality and uptime? Here are some options to secure these two important and well-known ports.

  1. Enable a firewall or endpoint protection to protect these ports from attackers. Most solutions include a blacklist to prevent connections from known attackers IP addresses.
  2. Install a VPN to encrypt and protect network traffic.
  3. Implement VLANs to isolate internal network traffic.
  4. Use MAC address filtering to keep unknown systems from accessing the network. This tactic requires significant management to keep the list maintained.

What is an SMB Port + Ports 445 and 139 Explained (2)

In addition to the network specific protections above, you can implement a data centric security plan to protect your most important resource – the data that lives on your SMB file shares.

Understanding who has access to your sensitive data across your SMB shares is a monumental task. Varonis maps your data and access rights and discovers your sensitive data on your SMB shares. Monitoring your data is essential to detect attacks in progress and protect your data from breaches. Varonis can show you where data is at-risk on your SMB shares and monitor those shares for abnormal access and potential cyberattacks. Get a 1:1 demo to see how Varonis monitors CIFS on NetApp, EMC, Windows, and Samba shares to keep your data safe.

What is an SMB Port + Ports 445 and 139 Explained (3)

Michael Buckbee

Michael has worked as a sysadmin and software developer for Silicon Valley startups, the US Navy, and everything in between.

What is an SMB Port + Ports 445 and 139 Explained (2024)

FAQs

What is port 139 and 445 used for? ›

Ports 139 and 445 are used for 'NetBIOS' communication between two Windows 2000 hosts. In the case of port 445 an attacker may use this to perform NetBIOS attacks as it would on port 139. Impact: All NetBIOS attacks are possible on this host.

What is SMB port 445 used for? ›

Port 445 is a traditional Microsoft networking port with tie-ins to the original NetBIOS service found in earlier versions of Windows OSes. Today, port 445 is used by Microsoft Directory Services for Active Directory (AD) and for the Server Message Block (SMB) protocol over TCP/IP.

What is port 139 commonly used for? ›

Port 139 is utilized by NetBIOS Session service. Enabling NetBIOS services provide access to shared resources like files and printers not only to your network computers but also to anyone across the internet. Therefore it is advisable to block port 139 in the Firewall.

Does port 139 need to be open? ›

If you are on Windows-based network that is running NetBios, it is perfectly normal to have port 139 open in order to facilitate that protocol. If you are not on a network using NetBios, there is no reason to have that port open.

Is port 139 a SMB? ›

SMB is a network file sharing protocol that requires an open port on a computer or server to communicate with other systems. SMB ports are generally port numbers 139 and 445.

Does SMB need port 139? ›

SMB has always been a network file sharing protocol. As such, SMB requires network ports on a computer or server to enable communication to other systems. SMB uses either IP port 139 or 445. Port 139: SMB originally ran on top of NetBIOS using port 139.

What is SMB and how does it work? ›

The Server Message Block (SMB) protocol is a network file sharing protocol that allows applications on a computer to read and write to files and to request services from server programs in a computer network. The SMB protocol can be used on top of its TCP/IP protocol or other network protocols.

What is SMB mainly used for? ›

What is the Server Message Block protocol? The Server Message Block protocol (SMB protocol) is a client-server communication protocol used for sharing access to files, printers, serial ports and other resources on a network. It can also carry transaction protocols for interprocess communication.

How do I open port 139 and 445 on Windows 10? ›

To open one or more ports in the Windows firewall, use these steps:
  1. Open Windows Security.
  2. Click on Firewall & network protection.
  3. Click the Advanced settings option.
  4. Select Inbound Rules from the left navigation pane.
  5. Under the “Actions” section, click the New Rule option in the right pane.
  6. Select the Port option.
Jul 15, 2022

Does port 445 need to be open? ›

We also recommend blocking port 445 on internal firewalls to segment your network – this will prevent internal spreading of the ransomware. Note that blocking TCP 445 will prevent file and printer sharing – if this is required for business, you may need to leave the port open on some internal firewalls.

What port does SMB use to operate at? ›

Perimeter firewall approaches
Application protocolProtocolPort
SMBTCP445
NetBIOS Name ResolutionUDP137
NetBIOS Datagram ServiceUDP138
NetBIOS Session ServiceTCP139

Is port 445 TCP or UDP? ›

TCP port 445 is used for direct TCP/IP MS Networking access without the need for a NetBIOS layer. This service is only implemented in the more recent verions Windows starting with Windows 2000 and Windows XP. The SMB (Server Message Block) protocol is used among other things for file sharing in Windows NT/2K/XP.

What ports should not be turned on? ›

Ports 80, 443, 8080 and 8443 (HTTP and HTTPS)

They're especially vulnerable to cross-site scripting, SQL injections, cross-site request forgeries and DDoS attacks.

Does SMB work over Internet? ›

Like any network file sharing protocol, SMB block needs network ports to communicate with other systems. Originally, it used port 139 that allowed computers to communicate on the same network. But since Windows 2000, SMB uses port 445 and the TCP network protocol to “talk” to other computers over the internet.

What is the difference between CIFS and SMB? ›

CIFS (Common Internet File System) and SMB (Server Message Block) are both Windows file-sharing protocols used in storage systems, such as network-attached systems (NAS). The key difference between CIFS and SMB is that CIFS is a dialect of SMB – a particular implementation of the SMB protocol.

Is port 445 inbound or outbound? ›

constant outbound SMB port 445( microsoft-ds) traffic.

What port is 139? ›

Port 139 Details. NetBIOS is a protocol used for File and Print Sharing under all current versions of Windows.

What happens if I disable port 445? ›

Blocking TCP 445 will prevent file and printer sharing and also other services such as DHCP (dynamic host configuration protocol) which is frequently used for automatically obtaining an IP address from the DHCP servers used by many corporations and ISPs(Internet Service Providers) will stop functioning.

How do I enable SMB port 445? ›

Go to Computer Configuration > Policies > Windows Settings > Security Settings > Windows Firewall with Advanced Security > Windows Firewall with Advanced Security - LDAP > Inbound Rules. Right-click and choose New Rule. Choose Port and click Next. Choose TCP and at specific local ports enter 135, 445, then click Next.

What is SMB example? ›

An SMB share, also known as an SMB file share, is simply a shared resource on an SMB server. Often, an SMB share is a directory, but it can be any shared resource. For example, network printers are often shared using SMB.

What programs use SMB? ›

9. Zendesk
  • G Suite – Ultimate SMB Software.
  • SpinOne.
  • Evernote.
  • Basecamp.
  • Trello.
  • Hootsuite.
  • Freshbooks.
  • MailChimp.
Nov 18, 2021

What tool to connect to SMB? ›

smbclient is a command line tool similar to a ftp connection while smbfs allows you to mount a SMB file share. Once a SMB share is mounted it acts similar to a local hard drive (you can access the SMB share with your file browser (nautilus, konqueror, thunar, other).

Why is SMB a security risk? ›

SMB Overview

Leaving an SMB service open to the public can give attackers the ability to access data on your clients' internal network, and increases their risk of a ransomware attack or other exploit.

Do we still use SMB? ›

The SMB protocol is one of the most popular protocols for file and resource sharing over networks. And not only with Windows—it has also been widely adopted by other operating systems, such as Linux/Unix and macOS.

What is the service name for port 445? ›

Service Name and Transport Protocol Port Number Registry
Service NamePort NumberTransport Protocol
microsoft-ds445tcp
microsoft-ds445udp
proxima-lm1445tcp
proxima-lm1445udp
46 more rows

How do I allow SMB through firewall? ›

Open Control Panel, click System and Security, and then click Windows Firewall. In the left pane, click Advanced settings, and in the console tree, click Inbound Rules. Under Inbound Rules, locate the rules File and Printer Sharing (NB-Session-In) and File and Printer Sharing (SMB-In).

What port should you open on the firewall? ›

For HTTPS, you need to allow TCP packets between any port on an IP address inside the firewall, and port 443 outside the firewall, or more rarely any port outside the firewall (some websites are not on the default port). For HTTP, it's the same with port 80.

How do I enable port 139 on Windows 10? ›

Open firewall ports in Windows 10
  1. Navigate to Control Panel, System and Security and Windows Firewall.
  2. Select Advanced settings and highlight Inbound Rules in the left pane.
  3. Right click Inbound Rules and select New Rule.
  4. Add the port you need to open and click Next.
Feb 2, 2018

How do I connect to SMB share? ›

Connect to a SMB Share

In the Server Address field, enter smb:// to define the network protocol for SMB, and then enter either the IP address or the hostname of the server. To add the server to your Favorite Servers list, click the '+' button. Click Connect to connect to the share.

Why is port 445 blocked? ›

This issue occurs because the Adylkuzz malware that leverages the same SMBv1 vulnerability as Wannacrypt adds an IPSec policy that's named NETBC that blocks incoming traffic on the SMB server that's using TCP port 445.

Does SMB use TCP? ›

Summary. Windows supports file and printer-sharing traffic by using the SMB protocol directly hosted on TCP. SMB 1.0 and older CIFS traffic supported the NetBIOS over TCP (NBT) protocol supported the UDP transport, but starting in Windows Vista and Windows Server 2008 with SMB 2.0. 2, requires TCP/IP over port 445.

How do I know if its TCP or UDP? ›

To check TCP and UDP ports, you can use Microsoft PortQry Command Line. If you could successfully connect, the dynamic ports are opened. If you receive error “The RPC server is unavailable”, the ports are closed. Ports 49152 – 65535 should be opened.

What are the three most common ports that get hacked? ›

Pentesting is used by ethical hackers to stage fake cyberattacks. If you're attempting to pentest your network, here are the most vulnerably ports.
...
Here are some common vulnerable ports you need to know.
  1. FTP (20, 21) ...
  2. SSH (22) ...
  3. SMB (139, 137, 445) ...
  4. DNS (53) ...
  5. HTTP / HTTPS (443, 80, 8080, 8443) ...
  6. Telnet (23) ...
  7. SMTP (25) ...
  8. TFTP (69)
Mar 29, 2022

Do hackers use port forwarding? ›

If you port forward a remote desktop connection to the Internet, anyone from anywhere in the world can connect to your computer if they know the password or exploit a bug. This can be bad. Can you get hacked through port forwarding? Yes.

What can hackers do with open ports? ›

Cybercriminals can exploit open ports and protocols vulnerabilities to access sensitive. If you don't constantly monitor ports, hackers may exploit vulnerabilities in these ports to steal and leak data from your system.

Is SMB unsafe? ›

The SMBv1 protocol is not safe to use. By using this old protocol, you lose protections such as pre-authentication integrity, secure dialect negotiation, encryption, disabling insecure guest logins, and improved message signing.

What happens if SMB is disabled? ›

While disabling or removing SMBv1 might cause some compatibility issues with old computers or software, SMBv1 has significant security vulnerabilities, and we strongly encourage you not to use it.

Can a hacker still damage a network using SMB? ›

Can hacking tools still damage a network using SMB? In Windows, Server Message Block (SMB) is used to share files and usually runs on top of NetBIOS, NetBEUI, or TCP/IP. Several hacking tools that target SMB can still cause damage to Windows networks.

Is SMB the same as FTP? ›

FTP is extremely fast and efficient compared to SMB when transferring large files. It can be difficult when it comes to small files, but overall, the speed of the FTP file transferring protocol is better. The use of short messages in SMB makes it sensible to network latency, which can decrease the speed.

Does Windows use SMB or NFS? ›

SMB is primarily used in Windows environments and it forms the basis for Microsoft's distributed file system. IBM developed SMB originally in 1983 as a way of providing shared access to files and printers across a network.

What happens if I block port 445? ›

Blocking TCP 445 will prevent file and printer sharing and also other services such as DHCP (dynamic host configuration protocol) which is frequently used for automatically obtaining an IP address from the DHCP servers used by many corporations and ISPs(Internet Service Providers) will stop functioning.

What ports do hackers look for? ›

Ports 80, 443, 8080 and 8443 (HTTP and HTTPS)

HTTP and HTTPS are the hottest protocols on the internet, so they're often targeted by attackers. They're especially vulnerable to cross-site scripting, SQL injections, cross-site request forgeries and DDoS attacks.

What is SMB used for in Active Directory? ›

Clients use SMB to access data on servers. This allows sharing of files, centralized data management, and lowered storage capacity needs for mobile devices. Servers also use SMB as part of the Software-defined Data Center for workloads such as clustering and replication.

What does SMB stand for in networking? ›

Server Message Block protocol (SMB protocol)

Why is SMB so vulnerable? ›

Why is it a risk? Version 1.0 of SMB contains a bug that can be used to take over control of a remote computer. The US National Security Agency (NSA) developed an exploit (called “EternalBlue”) for this vulnerability which was subsequently leaked.

Top Articles
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 6422

Rating: 5 / 5 (60 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.