![在 Windows 容器中连接到 tightVNC](https://linux22.com/image/742705/%E5%9C%A8%20Windows%20%E5%AE%B9%E5%99%A8%E4%B8%AD%E8%BF%9E%E6%8E%A5%E5%88%B0%20tightVNC.png)
网上有很多关于在 Linux 容器中使用 VNC 的资源,但我找不到适用于 Windows 容器的资源,所以我想我可以尝试一下。
我可以启动 tightVNC 服务器(禁用身份验证),并且 5900 和 5800 的监听端口出现在容器中。但是,当客户端查看器尝试建立连接时,我得到的最好结果是 -
因此我在 tightVNC 服务器上启用了 9 级日志记录,这里是传入连接开始的日志部分。
[ 1808/ 1812] 2019-09-15 09:39:13:181 + Incoming rfb connection from
192.168.1.220 to port 61860
[ 1808/ 1812] 2019-09-15 09:39:13:181 ! Set socket idle timeout, 0 ms
[ 1808/ 1812] 2019-09-15 09:39:13:181 ! Client #0 connected
[ 1808/ 1472] 2019-09-15 09:39:13:182 - Entering RFB initialization phase 1
[ 1808/ 1472] 2019-09-15 09:39:13:183 RFB initialization phase 1 completed
[ 1808/ 1472] 2019-09-15 09:39:13:183 Shared flag = 0
[ 1808/ 1472] 2019-09-15 09:39:13:183 Initial view-only state = 0
[ 1808/ 1472] 2019-09-15 09:39:13:183 Authenticated with view-only password = 0
[ 1808/ 1472] 2019-09-15 09:39:13:183 - Creating DesktopWinImpl
[ 1808/ 1472] 2019-09-15 09:39:13:184 The Aero is Off
[ 1808/ 1472] 2019-09-15 09:39:13:185 The console desktop has 0 displays
[ 1808/ 1472] 2019-09-15 09:39:13:185 - D3D driver usage is allowed, try to start it...
[ 1808/ 1508] 2019-09-15 09:39:13:186 Creating of D3D11Device
[ 1808/ 1508] 2019-09-15 09:39:13:187 Creating of (0) driverType device
[ 1808/ 1508] 2019-09-15 09:39:13:193 D3D11CreateDevice function was failed with code error = (-2005270524l)
[ 1808/ 1508] 2019-09-15 09:39:13:194 ! Catched Exception in the Win8ScreenDriverImpl::execute() function: D3D11CreateDe
vice function was failed with code error = (-2005270524l). The exception will consider as critical
[ 1808/ 1508] 2019-09-15 09:39:13:194 ! Win8ScreenDriverImpl has an invalid state. The invalid state can be a part of sc
reen propery changes. An update signal will be generated as a screen size changed signal.
[ 1808/ 1508] 2019-09-15 09:39:13:194 - update detected
[ 1808/ 1508] 2019-09-15 09:39:13:194 Destroy Win8DeskDuplicationThreads
[ 1808/ 1472] 2019-09-15 09:39:13:195 ! The Win8 duplication api can't be used: Win8ScreenDriverImpl can't be successful
ly initialized
[ 1808/ 1472] 2019-09-15 09:39:13:195 - Mirror driver usage is allowed, try to start it...
[ 1808/ 1472] 2019-09-15 09:39:13:195 - Searching for Mirage Driver ...
[ 1808/ 1472] 2019-09-15 09:39:13:197 ! The mirror driver factory has failed: Can't find Mirage Driver!
[ 1808/ 1472] 2019-09-15 09:39:13:197 - Using the standart screen driver
[ 1808/ 1472] 2019-09-15 09:39:13:201 - update detected
[ 1808/ 1472] 2019-09-15 09:39:13:201 Prepare to inject the key event: vkCode = 18, release = 1, extended = 0
[ 1808/ 1472] 2019-09-15 09:39:13:201 The modifier states before: m_controlIsPressed = 0; m_menuIsPressed = 0; m_delet
eIsPressed = 0; m_shiftIsPressed = 0; m_winIsPressed = 0;
[ 1808/ 1472] 2019-09-15 09:39:13:201 The modifier states after: m_controlIsPressed = 0; m_menuIsPressed = 0; m_delete
IsPressed = 0; m_shiftIsPressed = 0; m_winIsPressed = 0;
[ 1808/ 1776] 2019-09-15 09:39:13:201 - mouse detector thread id = 1776
[ 1808/ 1776] 2019-09-15 09:39:13:201 - update detected
[ 1808/ 372] 2019-09-15 09:39:13:201 - mouse shape detector thread id = 372
[ 1808/ 608] 2019-09-15 09:39:13:201 - poller thread id = 608
[ 1808/ 608] 2019-09-15 09:39:13:201 - grabbing screen for polling
[ 1808/ 608] 2019-09-15 09:39:13:201 - end of grabbing screen for polling
[ 1808/ 1472] 2019-09-15 09:39:13:201 ! exception during DesktopWinImpl creaion: Access is denied (error code 5)
[ 1808/ 1088] 2019-09-15 09:39:13:201 - console poller thread id = 1088
[ 1808/ 1156] 2019-09-15 09:39:13:202 - Hooks update detector thread id = 1156
[ 1808/ 1156] 2019-09-15 09:39:13:202 - Try allow to receive the 0 windows message
[ 1808/ 1156] 2019-09-15 09:39:13:202 - user32.dll successfully loaded.
[ 1808/ 1156] 2019-09-15 09:39:13:202 - The ChangeWindowMessageFilterEx() function successfully found.
[ 1808/ 1156] 2019-09-15 09:39:13:202 ! Can't allow to receive the 0 windows message by the ChangeWindowMessageFilterEx(
) function. (system error: Invalid window handle (error code 1400))
[ 1808/ 1156] 2019-09-15 09:39:13:202 - Hooks update detector has been terminated.
[ 1808/ 1164] 2019-09-15 09:39:13:205 - update detected
[ 1808/ 1472] 2019-09-15 09:39:13:208 ! Error during RFB initialization: Access is denied (error code 5)
[ 1808/ 1472] 2019-09-15 09:39:13:208 ! Connection will be closed: Access is denied (error code 5)
[ 1808/ 1472] 2019-09-15 09:39:13:208 + Connection from 192.168.1.220 has been closed for client #0
[ 1808/ 1792] 2019-09-15 09:39:13:209 + Connection from 192.168.1.220 has been closed for client #0
mcr.microsoft.com/windows/servercore:ltsc2019
我已经在和基础图像上尝试了这个mcr.microsoft.com/windows:1903
,并且都产生了相同的客户端消息和类似的日志。
我试过了
- 在默认的 ContainerAdministrator 帐户下运行 VNC 服务器
- 创建具有管理员成员资格的新用户帐户,并在该帐户下运行 VNC
--isolation process --device class/5B45201D-F2F2-4F3B-85BB-30FF1F953599
从这里- docker
--gpus all
run 选项(猜测)
但迄今为止,所有黑客攻击均无果。
我不知道这是否可行,但是查看 VNC 日志后,您有什么建议/想法可以尝试/破解吗?关于 RFB init access id 被拒绝的原因有什么建议吗?