# SMB(PORT:139,445)

The Server Message Block protocol (SMB protocol) is a [client-server](https://www.techtarget.com/searchwindowsserver/definition/client-server-network) communication [protocol](https://www.techtarget.com/searchnetworking/definition/protocol) used for sharing access to files, printers, serial ports and other resources on a [network](https://www.techtarget.com/searchnetworking/definition/network).

The SMB needs network ports to communicate with other systems. When this protocol was developed, the SMB used port 139 to facilitate computer communication on the same network. However, since the development of Windows 2000, the SMB has used port 445 and the TCP network protocol.\ <br>

### What Are Ports 139 And 445? <a href="#what_are_ports_139_and_445" id="what_are_ports_139_and_445"></a>

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.<br>

### **What is an SMB Share?**

&#x20;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.

### Reference Links:

* <https://nordvpn.com/blog/what-is-smb/>
* <https://www.techtarget.com/searchnetworking/definition/Server-Message-Block-Protocol>
* <https://www.varonis.com/blog/smb-port>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://n0m4dsec.gitbook.io/sec-book/common-web-services/smb-port-139-445.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
