skip to content

In SMB on Windows, what are the default administrative shares C$, ADMIN$ and IPC$, and how do you turn the automatic ones off?

level: juniorimportance: must knowfreq 62%

answer

  1. hidden-looking names on every host
  2. one of the three carries pipes, not files
  3. a drive letter plus a dollar sign
  4. two switches, one per machine role
  5. the cmdlet page does not list which shares

basics

~20 s

C$ and its siblings expose local disks, ADMIN$ is reserved for remote administration, and IPC$ is the pipe share that carries named-pipe RPC. Set-SmbServerConfiguration -AutoShareServer $false -AutoShareWorkstation $false turns off the default server and workstation shares.

solid answer

~30 s

Windows creates three special shares by default: `C$` (and `D$`, `E$`, one per local disk) shares a disk root, `ADMIN$` is reserved for remote administration, and `IPC$` is the pipe share that named-pipe RPC travels through. `Set-SmbServerConfiguration -AutoShareServer $false -AutoShareWorkstation $false` turns off the default server and workstation shares. Microsoft's cmdlet page does not list which shares those switches cover, so I would test on one host, re-list the shares and check what still works before rolling it out. I would also turn on share-access auditing first so I can see who actually uses them.

code

powershell · 5 lines
powershell
# Read the current setting on files01.example.internal first
Get-SmbServerConfiguration | Format-List

# Change ticket: turn off the default server and workstation shares
Set-SmbServerConfiguration -AutoShareServer $false -AutoShareWorkstation $false -Confirm:$false

go deeper

for a junior

Name the three default shares and what each is for, and know that IPC$ carries named pipes rather than files.

for a middle

Know both share-type numberings, the two AutoShare parameters and that the cmdlet page does not list which shares they cover.

for a senior

Stage the change: audit share access first, pilot on one host, verify with a re-listing, and record exceptions with an owner.

for a principal

Weigh the exposure removed by dropping the defaults against the management tooling that addresses them by name.

## What a share is, and which three are special In SMB a **share** is a local resource a server offers to clients. MS-SMB2 defines three kinds: a file (disk) share for a directory tree, a pipe share for named pipes, and a print share. A client reaches one with a `TREE_CONNECT` request naming a path such as `\\files01.example.internal\Finance`, and the response carries a `ShareType` that says which kind it is. On Windows, the Server Service specification (MS-SRVS) calls a few names **special shares**: - **`C$`**, `D$`, `E$` and so on: the root of a local disk, shared under the drive letter followed by a dollar sign. - **`ADMIN$`**: reserved for remote administration of the server. - **`IPC$`**: reserved for inter-process communication. It is the pipe share. MS-SMB2 says a pipe share always has the name `IPC$`, and that it allows only named-pipe operations and referral requests to itself. So two of the three expose file-system content and one exposes no files at all: `IPC$` is the door that RPC calls use, which the leaf's pipe question covers. ## Two numbering systems for the same idea Capture readers and script writers trip on this: the SMB 2 protocol and the Server Service protocol number share types differently. | Specification | Disk share | Pipe share | Print share | Special marker | |---|---|---|---|---| | MS-SMB2 `ShareType` in the TREE_CONNECT response | `0x01` | `0x02` | `0x03` | none | | MS-SRVS share type constants | `STYPE_DISKTREE` (0) | `STYPE_IPC` (3) | `STYPE_PRINTQ` (1) | `STYPE_SPECIAL` `0x80000000`, OR'd in | `STYPE_SPECIAL` is the flag MS-SRVS describes for `IPC$`, `ADMIN$` and the drive shares. A `3` in one table is a pipe share and in the other is a print share, so always say which specification a number comes from. ## Turning the automatic shares off The cmdlet page for `Set-SmbServerConfiguration` shows this example, described as turning off the default server and workstation shares: ```powershell Set-SmbServerConfiguration -AutoShareServer $false -AutoShareWorkstation $false -Confirm:$false ``` There are two parameters because there are two machine roles: `-AutoShareServer` for the default server shares and `-AutoShareWorkstation` for the default workstation shares. The page does not enumerate which shares each one covers, and it does not say whether `IPC$` is affected, so do not promise either in a change ticket. Verify the result on a test host. A sensible change sequence: 1. **Find who uses them.** Turn on the `Audit File Share` subcategory so event 5140 records each session that touches `C$` or `ADMIN$`. Microsoft's event 5140 page suggests monitoring `C$` on high-value machines. 2. **Pilot on one host.** Apply the switches, re-list the shares and exercise the management and backup tooling that connects to them by name. 3. **Record exceptions.** Anything that still needs an administrative share gets an owner and a reason. 4. **Roll out with Group Policy or your configuration tool** once the pilot is clean. ## Checking the result After the change, confirm three things rather than trusting the cmdlet's silence: read the configuration back with `Get-SmbServerConfiguration`, list the shares the server now offers with `Get-SmbShare`, and ask the owners of management and backup tooling to confirm nothing broke. If something did, the fix is to correct the caller or record a reasoned exception, not to re-enable the share by habit. This is a hardening step, not a fix for anything: it narrows what the server offers by default, and it only holds as long as nobody sets the parameters back. ## Who may use them The specification and the Microsoft pages used here do not state a default access list for these shares, so do not assert one from memory. Access to any share is decided by the share's own access list and the file-system ACL, checked separately, so read the actual share permissions on your hosts. ## Samba, for the non-Windows server Samba's manual documents an `administrative share` parameter whose default is `no`; it describes administrative shares as the default shares Windows creates, such as `C$`, `D$` or `ADMIN$`. Samba does not create them unless an administrator opts in per share. ## What an interviewer is listening for - You can say what each of the three is for, and that `IPC$` is the pipe share rather than a folder. - You know the switches are `-AutoShareServer` and `-AutoShareWorkstation` on `Set-SmbServerConfiguration`. - You audit first, change on a pilot and verify, rather than disabling blind. - You do not claim a default permission list that you have not read on the machine in front of you.

  • A capture shows a TREE_CONNECT response with ShareType 0x02. What kind of share was it, and which name does MS-SMB2 reserve for it?
    `0x02` is `SMB2_SHARE_TYPE_PIPE`, a named-pipe share, and MS-SMB2 says a pipe share always has the name `IPC$`. Do not read `0x03` as the pipe share: in MS-SMB2 it is the print share, and the `3` that means a pipe share (`STYPE_IPC`) belongs to MS-SRVS's separate numbering.
  • Where would an auditor look to see which client sessions touched C$ on files01.example.internal last week?
    In the Security log: with the `Audit File Share` subcategory enabled, event 5140 records a share access once per session at the first access, with the account, the source address and port, and the share name. If the setting was off last week there is nothing to read back, which is why you turn it on before you need it.
  • On a Samba server, do C$ and ADMIN$ exist by default, and where does the manual put the choice?
    No. Samba's smb.conf(5) has an `administrative share` parameter, per share, with the default `no`; the manual describes C$, D$ and ADMIN$ as the default shares Windows NT-based systems create. An administrator has to opt in on a share, so Samba never creates them silently.

An administrative share is like a service door that every new building comes with: it is not a bug that it exists, but you still decide whether it stays unlocked, who holds a key and who gets told when it is opened.

  • C$ and ADMIN$ are the same share under two names
  • IPC$ is a shared folder for temporary files
  • A trailing dollar sign makes a share unreachable from the network
  • ShareType 0x03 is the pipe share because STYPE_IPC is 3
  • Turning off automatic shares removes the need to audit the remaining shares