从驱动程序创建进程

发布于 2024-07-26 16:52:12 字数 86 浏览 1 评论 0原文

有没有办法在Windows NT平台(XP-W7)上从内核模式创建用户模式进程?

编辑:我必须只安装驱动程序。 这是该项目的具体情况。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

绅刃 2024-08-02 16:52:12

要创建有效的 win32 进程,驱动程序必须与 CSRSS 通信(完全未记录)。 因此,我最终对用户模式 ​​APC 进行排队,并在现有 win32 进程的上下文中为 APC 代码分配虚拟内存(该代码将调用 CreateProcess 并完成这项工作)。

这是一个棘手的方法,但它有效。

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.

颜漓半夏 2024-08-02 16:52:12

我不知道有更简单的方法来实现这一目标。 但是如果运行一个 Windows 服务来将重叠的 DeviceIoControl 放入您的驱动程序中呢? 返回时,服务可以检查从驱动程序接收到的数据并启动相应的应用程序。

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.

段念尘 2024-08-02 16:52:12

这不能直接完成 - 创建 win32 进程需要由 CreateProcess 的用户模式部分进行一些设置,而不仅仅是在内核模式下创建进程对象。

您在这里需要一些用户模式代码 - 服务、桌面应用程序等,以启动您的用户模式应用程序。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文