Disable anonymous access to named pipes and shares
- Single actionThis page belongs to a script, containing basic changes to achieve a task.
- Windows onlyThis script improves your privacy on Windows
- Impact: MinimumSystem Functionality Loss Risk: Low
This action improves privacy with minimal impact when you run the recommended script. - Batch (batchfile)These changes use Windows system commands to update your settings.
- Fully reversible
You can fully restore this action (revert back to the original behavior) using this website.
The restore/revert methods provided here can help you fix issues.
Overview
This script restricts anonymous access to Named Pipes and Shares 1 2. It reduces security risks by preventing unauthorized access 1 2. Named Pipes allow programs on a computer or network to communicate with each other. Anonymous access lets users connect to services without a username or password, increasing the risk of unauthorized access.
It configures the HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters!restrictnullsessaccess
registry
setting 1 2 to control null session access, which is a common exploit method via shared folders 2.
This may lead to reduced functionality or connectivity issues, particularly in enterprise environments where remote administration is necessary.
Sources
- Anonymous access to Named Pipes and Shares must be restricted.. www.stigviewer.com. (2024).
Original: https://www.stigviewer.com/stig/windows_10/2019-01-04/finding/V-63759
Archived: https://web.archive.org/web/20241125174145/https://www.stigviewer.com/stig/windows_10/2019-01-04/finding/V-63759 - Network access Restrict anonymous access to Named Pipes and Shares - Windows 10. Microsoft Learn. learn.microsoft.com. (2024).
Original: https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/network-access-restrict-anonymous-access-to-named-pipes-and-shares
Archived: https://web.archive.org/web/20240510180133/https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/security-policy-settings/network-access-restrict-anonymous-access-to-named-pipes-and-shares
Apply Now
Choose one of three ways to apply:
Download script
Download and run the script directly- No app needed
- Offline usage
- Easy-to-apply
- Free
- Open-source
Apply with privacy.sexy
Guided, automated application with safety checks- Recommended for most users
- Includes safety checks
- Free
- Open-source
- Popular
- Offline/Online usage
- Apply
- Revert
:: Set the registry value: "HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters!restrictnullsessaccess"
PowerShell -ExecutionPolicy Unrestricted -Command "$registryPath = 'HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters'; $data = '1'; reg add 'HKLM\SYSTEM\CurrentControlSet\Services\LanManServer\Parameters' /v 'restrictnullsessaccess' /t 'REG_DWORD' /d "^""$data"^"" /f"
Ijo6IFNldCB0aGUgcmVnaXN0cnkgdmFsdWUgXCJIS0xNXFxTWVNURU1cXEN1cnJlbnRDb250cm9sU2V0XFxTZXJ2aWNlc1xcTGFuTWFuU2VydmVyXFxQYXJhbWV0ZXJzIXJlc3RyaWN0bnVsbHNlc3NhY2Nlc3NcIlxuUG93ZXJTaGVsbCAtRXhlY3V0aW9uUG9saWN5IFVucmVzdHJpY3RlZCAtQ29tbWFuZCBcIiRyZXZlcnREYXRhID0gICcxJzsgcmVnIGFkZCAnSEtMTVxcU1lTVEVNXFxDdXJyZW50Q29udHJvbFNldFxcU2VydmljZXNcXExhbk1hblNlcnZlclxcUGFyYW1ldGVycycgL3YgJ3Jlc3RyaWN0bnVsbHNlc3NhY2Nlc3MnIC90ICdSRUdfRFdPUkQnIC9kIFwiXlwiXCIkcmV2ZXJ0RGF0YVwiXlwiXCIgL2ZcIiI=
Similar Guides
Wider Goal
Guides below includes this guide to achieve a wider goal.See other more general settings that includes this one as one of its actions.These plans combine multiple privacy settings, including this one, for stronger protection.
- Disable insecure remote administration access
- Improve network security
- Security improvements
This category improves security by disabling insecure remote administration features. Organizations use remote administration tools to manage multiple sy...
This category is dedicated to improving network security. It aims to minimize vulnerabilities by offering various settings that improve the integrity and...
This category encompasses a range of scripts designed to improve the security of your system by enforcing security best practices. These scripts help pro...
Same Goal
Other guides in Disable insecure remote administration access See settings that are in the same category as this guide.Using other actions in the same category may help you achieve your goal better.
See all 7 guides
About the Creators
These people have authored this documentation and written its scripts:
Reviewed By
This guide has undergone comprehensive auditing and peer review:Expert review by undergroundwires
- Verified technical accuracy and editorial standards
- Assessed system impact and user privacy risks
- Audited and verified using automated security tests
Public review by large community
- Privacy enthusiasts and professionals peer-reviewed
- Millions of end-users tested across different environments
- Audited and verified using third-party security software
History
We continually monitor our guides, their impact and other potential privacy options. We update our guides when new information becomes available. On every update, we publicly store who made the change, what has been changed, why the change was made and when the change was made.