createprocessasuser

starting a UAC elevated process from a non-interactive service (win32/.net/powershell)

两盒软妹~` 提交于 2019-11-28 16:33:33
问题 I'm using a thrid party Windows service that handles some automation tasks by running scripts and executables using CreateProcessAsUser(). I'm running into problems on Windows Server 2008 due to UAC and way the LUA elevation is handled through the APIs. The service runs as LocalSystem and does not have "Interact With Desktop" enabled. The processes are being run as users in the Administrators group, but not the Administrator account (which is exempted from many UAC restrictions). All the UAC

Calling CreateProcessAsUser from C#

梦想的初衷 提交于 2019-11-28 06:05:36
I've been attempting to create a new process under the context of a specific user using the CreateProcessAsUser function of the Windows API, but seem to be running into a rather nasty security issue... Before I explain any further, here's the code I'm currently using to start the new process (a console process - PowerShell to be specific, though it shouldn't matter). private void StartProcess() { bool retValue; // Create startup info for new console process. var startupInfo = new STARTUPINFO(); startupInfo.cb = Marshal.SizeOf(startupInfo); startupInfo.dwFlags = StartFlags.STARTF_USESHOWWINDOW;

Creating a process in a non-zero session from a service in windows-2008-server?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 02:01:45
问题 I was wondering if there is a simple way for a service to create a process in user session? My service is running as a user(administrator) account and not as a LocalSystem acount, therefore i can't use the WTSQueryUserToken function. i have tried calling OpenProcessToken(GetCurrentProcess,TOKEN_ALL_ACCESS,TokenHandle); but when i use this token to run CreateProcessAsUser(TokenHandle,.....) my process is still running in session 0. how can i resolve this issue? I'm using an Ole automation so i

Windows 2008 RenderFarm Service: CreateProcessAsUser “Session 0 Isolation” and OpenGL

拜拜、爱过 提交于 2019-11-27 20:17:49
I have a legacy Windows server service and (spawned) application that works fine in XP-64 and W2K3, but fails on W2K8. I believe it is because of the new " Session 0 isolation " feature. Consequently, I'm looking for code samples/security settings mojo that let you create a new process from a windows service for Windows 2008 Server such that I can restore (and possibly surpass) the previous behavior. I need a solution that: Creates the new process in a non-zero session to get around session-0 isolation restrictions (no access to graphics hardware from session 0) - the official MS line on this

Launching an administrative interactive process when a standard user is logged on

蓝咒 提交于 2019-11-27 09:23:36
I have a system service which creates a helper interactive process as administrator so that it can access some desktop-related resources, including the BlockInput() function and NVIDIA's NVAPI functions, which cannot be run from a service. When the logged on user was a member of Administrators, the following worked: Set privilege levels, including SE_TCB_NAME Get active session ID with WTSGetActiveConsoleSessionId() Get logged on user from session ID with WTSQueryUserToken() GetTokenInformation() with TokenLinkedToken DuplicateTokenEx() with SecurityImpersonation Launch process with

Windows 2008 RenderFarm Service: CreateProcessAsUser “Session 0 Isolation” and OpenGL

落花浮王杯 提交于 2019-11-27 04:26:03
问题 I have a legacy Windows server service and (spawned) application that works fine in XP-64 and W2K3, but fails on W2K8. I believe it is because of the new "Session 0 isolation" feature. Consequently, I'm looking for code samples/security settings mojo that let you create a new process from a windows service for Windows 2008 Server such that I can restore (and possibly surpass) the previous behavior. I need a solution that: Creates the new process in a non-zero session to get around session-0

Calling CreateProcessAsUser from C#

一个人想着一个人 提交于 2019-11-27 01:11:20
问题 I've been attempting to create a new process under the context of a specific user using the CreateProcessAsUser function of the Windows API, but seem to be running into a rather nasty security issue... Before I explain any further, here's the code I'm currently using to start the new process (a console process - PowerShell to be specific, though it shouldn't matter). private void StartProcess() { bool retValue; // Create startup info for new console process. var startupInfo = new STARTUPINFO(

Launching an administrative interactive process when a standard user is logged on

北城以北 提交于 2019-11-26 17:49:43
问题 I have a system service which creates a helper interactive process as administrator so that it can access some desktop-related resources, including the BlockInput() function and NVIDIA's NVAPI functions, which cannot be run from a service. When the logged on user was a member of Administrators, the following worked: Set privilege levels, including SE_TCB_NAME Get active session ID with WTSGetActiveConsoleSessionId() Get logged on user from session ID with WTSQueryUserToken()