6

Considering I have admin access to a machine, can I remotely access the default C$ share in Windows XP and Windows 7?

DaveRandom
  • 87,921
  • 11
  • 154
  • 174
jyz
  • 6,011
  • 3
  • 29
  • 37

2 Answers2

14

In theory yes:

\\servername\C$

...but I have had problems with this, and you shouldn't really modify access permissions for the default administrative share. It is best to create a new share that you can control precisely.

DaveRandom
  • 87,921
  • 11
  • 154
  • 174
  • ok, but I suppose there must be a way to access it, isn't? – jyz Aug 26 '11 at 18:46
  • Why do you need to? Just create a new share (Right-Click on C: in explorer -> sharing & security -> new share) that you can absolutely control. Like I say, you shouldn't really play around with default admistrative share or you can break various services... – DaveRandom Aug 26 '11 at 18:49
  • I'm working on a security tool, written in C#. One of the features that I would like to implement is that, once you have admin rights to the machine, you can access it even if no shares were manually created (as you suggested) – jyz Aug 26 '11 at 18:55
  • I see, fair enough. How are you authenticating against the remote machine? And are you dealing with on a domain/in a workgroup or both? – DaveRandom Aug 26 '11 at 18:57
  • I have re-tagged the question with C# to help you get the right focus – DaveRandom Aug 26 '11 at 18:58
  • Initially it's not over a domain, just a single machine, with a single ou a couple of users, but a singles machine. – jyz Aug 26 '11 at 18:59
  • Keep in mind that you have to be able to authenticate as a member of the local Administrators group. Therefore if your program is not running under a user account that is in this group, you will need to supply credentials... (and possibly even if it is, I have never tried this programmatically) – DaveRandom Aug 26 '11 at 19:01
3

You should be able to access it with:

\\netbiosname\c$

transistor1
  • 2,915
  • 26
  • 42
  • Have you tried this? Over a network it doesn't work... – jyz Aug 26 '11 at 18:44
  • Actually, it does work. I do it all the time. I work in IT. The key is to access it as the correct user account. When you're logged in as a local user account on a PC, and you type it into the address bar in the Explorer, it will try to access it as that account. The other PC can't validate that. Edit: You can map it, and set the credentials as the user account on the other PC. Or, you can use a domain account that is part of the Administrators group on the other PC. – djdanlib Aug 26 '11 at 19:01
  • @djdanlib - I tried that. The scenario I have is: from alice-pc logged in with alice user I try to access \\bob-pc\C$ using Bob's admin account: BOB-PC\Bob, but it says "Access Denied" – jyz Aug 26 '11 at 19:05
  • @jyzuz - can you try running Explorer as Bob (go into Start Menu, type `Explorer`, right-click and click `run as...`, then putting \\bob-pc\c$ into the address bar of that Explorer window? Another thought... are bob-pc and Bob members of a domain, and are you logging in with DOMAIN\Bob in the username field? Is BOB-PC\Bob the admin account as you said, or DOMAIN\Bob? – transistor1 Aug 26 '11 at 19:07
  • I see. You also have to configure the firewall to allow SMB through, and you may need to edit the local security policy as well. – djdanlib Aug 26 '11 at 19:20