Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I 'run as' 'Network Service'?

I am trying to run a process as another account. I have the command:

runas "/user:WIN-CLR8YU96CL5\network service" "abwsx1.exe" 

but then this asks for the password. However there is no password set for the network service.

Is what I am trying to do possible?

like image 757
Exitos Avatar asked Aug 02 '11 11:08

Exitos


People also ask

How do I run a Windows service as a network service?

In Windows explorer go to the folder containing the binaries of the service. Right-click on the folder > Properties > Security tab > Edit button. Add > "NETWORK SERVICE" > OK.

Where is the Network Service account?

The network service account is the built-in account NT AUTHORITY\NetworkService in the operating system. Administrators do not need to manage a password or maintain the account. Use an account with administrator privileges if you are installing on Windows Server 2008.

What is log on as network service?

Log on as a service (Windows 10) - Windows securityDescribes the best practices, location, values, policy management, and security considerations for the Log on as a service security policy setting.


1 Answers

Use PsExec.exe from SysInternals, running from an elevated command prompt.

e.g. this will open a new command prompt running as NETWORK SERVICE:

psexec -i -u "nt authority\network service" cmd.exe  

this will run it as LOCAL SYSTEM:

psexec -i -s cmd.exe  

You can verify these by running whoami from the cmd prompt.

See also:

  • http://forum.sysinternals.com/how-to-start-cmdexe-as-network-service_topic15797.html

  • Interactive command prompt as NETWORK SERVICE

like image 55
Rory Avatar answered Oct 22 '22 01:10

Rory