Richard Sharpe of the Samba team defines SMB as a "request-response" protocol.[
] In effect, this means that a client sends an SMB request to a server, and the server sends an SMB response back to the client. Rarely does a server send a message that is not in response to a client.
An SMB message is not as complex as you might think. Let's take a closer look at the internal structure of such a message. It can be broken down into two parts: the
header, which is a fixed size, and the
command string, whose size can vary dramatically based on the contents of the message.