Concepts / Network services

Network services

SMB/CIFS

Also called server message block, CIFS, Windows file sharing, samba, smbclient, port 445, SMB2, SMB3, net use, mapped drive

Windows-style file and printer sharing on TCP 445: a client logs in, connects to a named share, and reads or writes its files.

Four steps, always in this order
Four steps, always in this order

Agree a dialect, log in, connect to a share, then open files. A share is reached only after the login, and a capture shows these step names one after the other.

SMB (Server Message Block, once CIFS) is how Windows and Samba share folders and printers, on TCP port 445. A client negotiates a dialect (SMB2 or SMB3; the old SMB1 is insecure), logs in with a session setup (NTLM or Kerberos), does a tree connect to a share such as \\server\finance, then opens and reads files. Never expose port 445 to the internet: WannaCry spread over SMB1.

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start learning