Creating Null Session Shares

When network installing Microsoft RIS OSs (Windows 2000, Windows XP, Windows Server 2003) it is necessary the creation of a "Null Session Share". This kind of share got some bad reputation in the past from a security point of view, therefore setting them up on modern OSs it's not just a straight forward single-step action; it involves a bit of effort. This article tries to help Serva users creating their NSSs on different platforms.


Windows XP


  1. If you are using Windows XP Professional and simple file sharing is disabled:

    1. Open the Control Panel and then select "Folder Options"

    2. Select the "View" tab.

    3. Under "Advanced settings" select the "Use simple file sharing (Recommended)" check box.

    4. Click OK to close the "Folder Options" dialog box.

  2. From File Explorer right click the TFTP root directory and select "Sharing and Security..."

  3. If remote access is disabled:

    1. Click "If you understand the security risks but want to share files without running the wizard, click here."

    2. In the next "Enable File Sharing" dialog box, select the "Just enable file sharing" radio button, and then click "OK".

  4. Select the "Share this folder on the network" with share name WIA_RIS_SHARE.

  5. Click OK to close the Properties dialog box.

  6. From the Start menu, run the program "Regedit"

    1. Navigate to:
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\

      Edit the multi-string (REG_MULTI_SZ) value "NullSessionShares" and add the share name WIA_RIS_SHARE on a new line.

    2. Navigate to:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA\
      Edit the 32-bit value (REG_DWORD) value "restrictanonymous" and set it to 0.

    Now close Regedit.

  7. Open the Control Panel and then select "Administrative Tools" and then "Services". Next Right-click the "Server" service and select Restart to restart the service.

Windows Server 2003


  1. Run lusrmgr.msc, drill down to the following location:
    Local Users and Groups (Local)\Users        
    1. Double click on user:
      "Guest"

      Uncheck "Account is disabled" and press OK.

    Close lusrmgr.msc

  2. From File Explorer share the TFTP root directory as WIA_RIS_SHARE. Make sure the "Guest" account has read only permissions on both "Sharing" and "Security" tabs of the Properties dialog of the shared directory.

  3. From the Start menu, run the program "Regedit"

    1. Navigate to:
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\

      Edit the multi-string (REG_MULTI_SZ) value "NullSessionShares" and add the share name WIA_RIS_SHARE on a new line.

    2. Navigate to:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA\

      Edit the 32-bit value (REG_DWORD) value "restrictanonymous" and set it to 0.

    Now close Regedit.

  4. Under Administrative Tools, select and run Services. Then Right-click the "Server" service and select Restart to restart the service.

  5. Run gpedit.msc, drill down to the following location:
    Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options        
    1. Double click on:
      "Network access: Let Everyone permissions apply to anonymous users"

      Select "Enable" and press OK.

    2. Double click on:
      "Network access: Shares that can be accessed anonymously"

      If not present add WIA_RIS_SHARE and press OK.

    Close gpedit.msc

 

Windows Vista


  1. From File Explorer share the TFTP root directory as WIA_RIS_SHARE. Make sure "Everyone" group  has read permission on the just created share.

  2. From the Start menu, run the program "Regedit"

    1. Navigate to:
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\

      Edit/create the multi-string (REG_MULTI_SZ) value "NullSessionShares" and add the share name WIA_RIS_SHARE on a new line.

    2. Navigate to:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA\
      Edit the 32-bit value (REG_DWORD) value "restrictanonymous" and set it to 0.

    Now close Regedit.

  3. Under Administrative Tools, select and run Services. Then Right-click the "Server" service and select Restart to restart the service.

  4. Run gpedit.msc drill down to the following location
    Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options        
    1. Double click on:
      "Network access: Let Everyone permissions apply to anonymous users"

      Select "Enable" and press OK.

    2. Double click on:
      "Network access: Shares that can be accessed anonymously"

      If not present add WIA_RIS_SHARE and press OK.

    3. Double click on:
      "Network security: LAN Manager authentication level"

      Select "Send LM & NTLM -use NTLMv2 session security if negotiated"
      and press OK

    Close gpedit.msc

  5. Open the Control Panel and navigate to:
    Network and Internet\Network and Sharing Center\Sharing and Discovery\

    Turn off:

    password protected sharing

    Save changes and close the Control Panel.

 

Windows Server 2008


  1. Run lusrmgr.msc, drill down to the following location:
    Local Users and Groups (Local)\Users        
    1. Double click on user:
      "Guest"

      Uncheck "Account is disabled" and press OK.

    Close lusrmgr.msc

  2. From File Explorer share the TFTP root directory as WIA_RIS_SHARE. Make sure the "Guest" account has read only permissions on both "Sharing" and "Security" tabs of the Properties dialog of the shared directory.

  3. From the Start menu, run the program "Regedit"

    1. Navigate to:
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\

      Edit/create the multi-string (REG_MULTI_SZ) value "NullSessionShares" and add the share name WIA_RIS_SHARE on a new line.

    2. Navigate to:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA\
      Edit the 32-bit value (REG_DWORD) value "restrictanonymous" and set it to 0.

    Now close Regedit.

  4. Under Administrative Tools, select and run Services. Then Right-click the "Server" service and select Restart to restart the service.

  5. Run gpedit.msc, drill down to the following location:
    Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options        
    1. Double click on:
      "Network access: Let Everyone permissions apply to anonymous users"

      Select "Enable" and press OK.

    2. Double click on:
      "Network access: Shares that can be accessed anonymously"

      If not present add WIA_RIS_SHARE and press OK.

    3. Double click on:
      "Network security: LAN Manager authentication level"

      Select "Send LM & NTLM -use NTLMv2 session security if negotiated"
      and press OK.

    Close gpedit.msc

  6. Open the Control Panel and navigate to:
    Network and Internet\Network and Sharing Center\Change advanced sharing settings\
    Select:
    Turn off password protected sharing
    Save changes and close the Control Panel.

 

Windows 7


  1. From File Explorer share the TFTP root directory as WIA_RIS_SHARE. Make sure:
    1. "Everyone" group  has read permission on the just created share.
    2. "Guest" account has read permission on the just created share

  2. From the Start menu, run the program "Regedit"

    1. Navigate to:
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\

      Edit/create the multi-string (REG_MULTI_SZ) value "NullSessionShares" and add the share name WIA_RIS_SHARE on a new line.

    2. Navigate to:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA\
      Edit the 32-bit value (REG_DWORD) value "restrictanonymous" and set it to 0.

    Now close Regedit.

  3. Under Administrative Tools, select Services. Then Right-click the "Server" service and select Restart to restart the service.

  4. Run gpedit.msc, drill down to the following location:
    Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options        
    1. Double click on:
      "Network access: Let Everyone permissions apply to anonymous users"

      Select "Enable" and press OK.

    2. Double click on:
      "Network access: Shares that can be accessed anonymously"

      If not present add WIA_RIS_SHARE and press OK.

    3. Double click on:
      "Network security: LAN Manager authentication level"

      Select "Send LM & NTLM -use NTLMv2 session security if negotiated"
      and press OK..

    Close gpedit.msc

  5. Open the Control Panel and

    1. Navigate to:
    Network and Internet\Network and Sharing Center\Change advanced sharing settings\
    Select:
    Turn off password protected sharing

    2. Navigate to:
    User Accounts\Manage another account\Guest
    2. Select:
    Turn-On

    Save changes and close the Control Panel.

 

Windows 8


  1. From the new Metro UI click on Desktop and with File Explorer share the TFTP root directory as WIA_RIS_SHARE. Make sure:
    1. "Everyone" group  has read permission on the just created share.
    2. "Guest" account has read permission on the just created share.

  2. Cick [Win-Logo]+[R] and run the program "Regedit"

    1. Navigate to:
      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\

      Edit/create the multi-string (REG_MULTI_SZ) value "NullSessionShares" and add the share name WIA_RIS_SHARE on a new line.

    2. Navigate to:

      HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA\
      Edit the 32-bit value (REG_DWORD) value "restrictanonymous" and set it to 0.

    Now close Regedit.

  3. Cick [Win-Logo]+[F] and search for Administrative Tools then select and run Services. Next Right-click the "Server" service and select Restart to restart the service.

  4. Cick [Win-Logo]+[R] and run the program gpedit.msc, drill down to the following location:
    Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options        
    1. Double click on:
      "Network access: Let Everyone permissions apply to anonymous users"

      Select "Enable" and press OK.

    2. Double click on:
      "Network access: Shares that can be accessed anonymously"

      If not present add WIA_RIS_SHARE and press OK.

    3. Double click on:
      "Network security: LAN Manager authentication level"

      Select "Send LM & NTLM -use NTLMv2 session security if negotiated"
      and press OK..

    Close gpedit.msc

  5. Cick [Win-Logo]+[X] run the Control Panel

    1. Navigate to:
    Network and Internet\Network and Sharing Center\Change advanced sharing settings\
    Select:
    Turn off password protected sharing

    2. Navigate to:
    User Accounts\Manage another account\Guest
    Select:
    Turn-On

    Save changes and close the Control Panel.


NOTE: The described procedures involve registry editing and other administrative tasks. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs.


Confirmed errors or comments on how to improve the information contained in this document please contact me here.

 

 

 

Originally published 05/08/2012
2nd Edition 03/16/2013
3rd Edition 07/15/2013