829
[MS-CIFS]: Common Internet File System (CIFS) Protocol Intellectual Property Rights Notice for Open Specifications Documentation § Technical Documentation. Microsoft publishes Open Specifications documentation (“this documentation”) for protocols, file formats, data portability, computer languages, and standards support. Additionally, overview documents cover inter- protocol relationships and interactions. § Copyrights. This documentation is covered by Microsoft copyrights. Regardless of any other terms that are contained in the terms of use for the Microsoft website that hosts this documentation, you can make copies of it in order to develop implementations of the technologies that are described in this documentation and can distribute portions of it in your implementations that use these technologies or in your documentation as necessary to properly document the implementation. You can also distribute in your implementation, with or without modification, any schemas, IDLs, or code samples that are included in the documentation. This permission also applies to any documents that are referenced in the Open Specifications documentation. § No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation. § Patents. Microsoft has patents that might cover your implementations of the technologies described in the Open Specifications documentation. Neither this notice nor Microsoft's delivery of this documentation grants any licenses under those patents or any other Microsoft patents. However, a given Open Specifications document might be covered by the Microsoft Open Specifications Promise or the Microsoft Community Promise . If you would prefer a written license, or if the technologies described in this documentation are not covered by the Open Specifications Promise or Community Promise, as applicable, patent licenses are available by contacting [email protected] . § License Programs. To see all of the protocols in scope under a specific license program and the associated patents, visit the Patent Map . § Trademarks. The names of companies and products contained in this documentation might be covered by trademarks or similar intellectual property rights. This notice does not grant any licenses under those rights. For a list of Microsoft trademarks, visit www.microsoft.com/trademarks . § Fictitious Names. The example companies, organizations, products, domain names, email addresses, logos, people, places, and events that are depicted in this documentation are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred. Reservation of Rights. All other rights are reserved, and this notice does not grant any rights other than as specifically described above, whether by implication, estoppel, or otherwise. Tools. The Open Specifications documentation does not require the use of Microsoft programming tools or programming environments in order for you to develop an 1 / 829 [MS-CIFS] - v20171201 Common Internet File System (CIFS) Protocol Copyright © 2017 Microsoft Corporation Release: December 1, 2017

Introduction · Web viewHowever, because individual documents in the library are not updated at the same time, the section numbers in the documents may not match. You can confirm the

Embed Size (px)

Citation preview

[MS-CIFS]:

Common Internet File System (CIFS) Protocol

Intellectual Property Rights Notice for Open Specifications Documentation

Technical Documentation. Microsoft publishes Open Specifications documentation (this documentation) for protocols, file formats, data portability, computer languages, and standards support. Additionally, overview documents cover inter-protocol relationships and interactions.

Copyrights. This documentation is covered by Microsoft copyrights. Regardless of any other terms that are contained in the terms of use for the Microsoft website that hosts this documentation, you can make copies of it in order to develop implementations of the technologies that are described in this documentation and can distribute portions of it in your implementations that use these technologies or in your documentation as necessary to properly document the implementation. You can also distribute in your implementation, with or without modification, any schemas, IDLs, or code samples that are included in the documentation. This permission also applies to any documents that are referenced in the Open Specifications documentation.

No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.

Patents. Microsoft has patents that might cover your implementations of the technologies described in the Open Specifications documentation. Neither this notice nor Microsoft's delivery of this documentation grants any licenses under those patents or any other Microsoft patents. However, a given Open Specifications document might be covered by the Microsoft Open Specifications Promise or the Microsoft Community Promise. If you would prefer a written license, or if the technologies described in this documentation are not covered by the Open Specifications Promise or Community Promise, as applicable, patent licenses are available by contacting [email protected].

License Programs. To see all of the protocols in scope under a specific license program and the associated patents, visit the Patent Map.

Trademarks. The names of companies and products contained in this documentation might be covered by trademarks or similar intellectual property rights. This notice does not grant any licenses under those rights. For a list of Microsoft trademarks, visit www.microsoft.com/trademarks.

Fictitious Names. The example companies, organizations, products, domain names, email addresses, logos, people, places, and events that are depicted in this documentation are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred.

Reservation of Rights. All other rights are reserved, and this notice does not grant any rights other than as specifically described above, whether by implication, estoppel, or otherwise.

Tools. The Open Specifications documentation does not require the use of Microsoft programming tools or programming environments in order for you to develop an implementation. If you have access to Microsoft programming tools and environments, you are free to take advantage of them. Certain Open Specifications documents are intended for use in conjunction with publicly available standards specifications and network programming art and, as such, assume that the reader either is familiar with the aforementioned material or has immediate access to it.

Support. For questions and support, please contact [email protected].

Revision Summary

Date

Revision History

Revision Class

Comments

9/25/2009

1.0

Major

First Release.

11/6/2009

2.0

Major

Updated and revised the technical content.

12/18/2009

3.0

Major

Updated and revised the technical content.

1/29/2010

4.0

Major

Updated and revised the technical content.

3/12/2010

5.0

Major

Updated and revised the technical content.

4/23/2010

6.0

Major

Updated and revised the technical content.

6/4/2010

7.0

Major

Updated and revised the technical content.

7/16/2010

8.0

Major

Updated and revised the technical content.

8/27/2010

9.0

Major

Updated and revised the technical content.

10/8/2010

10.0

Major

Updated and revised the technical content.

11/19/2010

11.0

Major

Updated and revised the technical content.

1/7/2011

12.0

Major

Updated and revised the technical content.

2/11/2011

13.0

Major

Updated and revised the technical content.

3/25/2011

14.0

Major

Updated and revised the technical content.

5/6/2011

15.0

Major

Updated and revised the technical content.

6/17/2011

15.1

Minor

Clarified the meaning of the technical content.

9/23/2011

16.0

Major

Updated and revised the technical content.

12/16/2011

17.0

Major

Updated and revised the technical content.

3/30/2012

18.0

Major

Updated and revised the technical content.

7/12/2012

19.0

Major

Updated and revised the technical content.

10/25/2012

20.0

Major

Updated and revised the technical content.

1/31/2013

21.0

Major

Updated and revised the technical content.

8/8/2013

22.0

Major

Updated and revised the technical content.

11/14/2013

22.0

None

No changes to the meaning, language, or formatting of the technical content.

2/13/2014

23.0

Major

Updated and revised the technical content.

5/15/2014

24.0

Major

Updated and revised the technical content.

6/30/2015

25.0

Major

Significantly changed the technical content.

10/16/2015

25.0

None

No changes to the meaning, language, or formatting of the technical content.

7/14/2016

26.0

Major

Significantly changed the technical content.

6/1/2017

27.0

Major

Significantly changed the technical content.

12/1/2017

28.0

Major

Significantly changed the technical content.

Table of Contents

1Introduction17

1.1Glossary17

1.2References23

1.2.1Normative References23

1.2.2Informative References24

1.3Overview27

1.4Relationship to Other Protocols29

1.5Prerequisites/Preconditions30

1.6Applicability Statement30

1.7Versioning and Capability Negotiation31

1.8Vendor-Extensible Fields32

1.9Standards Assignments33

2Messages34

2.1Transport34

2.1.1NetBIOS-Based Transports34

2.1.1.1NetBIOS Frames (NBF) Protocol Transport34

2.1.1.2NetBIOS over TCP/UDP (NBT) Transport35

2.1.1.3NetBIOS over IPX/SPX (NBIPX) Transport35

2.1.1.4Other NetBIOS-Based Transports35

2.1.2Direct Hosting35

2.1.2.1Direct IPX Transport35

2.1.3Virtual Circuits39

2.2Message Syntax39

2.2.1Common Data Types41

2.2.1.1Character Sequences42

2.2.1.1.1File and Directory names42

2.2.1.1.2Pathnames43

2.2.1.1.3Wildcards43

2.2.1.2File Attributes43

2.2.1.2.1SMB_GEA43

2.2.1.2.1.1SMB_GEA_LIST44

2.2.1.2.2SMB_FEA44

2.2.1.2.2.1SMB_FEA_LIST46

2.2.1.2.3SMB_EXT_FILE_ATTR46

2.2.1.2.4SMB_FILE_ATTRIBUTES47

2.2.1.3Named Pipe Status (SMB_NMPIPE_STATUS)48

2.2.1.4Time49

2.2.1.4.1SMB_DATE50

2.2.1.4.2SMB_TIME50

2.2.1.4.3UTIME50

2.2.1.5Status Codes (SMB_ERROR)50

2.2.1.6Unique Identifiers51

2.2.1.6.1FID Generation52

2.2.1.6.2MID Generation52

2.2.1.6.3PID Generation52

2.2.1.6.4Connection ID (CID) Generation53

2.2.1.6.5Search ID (SID) Generation53

2.2.1.6.6SessionKey Generation53

2.2.1.6.7TID Generation54

2.2.1.6.8UID Generation54

2.2.2Defined Constants54

2.2.2.1SMB_COM Command Codes54

2.2.2.2Transaction Subcommand Codes61

2.2.2.3Information Level Codes64

2.2.2.3.1FIND Information Level Codes64

2.2.2.3.2QUERY_FS Information Level Codes65

2.2.2.3.3QUERY Information Level Codes65

2.2.2.3.4SET Information Level Codes66

2.2.2.4SMB Error Classes and Codes67

2.2.2.5Data Buffer Format Codes77

2.2.3SMB Message Structure78

2.2.3.1The SMB Header78

2.2.3.2Parameter Block84

2.2.3.3Data Block84

2.2.3.4Batched Messages ("AndX" Messages)85

2.2.3.4.1Follow-on Commands85

2.2.4SMB Commands86

2.2.4.1SMB_COM_CREATE_DIRECTORY (0x00)86

2.2.4.1.1Request86

2.2.4.1.2Response87

2.2.4.2SMB_COM_DELETE_DIRECTORY (0x01)88

2.2.4.2.1Request88

2.2.4.2.2Response89

2.2.4.3SMB_COM_OPEN (0x02)91

2.2.4.3.1Request91

2.2.4.3.2Response94

2.2.4.4SMB_COM_CREATE (0x03)98

2.2.4.4.1Request98

2.2.4.4.2Response99

2.2.4.5SMB_COM_CLOSE (0x04)102

2.2.4.5.1Request102

2.2.4.5.2Response103

2.2.4.6SMB_COM_FLUSH (0x05)104

2.2.4.6.1Request104

2.2.4.6.2Response105

2.2.4.7SMB_COM_DELETE (0x06)107

2.2.4.7.1Request107

2.2.4.7.2Response109

2.2.4.8SMB_COM_RENAME (0x07)110

2.2.4.8.1Request110

2.2.4.8.2Respons