绕过 Windows Server 2008 中的会话 0 隔离——成功,但仍然不可见
我基本上按原样使用位于此处的代码来启动进程。这段代码在 Vista/7 中完美运行——如果我使用 System.Diagnostics.Process.Start() 启动一个进程,我会看到它启动,但不可见,因为它位于会话 0 中。使用此代码,我看到进程在会话 1 中启动(与我在 Vista/7 中手动启动程序的同一会话)。
现在,在 Server 2008 中,当我手动启动程序时,它会打开到会话 2。当我不使用此代码时,我看到该进程仍然启动到会话 0。当我使用此代码时,它会启动到会话 1 --但不可见。据推测,这是因为它不是在与我相同的会话中启动的,因此存在于其他地方的“不可见”桌面上。
以前有人遇到过这个问题吗?该博客似乎比较受欢迎,所以我很难相信这个问题还没有得到解决。我正在使用的服务器是64位架构,我的win 7机器是32位。我认为这没有什么区别,博客表明该解决方案适用于两种架构。
I am using the code located here basically as-is to start a process. This code works flawlessly in Vista/7 -- If I start a process using System.Diagnostics.Process.Start()
I see that it starts, but is not visible because it is located in Session 0. Using this code, I see the process start in Session 1 (the same session I start programs in manually in Vista/7).
Now, in Server 2008, when I start a program manually it opens up into Session 2. When I do not use this code, I see the process still start into Session 0. When I use this code, it starts into Session 1 -- but is not visible. Presumably this is because it is not started in the same session as I, and thus is existing on an 'invisible' desktop elsewhere.
Has anyone encountered this problem before? The blog seems relatively popular, so I am hard-pressed to believe that this issue hasn't been addressed already. The server I am working on is 64-bit architecture, my win 7 machine is 32-bit. I don't think that makes a difference though, the blog indicates that the solution works on both architectures.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您尝试通过远程桌面绕过 UAC,则需要使用 ID 覆盖。原因是 Microsoft API 方法
WTSGetActiveConsoleSessionId
在使用远程桌面时无法提供正确的信息:因此,要绕过 Vista/Win7/2k8 UAC,您只需使用基本的 Ping 功能即可 - 它将在 LOCAL SYSTEM 下启动进程,并使用用户可见的正确 SID。
如果您发现这种情况没有发生,您可以进入进程管理器,检查 SID,并使用 ping w/ userIDOverride 来指定正确的 SID。
You will need to use the ID override if you are attempting to bypass UAC through Remote Desktop. The reason for this is because the Microsoft API method
WTSGetActiveConsoleSessionId
fails to provide correct information when using Remote Desktop:So, to bypass Vista/Win7/2k8 UAC you can just use the basic Ping function -- it will start the process under LOCAL SYSTEM with the correct SID to be visible by the user.
If you notice this not occurring you can go into process manager, inspect the SID, and use ping w/
userIDOverride
to specify the correct SID.