Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a process from a driver

Is there a way to create a user-mode process from kernel-mode on Windows NT platform (XP-W7)?

EDIT: I must install only the driver. This is a specific of the project.

like image 647
Sergey Podobry Avatar asked Jul 16 '09 06:07

Sergey Podobry


2 Answers

To create a valid win32 process the driver must communicate with CSRSS (what is completely undocumented). So I ended up by queuing a user-mode APC and allocating virtual memory for the APC code in the context of the existing win32 process (that code will call CreateProcess and do the job).

It is a tricky way but it works.

like image 89
Sergey Podobry Avatar answered Sep 25 '22 14:09

Sergey Podobry


I don't know an easier way to achieve this. But what about having a Windows service running which makes an overlapped DeviceIoControl into your driver? On return the service could examine the data it has received from the driver and start the according application.

like image 34
ur. Avatar answered Sep 23 '22 14:09

ur.