Vista-凭据提供程序-模拟远程连接以获取远程物理设备 [英] Vista - Credential provider - Impersonate a remote connection to get remote physical device

查看:66
本文介绍了Vista-凭据提供程序-模拟远程连接以获取远程物理设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我在模拟远程会话时遇到问题.

这就是我所拥有的(使用C ++):

我具有监听某些物理设备以打开/关闭会话的服务=>我使用凭据提供程序来管理所有事件.

对于每个连接的会话,我创建一个线程,该线程将监听物理设备并管理要执行的操作(登录/注销会话).
如您所知,远程计算机可以连接到我的计算机,因此我需要模拟远程会话以侦听远程计算机的物理设备.

这是我的问题,我没有任何问题通过在打开远程会话时(通过使用WTSQueryUserToken作为远程会话ID)来模拟用户,但是当该会话尚未登录时,用户会遇到麻烦,因此,在启动我的凭据时,我会遇到麻烦-> WTSQueryUserToken向我发送错误 ERROR_NO_TOKEN,这意味着没有用户登录.实际上,这是完全正确的,但是我仍然需要模拟远程会话以侦听设备.具体来说,我需要在会话注销和登录时监听设备,而该问题仅适用于要在我的计算机上使用RDP的远程计算机.

有人知道我该怎么做吗?我尝试查询具有许多功能(WTSQueryUserToken,OpenProcessToken等)的令牌,但由于未记录会话而无法正常工作.

另一个测试有效,所以我认为我的问题可能是已解决:
我试图启动直接在我的凭据提供程序中侦听物理设备的线程,并且该线程有效(线程正在侦听远程设备).

非常感谢,
Arnaud.

Hello,

I having an issue to impersonate a remote session.

This is what I have (using C++):

I have a service which listen some physical devices to open/close a session => I use my credential provider to manage all events.

For each connected session, I create a thread which will listen the physical device and manage the action to do (logon / logoff the session).
As you know, a remote computer can connect to my computer, so I need to impersonate the remote session to listen the physical device of the remote computer.

This is my issue, I do not have any trouble by impersonating a user when the remote session is opened (by using WTSQueryUserToken for the remote session ID) but when the session is not logged yet, so when my credential is launched, I have a trouble -> The WTSQueryUserToken send me the error ERROR_NO_TOKEN, which means that no user is logged. Actually this is completely right, but I still need to impersonate the remote session to listen the devices. Concretely, I need to listen the device when the session is logoff and logon, and the issue is only for remote computer which want to use RDP on my computer.

Does anybody know how I could do that ? I've tried to query a token with many function (WTSQueryUserToken, OpenProcessToken, ...) but it's not working because the session is not logged.

Another test worked so I think that my issue can be resolved:
I've tried to start the thread which listen the physical device directly in my credential provider and it worked (the thread was listening the remote device). The remote context was successfully loaded and no one user was logged, which function can do that ?

Many thanks,
Arnaud.

推荐答案

嗨Arnaud,

我建议在microsoft.public.windows.vista.security 讨论小组,它的含义比这里更明确.

,谢谢,
韦斯利
Hi Arnaud,

I would suggest posting Vista Credential Provider question at microsoft.public.windows.vista.security discussion group, it's more specified than here.

Thanks,
Wesley


这篇关于Vista-凭据提供程序-模拟远程连接以获取远程物理设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆