| Monitoring and Managing Windows Processes |
|
|
|
| Thursday, 27 October 2011 14:17 |
|
This article describes a simple solution that will help you to clear out the principles of how Windows system starts processes and show how you can set some filters for process start, including allowing and forbidding them. Written by: Sergii Bratus, Contents: Introduction IntroductionOur goal is to develop an application that will install the driver to monitor process start. At each new process start, the driver notifies the user-mode application about this action providing it with the process PID and process name, requesting if allow or deny this process start. While this communication, the process is in the waiting state and does not start to work. This solution would be interesting for the junior developers, beginners in process programming, who want to learn in detail driver development and driver – user mode interaction. It will be also useful for the developers of monitoring applications and corporate security systems. Code UsageThe code included to this article is just an illustration of the process blocking technique and is not a commercial solution ready to be used in the real-life projects. Project Structure.\bin - folder with binary files Project supports both x86 and x64 architectures and includes all necessary build configurations. How system loads a processTo create a Windows-process, one of such functions is called: Below, there is a list of basic steps of process creation by means of the
You can learn more details about process start scheme in the Mark Russinovich’s book named “Microsoft Windows Internals”. The interesting feature of the process creation and loading technology is notifications. Driver developers can subscribe to the notifications about process creation and about mapping of the image files to the memory. The first notification is sent each time when the system creates a process, the second one – each time when the system maps an image file. And this file can be both the executive file and the DLL. By means of these notifications, our driver gets to know about the start of the new process and can inform our application about it. The mechanism of the transferring the information to the user mode is described below. The complete article text is available only for the registered users. Please Log In or Register. |






