Disabling the Hidden Administrative Shares

By Paul McFedries  Add a new comment

I mentioned in my previous post that you can add $ to a share name to hide the share, and that it was a good idea to also modify the share name to something not easily guessable by some snoop. Note, however, that Windows Vista sets up certain hidden shares for administrative purposes, including one for drive C: (C$) and any other hard disk partitions you have on your system. Windows Vista also sets up the following hidden shares:

Share Shared Path Purpose
ADMIN$ %SystemRoot% Remote administration
IPC$ N/A Remote interprocess communication
print$ %SystemRoot%\System32\spool\drivers Access to printer drivers

To see these shares, select Start, All Programs, Accessories, Command Prompt to open a command prompt session, type net share, and press Enter. You see a listing similar to this:

Share name   Resource                        Remark
-----------------------------------------------------------
C$           C:\                             Default share
D$           D:\                             Default share
ADMIN$       C:\WINDOWS                      Remote Admin
IPC$                                         Remote IPC
print$       C:\System32\spool\drivers       Printer Drivers
Public       C:\Users\Public                 

So although the C$, D$, and ADMIN$ shares are otherwise hidden, they're well known, and they represent a small security risk should an intruder get access to your network.

To close this hole, you can force Windows Vista to disable these shares. Here are the steps to follow:

  1. Click Start, type regedit in the Search box, and then click regedit.exe in the search results. The User Account Control dialog box appears.
  2. Enter your UAC credentials to continue. Windows Vista opens the Registry Editor.
  3. CAUTION
    Remember that the Registry contains many important settings that are crucial for the proper functioning of Vista and your programs. Therefore, when you are working with the Registry Editor, don't make changes to any settings other than the ones I describe in this post.

  4. Open the HKEY_LOCAL_MACHINE branch.
  5. Open the SYSTEM branch.
  6. Open the CurrentControlSet branch.
  7. Open the Services branch.
  8. Open the LanmanServer branch.
  9. Select the Parameters branch.
  10. Select Edit, New, DWORD (32-bit) Value. Vista adds a new value to the Parameters key.
  11. Type AutoShareWks and press Enter. (You can leave this setting with its default value of 0.)
  12. Restart Windows Vista to put the new setting into effect.

Once again, select Start, All Programs, Accessories, Command Prompt to open a command prompt session, type net share, and press Enter. The output now looks like this:

Share name   Resource                        Remark
-----------------------------------------------------------
IPC$                                         Remote IPC
print$       C:\System32\spool\drivers       Printer Drivers
Public       C:\Users\Public                 

Bear in mind that some programs expect the administrative shares to be present, so disabling those shares may cause those programs to fail or generate error messages. If that happens, enable the shares by opening the Registry Editor and either deleting the AutoShareWks setting or changing its value to 1.

ITworld LIVE

NetworkingWhite Papers & Webcasts

White Paper

Building Cloud-Optimized Data Center Networks white paper

Enterprises are turning to the Cloud to improve business agility, reduce expenses and accelerate business innovation. Cloud computing redefines the way IT assets are deployed and consumed and dramatically affects the way data center networks are architected and managed. Conventional hierarchical data center networks built to support traditional IT architectures can't meet the security, agility and price/performance requirements of virtualized cloud computing environments. This white paper reviews the impact of cloud computing on data center networks and describes HP's approach to building simpler, more secure and automated networks that fully meet the stringent performance, security, reliability and agility demands of the new data center in the Cloud.Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.

White Paper

Seven Priorities for Integrated Network Management - How HP Intelligent Management Center Delivers an Enterprise-class Solution

This white paper describes the major requirements for network management solutions to help the organizations become more profitable, efficient and reliable.Intel and the Intel logo are trademarks of Intel Corporation in the U.S. and/or other countries.

White Paper

Top 10 Best Practices of Backup, Replication & Recovery for VMware & Hyper-V

Whether you are new to virtualization or if you have been administering a virtual infrastructure for a while, it's now time to review your virtual infrastructure backup design and backup product features. Determine if you are both optimally protecting your virtual infrastructure as well as taking advantage of the latest virtualization backup features. Read this white paper to learn the 10 best practices for virtual infrastructure backup.

White Paper

Expert Guide on Backing up Windows Server in Hyper-V

Virtualization improves your infrastructure in many ways - it also introduces unfamiliar considerations. Take backup, replication and disaster recovery for example. The right backup and replication solution for Hyper-V can ensure that you'll be able to scale your infrastructure and protect yourself from data and application loss. But there are wrong choices to be made. Download this white paper from Microsoft MVP John Savill, avoid bad choices, and learn how to effectively protect your virtualized data and systems successfully.

White Paper

7 Expert Tips on VMware Backup

Want to create a bulletproof VMware backup infrastructure? Download this guide and learn 7 time-tested VMware infrastructure backup tips from virtualization backup pros:* Understand backup tool limitations* Save time, prevent data-loss* Find the solution that's right for youDownload the guide and save time planning your VMware backup.

See more White Papers | Webcasts

Ask a question

Ask a Question