Out-of-the box, a Windows system automatically shares the root of every hard drive on the machine as <drive>$ (so you get C$, D$, A$, etc).
The shares are ACL’ed so that only members of the local administrative group can access them, and they’re hidden from the normal enumeration UI (they’re included in the enumeration APIs but not in the UI (as are all shares with a trailing $ in their name).
One question that came up yesterday was why Windows does this in the first place.
The answer is steeped in history. It goes way back to the days of Lan Manager 1.0, and is a great example of how using your own dogfood helps create better products.
Lan Manager was Microsoft’s first attempt at competing directly with Novell in networking. Up until that point, Microsoft produced an OEM-only networking product called MS-NET (I have a copy of the OEM adaptation kit for MS-NET 1.1 in my office – it was the first product I ever shipped at Microsoft).
But Lan Manager was intended as a full solution. It had a full complement of APIs to support administration, supported centralized authentication, etc.
One of the key features for Lan Manager was, of course, remote administration. The server admin could sit in their office and perform any administrative tasks they wanted to on the computer.
This worked great – the product was totally living up to our expectations…
Until the day that the development lead for Lan Manager (Russ (Ralph) Ryan) needed to change a config file on the LanMan server that hosted the source code for the Lan Manager product. And he realized that none of the file shares on the machine allowed access to the root directory of the server! He couldn’t add a new share remotely, because the UI for adding file shares required that you navigate through a tree view of the disk – and since the root wasn’t shared, he could only add shares that lived under the directories that were already shared.
So he had to trudge from his office to the lab and make the config change to the server.
And thus a new feature was born – by default, Lan Manager (and all MS networking products to this day) shares the root of the drives automatically to ensure that remote administrators have the ability to access the entire drive. And we’d probably have never noticed it unless we were dogfooding our products.
Nowadays, with RDP and other more enhanced remote administration tools, it’s less critical, but there are a boatload of products that rely on the feature.
Note1: You can disable the automatic creation of these shares by going to this KB article.
Note2: The test lead for the Lan Manager product was a new hire, fresh from working at Intel who went by the name of Henry (Brian) Valentine.