Batched Message(AndX Messages) 主要是为了在一个message中发送多个request或者response command,而只需要一个smb header即可。 In AndX Messages, only one SMB Header (section 2.2.3.1) is sent. The header is then followed by zero or more Parameter and Data block pairs, each corresponding to an additional command request/response. There is no limit on the number of block pairs in a message specifically, only on the total message size. The total size of a Batched Message MUST NOT exceed the negotiated MaxBufferSize. AndX Messages contain a construct, conceptually similar to a linked-list, that is used to connect the batched block pairs. The resulting list is referred to as an AndX Chain. 其结构如下:
AndXOffset (2 bytes): The offset in bytes, relative to the start of the SMB Header, of the next Parameter block in the AndX Message. This offset is independent of any other size parameters or offsets within the command. This offset can point to a location past the end of the current block pair.
The AndX construct is located at the start of the Parameter block of an AndX command request/response.
由于commands数量较多,此处给出微软官方的命令解释地址。
这是SMB协议的第一步,首先进行的是Negotite and Tree Connect。在该过程中,使用的SMB命令为SMB_COM_NEGOTIATE(0x72),此命令用于启动客户端和服务器之间的SMB连接。 在将任何其他SMB消息发送到服务器之前,必须完成SMB_COM_NEGOTIATE交换。需要注意的是每个SMB连接只能有一个SMB_COM_NEGOTIATE交换。 必须拒绝服务器收到的后续SMB_COM_NEGOTIATE请求以及错误响应。 服务器不得采取任何其他行动。