Blog Post

Storage at Microsoft
6 MIN READ

SMB over QUIC client access control now supported in Windows Insider

NedPyle's avatar
NedPyle
Icon for Microsoft rankMicrosoft
Oct 18, 2023

Heya folks, Ned here again. Beginning in Windows 11 Insider Preview Build 25977 (Canary Channel) and Windows Server Preview Build 25997, SMB over QUIC now supports access control for clients. Today I’ll explain how this works, what the advantages are, and how to set it up.

 

SMB over QUIC

SMB over QUIC introduced an alternative to TCP and RDMA, supplying secure connectivity to edge file servers over untrusted networks like the Internet. QUIC has significant advantages, the largest being mandatory certificate-based encryption instead of relying on passwords.

 

SMB over QUIC offers an "SMB VPN" for telecommuters, mobile device users, and high security organizations. The server certificate creates a TLS 1.3-encrypted tunnel over the internet-friendly UDP port 443* instead of the legacy TCP port 445. No SMB traffic - including authentication and authorization - is exposed to the underlying network. SMB behaves normally within the QUIC tunnel, meaning the user experience doesn't change and capabilities like multichannel and compression work.  

 

A file server administrator must opt in to enabling SMB over QUIC, it isn't on by default and a client can't force a file server to enable SMB over QUIC. It’s available in Windows 11 and Windows Server 2022 as an SMB client and in Windows Server 2022 Azure Edition* as an SMB server.

 

* Update Nov 15, 2023. We just announced that SMB over QUIC is now part of Windows Server Datacenter and Standard editions for the next release of Windows Server and that you can now control the QUIC network port. You can try it out in Insiders Preview. For more info, review https://aka.ms/SMBoverQUICServer

 

SMB over QUIC Client Access Control

SMB over QUIC client access control (CAC) improves the existing SMB over QUIC feature. Previously, servers trusted all clients if they were issued the same certificate root chain as the server’s SMB over QUIC server certificate. With this new option, administrators can restrict which clients can access SMB over QUIC servers – an allowlist for devices trusted to connect to the file server. This gives organizations more protection but does not change the Windows authentication used to make the SMB connection nor does it alter the end user experience.

 

This feature works by a client trusting the SMB over QUIC server via a valid shared root authority key. An admin also gives the client a certificate from the same issuer, and that certificate’s hash (or issuer) is added to a trust list maintained by the server. When the client connects, it sends the certificate info to the server for comparison against the allow list, granting or denying access to QUIC. Then SMB authentication occurs inside the QUIC TLS tunnel, and the user connects to their share. An admin can also explicitly deny access or just revoke certificates. CAC is optional and – for now – not on by default.

 

Update November 8, 2023:

Starting with Build 25992, the SMB over QUIC client access control feature now supports using certificates with subject alternative names and not just a single subject. This means the client access control feature now supports using a Microsoft AD Certificate Authority and multiple endpoint names, just like the currently released version of SMB over QUIC. You can now evaluate the feature using the recommended options and not require self-signed test certificates. 

 

Configuring SMB over QUIC client access control

The steps to configure SMB over QUIC CAC are nearly identical for the server-side. The steps for clients are quite different. This is the typical trade-off between security and ease of management.

 

Prerequisites

To evaluate CAC, you’ll need:

 

 

Configure SMB over QUIC CAC

To configure SMB over QUIC CAC, we’re going to use a self-signed certificate and PowerShell.

 

These steps are strictly for Insider Preview evaluation purposes; the released CAC feature will fully support a Certificate Authority and Windows Admin Center, and you should never use a self-signed certificate with SMB over QUIC in a production environment.

 

  1. Open an administrator-elevated PowerShell console on the SMB over QUIC server.
  2. Create server self-signed certificate (where “Server DNS name” is the fully-qualified name of the SMB over QUIC server):

 

$serverCert = New-SelfSignedCertificate -DnsName Server DNS name -CertStoreLocation "Cert:\LocalMachine\My" -NotAfter (Get-Date).AddMonths(6) -KeyAlgorithm "RSA" -KeyLength "2048"

 

  1. Configure the server certificate mapping requiring client authentication:

 

New-SmbServerCertificateMapping -Name Server DNS name -Thumbprint $serverCert.Thumbprint -Store My -Requireclientauthentication $true

 

  1. Export the certificate:

 

Export-Certificate -Cert $serverCert -FilePath path\serverCert.cer

 

  1. Copy the servercert.cer file to the client machine and on the client, open an administrator-elevated PowerShell console
  2. Install the certificate into the trusted root store on the client:

 

Import-Certificate -FilePath path\serverCert.cer -CertStoreLocation Cert:\LocalMachine\root

  1. Create the client’s certificate for use with the server allow list:

 

$clientCert = New-SelfSignedCertificate -DnsName Server DNS name -CertStoreLocation "Cert:\LocalMachine\My" -NotAfter (Get-Date).AddMonths(6) -KeyAlgorithm "RSA" -KeyLength "2048"

 

  1. Configure the client certificate mapping on the client machine:

 

New-SmbClientCertificateMapping -Namespace Server DNS name -Thumbprint $clientCert.Thumbprint -Store My

 

  1. Obtain client certificate SHA256 hash by running certutil to examine the Cert Hash(sha256) field:

 

Export-Certificate -Cert $clientCert -FilePath path\clientCert.cer

certutil.exe path\clientCert.cer | findstr /i /c:"Cert Hash(sha256)"

 

An example of the certutil command running     

     10. Return to the server.

     11. Install the client certificate into the trusted root store on the server:

 

Import-Certificate -FilePath path\ClientCert.cer -CertStoreLocation Cert:\LocalMachine\root

     
     12. Grant access to the client by its SHA256 entry:

 

Grant-SmbClientAccessToServer -Name Server DNS name -IdentifierType SHA256 -Identifier Cert Hash(sha256)

 

Note: you can also grant access by Issuer, meaning instead of adding a certificate SHA256 hash from every single client, you can instead add the Issuer DN by using -IdentifierType ISSUER. While not as granular or secure, this is useful for large client fleets when using a trusted certificate authority and not self-signed evaluation certs.

 

 

     12. You have now configured SMB over QUIC CAC. Connect to the server using either:

 

NET USE \\server DNS name\share /TRANSPORT:QUIC
New-SmbMapping -RemotePath \\server DNS name\share -TransportType QUIC

 

Final Notes

SMB over QUIC isn’t just for mobile users and edge servers in Internet DMZs, it’s a practical defensive layer to prevent leakage of NTLM credentials and makes attacking internal files servers harder without first subverting a trusted client. TCP had its time, QUIC is the future of user and application transport.

 

We also just announced that a replacement for KDC Proxy -  IAKerb - is coming to Windows Insider Previews along with a local KDC. These combined options mean the beginning of the end for NTLM, which will make SMB over QUIC Kerberos usage much easier. Read about it at The evolution of Windows authentication.     

 

This is part of a campaign to improve the security of Windows and Windows Server for the modern landscape. You've read my posts on SMB security changes over the past year:

 

 

For more information on securing SMB on Windows in-market, check out:

 

 

Until next time,

Ned Pyle

Updated Jul 02, 2024
Version 10.0
  • Thank you NedPyle for Sharing this Awesome blogpost with the community :stareyes:

    Shared with the Windows Insider Community 
    Cheers, James

  • DetVidunderliga's avatar
    DetVidunderliga
    Copper Contributor

    Thank you Mr Pyle for great content as per usual. I have a question with regards to the statement:

    It’s available in Windows 11 and Windows Server 2022 as an SMB client and in Windows Server 2022 Azure Edition* as an SMB server.

    and this cloud only strategy that seems to move forward at a break neck pace right now;

    Is there going to be a fully functional Windows Server in the future / next release for organizations preferring on prem footprints?

    It seems to me like that part of the customer base is unwanted these days and for me personally it is hard to find the correct architectural bridge to the future given my organization’s traditional reliance on Microsoft Active Directory, SQL Server, IIS and in-house .NET development. It is not a lack of understanding of Azure, it's license structure and endless layers of services on my part - it is that I reject the notion of monthly subscriptions, learning cloud provider specific tooling with no generic area of application outside the cloud provider combined with the sense of customer lock-in that makes public cloud a very hard sell for me. For me as a customer I would like to have the choice were I am to run my workloads and create my services - that choice might be influenced by regulatory frameworks, cost driven issues or just the common fact that we have the know-how to build it our self on top of the traditional Microsoft provided stack hosted on prem.

    Best regards

    Anders

  • DetVidunderliga's avatar
    DetVidunderliga
    Copper Contributor

    Thank you sir for taking the time to reply and I shall look in the coming blog post for the answer to my question.

  • ohault's avatar
    ohault
    Brass Contributor

    In one hand, file sharing over the Internet, should be somehow deeply integrated with at least both Microsoft OneDrive and Google Drive.

     

    On the other hand, for private traffic (in data center) relaying on MPTCP will provide a seamless and simpler approach especially for COTS hardware

  • Wes808's avatar
    Wes808
    Brass Contributor

    the asterisk is exciting pre-news Ned!  could we expect something further in October, in CY 2023, or beyond?