Network access: Restrict anonymous access to Named Pipes and Shares
A DWORD value of `1` instructs the Windows Server service to restrict access by unauthenticated clients using null sessions.
since 0.9.8.11
Purpose
Show registry keys (1)
HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters\RestrictNullSessAccess
A DWORD value of 1 instructs the Windows Server service to restrict access by unauthenticated clients using null sessions. Anonymous access remains possible only for named pipes and network shares listed in NullSessionPipes and NullSessionShares, respectively.
The value therefore does not prohibit all anonymous access. It enforces the two exception lists as a boundary. Listing a resource does not by itself grant additional permissions or replace that resource’s access controls.
Notes
Security
This restriction reduces the Server service attack surface exposed through null sessions. Without the restriction, unauthenticated clients may reach named pipes or shares whose configuration permits anonymous access, potentially exposing their information or functionality without prior identity verification.
The effective protection also depends on NullSessionPipes, NullSessionShares, and the permissions of each resource. Listed resources can remain anonymously accessible when their other access controls permit it.
Possible side effects
Applications and legacy services that depend on unauthenticated access to a named pipe or share can stop working correctly when the required resource is not included in the applicable exception list.
Notes
RestrictNullSessAccess is the registry representation of the Windows security option. Its type is REG_DWORD, and a value of 1 represents the enabled restriction.
The setting applies to Server service null sessions. It is not a general block on every form of anonymous network access, and it does not control anonymous SAM enumeration or other network-access behavior governed by separate security options.
Microsoft documentation
Microsoft Learn: Network access: Restrict anonymous access to Named Pipes and Shares
Microsoft Learn: Policy CSP – LocalPoliciesSecurityOptions