In a Windows environment, null sessions can allow users to have anonymous access to hidden administrative shares on a system.
Once connected to the shares through a null session, attackers can potentially enumerate information about your system and environment, such as users and groups, operating systems, password policies, privileges, etc. With this information, an attacker can learn about any potential vulnerabilities or ways to best attack your systems.
Disabling null sessions is a key way to help you strengthen your organization’s security and reduce your attack surface.
Edit GPO- Go to Computer configuration\Policies\Windows settings\Security Settings\Local Policies\SecurityOptions
If you open regedit and browse to:
Figure 1: Modifying the RestrictAnonymous key in the registry