View all Worklets
Windows

Windows - Security - Restrict Anonymous Access to Named Pipes and Shares

This Worklet follows Microsoft's best practices of restricting null session access to unauthenticated and anonymous users for all server pipes and shared folders.

Worklet Details

Introduction to the PowerShell Based Restrict Anonymous Access to Named Pipes and Shares Worklet

The Windows - Security - Restrict Anonymous Access to Named Pipes and Shares Worklet is a PowerShell-based script that helps enhance the security of your Windows environment. It follows Microsoft's best practices by restricting null session access for unauthenticated and anonymous users on all server pipes and shared folders, except for those listed in the NullSessionPipes and NullSessionShares registry entries.

Why would you use the Windows - Security - Restrict Anonymous Access to Named Pipes and Shares Worklet?

Implementing this Worklet can help mitigate potential security vulnerabilities caused by unauthorized system access through shared folders, including default shared folders present on devices in your network. By using this Worklet, administrators can reduce the risk of unauthorized users exploiting weaknesses in these shared resources, thereby improving overall network security. 

This solution is particularly essential for organizations that prioritize data protection and aim to maintain compliance with industry standards.

Components of the Restrict Anonymous Access to Named Pipes and Shares Worklet

The Worklet comprises two primary components: an evaluation code that checks if current registry configurations align with desired states, and a remediation code that enforces these configurations if necessary. The desired state configuration requires setting specific registry values to restrict anonymous access, such as RestrictNullSessAccess and RestrictAnonymous. 

These values are set within corresponding registry hives like HKEY_LOCAL_MACHINE.

How does the Restrict Anonymous Access to Named Pipes and Shares Worklet work?

By utilizing PowerShell functions like EvaluateRegistry() and RemediateRegistry(), the Worklet first assesses whether current registry configurations meet desired states concerning anonymous access restrictions. 

If any discrepancies exist between current settings and desired states, it flags devices for remediation. Devices already compliant with prescribed configurations will not require further action.

What is the expected outcome when you use the Windows - Security - Restrict Anonymous Access to Named Pipes and Shares Worklet?

Upon running the Worklet, the expected outcome is for devices to either become compliant with desired registry configurations or be identified as already compliant. Remediation measures will only apply if necessary, ensuring that your Windows environment becomes more secure by restricting anonymous access to named pipes and shares. 

This Worklet enables administrators to maintain a proactive approach towards security settings while adhering to established best practices recommended by Microsoft.

View in app

CONFIGURE

What's a Worklet?

Consider Automox Worklets your easy button. Grab ready-to-go PowerShell and BASH code from our catalog to automate any scriptable task on your Windows, macOS, and Linux endpoints.

do more with worklets