-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vnc encrypt -SecurityTypes=VeNCrypt,TLSVnc #1230
Comments
I'm afraid we do not support any VNC encryption. Right now the recommended solution is to use https to the WebSocket proxy, and then make sure the connection between the WebSocket proxy and VNC server is secured some other way (e.g. by having them on the same machine). I don't think this will improve anytime soon as the browsers don't give access to TLS code from JavaScript, and it will probably be very slow in pure JavaScript. |
The webproxy uproach will secure the data channel between client browser and the server, but the vnc server port by itself independently is still vulnerable if the hacker comes to know the server machine name and vnc port number. The IT team run tests on each port independently and flag if the data from that port is not encrypted.
Sorry for asking too many questions in a single thread. noVNC had been a critical application in our project evolution so far and we want to get through this security concern with a clean solution. |
Unencrypted doesn't mean it's easier for a random attacker to get in. Encryption is there to protect against eavesdropping. So if the network is otherwise secure against eavesdropping, then encryption doesn't really add any extra security. But you can always configure a firewall to only allow connections to the VNC server from the WebSocket proxy.
Not that I know of. noVNC doesn't support any type of VNC encryption. A more advanced WebSocket proxy might be able to do something, but I'm not aware of any such proxy.
The browser obviously has a TLS client engine since it can use https. But that engine is not available from JavaScript. So we cannot write code in noVNC that uses that TLS engine to talk to the VNC server.
The only feasible way is to get a TLS library written in JavaScript and hook that up to noVNC. I'd be cautious about this approach though as writing a secure TLS library is hard. Adding a TLS library with security issues might cause more problems than running unencrypted. |
For reference, how we solve this in ThinLinc is to have the proxy and the VNC server on the same machine. At that point there is no network and no need for protection against eavesdropping. I'm not sure how OpenStack does it. @DirectXMan12, any insight? |
IIRC (it's been a few years since I worked on OpenStack at this point), the plan (which I had partially implemented) was a kind-of mitm proxy that set up the security by doing the initial handshake with security to the server, then faking a no-security handshake based on that with the client. After that, it would strip the security and proceed from there. |
Thanks for the inputs. One option we thought of is to block the access to VNC port from external world, so that VNC is accessed only through websockify running on the same machine. To acheive this we used -localhost option of xVNC while starting vncserver. This option disables access to VNC from remote machines and allows access from that machine only. Do you see any security loopholes in this approach. |
One quick question on your input "But you can always configure a firewall to only allow connections to the VNC server from the WebSocket proxy." |
That should protect you from eavesdropping, yes.
Assuming you know the IP address of the WebSocket proxy, simply configure your firewall to reject any other IP address trying to connect to the VNC port. This would force an attacker to spoof the IP address, which may be difficult or impossible depending on the network layout. Exactly how you do this depends on your firewall, so you'll have to check its documentation. |
What is the supported option for |
here's the proxy code (I'm using
|
I'm afraid debugging your WebSocket proxy is about outside of our scope. You also seem to be using RealVNC, which is something I would recommend against during testing as it is closed and more difficult for the open community to help you with. Still, the initial issue with VeNCrypt is as resolved as it will ever be, so I'll go ahead and close this issue. |
Describe the bug
We had been using novnc for our project with -ssl-only option
Recently we had been asked to encrypt vnc traffic using -SecurityTypes=VeNCrypt,TLSVnc with the vnc server. We are using tigervnc 1.9 server.
When we enabled tiger vnc server with above option, novnc started to complaint "unsupported security types (19,19)".
Is -SecurityTypes=VeNCrypt,TLSVnc supported?
If not is there a workaround suggested?
To Reproduce
Start vncserver with -SecurityTypes=VeNCrypt,TLSVnc option like:
$> tigervnc-1.9.0.x86_64/usr/bin/vncserver -SecurityTypes=VeNCrypt,VncAuth
vnc server started on display 1
$> noVNC/utils/launch.sh --vnc localhost:5901 --cert novnc.pem --ssl-only --listen 6103
Open the suggested url in any browser
Expected behavior
The vncserver desktop should appear on browser.
Screenshots
Client (please complete the following information):
Chrome, Firefox
Server (please complete the following information):
The text was updated successfully, but these errors were encountered: