Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Monitor Another program

Name: Anonymous 2011-11-12 9:07

I want to write an app that monitors another program (my main app) and restarts it if the user tries to kill it in the task monitor.  This is for windows 7 systems.  I can use any language, but I am assuming .net language would be the easiest.  Can anyone provide me with any tips or links or books that would help me out. 

I would prefer not to do something like a loop that just reads the task monitor every 5 seconds or something like that.  I am more interested in a solution that uses hooks.

Name: Anonymous 2011-11-12 9:08

Read the source of 90% of the viruses ever made.

Name: Anonymous 2011-11-12 10:33

Implement part of it as a kernel service that polls the userland process list for your specific executable name, make a hash of the userland process and compare (so some faggot doesn't take advantage of your system by creating a program with the exact same name, then able to kill your application) and load the program if it isn't found.

Name: Anonymous 2011-11-12 10:52

>>3
Implying .NET kernel service

Name: Anonymous 2011-11-12 10:54

>>4
Implying .NET

Name: Anonymous 2011-11-12 10:57

>>4,5
Implying
Back to /g/, ``please''!!

Name: Anonymous 2011-11-12 10:59

easiest way is your "virus" program can listen a port and your main program can check if that port is available. if it not restart your virus

Name: Anonymous 2011-11-12 11:18

>>7
Of course with all of that running in userland, there's no guarentee that
a) Another program will already have taken that port
b) the main program will not be found and terminated
If this is for something resembling a kiosk, then the only way to go about this is to implement your main "monitor" program as a kernel driver. I would try the Windows Driver Development Kit and Native API reference for the means to implement your system.

Don't change these.
Name: Email:
Entire Thread Thread List