Home
%3CLINGO-SUB%20id%3D%22lingo-sub-860024%22%20slang%3D%22en-US%22%3EControlling%20SMB%20Dialects%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-860024%22%20slang%3D%22en-US%22%3E%3CP%3EHeya%20folks%2C%20%3CA%20href%3D%22https%3A%2F%2Ftwitter.com%2Fnerdpyle%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ENed%3C%2FA%3E%20here%20again.%20As%20part%20of%20a%20small%20series%20on%20esoteric%20SMB%20settings%2C%20today%20I%E2%80%99m%20going%20to%20explain%20how%20to%20control%20SMB%20client%20dialects%20in%20Windows%2010%20and%20Windows%20Server%202019.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1821897368%22%20id%3D%22toc-hId-1821897368%22%3E%3CSTRONG%3EBackground%20%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3ESMB%20Dialects%20are%20simply%20significant%20versions%20-%20just%20like%20dialects%20within%20human%20languages%20-%20that%20allow%20a%20client%20and%20server%20to%20agree%20on%20conversation%20behaviors.%20For%20example%2C%20the%20SMB%203.1.1%20dialect%20came%20with%20Windows%2010%20and%20Windows%20Server%202016.%20These%20dialects%20allow%20assignment%20of%20various%20capabilities%20like%20encryption%2C%20signing%20algorithms%2C%20multichannel%20connections%2C%20etc.%20When%20the%20SMB%20client%20initially%20connects%20to%20a%20destination%20server%2C%20it%20negotiates%20the%20matched%20and%20required%20set%20of%20capabilities.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1.%20The%20SMB%20client%20says%20%E2%80%9CI%20support%20all%20these%20dialects%20and%20capabilities%E2%80%9D%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20883px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132257iFF5265E4FD818124%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Annotation%202019-09-17%20144004.png%22%20title%3D%22Annotation%202019-09-17%20144004.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E2.%20The%20SMB%20server%20responds%2C%20%E2%80%9CLet%E2%80%99s%20use%20the%20highest%20one%20we%20both%20support%2C%20in%20this%20case%20SMB%203.1.1%E2%80%9D%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20983px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132255iE7CEFA5BA9B64066%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Annotation%202019-09-17%20141436.png%22%20title%3D%22Annotation%202019-09-17%20141436.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%E2%80%99re%20having%20trouble%20sleeping%2C%20I%20suggest%20reading%20our%20simple%20SMB2%20NEGOTIATE%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fopenspecs%2Fwindows_protocols%2Fms-smb2%2Ffac3655a-7eb5-4337-b0ab-244bbcd014e8%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Espec%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132235i46261088B26DC93B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22clipboard_image_0.png%22%20title%3D%22clipboard_image_0.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3ESheesh%2C%20our%20protocol%20docs...%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20479px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132260i08CE54FE3CE3A056%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Annotation%202019-09-17%20162411.png%22%20title%3D%22Annotation%202019-09-17%20162411.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--730259593%22%20id%3D%22toc-hId--730259593%22%3E%3CSTRONG%3EWho%20cares%3F%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3EThere%20are%20times%20when%20you%20might%20want%20to%20require%20a%20minimum%20or%20maximum%20dialect%2C%20such%20as%20when%20using%20older%20networking%20equipment%20that%20might%20not%20understand%20later%20protocols.%20Or%20you%20might%20want%20to%20enforce%20the%20latest%20protocol%20for%20security%20reasons%20and%20not%20rely%20on%20servers%20to%20know%20what%E2%80%99s%20safest%20for%20clients.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1012550742%22%20id%3D%22toc-hId-1012550742%22%3E%3CSTRONG%3EWindows%201709%20and%20later%20SMB%20dialect%20control%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3EStarting%20in%20build%201709%20(RS3)%20you%20get%20fine-grained%20control%20over%20protocol%20in%20the%20SMB%20client.%20When%20I%20say%20client%2C%20I%20mean%20a%20%E2%80%9Ccomputer%20acting%20as%20the%20SMB%20client%E2%80%9D%2C%20not%20the%20Windows%20edition%3B%20this%20article%20applies%20equally%20to%20Windows%20Server.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThere%20are%20two%20%3CEM%3EDWORD%3C%2FEM%3E%20value%20names%20to%20create%20and%20modify%20values%20on%3A%3C%2FP%3E%0A%3CPRE%3EHKEY_LOCAL_MACHINE%5CSYSTEM%5CCurrentControlSet%5CServices%5CLanmanWorkstation%5CParameters%3CBR%20%2F%3EMinSMB2Dialect%3CBR%20%2F%3EMaxSMB2Dialect%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20valid%20hex%20values%20are%3A%3C%2FP%3E%0A%3CPRE%3E0x00000202%3CBR%20%2F%3E0x00000210%3CBR%20%2F%3E0x00000300%3CBR%20%2F%3E0x00000302%3CBR%20%2F%3E0x00000311%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20you%20might%20have%20guessed%2C%20this%20is%20setting%20SMB%202.0.2%2C%202.1.0%2C%203.0.0%2C%203.0.2%2C%20and%203.1.1%20dialects.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH5%20id%3D%22toc-hId--2129146734%22%20id%3D%22toc-hId--2129146734%22%3E%3CSTRONG%3EImportant%3A%3C%2FSTRONG%3E%20SMB1%20cannot%20be%20controlled%20here%20and%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fstopusingsmb1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eyou%20should%20have%20long%20since%20uninstalled%20it%3C%2FA%3E%20if%20Windows%20%3CA%20href%3D%22http%3A%2F%2Faka.ms%2Fsmb1rs3%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Edidn%E2%80%99t%20do%20it%20for%20you%3C%2FA%3E.%3C%2FH5%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20set%20the%20MinSMB2Dialect%20to%20the%20lowest%20allowed%20dialect%20and%20the%20MaxSMB2Dialect%20to%20the%20highest%20allowed%20dialect.%20For%20example%2C%20this%20setting%20makes%20the%20client%20send%20only%20the%20SMB%203%20family%20of%20traffic%20and%20prevents%20use%20of%20SMB%202.x%3A%3C%2FP%3E%0A%3CPRE%3EHKEY_LOCAL_MACHINE%5CSYSTEM%5CCurrentControlSet%5CServices%5CLanmanWorkstation%5CParameters%3CBR%20%2F%3EMinSMB2Dialect%3A%200x000000300%3CBR%20%2F%3EMaxSMB2Dialect%3A%200x000000311%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThey%20can%20also%20be%20equal%20%E2%80%93%20for%20instance%2C%20if%20you%20wanted%20to%20require%20just%20the%20absolute%20latest%2C%20most%20secure%20version%20of%20SMB%2C%203.1.1%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20754px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132253iE5E583A41D04C839%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Annotation%202019-09-17%20141149.png%22%20title%3D%22Annotation%202019-09-17%20141149.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20don%E2%80%99t%20set%20the%20MaxSMB2Dialect%20value%2C%20everything%20above%20the%20minimum%20will%20be%20negotiated%3B%20this%20is%20a%20good%20way%20to%20be%20future%20proof%20if%20we%20decided%20to%20make%20an%20%E2%80%9CSMB%204%E2%80%9D%20someday.%26nbsp%3BThese%20registry%20changes%20work%20on%20the%20fly%20for%20new%20connections%2C%20no%20reboot%20or%20service%20restart%20needed.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-203204116%22%20id%3D%22toc-hId-203204116%22%3E%3CSTRONG%3EHow%20it%20looks%20on%20the%20wire%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3EHere%20I%20have%20forced%20only%20the%20SMB%203%20dialect%20family.%20Notice%20now%20how%20instead%20of%20sending%20all%20the%20dialects%20in%20my%20negotiate%20request%2C%20I%20only%20send%20three%20now.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20890px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132247i45864DE98EB63430%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Annotation%202019-09-17%20145123.png%22%20title%3D%22Annotation%202019-09-17%20145123.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EHere%20I%20have%20forced%20the%20SMB%20client%20to%20only%20use%20the%20SMB%202%20family%20because%20I%20am%20using%20an%20outdated%20WAN%20appliance%20packet%20shaper%20that%20doesn%E2%80%99t%20support%20SMB%203.%20In%20this%20response%20packet%2C%20the%20server%20agreed%20to%20use%20SMB%202.1.%20Notice%20also%20how%20my%20capabilities%20have%20changed%20%E2%80%93%20I%20cannot%20use%20multichannel%2C%20persistent%20handles%2C%20directory%20leasing%2C%20or%20encryption%20anymore%20because%20SMB%202.1%20doesn%E2%80%99t%20support%20those%20features.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20929px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132251i9E4C4038E5822DC8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Annotation%202019-09-17%20140341.png%22%20title%3D%22Annotation%202019-09-17%20140341.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20use%20this%20dialect%20control%20to%20work%20with%20that%20WAN%20appliance%20temporarily%20until%20you%20update%20its%20firmware%20(and%20you%E2%80%99d%20better!)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20style%3D%22font-family%3A%20SegoeUI%2C%20Lato%2C%20'Helvetica%20Neue'%2C%20Helvetica%2C%20Arial%2C%20sans-serif%3B%20color%3A%20%23333333%3B%22%20id%3D%22toc-hId-1946014451%22%20id%3D%22toc-hId-1946014451%22%3E%3CSTRONG%3ECareful%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3EIf%20you%20mistype%20the%20values%20to%20ones%20that%20don%E2%80%99t%20exist%2C%20the%20SMB%20server%20will%20refuse%20the%20connection%20with%20error%20%E2%80%9CInvalid%20Parameter%E2%80%9D.%20Don%E2%80%99t%20do%20that.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132252iC3A96FA3C1FC6C3D%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Annotation%202019-09-17%20141027.png%22%20title%3D%22Annotation%202019-09-17%20141027.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20set%20a%20minimum%20SMB%20dialect%20not%20supported%20by%20your%20servers%2C%20you%20won%E2%80%99t%20connect%20anymore%2C%20with%20error%20%E2%80%9Cnot%20supported%E2%80%9D%20and%20%E2%80%9Cnetwork%20path%20not%20found%E2%80%9D.%20Here%20I%20have%20forced%20my%20SMB%20client%20to%20only%20support%20SMB%203.1.1%20then%20I%20connected%20to%20a%20Windows%20Server%202008%20machine%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20975px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132254i9479B7961B9E3597%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Annotation%202019-09-17%20141313.png%22%20title%3D%22Annotation%202019-09-17%20141313.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20307px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132256i57DEC7372FD4813B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Annotation%202019-09-17%20141523.png%22%20title%3D%22Annotation%202019-09-17%20141523.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDon%E2%80%99t%20do%20that%20either.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--606142510%22%20id%3D%22toc-hId--606142510%22%3E%3CSTRONG%3ESummary%3C%2FSTRONG%3E%3C%2FH2%3E%0A%3CP%3EI%20hope%20this%20clarified%20SMB%E2%80%99s%20dialect%20negotiation%20behaviors%20and%20maybe%20saved%20you%20come%20follicles%20someday.%20SMB%20is%20ubiquitous%20and%20isn%E2%80%99t%20just%20for%20Windows%3B%20both%20the%20Linux%20kernel%20and%20MacOS%20broadly%20used%20have%20built-in%20SMB%20clients.%20In%20the%20past%207%20days%20alone%2C%20our%20Win10%20telemetry%20observed%2030%20billion%20SMB%20connections.%20Understanding%20how%20it%20works%20is%20an%20extremely%20useful%20skill.%20I%20recommend%20simply%20running%20Wireshark%20or%20Message%20Analyzer%20and%20using%20SMB%20in%20your%20lab%20to%20understand%20what%20normal%20conversations%20look%20like.%20You%20can%20also%20read%20our%20complete%20robot-lawyer%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fopenspecs%2Fwindows_protocols%2Fms-smb2%2F5606ad47-5ee0-437a-817e-70c366052962%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Efull%20on-the-wire%20specification%3C%2FA%3E%20if%20you%20enjoy%20pain.%3C%2FP%3E%0A%3CP%3EUntil%20next%20time%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENed%20%E2%80%9Cparser%E2%80%9D%20Pyle%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-860024%22%20slang%3D%22en-US%22%3E%3CP%3EUnderstanding%20SMB2%2B%20dialects%20and%20controlling%20them%20in%20later%20versions%20of%20Windows%2010%20and%20Windows%20Server%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

Heya folks, Ned here again. As part of a small series on esoteric SMB settings, today I’m going to explain how to control SMB client dialects in Windows 10 and Windows Server 2019.

 

Background

SMB Dialects are simply significant versions - just like dialects within human languages - that allow a client and server to agree on conversation behaviors. For example, the SMB 3.1.1 dialect came with Windows 10 and Windows Server 2016. These dialects allow assignment of various capabilities like encryption, signing algorithms, multichannel connections, etc. When the SMB client initially connects to a destination server, it negotiates the matched and required set of capabilities. 

 

1. The SMB client says “I support all these dialects and capabilities”:

 

Annotation 2019-09-17 144004.png

2. The SMB server responds, “Let’s use the highest one we both support, in this case SMB 3.1.1”

 

Annotation 2019-09-17 141436.png

 

If you’re having trouble sleeping, I suggest reading our simple SMB2 NEGOTIATE spec.

 

clipboard_image_0.png

Sheesh, our protocol docs...

 

Annotation 2019-09-17 162411.png

 

Who cares?

There are times when you might want to require a minimum or maximum dialect, such as when using older networking equipment that might not understand later protocols. Or you might want to enforce the latest protocol for security reasons and not rely on servers to know what’s safest for clients.

 

Windows 1709 and later SMB dialect control

Starting in build 1709 (RS3) you get fine-grained control over protocol in the SMB client. When I say client, I mean a “computer acting as the SMB client”, not the Windows edition; this article applies equally to Windows Server.

 

There are two DWORD value names to create and modify values on:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
MinSMB2Dialect
MaxSMB2Dialect

 

The valid hex values are:

0x00000202
0x00000210
0x00000300
0x00000302
0x00000311

 

As you might have guessed, this is setting SMB 2.0.2, 2.1.0, 3.0.0, 3.0.2, and 3.1.1 dialects.

 

Important: SMB1 cannot be controlled here and you should have long since uninstalled it if Windows didn’t do it for you.

 

You set the MinSMB2Dialect to the lowest allowed dialect and the MaxSMB2Dialect to the highest allowed dialect. For example, this setting makes the client send only the SMB 3 family of traffic and prevents use of SMB 2.x:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
MinSMB2Dialect: 0x000000300
MaxSMB2Dialect: 0x000000311

 

They can also be equal – for instance, if you wanted to require just the absolute latest, most secure version of SMB, 3.1.1:

 

Annotation 2019-09-17 141149.png

 

If you don’t set the MaxSMB2Dialect value, everything above the minimum will be negotiated; this is a good way to be future proof if we decided to make an “SMB 4” someday. These registry changes work on the fly for new connections, no reboot or service restart needed.

 

How it looks on the wire

Here I have forced only the SMB 3 dialect family. Notice now how instead of sending all the dialects in my negotiate request, I only send three now.

 

Annotation 2019-09-17 145123.png

Here I have forced the SMB client to only use the SMB 2 family because I am using an outdated WAN appliance packet shaper that doesn’t support SMB 3. In this response packet, the server agreed to use SMB 2.1. Notice also how my capabilities have changed – I cannot use multichannel, persistent handles, directory leasing, or encryption anymore because SMB 2.1 doesn’t support those features.

 

Annotation 2019-09-17 140341.png

 

You can use this dialect control to work with that WAN appliance temporarily until you update its firmware (and you’d better!)

 

Careful

If you mistype the values to ones that don’t exist, the SMB server will refuse the connection with error “Invalid Parameter”. Don’t do that.

 

Annotation 2019-09-17 141027.png

 

If you set a minimum SMB dialect not supported by your servers, you won’t connect anymore, with error “not supported” and “network path not found”. Here I have forced my SMB client to only support SMB 3.1.1 then I connected to a Windows Server 2008 machine:

 

Annotation 2019-09-17 141313.png

Annotation 2019-09-17 141523.png

 

Don’t do that either.

 

Summary

I hope this clarified SMB’s dialect negotiation behaviors and maybe saved you come follicles someday. SMB is ubiquitous and isn’t just for Windows; both the Linux kernel and MacOS broadly used have built-in SMB clients. In the past 7 days alone, our Win10 telemetry observed 30 billion SMB connections. Understanding how it works is an extremely useful skill. I recommend simply running Wireshark or Message Analyzer and using SMB in your lab to understand what normal conversations look like. You can also read our complete robot-lawyer full on-the-wire specification if you enjoy pain.

Until next time,

 

Ned “parser” Pyle