Network Access As Local System Running Exe From Network Share

1.2k views Asked by At

I am running a Dotnet 3.5 executable in Windows 7 Ent, as a GPO computer startup script in a domain. The script resides on a network share. The exe is run as Local System. The exe runs correctly.

I would like to access a web Service in this exe, but it appears that the Local System does not have access to network resources per documentation. However if the same exe is copied to the C Drive and run from there under the same account and same conditions (i.e. GPO startup script) then the Web Service can be accessed.

How is it that the Local System has access to the web service when running from C: drive, but not from the Network Share? Is there anything that can be done to make it work from the network share, without first being copied to the local drive? is Local System same as SYSTEM and same as NTAuthority\system?

I have tried the following so far to make it work. None of these work:

  1. Impersonate a domain user in code.
  2. Give Full Trust to all zones in .Net Security Configuration
  3. Add the network share to Trusted Sites in IE.
  4. Use the netbios name instead of the fully qualified name of the fileserver, i.e. \server\share, rather than \server.domain.com\share

The following things I cannot do to fix this problem:

  1. Change the logon account of the Group Policy Client service to a domain user
  2. Run the exe as logon script. It has to be startup script.

To reproduce this problem I do the following:

  1. Create an simple exe with some network function, i.e. WebClient.DownloadString("http://www.google.com")
  2. Deploy exe to a network share
  3. Run as normal user to show there is no error
  4. Run whoami to show the current user
  5. run psexec -s -i cmd.exe
  6. Cmd will start as SYSTEM (Local System or NT Authority\System)
  7. Run whoami to show the current user
  8. Run exe from network share to show it will fail to download the page.
  9. Copy the exe to C Drive.
  10. Run exe to show the page is downloaded.
0

There are 0 answers