How to prevent users from killing my process???

closed account (3hMz8vqX)
Hi All,

I am making a small program that will monitor a user . . .
something like a parental controls security software . . .


Now I like to prevent users from killing my process . . .

So I decided to set the process's security descriptor using SetKernelObjectSecurity() and it worked prevented regular users from
killing my process, so, how to prevent administrators from killing my process!

Just imagine if an administrator is using the computer and suddenly a program
shows up saying that it wants to run as admin . . .

And if he accidentaly give 'Yes' then the first thing its going to do is to kill
my process . . .

So how will I prevent administrators from killing my process . . .

Programs like Avast and Kaspersky have a self defence mechanism
in which trying to kill the process will cause "Access Is Denied" even by administrator

So, how will I integrate this into C++ using WINAPI
Im using Dev C++
windows 7 ultimate 32 bit

And I also knew that certain antivirus programs hook NtTerminateProcess() etc .
You see, I dont want to hook any of those functions, okay ?


So, guys please please help me . . .
I will be very happy if you help me !

Thankyou everyone in advance!!!








And I also knew that certain antivirus programs hook NtTerminateProcess() etc .
You see, I dont want to hook any of those functions, okay ?

Why not? It's how you are to do it.
closed account (Dy7SLyTq)
i dont think there is a windows function that keeps it from getting killed. of course there are quick hacks you could do, but nothing i dont think av would pick up
You don't need to hook kernel function calls, this isn't 2001. What you're looking for is called a Critical System Service: http://msdn.microsoft.com/en-us/library/windows/desktop/aa373646(v=vs.85).aspx
Last edited on
Topic archived. No new replies allowed.