Create a process from a driver

浪子不回头ぞ 提交于 2019-12-19 08:12:41

问题


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.


回答1:


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.




回答2:


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.




回答3:


This can't be directly done - Creating a win32 process requires some set up by the user mode part of CreateProcess, not just creating the process object in kernel mode.

You need some user mode code here - either a service, a desktop app, or so on, to launch the your user mode application.



来源:https://stackoverflow.com/questions/1135700/create-a-process-from-a-driver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!