在 C# 中调用 TerminateProcess 时出错
我发现某些程序可以挂接 TerminateProcess API,这样您就无法实际使用任何调用该 API 的代码。还有什么其他方法可以使用 C# 杀死这样的进程?类似于高级过程操纵器的东西。
I found out that some programs can hook the TerminateProcess API such that you cannot actually use any piece of code that calls the API. What other way can one kill such a process using C#? Something similar to advanced process manipulator.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你可以绕过这个钩子。你知道,获取dll的加载地址,在导出表中查找函数,然后直接调用它。
或者,您可以编写一个设备驱动程序,从操作系统进程列表中删除该进程。这将阻止它被安排。
更严重的是,请考虑以下事实:.NET 不太适合防病毒软件开发。您必须经常使用较低级别的软件,因此我认为 .NET 没有什么好处。它可以用作 AV 核心的前端,但这就是我使用它的全部目的。
You can just bypass the hook. You know, acquire the load address of the dll, look up the function in the exports table, and invoke it directly.
Alternatively, you could write a device driver that removes the process from the OS list of processes. This will prevent it from being scheduled.
On a more serious note, consider the fact that .NET is not well-suited for antivirus software development. You'd have to step into lower levels of software so often that I don't think .NET would be beneficial. It could serve as a front-end for an AV core, but that's all I would use it for.