Windows 7 x64:低 IL 进程 msdn 示例不起作用
我想从中等完整性级别的进程创建低完整性级别的进程。 我找到了 msdn 示例:设计应用程序以低完整性级别运行
但它在我的系统上不起作用。进程创建成功,但出现消息框
“应用程序无法正确初始化(0xC0000022 -- STATUS_ACCESS_DENIED) ...” 出现了。有人遇到同样的问题吗?
I want to create process with low integrity level from process with medium integrity level.
I found msdn example: Designing Applications to Run at a Low Integrity Level
But it does not work on my system. Process is created successfully, but message box
"Alpplication failed to initialized properly(0xC0000022 -- STATUS_ACCESS_DENIED) ..."
is appeared. Did anybody meet the same problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我也遇到了这个。示例中使用的 SID 不正确。它应该是“S-1-16-4096”,而不是“S-1-16-1024”。
I ran into this too. The SID used in the example is incorrect. It should be "S-1-16-4096", not "S-1-16-1024".
我对@dyared 的答案投了赞成票,因为它帮助我找到了完整的答案。我首先要指出的是,我并不专门研究这个问题,这只是我的发现的总结。
看来 MSDN 示例不适用于指定的 SID 字符串,因为它指定的完整性级别太低。来自Chromium 的源代码,示例中使用的
S-1-16-1024
SID 介于INTEGRITY_LEVEL_BELOW_LOW
和INTEGRITY_LEVEL_UNTRUSTED
:此外,@dyared 建议的 SID
S-1-16-4096
似乎也在启动 Internet Explorer 时使用保护模式,如 在 Windows Vista 上以保护模式创建进程 MSDN 博客上的文章。然而,因为足以让示例正常工作并不意味着它对于每种情况都足够严格,并且必须在了解其含义的情况下选择适当的完整性级别。
I have upvoted @dyared's answer because it helped me find the complete answer. I should mention first that I am not specialized in this matter and this is only a summary of my findings.
It seems that the MSDN example does not work with the specified SID string because it specifies an integrity level that is too low. From the Chromium's source code, the
S-1-16-1024
SID used in the example is betweenINTEGRITY_LEVEL_BELOW_LOW
andINTEGRITY_LEVEL_UNTRUSTED
:Furthermore, it seems that the SID
S-1-16-4096
, suggested by @dyared, is also used when launching Internet Explorer in protected mode, as claimed in Creating a Process in Protected Mode on Windows Vista article on MSDN Blogs.However, because it was enough to get the example working does not mean it is strict enough for every situation and choosing the appropriate integrity level must be made understanding its implications.