Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

[C++] Prevent user from closing program [White hat]

No, there is no easy way of preventing the user from killing your process with task manager. You could set it to a critical process, causing a BSOD upon termination (couple of lines of code).

But you are "white hat" so why even do this? It seems like something that does not need to happen.
Since it is a white hat program instead of re-spawning the process if killed, maybe log the event, time, logged in user, system state, open windows, and email the parent, and perhaps even force a log off or lock a screensaver. Then they can discipline their kids so they will not close the program again.

This would required either a second monitoring process, or an injected dll, or remote thread. The monitoring process is more whitehat and will cause less issues in a production environment for your purpose.

Just my thoughts


Possibly Related Threads...
Thread / Author Replies Views Last Post
by daarioJun 9, 2024 04:14 PM 10 301 Jun 9, 2024 04:14 PM
Last Post: Tyr
[Python] by Bass_ReevesAug 20, 2023 01:44 AM 9 632 Aug 20, 2023 01:44 AM
Last Post: Lucky4L
[Shell] by LuckyOnesSep 5, 2018 03:38 PM 4 221 Sep 5, 2018 03:38 PM
Last Post: LuckyOnes