![]() |
System Processes |
Post Reply
|
Page 123> |
| Author | |||
As-Ts
Newbie
Joined: 02 June 2009 Online Status: Offline Posts: 12 |
Quote Reply
Topic: System ProcessesPosted: 02 June 2009 at 1:52pm |
||
|
Hi
The functions 'OpenProcess()' or 'TerminateProcess()' fails when trying to open or terminate a system process like 'svchost.exe' or 'smss.exe' . How can I terminate a protected system process ? Thanks |
|||
![]() |
|||
molotov
Moderator Group
Joined: 04 October 2006 Online Status: Offline Posts: 17287 |
Quote Reply
Posted: 02 June 2009 at 2:08pm |
||
|
Hi As-Ts,
Are you using Process Explorer for this, and getting messages? ![]() If you're writing your own app, first enable SeDebugPrivilege. |
|||
|
Daily affirmation:
net helpmsg 4006 |
|||
![]() |
|||
As-Ts
Newbie
Joined: 02 June 2009 Online Status: Offline Posts: 12 |
Quote Reply
Posted: 02 June 2009 at 2:17pm |
||
|
Hi molotov
Thanks for replying No. I am using my own app and it can close every processes by the functions i mentioned except system processes. I didn't work with 'SeDebugPrivilege' . Can you explain more or send me the source code (In VB or C++) please? Thank you a lot |
|||
![]() |
|||
molotov
Moderator Group
Joined: 04 October 2006 Online Status: Offline Posts: 17287 |
Quote Reply
Posted: 02 June 2009 at 2:19pm |
||
|
Daily affirmation:
net helpmsg 4006 |
|||
![]() |
|||
As-Ts
Newbie
Joined: 02 June 2009 Online Status: Offline Posts: 12 |
Quote Reply
Posted: 02 June 2009 at 2:27pm |
||
|
Are you sure this is not a wrong example?
![]() can you say what exactly must be done to terminate a Protected System Process? |
|||
![]() |
|||
molotov
Moderator Group
Joined: 04 October 2006 Online Status: Offline Posts: 17287 |
Quote Reply
Posted: 02 June 2009 at 2:33pm |
||
Edited by molotov - 02 June 2009 at 2:35pm |
|||
|
Daily affirmation:
net helpmsg 4006 |
|||
![]() |
|||
As-Ts
Newbie
Joined: 02 June 2009 Online Status: Offline Posts: 12 |
Quote Reply
Posted: 02 June 2009 at 2:43pm |
||
|
Ok. Thanks
I think SeDebugPrivilege is related to access rights. But I haven't any information about enabling SeDebugPrivilege. By 'Protected' I mean the processes which won't be opened or terminated by calling OpenProcess() or TerminateProcess commonly. |
|||
![]() |
|||
As-Ts
Newbie
Joined: 02 June 2009 Online Status: Offline Posts: 12 |
Quote Reply
Posted: 02 June 2009 at 2:52pm |
||
|
Compiler Error :
'CreateRemoteThread' : cannot convert parameter 5 from 'const int' to 'void *' |
|||
![]() |
|||
As-Ts
Newbie
Joined: 02 June 2009 Online Status: Offline Posts: 12 |
Quote Reply
Posted: 02 June 2009 at 3:19pm |
||
|
I think I could enable SeDebugPrivilege but the function OpenProcess() fails.
look at this part in VB : Sub EnableSeDebugPrivilege Dim hProc As Long Dim hToken As Long Dim mLUID As LUID Dim mPriv As TOKEN_PRIVILEGES Dim mNewPriv As TOKEN_PRIVILEGES hProc = GetCurrentProcess() hProc = 2108 OpenProcessToken hProc, TOKEN_ADJUST_PRIVILEGES + TOKEN_QUERY, hToken LookupPrivilegeValue "", "SeDebugPrivilege", mLUID mPriv.PrivilegeCount = 1 mPriv.Privileges(0).Attributes = SE_PRIVILEGE_ENABLED mPriv.Privileges(0).pLuid = mLUID AdjustTokenPrivileges hToken, False, mPriv, 4 + (12 * mPriv.PrivilegeCount), mNewPriv, 4 + (12 * mNewPriv.PrivilegeCount) MsgBox OpenProcess(process_all_access, False, 2108) End Sub ![]() ![]() |
|||
![]() |
|||
molotov
Moderator Group
Joined: 04 October 2006 Online Status: Offline Posts: 17287 |
Quote Reply
Posted: 02 June 2009 at 3:30pm |
||
You're not checking if OpenProcessToken, LookupPrivilegeValue, or AdjustTokenPrivileges fail, before you call OpenProcess. Are you running the code as an administrator, or from an account that has SeDebugPrivilege? Edited by molotov - 02 June 2009 at 3:31pm |
|||
|
Daily affirmation:
net helpmsg 4006 |
|||
![]() |
|||
Post Reply
|
Page 123> |
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |