-
June 14th, 2001, 05:45 PM
#1
How to prevent application to be killed from task manager
My first question is how to hide a process from Task Manager? This might be impossible because of security reason.
My second question is then how to prevent a user to kill an application (process) from task manager? I know you can do this in VB, that is, to check UnloadMode in Form_QueryUnload. What is the corespondent procedure in C/C++?
-
June 15th, 2001, 02:58 AM
#2
Re: How to prevent application to be killed from task manager
You can't hide a process under > NT.
The solution for kill-protection that you suggested doesn't work. If someone was to call TerminateProcess on your process it would die. All your code did was ignore that attempt to push the 'x' button on the caption.
AFAIK the only way to protect a process is to make sure you create it with a security descriptor that doesn't allow users to kill it (except for system account probably).
_________________________________
Assaf Lavie
ICQ: 14672644
-
June 15th, 2001, 04:02 AM
#3
Re: How to prevent application to be killed from task manager
-
June 15th, 2001, 05:57 AM
#4
Re: How to prevent application to be killed from task manager
There is a platform SDK function RegisterServiceProcess() in Kernel32.dll which can be used to hide your process from process list.
The answer to your second question could be obtained from the above explanation only. Because when you are hiding a process, no one cannot delete your process.
All the best and do respond about your status.
BSR
-
June 18th, 2001, 05:20 PM
#5
Re: How to prevent application to be killed from task manager
Thanks to all who replied.
Here is a brief summary:
1. RegisterServiceProcess works for Win95/Win98 but not on WinNT and Win2000. RegisterServiceProcess doesn't seem to exist on WinNT/Win2000.
2. Making an invisible parent window as suggested in http://www.codeproject.com/docview/notaskbaricon.asp makes icon disappear on task bar, but the process is still listed in task manager.
3. I haven't tried Security descriptor. It looks like this is the way to go if mixed platform is required.
-
July 29th, 2001, 02:14 PM
#6
Re: How to prevent application to be killed from task manager
Don't give up! There is a way to do this. My friend once made an app that could NOT be found in the process list in Windows 2000. He never told me how it was done, and then he disappeared from IRC. I'm currently working on this subject and I hope I'll have it figured out soon
-
July 29th, 2001, 02:26 PM
#7
Re: How to prevent application to be killed from task manager
The process list displays: Processes! By making your application part of someother process, the application can't be terminated on it's own. How can this be done? Using the WriteProcessMemory and ReadProcessMemory functions you can actualy access another process's memory. You can inject a function into the process's memory, and then call CreateRemoteThread to have the function run in a seperate thread.
Another solution way to do this is DLL injection. You create a DLL that containts the required code, and you make the target process load the dll, and maybe even call a function in it. There are quite a few ways to do this, but the easiest would be using a Global Windows Hook. Look up SetWindowsHookEx() for more info about this function.
Got a question? try looking it up in MSDN first. Msdn comes with the Visual Studio, and can be found at http://msdn.microsoft.com
---===---
I'm not here for the rates, but rating a post is a good way for me to know how much i helped.
---===---
Daniel
-
July 30th, 2001, 09:23 AM
#8
Re: How to prevent application to be killed from task manager
I KNOW that it is possible to hide an app from the processes in Windows NT/2000. I've tested an application that "disappeared". And I even knew the guy who made it. DLL injection was the method he used, but I'm not sure how he did the other things...
But, it does work - that is for sure!
-
July 15th, 2004, 05:23 AM
#9
Hi Snakeye.
Can you explain how you have achieve hiding an app from the task manager?
-
July 15th, 2004, 06:55 AM
#10
Originally Posted by cassan
Hi Snakeye.
Can you explain how you have achieve hiding an app from the task manager?
You do realize I hope that you are replying to a message that is three years old...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|