Re: Cant create a explorer process with NT-AUTHORITY\SYSTEM Account,...
- From: "Kerem Gümrükcü" <kareem114@xxxxxxxxxxx>
- Date: Wed, 7 Mar 2007 23:09:04 +0100
Hi Johannes,
yes, this was exactly what i was looking for...
Thank you very much...
Best regards
Kerem Gümrükcü
"Johannes Passing" <jpassing_at_hotmail_com@xxxxxxxxxx> schrieb im
Newsbeitrag news:OxXJlwPYHHA.4520@xxxxxxxxxxxxxxxxxxxxxxx
Try using "explorer.exe /separate".
/Johannes
Kerem Gümrükcü wrote:
Hi,
well this first sounds a bit stupid (and risky), but for some special
reason i
have to create a explorer.exe process with local system account
Indentity. The same task does work for a comand console but
whenever i try to execute a explorer.exe it runs in my LoggenOn
User Account (valid Pluto\Kerem Gümrükcü for me). Why cant i
start a explorer.exe with the Local System Acount Token? The right
question would be: Why does it even impersonate to my logged on user
even when i start it with the Token from the Local System Account inside
a (own, not shared) windows service process.
Scenario:
I wrote a C# User Interface that communicates with sockets and Custom
Control Codes with the service. This works fine. I wrote two apps, a
single one, pure C Windows API implementation and a pure C#.NET
one. Both work with sockets and Service Control Codes and interact
with the pure C native windows service. The bi-directional communiction
works fine. But the thing i dont understand is, why the console can be
started with the NT-AUTHORITY\SYSTEM Account and the explorer.exe
not? The explorer starts in the context of the service (service is
flagged to
be able to interact with the Desktop). Both Application start from the
(own) Service Process. The Console runs with NT-AUTHORITY\SYSTEM
but the explorer.exe with my logged on user token. Why?
Here is some (highly simplified) code:
/***********************************************/
if(OpenProcessToken(GetCurrentProcess(),TOKEN_ALL_ACCESS,&hToken) ==
FALSE){
char lpszErr[MAX_PATH];
_ltoa((int)GetLastError(),lpszErr,10);
OutputDebugString(lpszErr);
return FALSE;
};
.......
if(CreateProcessAsUser(
hToken,
NULL,
"explorer.exe",
NULL,
NULL,
FALSE,
CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_PROCESS_GROUP,
NULL,
NULL,
&si,
&pi) == 0){
char lpszErr[MAX_PATH];
_ltoa((int)GetLastError(),lpszErr,10);
OutputDebugString(lpszErr);
return FALSE;
};
/***********************************************/
I know that it is a big risk to run GUI Code with that power
but for some reasons and special tools i wrote i need to do
this. There is no other chance to create a new poweruser on
the systems where it will run.
Any ideas....?
Thanks in advance...
Best regards
Kerem Gümrükcü
.
- References:
- Cant create a explorer process with NT-AUTHORITY\SYSTEM Account,...
- From: Kerem Gümrükcü
- Re: Cant create a explorer process with NT-AUTHORITY\SYSTEM Account,...
- From: Johannes Passing
- Cant create a explorer process with NT-AUTHORITY\SYSTEM Account,...
- Prev by Date: Re: Cant create a explorer process with NT-AUTHORITY\SYSTEM Account,...
- Next by Date: Re: Locking Mouse & Keyboard
- Previous by thread: Re: Cant create a explorer process with NT-AUTHORITY\SYSTEM Account,...
- Next by thread: recieve Mouse msgs when hot spot is not inside window region More options
- Index(es):
Relevant Pages
|