如何创建在任务管理器或服务列表中不可见的进程
可能的重复:
从任务管理器中隐藏 C# 程序?
我需要创建一个用户不应该能够使用任务管理器或其他方法终止企业级活动监视器进程。也许这应该是一个隐藏的过程。这可能吗?有什么解决方法吗?我更喜欢使用 C#
,然后是 C++
(使用 Visual C++ 编译器)。
谢谢所以
Possible Duplicate:
Hide a C# program from the task manager?
I need to create an enterprise level activity monitor process in which the user should not be able to kill using the Task Manager or some other method. Perhaps it should be a hidden process. Is this possible? Are there any workarounds? I prefer to use C#
then C++
(with the Visual C++ compiler).
Thanks SO
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
相关:
从任务管理器中隐藏 C# 程序?
https://stackoverflow.com/questions/759466/is -it-possible-to-hide-console-c-application-from-task-manager
简短的答案是:不,你不能(合法地)从任务管理器中隐藏它,除非你用 Windows 包装它服务。有多种方法可以防止应用程序关闭。
Related:
Hide a C# program from the task manager?
https://stackoverflow.com/questions/759466/is-it-possible-to-hide-console-c-application-from-task-manager
Short answer is: no, you can't (legally) hide it from Task manager, unless you wrap it with a Windows service. There are various ways of preventing your application from closing.
关于“我如何防止用户执行X”这个主题,答案是安全。如果您希望用户拥有对其计算机的完全访问权限,那么您就无法限制他们。如果您想限制用户,请相应地更改您的安全策略。
“但是我的员工不会喜欢我们不信任他们拥有完全管理权限的想法” - 好吧,老实说,你不信任他们;这就是你实施这个的原因。您不希望员工欺骗您,他们也应该对您抱有同样的期望。
除了其他人所说的之外,一个更简单的解决方案是仅创建两个进程 - 一个真实进程和一个“哨兵”。基本上,每隔 100 毫秒左右,只需快速检查一下其他进程是否处于活动状态且运行状况良好,如果不是,则启动它。解决这个问题很容易(例如使用
kill.exe
),但考虑到您的用户是完全管理员,其他所有解决方案也是如此。真正防止他们杀死您的应用程序的合法解决方案是通过典型的 Windows 安全性来限制访问 - 限制用户对进程的访问。不是通过廉价的隐藏和混淆。
On the topic of "how do i prevent users from doing X", the answer is security. If you want users to have full access to their machines, then you can't restrict them. If you want to restrict users, then change your security policy accordingly.
"But then my employees won't like the idea that we don't trust them with full admin rights" - well, honestly, you don't trust them; that's why you are implementing this. You don't want employees tricking you, and they should expect the same of you.
In addition to what others say, One more simple solution is to just create two processes - one REAL process, and one "sentinel". Basically, every 100ms or so, just do a quick check to see that the other process is alive and healthy, and if it's not, launch it. It's easy to get around this (by using
kill.exe
for example), but so is every other solution considering your users are full administrators.The legitimate solution to really prevent them from killing your app is to restrict access via typical Windows security -- restrict user access to the process. Not by cheap hiding and obfuscation.