Understanding Server Message Block from the Ground Up (2024)

Cybersecurity

Tom StewartSpencer Strausbaugh

March 7, 2018

5 min read

The Server Message Block (SMB) is an integral part of any successful organization’s technology assets. In this blog post, we’ll take an easily digestible look at SMB, including its history, why and how it is used and what SMB is used for during penetration tests.

SMB was first referenced as “IBM PC Network SMB Protocol” in a 1985 document by IBM, and in 1987 as “Microsoft Networks/OpenNet-FILE.” Each of these documents outline the very basics of SMB. Simply, SMB is a client-server protocol used to provide shared access to resources over a network which means that a client asks for files or resources and the server supplies them.

Understanding Server Message Block from the Ground Up (3)

In the early years, a version of SMB was created by Microsoft and was known as Common Internet File System or CIFS. This term is still occasionally used across the internet as a synonym for SMB, but the term is antiquated. To eliminate any confusion, I use the term SMB in this blog post.

The various iterations of SMB have added functions to the protocol, and some of the high-level changes include:

  • SMB 2.0 (2006)
    • Streamlined the protocol
      • The number of subcommands changed from over 100 to 19
    • Durable file handles
      • Connections to an SMB server could now survive over brief network outages
    • Backwards compatible
      • Used for communication with older versions of Windows
  • SMB 2.1 (2008)
    • Opportunistic Locking
      • A form of version control, which allows a user to download a file from a share and make changes to a file, while notifying other users working on the same file that they have older versions of the file
  • SMB 3.0 (2012)
    • SMB over RDMA
      • Increases the scalability and speed of storage access
      • Decreases the CPU utilization of processing
    • SMB Multichannel
      • This SMB server can transmit more data using multiple connections
  • SMB 3.02 (2012)
    • SMBv1 could now be disabled
  • SMB 3.1.1 (2016)
    • Implemented pre-authentication integrity check using SHA-512 hash

SMB is much like HTTP, FTP or other protocols used to get data from point A on a network to point B. There are some strengths and weaknesses, with the primary SMB strength being the ease of use. The setup across various devices on a network are seamless, so that Windows, OSX, and Linux devices can utilize SMB with little to no effort. Additionally, SMB can be used to share resources as well as files. So if a client wanted to use a printer which was connected to the SMB server, but not the client, the client could use the SMB server and connect to the printer through that server. This would also work for file systems, printers, mail slots, and APIs.

There are some drawbacks to SMB. For example, it should not be used across the internet, but only on hosts connected to the LAN. This is due to the inherent insecurity of the way SMB authenticates. Although it is still apparent on a LAN, the attack surface is greatly reduced.

Understanding Server Message Block from the Ground Up (4)

In the above graphic from Microsoft, NTLM Authentication is passed when the session is set up. Although the data is encrypted, the authentication is easily cracked, and should not be used. A good alternative would be SFTP, which safely encrypts traffic. Additionally, SMB can provide significant information disclosure and even a remote shell if improperly configured or unpatched. The attack surface for SMB should be minimized and restricted to LANs.

Below is a Wireshark capture of a tool called psexec, connecting to an SMB share dropping an executable. This tool can be used by attackers to gain access to a session on the victim computer if the correct credentials are supplied.

Understanding Server Message Block from the Ground Up (5)

If the attacker has network access to the computer and valid credentials, and port 445 is open on the target computer, this attack can be easily performed. The attacker drops an executable on the target machine, launches the executable as a temporary service, and pipes the screen keyboard output to the attacker, giving the attacker access to the target computer.

Another SMB shortcoming is transfer speed. Each SMB transfer is a limited number of bytes for request, depending on the version being used. These requests must be repeated until the end of the file transfer is reached. Each time the request reaches the data limit, a new request will be issued and each of these requests take away from transfer time. The SFTP behaves faster in this case as well, but also has its own shortcomings.

In short, the SMB protocol is antiquated, but the infrastructures built on top of this protocol will not change anytime soon. Although there are benefits to the protocol such as ease of use, there are still overarching problems. Hackers and penetration testers will continue to use SMB as an attack vector until the protocol evolves to be more secure, or is no longer needed for a Windows network to function.

Sources:

Cybersecurity

Understanding Server Message Block from the Ground Up (6)

Tom Stewart

Senior Director
Security and Privacy

View all posts

Understanding Server Message Block from the Ground Up (7)

Spencer Strausbaugh

Manager
Technology Consulting – Security and Privacy

View all posts

Understanding Server Message Block from the Ground Up (2024)

FAQs

How does Server Message Block work? ›

The SMB protocol enables applications and their users to access files on remote servers, as well as connect to other resources, including printers, mailslots and named pipes. SMB provides client applications with a secure and controlled method for opening, reading, moving, creating and updating files on remote servers.

What is true about Server Message Block? ›

Server Message Block (SMB) enables file sharing, printer sharing, network browsing, and inter-process communication (through named pipes) over a computer network. SMB serves as the basis for Microsoft's Distributed File System implementation. SMB relies on the TCP and IP protocols for transport.

What is the SMB rule? ›

Server Message Block (SMB) is a network protocol used for providing shared access to files, printers, and other communication between nodes on a network. It is a client-server communication protocol, where clients request services and servers respond to those requests.

Which of the following functions are enabled by Server Message Block? ›

File sharing, printer sharing, network surfing, and inter-process communication (through named pipes) are all made possible over a computer network using Server Message Block (SMB).

How does message blocking work? ›

Messaging Blocking is meant only to block messages, not to prevent overages. With Message Blocking, you can: Block Text and Picture Messages: Blocks all chargeable incoming and outgoing SMS and MMS messages. Block Instant Messages sent via SMS: Blocks chargeable instant messages sent via SMS.

How does blocking text messages work? ›

When someone you've blocked tries to text you, you will not receive text messages from them. The blocked person also does not receive any notification that they're blocked. However, many iPhone users may be able to deduce that you've blocked them. This is because of the iMessage text “status” feature on iPhones.

How is Server Message Block different from network file system? ›

SMB allows clients to communicate and share files with each other by using the server as a mediator. NFS only allows client-server operations.

Does SMB work over the internet? ›

Using TCP allows SMB to work over the internet.

What is an example of SMB? ›

Here's an example of how the SMB works in real life. Let's say that the printer in your office is connected to the office administrator's computer. If you want to print a document, your computer (the client) sends the office administrator's computer (the server) a request to print it and uses the SMB protocol to do it.

What is port 139 used for? ›

Port 139, primarily used by the Server Message Block (SMB) protocol for file sharing in Windows networks, stands out as a critical point of vulnerability when not properly secured. This port facilitates network communications, allowing computers to share files, printers, and serial ports over a network.

What is port 445 used for? ›

What is the use of port 445? Port 445 is a Microsoft networking port which is also linked to the NetBIOS service present in earlier versions of Microsoft Operating Systems. It runs Server Message Block (SMB), which allows systems of the same network to share files and printers over TCP/IP.

What is the purpose of SMB? ›

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.

What is the purpose of the Server Message Block? ›

Server message block (SMB) is a client/server communication protocol that provides shared access to files, whole directories, and network resources such as printers across a network. It is also used to carry transaction protocols for authenticated interprocess communication.

Is CIFS obsolete? ›

CIFS is now considered obsolete because most modern data storage systems use the more robust Server Message Block (SMB) 2.0 and 3.0 file-sharing protocols.

What ports is SMB running on? ›

SMB operates on several ports, with the most common being 139 and 445. Port 139 is used for file and printer sharing over NetBIOS, running over TCP/IP. This setup is typical in older versions of Windows and in various Unix systems.

How does SMB Direct work? ›

SMB Direct is based around the use of RDMA (Remote Direct Memory Access). RDMA allows network data to be transferred directly to application memory, or directly from application memory to the network, without having to involve the CPU.

How does SMB authentication work? ›

SMB client request – Through the SMB protocol, the client device sends a request to the SMB server, seeking to access shared resources. Authentication – After establishing a session with the server, the client transmits its identification credentials to the server.

Is SMB a security risk? ›

Small and medium-sized businesses (SMBs) are often targeted by cyberattacks due to misconfigured security systems, weak credentials, and insecure mobile devices. Attackers exploit misconfigured security systems to gain access to sensitive data.

Can someone see your messages in a discord server if you block them? ›

If you block them, they cannot see your messages; as you cannot see theirs. The only way to break this spell is by unblocking, which is your choice.

Top Articles
What Foods Can I Take to France? - Everything You Need to Know
E-Commerce is Hard
Knoxville Tennessee White Pages
Cold Air Intake - High-flow, Roto-mold Tube - TOYOTA TACOMA V6-4.0
Wizard Build Season 28
Readyset Ochsner.org
Apex Rank Leaderboard
Elden Ring Dex/Int Build
Skip The Games Norfolk Virginia
Oppenheimer & Co. Inc. Buys Shares of 798,472 AST SpaceMobile, Inc. (NASDAQ:ASTS)
Elizabethtown Mesothelioma Legal Question
Missing 2023 Showtimes Near Landmark Cinemas Peoria
Sony E 18-200mm F3.5-6.3 OSS LE Review
Gino Jennings Live Stream Today
Munich residents spend the most online for food
Tamilrockers Movies 2023 Download
Katherine Croan Ewald
Diamond Piers Menards
The Ultimate Style Guide To Casual Dress Code For Women
Site : Storagealamogordo.com Easy Call
Is Windbound Multiplayer
Filthy Rich Boys (Rich Boys Of Burberry Prep #1) - C.M. Stunich [PDF] | Online Book Share
Integer Division Matlab
Sandals Travel Agent Login
Horn Rank
Ltg Speech Copy Paste
Cognitive Science Cornell
Random Bibleizer
Craigslist Fort Smith Ar Personals
The Clapping Song Lyrics by Belle Stars
Poe T4 Aisling
R/Sandiego
Kempsville Recreation Center Pool Schedule
Rogold Extension
Beaver Saddle Ark
Log in or sign up to view
A Man Called Otto Showtimes Near Amc Muncie 12
Powerspec G512
The Minneapolis Journal from Minneapolis, Minnesota
Saybyebugs At Walmart
2007 Jaguar XK Low Miles for sale - Palm Desert, CA - craigslist
Miami Vice turns 40: A look back at the iconic series
Love Words Starting with P (With Definition)
Tlc Africa Deaths 2021
Youravon Com Mi Cuenta
Nope 123Movies Full
Kushfly Promo Code
Diario Las Americas Rentas Hialeah
Game Akin To Bingo Nyt
Marion City Wide Garage Sale 2023
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 6237

Rating: 4.9 / 5 (49 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.